Re: [Trinidad] How to use PPR and a valueChangeEvent to update components in a tr:table row
Hi, On Wed, Jul 23, 2008 at 4:49 PM, Stephen Friedrich <[EMAIL PROTECTED]> wrote: > I found this post when googling for "inputHidden partialTriggers". > > It seems that the inputHidden tag does not even have a partialTriggers > attribute at all :-( > > Just oversight, or is there a reason for this? I don't know the "historic" reason for that. You could use this: RequestContext rc = RequestContext.getCurrentInstance(); rc.addPartialTarget(myHiddenInputComponent); -M > -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org
Re: [Trinidad] How to use PPR and a valueChangeEvent to update components in a tr:table row
I found this post when googling for "inputHidden partialTriggers". It seems that the inputHidden tag does not even have a partialTriggers attribute at all :-( Just oversight, or is there a reason for this?
Re: [Trinidad] How to use PPR and a valueChangeEvent to update components in a tr:table row
Events in a table are fired in context, so you can access bound component attributes in the correct context (assuming that you are catching a value change event in a table child) On Tue, Jul 15, 2008 at 7:46 PM, Graeme Steyn <[EMAIL PROTECTED]> wrote: > Andrew, thank you. I think the problem is in the actual value change > event listener code. I am not sure how to access or update the > individual components. The current code appears as follows: > >public void institutionValueChange(ValueChangeEvent event) { > >String newValue = (String) event.getNewValue(); > >UIXTable table = (UIXTable) constrainedTertiaryEducationTable; >TertiaryEducation row = (TertiaryEducation) table.getRowData(); > >if (newValue != null) { > >// Find the hepCode value... > >if (inHepList) { >row.setInstitutionId(hepCode); >row.setCountry( >PeopleSoftConstants.AUSTRALIAN_COUNTRY_CODE); >} >} else { >row.setInstitutionId(null); >} > >// Render response to prevent going to the validation phase for > the >// other components. This prevents validation errors for the as > yet >// incomplete fields. >getFacesContext().renderResponse(); > >} > > Basically, the row.set... operations are for updating the values in the > other columns for the same row. I would also have liked to do something > along the lines of > > countryComponent.setDisabled(true); > > Unfortunately, I am not sure how this gets done without binding to the > component in the backing bean, which I have being having problems with > as well. As you can see, I am a little new at trying to manipulate > table contents using PPR. > > Regards, > > Graeme. > >> -Original Message- >> From: Andrew Robinson >> Sent: Wednesday, 16 July 2008 1:48 AM >> >> For access in the same row, what you have done looks correct to me. >> Only when you want to go to a different row or from outside the table >> into a row that it is a problem (must be handled with code). Can you >> check using firebug if the HTML is being sent down for the two >> components? >> >> -Andrew >> >> On Tue, Jul 15, 2008 at 4:57 AM, Graeme Steyn <[EMAIL PROTECTED]> >> wrote: >> > Hi, >> > >> > I have a table with a tr:inputText field that I have attached a >> jquery >> > autocomplete function to. When the value of this input field >> changes, I >> > would like to do a PPR operation that updates corresponding hidden >> input >> > and select one choice components in the same row. The code for the >> two >> > columns appears below. >> > >> > Within the institutionValueChange event code, how would I access the >> > "constHep" and "constCntry" components to update their values and in >> the >> > case of the "constCntry" disable the component based on the new >> value. >> > >> > Any points would be greatly appreciate. >> > >> > Thank you. >> > >> > Regards, >> > >> > Graeme. >> > >> > >> > >> > > > valign="middle"> >> > > > source="#{bundle.liveSearch}" >> > styleClass="searchIco" >> > shortDesc="#{bundle.iconLiveSearch}" /> >> > >> > >> > >> > > > valign="middle"> >> > > > id="constHep" >> > value="#{entry.institutionId}" >> > partialTriggers="constInst" /> >> > >> > > > id="constInst" >> > value="#{entry.institution}" >> > immediate="true" >> > autoSubmit="true" >> > valueChangeListener="#{entry.institutionValueChange}" > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > > > id="constCntry" >> > partialTriggers="constInst" >> > value="#{entry.country}" > >> > > /> >> > >> > >> > >> > >> > Graeme Steyn >> > Information Systems >> > Information Technology Division >> > CQUniversity >> > Tel: +61 7 4930 9256 >> > Fax: +61 7 4930 6814 >> > E-mail: [EMAIL PROTECTED] >> > >> > >> > This e-mail message is intended only for the use of the individual > or >> > entity to which it is addressed and may contain information that is >> > privileged, confidential and exempt from disclosure under applicable >> > law. If you are not the intended recipient, any dissemination, >> > distribution or copying of this communication is strictly > prohibited. >> If >> > you have received this communication in error, please notify me >> > immediately by facsimile or telephone. >> > >> > >
RE: [Trinidad] How to use PPR and a valueChangeEvent to update components in a tr:table row
Andrew, thank you. I think the problem is in the actual value change event listener code. I am not sure how to access or update the individual components. The current code appears as follows: public void institutionValueChange(ValueChangeEvent event) { String newValue = (String) event.getNewValue(); UIXTable table = (UIXTable) constrainedTertiaryEducationTable; TertiaryEducation row = (TertiaryEducation) table.getRowData(); if (newValue != null) { // Find the hepCode value... if (inHepList) { row.setInstitutionId(hepCode); row.setCountry( PeopleSoftConstants.AUSTRALIAN_COUNTRY_CODE); } } else { row.setInstitutionId(null); } // Render response to prevent going to the validation phase for the // other components. This prevents validation errors for the as yet // incomplete fields. getFacesContext().renderResponse(); } Basically, the row.set... operations are for updating the values in the other columns for the same row. I would also have liked to do something along the lines of countryComponent.setDisabled(true); Unfortunately, I am not sure how this gets done without binding to the component in the backing bean, which I have being having problems with as well. As you can see, I am a little new at trying to manipulate table contents using PPR. Regards, Graeme. > -Original Message- > From: Andrew Robinson > Sent: Wednesday, 16 July 2008 1:48 AM > > For access in the same row, what you have done looks correct to me. > Only when you want to go to a different row or from outside the table > into a row that it is a problem (must be handled with code). Can you > check using firebug if the HTML is being sent down for the two > components? > > -Andrew > > On Tue, Jul 15, 2008 at 4:57 AM, Graeme Steyn <[EMAIL PROTECTED]> > wrote: > > Hi, > > > > I have a table with a tr:inputText field that I have attached a > jquery > > autocomplete function to. When the value of this input field > changes, I > > would like to do a PPR operation that updates corresponding hidden > input > > and select one choice components in the same row. The code for the > two > > columns appears below. > > > > Within the institutionValueChange event code, how would I access the > > "constHep" and "constCntry" components to update their values and in > the > > case of the "constCntry" disable the component based on the new > value. > > > > Any points would be greatly appreciate. > > > > Thank you. > > > > Regards, > > > > Graeme. > > > > > > > > > valign="middle"> > > > source="#{bundle.liveSearch}" > > styleClass="searchIco" > > shortDesc="#{bundle.iconLiveSearch}" /> > > > > > > > > > valign="middle"> > > > id="constHep" > > value="#{entry.institutionId}" > > partialTriggers="constInst" /> > > > > > id="constInst" > > value="#{entry.institution}" > > immediate="true" > > autoSubmit="true" > > valueChangeListener="#{entry.institutionValueChange}" > > > > > > > > > > > > > > > > > > > > > > id="constCntry" > > partialTriggers="constInst" > > value="#{entry.country}" > > > /> > > > > > > > > > > Graeme Steyn > > Information Systems > > Information Technology Division > > CQUniversity > > Tel: +61 7 4930 9256 > > Fax: +61 7 4930 6814 > > E-mail: [EMAIL PROTECTED] > > > > > > This e-mail message is intended only for the use of the individual or > > entity to which it is addressed and may contain information that is > > privileged, confidential and exempt from disclosure under applicable > > law. If you are not the intended recipient, any dissemination, > > distribution or copying of this communication is strictly prohibited. > If > > you have received this communication in error, please notify me > > immediately by facsimile or telephone. > > > >
Re: [Trinidad] How to use PPR and a valueChangeEvent to update components in a tr:table row
For access in the same row, what you have done looks correct to me. Only when you want to go to a different row or from outside the table into a row that it is a problem (must be handled with code). Can you check using firebug if the HTML is being sent down for the two components? -Andrew On Tue, Jul 15, 2008 at 4:57 AM, Graeme Steyn <[EMAIL PROTECTED]> wrote: > Hi, > > I have a table with a tr:inputText field that I have attached a jquery > autocomplete function to. When the value of this input field changes, I > would like to do a PPR operation that updates corresponding hidden input > and select one choice components in the same row. The code for the two > columns appears below. > > Within the institutionValueChange event code, how would I access the > "constHep" and "constCntry" components to update their values and in the > case of the "constCntry" disable the component based on the new value. > > Any points would be greatly appreciate. > > Thank you. > > Regards, > > Graeme. > > > > valign="middle"> > source="#{bundle.liveSearch}" > styleClass="searchIco" > shortDesc="#{bundle.iconLiveSearch}" /> > > > > valign="middle"> > id="constHep" > value="#{entry.institutionId}" > partialTriggers="constInst" /> > > id="constInst" > value="#{entry.institution}" > immediate="true" > autoSubmit="true" > valueChangeListener="#{entry.institutionValueChange}" > > > > > > > > > > > id="constCntry" > partialTriggers="constInst" > value="#{entry.country}" > > > > > > > Graeme Steyn > Information Systems > Information Technology Division > CQUniversity > Tel: +61 7 4930 9256 > Fax: +61 7 4930 6814 > E-mail: [EMAIL PROTECTED] > > > This e-mail message is intended only for the use of the individual or > entity to which it is addressed and may contain information that is > privileged, confidential and exempt from disclosure under applicable > law. If you are not the intended recipient, any dissemination, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify me > immediately by facsimile or telephone. > >
[Trinidad] How to use PPR and a valueChangeEvent to update components in a tr:table row
Hi, I have a table with a tr:inputText field that I have attached a jquery autocomplete function to. When the value of this input field changes, I would like to do a PPR operation that updates corresponding hidden input and select one choice components in the same row. The code for the two columns appears below. Within the institutionValueChange event code, how would I access the "constHep" and "constCntry" components to update their values and in the case of the "constCntry" disable the component based on the new value. Any points would be greatly appreciate. Thank you. Regards, Graeme. Graeme Steyn Information Systems Information Technology Division CQUniversity Tel: +61 7 4930 9256 Fax: +61 7 4930 6814 E-mail: [EMAIL PROTECTED] This e-mail message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by facsimile or telephone.