ok...

please test

private boolean shouldButtonBeVisible = false;

set / is  method

and then use:

rendered="#{UserBean.shouldButtonBeVisible}"

Csík Norbert wrote:
yes. the only difference between the two cases is the existence of the rendered property.

Slawek írta:

sure that in case 1 your button is inside somme form?:P
thats my favorite bug;)

slawek

Yes I've tried, but nothing happend. The button is still does nothing. The action method is uncalled.

Heath Borders írta:

Yeah, that's what I meant.


On Thu, 31 Mar 2005 20:03:37 +0200, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:

Have you tried somthing like

rendered="#{UserBean.shouldButtonBeVisible}"

?

That was that what Heath was meaning... I guess

Csík Norbert wrote:

Sorry, maybe I wasn't clear enough. When the rendered property is set as
in the example below, the button renders correctly. It is on the page
when the condition is true. The problem is that, when I click on the
button (at this time the condition is true, 'cause I can click on the
button) nothing happens.


CASE 1:

<h:commandButton
     value="#{globalBundle.deleteButtonLabel}"
     action="#{UserBean.delete}"
     rendered="#{UserBean.userCode != ''}"
/>

The button is only visible when the condition is true, but when I click
on it, nothing happens (the action isn't called). This is my problem.


CASE 2:

<h:commandButton
     value="#{globalBundle.deleteButtonLabel}"
     action="#{UserBean.delete}"
/>

The button is always visible, and the action is called when I click on
the button.

Reply via email to