Hello all,
I'm new to Orbeon and XForms and had a relatively simple questions. 1. I have a form where I collection a username field. 2. A submit button sends the username to pipeline where the field is extracted. 3. The username is passed to a Java POJO where it is checked against LDAP to see if it exists. 4. If the username exists, a message is displayed to the user. I've got 1-3 working. Now that I have the output in the pipeline, how do I pass it to the xform. Here's the pipeline... <p:param type="input" name="instance"/> <p:param type="output" name="data"/> <!-- Get the username out of the XML doc --> <p:processor name="oxf:xslt"> <p:input name="config"> <xsl:stylesheet version=" 2.0"> <xsl:template match="/"> <delegation:execute service="my-service" operation="checkUsername"> <param1 xsi:type="xs:string"> <xsl:value-of select="/person/credentials/username"/> </param1> </delegation:execute> </xsl:template> </xsl:stylesheet> </p:input> <p:input name="data" href="#instance" debug="false"/> <p:output name="data" id="username"/> </p:processor> <!-- Call the bean --> <p:processor name="oxf:delegation"> <p:input name="interface"> <config> <service id="my-service" type="javabean" class="com.captechventures.sitc.foodstamps.test.XPLTest "/> </config> </p:input> <p:input name="call" href="#username" /> <p:output name="data" id="username-count" /> </p:processor> <p:processor name="oxf:identity"> <p:input name="data" href="#username-count"/> <p:output name="data" ref="data"/> </p:processor> Thanks for your help! -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Waseem,
Does your submission element have the replace attribute "all"
or
"instance" ? You probably want to use instance.
The LDAP query
will run in the background and when completed, any xforms
elements
that are bound to that instance data will be updated for you
by
the engine.
Or, You can use <xforms:trigger> and
<xforms:submit> together:
<xforms:trigger>
<xforms:action>
<xforms:send
submission="my-sub"/>
<xforms:toggle
case="login-view"/>
</xforms:action>
</xforms:trigger>
If your submission uses replace="all" then the page will
be re-rendered and the instance is available as the
page-flow
parameter in various ways:
<xforms:instance id="login-data"
src="input:instance"/>
Cheers,
Hank
Hank Ratzesberger
http://nees.ucsb.edu/ Institute for Crustal Studies University of California, Santa Barbara
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |