I am aware that this is the standard way to set the value of
updateactionListner.
<t:commandButton id="testButton" value="Submit"
action="#{clickHandler.setClick}">
<t:updateActionListener property="#{clickHandler.iD}" value="#{somebean:id}"
/>
</t:commandButton>
----- But my requiremenent is the following....
have a form like this which will be submitted via Javascript.
images/some.jpg
<h:form id="testForm">
<t:inputHidden id="igId"/>
<t:commandButton id="testButton" value="Submit"
action="#{clickHandler.setClick}">
<t:updateActionListener property="#{clickHandler.iD}"
value="#{testForm:igId}" />
</t:commandButton>
</h:form>
Javascript will be like this.
function jsFunction(a)
{
alert('111');
document.getElementById('testForm:igId').value= a;
var buttonObject=
window.parent.document.getElementById("testForm:testButton");
buttonObject.click(); // This would help in submitting the first page
// to submit to the needed action method
}
------I know it might look odd to do things in this way, but this is the
trick I have to do to accomplish some stuff.
---- On following the above steps I get the following error.
javax.faces.el.ReferenceSyntaxException: testForm:igId
com.sun.faces.application.ApplicationImpl.checkSyntax(ApplicationImpl.java:752)
-- Please advise how to populate the updateactionlistner via javascript,
before form submit.
PLEASE ADVICE WHAT SHOULD I DO.
--
View this message in context: http://www.nabble.com/t%3AupdateActionListner....Help-needed.-tf4222265.html#a12011111
Sent from the javaserverfaces users mailing list archive at Nabble.com.