Trees' Cookies
Hello!
Please I need a solution to this:
I have a page with a Tree (with the id=tree1) in
/sectionA/Page1.jsp
where sectionA is the name of the folder that contains Page1.jsp
and I have another page in
/sectionB/Page2.jsp
where I set some values and I return to Page1.jsp with an object in
RequestBean1.
The Tree in Page1.jsp has 4 TreeNodes.
When I click on one of the Nodes the cookie "form1:tree1-hi" is updated
and its value is set to "form1:tree1:treeNodeName", where treeNodeName
is the id of the selected node.
When I go to Page2.jsp a new cookie with the same name and
value is created in /sectionB/.
I return to Page1.jsp with the object and I add it as a new node.
And now, when I select a different node the cookie in /sectionB/ is updated,
not the one in /sectionA/, that is the one that creator uses to get the
selected one.... So no matter what node I select it will use the selected
node id saved in the cookie in /sectionA/.
So.... how can I save the selected treeNode in the right cookie?
Thanks in advance!
mono.
[1169 byte] By [
mono] at [2007-11-26 11:42:01]

# 2
People! Found the solution... partial, but it is a solution
Open the tree.js inside the jar file of the theme you are using
and change in the function setCookieValue() the following:
document.cookie = cookieName + "=" + val;
for
document.cookie = cookieName + "=" + val + "; path=/";
it will write all the cookies of the trees in the root directory of
the application. All you have to do is not repeat the name of the
tree components you use in your app.
mono
[thx to JP]
mono at 2007-7-7 11:48:29 >

# 3
hi,
I unpack the tdefaultheme.jar file using jar, edit tree.js as you suggested, repack the jar file as then replace it in the ../modules/ext directory. i then update the manifest file with the correct one.
but alas, the system throws an exception:
Message ID: WebModule[/mps]Invalid theme configuration file for theme defaulttheme. ThemeFactory could not locate resource bundle at com.sun.rave.web.ui.defaulttheme.messages.messages.
com.sun.rave.web.ui.theme.ThemeConfigurationException
Complete Message
Invalid theme configuration file for theme defaulttheme.ThemeFactory could not locate resource bundle at com.sun.rave.web.ui.defaulttheme.messages.messages.at com.sun.rave.web.ui.theme.ThemeFactory.createResourceBundle(ThemeFactory.java:4 66)at com.sun.rave.web.ui.theme.ThemeFactory.createTheme(ThemeFactory.java:401)at com.sun.rave.web.ui.theme.ThemeFactory.createThemeManager(ThemeFactory.java:313 )at com.sun.rave.web.ui.theme.ThemeFactory.createThemeManager(ThemeFactory.java:235 )at com.sun.rave.web.ui.theme.ThemeFactory.initializeThemeManager(ThemeFactory.java :198)at com.sun.rave.web.ui.util.ThemeUtilities.getTheme(ThemeUtilities.java:64)at com.sun.rave.web.ui.renderer.HeadRenderer.renderAttributes(HeadRenderer.java:11 2)at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeBegin(AbstractRenderer.java :148)at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271 )at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.ja va:285)at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:13 3)at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilte rChain.java:397)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:303)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:184)at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:216)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:184)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 276)at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:240)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 179)at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java: 120)at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:13 7)at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorT ask.java:667)at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(Proces sorTask.java:574)at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:844)at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask .java:287)at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
What am i doing wrong? Can you send the modified file to cmwange@yahoo.com?
Frustrated man.
# 4
Hello... sorry didn't see your question before.
"repack the jar file as then replace it in the ../modules/ext directory"
That is some packaging error, because you can change almost everything
in the content of the files included in the theme.
The difference is that I made a new theme. I did not change the default theme.
You should try making a new theme (copying the default) and change that one.
--
mono
mono at 2007-7-7 11:48:29 >
