I'd take a guess here and say that the Update button isn't firing because the backing bean is instantiated each request. Hence the attribute you're relying on to decide if the Update button should be rendered is also getting reset. It works fine for enabling the Update button because the submit of the Edit button is changing this value and then the Update button is reading the changed value in its rendered attribute. From memory JSF or Trinidad is coded such that the rendered attribute will be checked at each submit and because your newly instantiated bean is saying don't render, it won't bother firing the action because it believes the button isn't actually shown at present.
Hope this helps, Danny On 2/13/07, Mistry, Apurva <[EMAIL PROTECTED]> wrote:
Forgot to mention this.... If I add the bean in session scope in faces-config, the action is called upon. however i required it to be in request scope. Why would it work in session and not request. thanks -----Original Message----- From: Mistry, Apurva [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 11:14 AM To: adffaces-user@incubator.apache.org Subject: Problem with action attribute in jsf commandbutton Hi, I am having the problem with action attribute with trinidad commandbutton link. I have two action buttons, edit and update. Edit is visible first when the page is loaded with the 4 related fields in read-only mode. When the user clicks Edit button, a flag is set in backing bean to render the Update button instead of Edit, and the fields are editable. However, when the Update button is clicked, to update the modified data, the binded action is not called. The backing bean for these actions is in request scope, and as far as I know, anytime the request is made the corresponding backingbean object instance is created and the action is performed. After the request is serviced, that instance is killed. I am not sure why is the action is not called upon. Below is the code snippet. I would appreciate any help. <tr:commandButton inlineStyle="x6m xag" text="Edit" action="#{EditCusLinksBB.editAssoCE}" rendered="#{editCustBB.certifiedEntity != null and EditCusLinksBB.corpEditable}" /> <tr:commandButton inlineStyle="x6m xag" text="Update" action="#{EditCusLinksBB.updateAssoCE}" rendered="#{!EditCusLinksBB.corpEditable}"/> thanks apurva. ********************************************************************* Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by email and destroy all copies of the original message. ********************************************************************* ********************************************************************* Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by email and destroy all copies of the original message. *********************************************************************
-- Chordiant Software Inc. www.chordiant.com