Hi Guy,
2008/8/3 Guy Bashan <[EMAIL PROTECTED]>:
> Hi,
>
> I am having a weird behavior with commandLink in a datatable:
>
> I want that the command link will be rendered only if a select box of that
> row is checked (it is a select box used for editing the row).
>
> This is the code of the command link:
>
> <h:column>
>
> <f:facet name="header">
>
> <h:outputText value="Action"/>
>
> </f:facet>
>
> <h:commandLink value="Save" action="#{videoList.save}"
> rendered="#{editableVideo.edit}">
>
> <f:param name="videoId" value="#{editableVideo.video.videoId}" />
>
> </h:commandLink>
>
> </h:column>
>
>
>
> When I am pressing the "save" link, the page is posted but no action on the
> server is being activated.
>
> When I remove: rendered="#{editableVideo.edit}", "save" method is being
> called properly.
>
>
>
> Any ideas?
>
> Am I doing something wrong?
What is the value of #{editableVideo.edit} when you press the link?
Your problem looks like the value of
#{editableVideo.edit} changes between rendering and next request (the
save click) from true to false.
Maybe because you uncheck the selectbox before clicking the link?
A action is not executed if the rendered evaluates to false at request
processing time.
>
>
>
> Thanks,
>
> Guy.
Regards,
Volker Weber
--
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de