Hi Udo,
sorry... I forgot the environment information:
MyFaces 1.1.6
Tobago 1.0.24 and 1.0.27
The bean has session scope.
<managed-bean>
<managed-bean-name>tobagoTreeTestBean</managed-bean-name>
<managed-bean-class>TobagoTreeTestBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
I have attached my test bean and the jsp page to this mail.
First I thought that the request always contains the state of the navigation,
but I checked the request parameters (using a servlet filter) and figured out
that the state information will only be sent when I click the navigation tree.
Nevertheless reloading the page (browser reload) collapses the tree when using
parameters and saves the state without using parameters. In both situations
there are no request parameters from the navigation state.
--------------------------------------------
Request parameters using parameters:
--------------------------------------------
Parameters:
param: 123
--------------------------------------------
Request parameters without parameters:
--------------------------------------------
Parameters:
--------------------------------------------
Request parameters when clicking the tree:
--------------------------------------------
Parameters:
_idJsp0::form-action: _idJsp0:nav:Number1
jsf_tree: 5
_idJsp0::action-position: 0px,0px,0px,0px
_idJsp0::context-path: /Tobago
jsf_viewid: /TobagoTreeTest.jsp
_idJsp0::form-clientDimension: 913;700
_idJsp0:nav: ;Home;Number1;
_idJsp0:nav-marker: _idJsp0:nav:Number1
tobago.dummy:
_idJsp0:nav-scrollPosition:
Regards,
Alf
-----Ursprüngliche Nachricht-----
Von: Udo Schnurpfeil <[email protected]>
Gesendet: 17.06.2010 09:59:42
An: MyFaces Discussion <[email protected]>
Betreff: Re: [Tobago] Problem using tc:tree and request parameters
>Hi Alf,
>
>I've some questions:
>Which Tobago version and which JSF implementation and version you are
>using (and which container)?
>In which scope is the managed bean that holds the state?
>
>I don't exactly know what happens, because I've not the sources of you code.
>But I can try some supposition...
>The usual usage of Tobago is to write an application, with one or more
>pages that will be called by clicking on some controls on the page.
>It was a difference of calling the URL and clicking a <tc:button>. The
>click on a button will submit the current expansion state of the tree
>and sends it to the server (via a hidden input field), which manipulates
>the tree state object. When calling the URL (manually) the expansion
>state information is not part of the request. When JSF now restores the
>UIViewRoot and begins to decode the request it clears the expand state
>and tries to apply the new information from the browser (which are not
>available in this case).
>
>It is correct, that you want to provide external links (non faces
>request to faces response)? Are you also use "internal" actions? If not,
>you don't need to save the expansion state for each user. You can try to
>put the tree state in the "none" scope.
>
>Regards,
>
>Udo
>
>Am 15.06.10 15:51, schrieb Alf Felis:
>> Any idea?
>>
>> -------- Original-Nachricht --------
>> Datum: Thu, 03 Jun 2010 13:31:44 +0200
>> Von: "Alf Felis"[
>> An: MyFaces Discussion
>> Betreff: [Tobago] Problem using tc:tree and request parameters
>>
>> Hi all,
>>
>> I have a problem with tc:tree.
>> In my code I expand the tree after creation using the TreeState:
>>
>> state.expand(tree, 1);
>>
>> This works fine till I use a request parameter... e.g.
>>
>> http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp?param=123
>>
>> In this case the first/initial call will show an expanded tree... the second
>> call shows a collapsed tree.
>>
>> -------------------------------------
>> first and second call with parameter:
>> -------------------------------------
>> 1.) Call the URL -> tree expanded
>> 2.) Reload the URL -> tree collapsed
>>
>> -------------------------------------
>> first call with, second without parameter:
>> -------------------------------------
>> 1.) Call the URL -> tree expanded
>> 2.) Call http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp -> tree
>> expanded
>> 3.) any call/reload without parameter -> tree expanded
>>
>> I figured out that the method 'TreeState.clearExpandState()' will be called,
>> but I can't find any hints on that issue.
>>
>>
>> Regards, Alf
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01