Created
March 9, 2010 03:00
-
-
Save avernet/326094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" | |
xmlns:f="http://orbeon.org/oxf/xml/formatting" | |
xmlns:xhtml="http://www.w3.org/1999/xhtml" | |
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" | |
xmlns:widget="http://orbeon.org/oxf/xml/widget" | |
xmlns:ev="http://www.w3.org/2001/xml-events" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:fr="http://orbeon.org/oxf/xml/form-runner" | |
xmlns:xbl="http://www.w3.org/ns/xbl" | |
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" | |
xmlns:exf="http://www.exforms.org/exf/1-0" | |
xmlns:howto="http://www.orbeon.com/howto"> | |
<xhtml:head> | |
<xhtml:title>Session</xhtml:title> | |
<xforms:model> | |
<xforms:instance id="from-session"><dummy/></xforms:instance> | |
<xforms:insert ev:event="xforms-model-construct-done" nodeset="instance('from-session')" | |
origin="xxforms:get-request-attribute('session-howto')"/> | |
<xforms:instance id="ui"> | |
<instance> | |
<value/> | |
</instance> | |
</xforms:instance> | |
</xforms:model> | |
</xhtml:head> | |
<xhtml:body> | |
<xhtml:div> | |
<xforms:input ref="instance('ui')/value"> | |
<xforms:label>Value:</xforms:label> | |
</xforms:input> | |
<fr:button> | |
<xforms:label>Store value in session</xforms:label> | |
<xforms:action ev:event="DOMActivate"> | |
<xforms:insert context="." origin="xxforms:set-request-attribute('session-howto', instance('ui'))"/> | |
<xforms:toggle case="reload-page"/> | |
</xforms:action> | |
</fr:button> | |
<fr:button> | |
<xforms:label>Reset content of session</xforms:label> | |
</fr:button> | |
</xhtml:div> | |
<xhtml:div> | |
<xforms:switch> | |
<xforms:case/> | |
<xforms:case id="reload-page">Try reloading this page to see the content of the session.</xforms:case> | |
</xforms:switch> | |
</xhtml:div> | |
</xhtml:body> | |
</xhtml:html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment