You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2005/03/09 21:57:36 UTC

Anyone have trouble with commandLink and navigation

I'm having some trouble with commandLink.  My navigation rules are
only working properly the second time I click the link.  This is
inside of tree2 but maybe somebody has had this problem inside
dataTable or one of their custom components?

Everything works properly on the second click.  Any ideas on why this
might be?  I tested action method and action listener and problem is
the same.

TIA,
sean

Re: Anyone have trouble with commandLink and navigation

Posted by Sean Schofield <se...@gmail.com>.
BTW,

When I use the back button and click the link again it does not work. 
(As has been reported earlier.  I know this will affect my users here
at work so I will investigate the reported differences between RI and
MyFaces shortly.)

sean


On Wed, 9 Mar 2005 18:13:47 -0500, Sean Schofield
<se...@gmail.com> wrote:
> OK I found and fixed the problem.  Basically there was a problem with
> the decode as Heath and I suspected.  The problem was specific to
> tree2.  I had a "short-cut" in my processDecodes statement where I
> wasn't processing decodes for nodes that were not expanded.  Well long
> story short that does not work.
> 
> By trying to save the computer some time and aggravation, I caused
> myself a days worth of time and aggravation :-(
> 
> On Wed, 9 Mar 2005 16:24:31 -0500, Sean Schofield
> <se...@gmail.com> wrote:
> > Yeah but I am not hitting the back button.  Still that is a good
> > point.  I may have to try with the reference implementation (a slight
> > pain the way I have things set up now.)  Interestingly though
> > commandLink works fine in my simple example.  That is why I suspected
> > something wrong with my tree.
> >
> > sean
> >
> >
> > On Wed, 9 Mar 2005 15:20:26 -0600, Jonathan Eric Miller
> > <je...@uchicago.edu> wrote:
> > > This sounds like the same problem that I have when using the Web browser
> > > back button. i.e. if I click the Web browser back button to return to the
> > > previous page and then click on a h:commandButton, it redisplays the same
> > > screen, then, if I click it again, it does what it's supposed to. This is
> > > different than the behaviour exibited by Sun's RI.
> > >
> > > Jon
> > >
> > > ----- Original Message -----
> > > From: "Sean Schofield" <se...@gmail.com>
> > > To: "MyFaces Discussion" <my...@incubator.apache.org>
> > > Sent: Wednesday, March 09, 2005 2:57 PM
> > > Subject: Anyone have trouble with commandLink and navigation
> > >
> > > > I'm having some trouble with commandLink.  My navigation rules are
> > > > only working properly the second time I click the link.  This is
> > > > inside of tree2 but maybe somebody has had this problem inside
> > > > dataTable or one of their custom components?
> > > >
> > > > Everything works properly on the second click.  Any ideas on why this
> > > > might be?  I tested action method and action listener and problem is
> > > > the same.
> > > >
> > > > TIA,
> > > > sean
> > > >
> > >
> > >
> >
>

Re: Anyone have trouble with commandLink and navigation

Posted by Sean Schofield <se...@gmail.com>.
OK I found and fixed the problem.  Basically there was a problem with
the decode as Heath and I suspected.  The problem was specific to
tree2.  I had a "short-cut" in my processDecodes statement where I
wasn't processing decodes for nodes that were not expanded.  Well long
story short that does not work.

By trying to save the computer some time and aggravation, I caused
myself a days worth of time and aggravation :-(

On Wed, 9 Mar 2005 16:24:31 -0500, Sean Schofield
<se...@gmail.com> wrote:
> Yeah but I am not hitting the back button.  Still that is a good
> point.  I may have to try with the reference implementation (a slight
> pain the way I have things set up now.)  Interestingly though
> commandLink works fine in my simple example.  That is why I suspected
> something wrong with my tree.
> 
> sean
> 
> 
> On Wed, 9 Mar 2005 15:20:26 -0600, Jonathan Eric Miller
> <je...@uchicago.edu> wrote:
> > This sounds like the same problem that I have when using the Web browser
> > back button. i.e. if I click the Web browser back button to return to the
> > previous page and then click on a h:commandButton, it redisplays the same
> > screen, then, if I click it again, it does what it's supposed to. This is
> > different than the behaviour exibited by Sun's RI.
> >
> > Jon
> >
> > ----- Original Message -----
> > From: "Sean Schofield" <se...@gmail.com>
> > To: "MyFaces Discussion" <my...@incubator.apache.org>
> > Sent: Wednesday, March 09, 2005 2:57 PM
> > Subject: Anyone have trouble with commandLink and navigation
> >
> > > I'm having some trouble with commandLink.  My navigation rules are
> > > only working properly the second time I click the link.  This is
> > > inside of tree2 but maybe somebody has had this problem inside
> > > dataTable or one of their custom components?
> > >
> > > Everything works properly on the second click.  Any ideas on why this
> > > might be?  I tested action method and action listener and problem is
> > > the same.
> > >
> > > TIA,
> > > sean
> > >
> >
> >
>

Re: Anyone have trouble with commandLink and navigation

Posted by Jonathan Eric Miller <je...@uchicago.edu>.
This sounds like the same problem that I have when using the Web browser 
back button. i.e. if I click the Web browser back button to return to the 
previous page and then click on a h:commandButton, it redisplays the same 
screen, then, if I click it again, it does what it's supposed to. This is 
different than the behaviour exibited by Sun's RI.

Jon

----- Original Message ----- 
From: "Sean Schofield" <se...@gmail.com>
To: "MyFaces Discussion" <my...@incubator.apache.org>
Sent: Wednesday, March 09, 2005 2:57 PM
Subject: Anyone have trouble with commandLink and navigation


> I'm having some trouble with commandLink.  My navigation rules are
> only working properly the second time I click the link.  This is
> inside of tree2 but maybe somebody has had this problem inside
> dataTable or one of their custom components?
>
> Everything works properly on the second click.  Any ideas on why this
> might be?  I tested action method and action listener and problem is
> the same.
>
> TIA,
> sean
> 


Re: Anyone have trouble with commandLink and navigation

Posted by Sean Schofield <se...@gmail.com>.
Heath, Thanks for the tip.  That is actually what I am actually
looking into this right now with my IDE debugger.

What's odd is that it works ok the second time.  That seems weird to
me.  I would expect it to work every time or not at all.  That makes
me suspect there might be an issue with my component tree.

sean


On Wed, 9 Mar 2005 15:07:19 -0600, Heath Borders
<he...@gmail.com> wrote:
> Well, most likely, the your commandLink is not properly decoding
> itself.  My guess is that for some reason its not putting its client
> id into its parent form's hidden input for commandLinks.
> 
> 
> On Wed, 9 Mar 2005 15:57:36 -0500, Sean Schofield
> <se...@gmail.com> wrote:
> > I'm having some trouble with commandLink.  My navigation rules are
> > only working properly the second time I click the link.  This is
> > inside of tree2 but maybe somebody has had this problem inside
> > dataTable or one of their custom components?
> >
> > Everything works properly on the second click.  Any ideas on why this
> > might be?  I tested action method and action listener and problem is
> > the same.
> >
> > TIA,
> > sean
> >
> 
> --
> -Heath Borders-Wing
> hborders@mail.win.org
>

Re: Anyone have trouble with commandLink and navigation

Posted by Heath Borders <he...@gmail.com>.
Well, most likely, the your commandLink is not properly decoding
itself.  My guess is that for some reason its not putting its client
id into its parent form's hidden input for commandLinks.


On Wed, 9 Mar 2005 15:57:36 -0500, Sean Schofield
<se...@gmail.com> wrote:
> I'm having some trouble with commandLink.  My navigation rules are
> only working properly the second time I click the link.  This is
> inside of tree2 but maybe somebody has had this problem inside
> dataTable or one of their custom components?
> 
> Everything works properly on the second click.  Any ideas on why this
> might be?  I tested action method and action listener and problem is
> the same.
> 
> TIA,
> sean
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org