Backing data lists for UIComponents must persist to the next request.
You can persist just the list instead of the entire bean.  That's
generally how I do it.

There's also a preserveTableModel attribute for t:dataTable that does
something similar, but I don't use it -- I'd rather have the control
that t:saveState gives me.

On 9/21/06, Patrick Dreyer <[EMAIL PROTECTED]> wrote:
I stumbled over an interesting hint from Jeff Bischoff in the maillist:

> Re: Refresh JSF Page
>
> That's a pretty broad topic! If you could be more specific, you might
> get more hints...
>
> See [1] for a neat trick to force updated model values in input components.
>
> [1] http://wiki.apache.org/myfaces/ClearInputComponents

I fear, that I'm forced to save the state (t:saveState) of CategoryBean just to 
force an update of it programmatically in the action method 
CategoryBean:select(). But it can't be that way. I'm sure I passed something 
and there is a neat, straight forward solution.

Beside the clear descriptions of Mike why my problem persists, does anyone have 
an idea how to solve that puzzle?

Patrick

Mike Kienenberger schrieb:
> Is #{subscriptionCategoryBean.subscriptions} request-scoped?  If so,
> try using t:saveState to persist it across a page, or change it to
> session-scoped, or use some other persisting mechanism.
>
>
> On 9/15/06, Patrick Dreyer <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I don't like the prosa form and so:
>> * Tomcat 5.5.17
>> * MyFaces 1.1.3
>> * Tomahawk 1.1.3
>> * Page with two dataList; subscriptionCategories and subscriptions
>> * Links of subscriptionCategories work fine
>> * Links of subscriptions don't work at all; action doesn't get called
>> * Using dataTable for subscriptions doesn't work either
>> * Put each list in a separate form doesn't work either
>> * "Test" link (between the two lists) works as expected; action gets called, 
navigation to other page
>> * Static values in "Test" link and subscriptions only for testing purposes
>>
>> Any ideas? Thanks
>>
>> Patrick
>>
>> Page snippet:
>> <body>
>> <h:messages />
>> <form jsfc="h:form">
>>         <ul id="subscriptionCategories"
>>                         jsfc="t:dataList"
>>                         layout="unorderedList"
>>                         value="#{portalBean.subscriptionCategories}"
>>                         var="subscriptionCategory">
>>                 <li jsfc="h:commandLink" 
action="#{subscriptionCategoryBean.select}">
>>                         <f:param name="id" value="#{subscriptionCategory.id}" 
/>
>>                         #{subscriptionCategory.name}
>>                 </li>
>>         </ul>
>>         <p>
>>         <a jsfc="h:commandLink" action="#{subscriptionBean.select}">
>>                         <f:param name="id" value="1" />
>>                 Test
>>         </a>
>>         </p>
>>         <ul id="subscriptions"
>>                         jsfc="t:dataList"
>>                         layout="unorderedList"
>>                         value="#{subscriptionCategoryBean.subscriptions}"
>>                         var="subscription">
>>                 <li jsfc="h:commandLink" action="#{subscriptionBean.select}">
>>                         <f:param name="id" value="1" />
>>                         #{subscription.title}
>>                 </li>
>>         </ul>
>> </form>
>> </body>
>>
>>
>


Reply via email to