I created a library (section tempate) with a dropdown of all my facilities. Now I want to reference the value of that dropdown. I assinged a name $Facility in the library (section template), but that does not seem to exist in the main form.
Anyone know how to get the value of a widget that is in an included library (section tempate)? -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Kevin,
Good catch. Right now the internals of section templates are not visible from the outside, and that applies to those variables. However, you should be able to do: $section-id/foo where "foo" is the id of the control within the section template. -Erik On Mon, Mar 19, 2012 at 1:34 PM, Dr. Kevin Hunt <[hidden email]> wrote: > I created a library (section tempate) with a dropdown of all my > facilities. Now I want to reference the value of that dropdown. I > assinged a name $Facility in the library (section template), but that does > not seem to exist in the main form. > > Anyone know how to get the value of a widget that is in an included library > (section tempate)? > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Section-id thats defined in the section template? I'll try and let you know.
On Mon, Mar 19, 2012 at 7:27 PM, Erik Bruchez <[hidden email]> wrote: Kevin, -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Doesn't seem to work. Here is my main form (I have attached the XML for the section libary below that). See the calculate="$section-terminal-location/LIB_Term"/>
Any suggestions? <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:exforms="http://www.exforms.org/exf/1-0" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:saxon="http://saxon.sf.net/" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <xhtml:head> <xhtml:title>Untitled Form</xhtml:title> <xforms:model id="fr-form-model"> <!-- Main instance --> <xforms:instance id="fr-form-instance"> <form> <section-main> <control-1/> </section-main> <section-terminal-location/> </form> </xforms:instance> <!-- Bindings --> <xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')"> <xforms:bind id="section-main-bind" nodeset="section-main" name="section-main"> <xforms:bind id="control-1-bind" name="control-1" nodeset="control-1" type="xforms:string" calculate="$section-terminal-location/LIB_Term"/> </xforms:bind> <xforms:bind id="section-terminal-location-bind" nodeset="section-terminal-location" name="section-terminal-location"/> </xforms:bind> <!-- Metadata --> <xforms:instance id="fr-form-metadata" xxforms:readonly="true"> <metadata> <application-name>Safety</application-name> <form-name>Kevin_Test</form-name> <title xml:lang="en">Untitled Form</title> <description xml:lang="en"/> <author/> <logo mediatype="" filename="" size=""/> </metadata> </xforms:instance> <!-- Attachments --> <xforms:instance id="fr-form-attachments"> <attachments> <css mediatype="text/css" filename="" size=""/> <pdf mediatype="application/pdf" filename="" size=""/> </attachments> </xforms:instance> <!-- All form resources --> <!-- Don't make readonly by default in case a service modifies the resources --> <xforms:instance id="fr-form-resources" xxforms:readonly="false"> <resources> <resource xml:lang="en"> <section-main> <label>Main</label> <help/> </section-main> <control-1> <label>Should calculate to value in Terminal Location</label> <hint/> <help/> <alert/> </control-1> <section-terminal-location> <label>Terminal Location</label> <help/> </section-terminal-location> </resource> </resources> </xforms:instance> <!-- Utility instances for services --> <xforms:instance id="fr-service-request-instance" xxforms:exclude-result-prefixes="#all"> <request/> </xforms:instance> <xforms:instance id="fr-service-response-instance" xxforms:exclude-result-prefixes="#all"> <response/> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> <fr:view> <xforms:label ref="instance('fr-form-metadata')/title"/> <fr:body> <fr:section id="section-main-section" bind="section-main-bind"> <xforms:label ref="$form-resources/section-main/label"/> <xforms:help ref="$form-resources/section-main/help"/> <fr:grid columns="2"> <xhtml:tr> <xhtml:td> <xforms:input id="control-1-control" bind="control-1-bind"> <xforms:label ref="$form-resources/control-1/label"/> <xforms:hint ref="$form-resources/control-1/hint"/> <xforms:help ref="$form-resources/control-1/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:input> </xhtml:td> <xhtml:td/> </xhtml:tr> </fr:grid> </fr:section> <fr:section id="section-terminal-location-section" bind="section-terminal-location-bind"> <xforms:label ref="$form-resources/section-terminal-location/label"/> <xforms:help ref="$form-resources/section-terminal-location/help"/> <component:section-2 xmlns:component="http://orbeon.org/oxf/xml/form-builder/component/orbeon/library" xmlns="http://orbeon.org/oxf/xml/form-builder" xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"/> </fr:section> </fr:body> </fr:view> </xhtml:body> </xhtml:html> ===============Section Template ============== <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:exforms="http://www.exforms.org/exf/1-0" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:saxon="http://saxon.sf.net/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:odt="http://orbeon.org/oxf/xml/datatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xhtml:head> <xhtml:title>TCS Yards</xhtml:title> <xforms:model id="fr-form-model"> <xforms:instance id="fr-form-instance"> <form> <LIB_Section_Term> <LIB_Term/> </LIB_Section_Term> </form> </xforms:instance> <xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')"> <xforms:bind id="LIB_Section_Term-bind" nodeset="LIB_Section_Term" name="LIB_Section_Term"> <xforms:bind id="LIB_Term-bind" nodeset="LIB_Term" type="xforms:string" name="LIB_Term"/> </xforms:bind> </xforms:bind> <xforms:instance id="fr-form-metadata" xxforms:readonly="true"> <metadata> <application-name>tcsyards</application-name> <form-name>Library</form-name> <title xml:lang="en">TCS Yards</title> <description xml:lang="en"/> <author/> <logo mediatype="" filename="" size=""/> </metadata> </xforms:instance> <xforms:instance id="fr-form-attachments"> <attachments> <css mediatype="text/css" filename="" size=""/> <pdf mediatype="application/pdf" filename="" size=""/> </attachments> </xforms:instance> <xforms:instance id="fr-form-resources" xxforms:readonly="false"> <resources> <resource xml:lang="en"> <LIB_Term> <label>Terminal:</label> <hint>Select Driver's Current Primary Terminal, or where incident occurred.</hint> <help/> <alert/> <item> <label>Bethlehem (BET)</label> <value>bethlehem-(bet)</value> </item> <item> <label>Chicago (CHI)</label> <value>chicago-(chi)</value> </item> <item> <label>Dallas (DFW)</label> <value>dallas-(dfw)</value> </item> <item> <label>Atlanta (EPT)</label> <value>atlanta-(ept)</value> </item> <item> <label>Fort Wayne-Piqua (FTW)</label> <value>fort-wayne-piqua-(ftw)</value> </item> <item> <label>Harrisburg (HAR)</label> <value>harrisburg-(har)</value> </item> <item> <label>Jacksonville (JAX)</label> <value>jacksonville-(jax)</value> </item> <item> <label>Kansas City (KCY)</label> <value>kansas-city-(kcy)</value> </item> <item> <label>Minneapolis (MSP)</label> <value>minneapolis-(msp)</value> </item> <item> <label>Sandusky (SAN)</label> <value>sandusky-(san)</value> </item> <item> <label>St. Louis (STL)</label> <value>st-louis-(stl)</value> </item> <item> <label>Toronto (TOR)</label> <value>toronto-(tor)</value> </item> </LIB_Term> <LIB_Section_Term> <label>Triple Crown Yard</label> <help/> </LIB_Section_Term> </resource> </resources> </xforms:instance> <xforms:instance id="fr-service-request-instance" xxforms:exclude-result-prefixes="#all"> <request/> </xforms:instance> <xforms:instance id="fr-service-response-instance" xxforms:exclude-result-prefixes="#all"> <response/> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> <fr:view> <xforms:label ref="instance('fr-form-metadata')/title"/> <fr:body> <fr:section id="LIB_Section_Term-section" bind="LIB_Section_Term-bind"> <xforms:label ref="$form-resources/LIB_Section_Term/label"/> <xforms:help ref="$form-resources/LIB_Section_Term/help"/> <fr:grid columns="2"> <xhtml:tr> <xhtml:td xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:fb="http://orbeon.org/oxf/xml/form-builder"> <xforms:select1 appearance="minimal" bind="LIB_Term-bind" id="LIB_Term-control"> <xforms:label ref="$form-resources/LIB_Term/label"/> <xforms:hint ref="$form-resources/LIB_Term/hint"/> <xforms:help ref="$form-resources/LIB_Term/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> <xforms:item> <xforms:label>[Select...]</xforms:label> <xforms:value/> </xforms:item> <xforms:itemset nodeset="$form-resources/LIB_Term/item"> <xforms:label ref="label"/> <xforms:value ref="value"/> </xforms:itemset> </xforms:select1> </xhtml:td> <xhtml:td/> </xhtml:tr> </fr:grid> </fr:section> </fr:body> </fr:view> </xhtml:body> On Mon, Mar 19, 2012 at 7:37 PM, Dr. Kevin Hunt <[hidden email]> wrote: Section-id thats defined in the section template? I'll try and let you know. -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Sorry, I was looking at the wrong Section template. I got it working.
On Tue, Mar 20, 2012 at 7:36 AM, Dr. Kevin Hunt <[hidden email]> wrote: Doesn't seem to work. Here is my main form (I have attached the XML for the section libary below that). See the calculate="$section-terminal-location/LIB_Term"/> -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |