I can kind of see that, except my understanding about the JSF lifecycle was that the first step was supposed to be a "restore view" so that, if, for example, a validation error was detected, all component values would be restored, even if they were of request scope.
I'll have to try this same thing using Sun RI to see if it exhibits the same behavior. Interesting.... - Brendan -----Original Message----- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Monday, August 15, 2005 4:06 PM To: MyFaces Discussion Subject: Re: Using <h:commandLink> inside <t:column> Here's my guess (and it only came to me after your email, not early enough to avoid your pain). The link component doesn't exist or isn't rendered in the component tree because there are no rows in the datatable. The "action handler" throws away actions if the action source isn't rendered or doesn't exist. There's probably some handwaving in this and some minor errors, but it's probably the general idea of why it's not working. -Mike On 8/15/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: > Well, I wouldn't have guessed it, Mike, but, out of desperation, I tried > your suggestion of making the bean have session scope instead of request > scope, and, voila, it worked! It went to the next page fine. > > Now my question is: Is this a bug or a feature? In other words, if I > need a managed bean to populate a table, and that table contains a > commandLink in it to go to another page that does not need the managed > bean, why does the link not work when the bean is declared with request > scope? Why does it bring me back to the original page (which, > obviously, will have an empty table because the bean's data was > released)? > > Any ideas anyone? > > - Brendan > > -----Original Message----- > From: CONNER, BRENDAN (SBCSI) > Sent: Monday, August 15, 2005 2:55 PM > To: 'MyFaces Discussion' > Subject: RE: Using <h:commandLink> inside <t:column> > > > The main problem is that it's not going to the next page; it's > displaying the original page. The next page doesn't need the bean, but > it would be nice to go to the next page. If I copy-paste the > <h:commandLink> to be outside the dataTable, then I get to the next page > fine. But, for some reason, if I click on the same <h:commandLink> from > within the dataTable, the original page gets displayed again with an > empty bean. Usually, this would be a sign that there was an error > encountered (although the component tree should then be restored). But > I can't see that an error was encountered, since <h:messages> doesn't > show anything. Also, I'm sure that the outcome was spelled right, since > copying and pasting it outside of the dataTable works. > > Oh, well, just wondering if someone else had a similar experience. I'll > have to trap the MyFaces conversation in the debugger to see what it > thinks is going on.... > > - Brendan > > -----Original Message----- > From: Mike Kienenberger [mailto:[EMAIL PROTECTED] > Sent: Monday, August 15, 2005 2:29 PM > To: MyFaces Discussion > Subject: Re: Using <h:commandLink> inside <t:column> > > > Does it work if you change your backing bean to session scope? > If so, the solution might be to t:saveState your backing bean. > > Not sure why the link isn't working, but if it depends on the > datatable data, that could be related to the above. > > On 8/15/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: > > Has anyone had any trouble using <h:commandLink> inside <t:column>? > I'm > > still trying to figure out what's going wrong, but the symptom is that > > the page with the table gets displayed fine, and then, when I click on > > the link, the same page gets displayed, but this time with all the > data > > missing. (The backing bean has request scope.) The new page > indicated > > by the link doesn't get displayed. The same link works fine outside > of > > <t:column>. It just seems to fail inside the <t:column>. (BTW, > > <t:column> is specified inside <t:dataTable>.) > > > > - Brendan > > >