[prev in list] [next in list] [prev in thread] [next in thread] 

List:       myfaces-user
Subject:    Re: Bugs with commandLink rendered="..."
From:       Martin Marinschek <martin.marinschek () gmail ! com>
Date:       2005-10-31 10:43:06
Message-ID: 5a99335f0510310243y58547ddfqd4786069fc4f8d00 () mail ! gmail ! com
[Download RAW message or body]

Yes, you are absolutely right.

We are on the right path, though, I think.

And - you would not have got support like this from Microsoft, right?

Plus - if you want to change how things are working, you can. So by
any means, help us to close the gap!

regards,

Martin

On 10/31/05, Yee CN <yeecn@streamyx.com> wrote:
> Martin,
>
> That solved my problems. Thanks very much for you explanation.
>
> I think JSF still need a bit of work. Coming from ASP.NET background I think
> .NET Web Form framework is quite a bit easier to master. I hope JSF or Shale
> will bridge the gap soon.
>
> Regards,
> Yee
>
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> Sent: Monday, 31 October 2005 6:13 PM
> To: MyFaces Discussion; yeecn@streamyx.com
> Subject: Re: Bugs with commandLink rendered="..."
>
> Is userBean a request scoped Bean?
>
> If yes, you'll need to use a session bean instead or use t:saveState
> to save the state of the user bean between requests.
>
> The problem is that the link is rendered, you click on it, the
> lifeCycle is triggered again and now the rendered attribute of the
> link is evaluated to false as the userBean has lost its state - so the
> link is not decoded and the action is not triggered.
>
> regards,
>
> Martin
>
> On 10/31/05, Yee CN <yeecn@streamyx.com> wrote:
> >
> >
> >
> > Hi,
> >
> >
> >
> > I think there are is a bug in commandLink in treating the "rendered"
> > attributes.
> >
> >
> >
> > Below is a demonstration. The jsf page concerned is to have an 'edit' more
> > and a 'browse' mode. When the page is in edit mode the 'Save Changes' and
> > 'Cancel' button will show, else the 'Edit' and 'Back' button will show.
> >
> >
> >
> > The rendering of the buttons are OK, however as it stands the 'Save
> Changes'
> > and 'Cancel' button will not trigger the backing bean action. If I take
> away
> > the rendered="." attributes I will see all 4 buttons, but everything works
> > as expected.
> >
> >
> >
> > -------------------------------------------------------------------------
> >
> >
> >
> > <h:commandLink value="Edit"  action="#{userBean.editUserAction}"
> > rendered="#{!userBean.isEdit}">
> >
> > </h:commandLink>
> >
> > <f:verbatim>&nbsp&nbsp</f:verbatim>
> >
> > <h:commandLink value="Back" action="#{userBean.backAction}"
> > rendered="#{!userBean.isEdit}">
> >
> > </h:commandLink>
> >
> > <h:commandLink value="Save Changes" action="#{userBean.saveAction}"
> > rendered="#{userBean.isEdit}">
> >
> > </h:commandLink>
> >
> > <f:verbatim>&nbsp&nbsp</f:verbatim>
> >
> > <h:commandLink value="Cancel" action="#{userBean.backAction}"
> > rendered="#{userBean.isEdit}">
> >
> > </h:commandLink>
> >
> >
> >
> >
> >
> >
> > Is there a work around for this?
> >
> >
> >
> > Thanks
> >
> >
> >
> > Yee
>
>
> --
>
> http://www.irian.at
> Your JSF powerhouse -
> JSF Trainings in English and German
>
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic