Hi Nako, Thanks for the pointer. I have to use a command button. Is there anyway (apart from styling the command link as a button) to check if there is a change in the form when the user tries to go some where else?
Thanks, Madhav On 1/31/07, Nacho Estrada <[EMAIL PROTECTED]> wrote:
Some months ago... http://comments.gmane.org/gmane.comp.jakarta.myfaces.user/26829 Any changes? On 1/29/07, Madhav Bhargava <[EMAIL PROTECTED]> wrote: > > I just looked at the renderer code for this component: > > > > In the encodeJavascript method following line is present: > > sb.append(*"setTimeout('"* + replacedClientId + > *"Notifier.prepareNotifier()',500);\n"*); > > > > This will add a timeout of 500. However this setting does not have any > effect on command links. Moreover should not this value be configurable? If > someone does not want a timeout, rather wants to use to necessary choose > before moving ahead then he/she will not be able to do it. > > > > ~madhav > > > ------------------------------ > > *From:* Madhav Bhargava [mailto:[EMAIL PROTECTED] > *Sent:* Monday, January 29, 2007 1:12 PM > *To:* MyFaces Discussion > *Subject:* stateChangeNotifier does not work with t:commandButton > properly > > > > Hi All, > > > > I have been looking for a component like s:stateChangeNotifier for quite > some time and I am glad that it is there is sandbox finally. > > The problem with this component is that it does not work properly with > t:commandButton component. > > > > Consider the following code: > > > > <s:stateChangedNotifier > > confirmationMessage="There are changes in the form. You will > loose all data if you choose to leave the form. Do you want to cancel?" > > excludedIds="_patientRegistration_proceed, > _patientRegistration_reset" disabled="false"/> > > > > > > And then you have the following buttons: > > > > <t:commandButton id="_patientRegistration_proceed" forceId="true" > value="Proceed" action="#{patientRegistrationWizardBean.proceed}" > actionFor="patientRegistration"/> > > <t:commandButton id="_patientRegistration_reset" forceId="true" > value="#{msg['button.demographicdetails.reset']}" action="#{ > patientRegistrationWizardBean.reset}"/> > > <t:commandButton id="_patientRegistration_cancel" forceId="true" > value="Cancel" action="#{patientRegistrationWizardBean.cancel}"/> > > > > Now the problem is that when I click the "Cancel" button then the popup > only appears for 2 seconds and then it vanishes and the control goes to the > action method attached with the command button. > > > > However, this problem is not there with the command link. I have > something like: > > <t:commandLink id="_patientRegistration_dummy" forceId="true" > value="dummy"/> > > > > Now if I click this link then the modal popup stays there till you click > a link. > > > > I have following questions: > > 1. Does this component only work with t:commandLink component? > > 2. If I have a datagrid and one of the columns in the datagrid is a link > "View Details". Say if there are 20 rows displayed in one page and there are > other command buttons on the page to control navigation. Then will I have to > put all the ID's for all the links in the column to prevent the popup > appearing on click of any of the "View Details" link? > > > > Rgds, > > Madhav > **************** CAUTION - Disclaimer ***************** > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended > solely for the use of the addressee(s). If you are not the intended > recipient, please notify the sender by e-mail and delete the original > message. Further, you are not to copy, disclose, or distribute this e-mail > or its contents to any other person and any such actions are unlawful. This > e-mail may contain viruses. Infosys has taken every reasonable precaution to > minimize this risk, but is not liable for any damage you may sustain as a > result of any virus in this e-mail. You should carry out your own virus > checks before opening the e-mail or attachment. Infosys reserves the right > to monitor and review the content of all messages sent to or from this > e-mail address. Messages sent to or from this e-mail address may be stored > on the Infosys e-mail system. > ***INFOSYS******** End of Disclaimer ********INFOSYS*** >
-- When I tell the truth, it is not for the sake of convincing those who do not know it, but for the sake of defending those that do

