You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by support <ap...@purpleblade.net> on 2006/12/22 09:07:38 UTC
rendered question - command link works then does not
I have a command link that is only rendered if a property is set in the
back end bean. When I click the button it is supposed to add a row to a
database. When the page is first rendered the [Add] button appears, I
enter info into the inputText boxes and click [Add] and the information
gets inserted, however when the page returns, a second add does not work.
When the [Add] button is clicked, it never hits the backend bean at
all. I am quite sure of this. The commandlink has a rendered tag that
determines if the commandlink & img is rendered at all.
Is there any reason it would work the first time but not the second time?
Thanks
Roger
Re: rendered question - command link works then does not
Posted by Mike Kienenberger <mk...@gmail.com>.
The other common situation is that your rendering condition is based
on request-scoped data.
The rendering condition value must remain constant between the
response when the button is rendered, and the next request when the
button is processes.
Ie, if <uicommand rendered="#{bean.condition}">, then bean.condition
must not be request-scoped. (it can be session or application scoped,
or it can be preserved to the next request using t:saveState or
something similar. It can even be recomputed each request so long as
the computation returns the same value on the following request).
On 12/22/06, Volker Weber <we...@googlemail.com> wrote:
> Are you sure there is no validation/conversion error?
>
> This is the most frequently reason fo not invoking actions.
>
> add a h:messages tag to you page ensure this.
>
> Regards,
> Volker
>
>
>
> 2006/12/22, support <ap...@purpleblade.net>:
> > I have a command link that is only rendered if a property is set in the
> > back end bean. When I click the button it is supposed to add a row to a
> > database. When the page is first rendered the [Add] button appears, I
> > enter info into the inputText boxes and click [Add] and the information
> > gets inserted, however when the page returns, a second add does not work.
> >
> > When the [Add] button is clicked, it never hits the backend bean at
> > all. I am quite sure of this. The commandlink has a rendered tag that
> > determines if the commandlink & img is rendered at all.
> >
> > Is there any reason it would work the first time but not the second time?
> >
> > Thanks
> >
> > Roger
> >
>
Re: rendered question - command link works then does not
Posted by Volker Weber <we...@googlemail.com>.
Are you sure there is no validation/conversion error?
This is the most frequently reason fo not invoking actions.
add a h:messages tag to you page ensure this.
Regards,
Volker
2006/12/22, support <ap...@purpleblade.net>:
> I have a command link that is only rendered if a property is set in the
> back end bean. When I click the button it is supposed to add a row to a
> database. When the page is first rendered the [Add] button appears, I
> enter info into the inputText boxes and click [Add] and the information
> gets inserted, however when the page returns, a second add does not work.
>
> When the [Add] button is clicked, it never hits the backend bean at
> all. I am quite sure of this. The commandlink has a rendered tag that
> determines if the commandlink & img is rendered at all.
>
> Is there any reason it would work the first time but not the second time?
>
> Thanks
>
> Roger
>