|
hi all !!,
I´m trying to control events (xforms-invalid, xforms-valid, xforms-value-changed) but it doesn´t work. I have this :
<head> ...
</head> <body> ...
<xforms:group> ... a lot of controls ... for example :
<xforms:input id="dmv-apellido-control" incremental="true" ref="name/first-apellido" class="dmv-first-apellido"> <xforms:label model="model-language" ref="instance('spain')/detail/labels/first-apellido" class="forms-hidden"/> <xforms:alert model="model-language" ref="instance('spain')/detail/alerts/first-apellido"/> </xforms:input>
| ........
</group>
<div> .... more controls and this control events :
<xforms:group model="common-model"> <xforms:action ev:event="xforms-invalid" if="normalize-space(event('alert')) != ''"> <xforms:action if="not(xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')])"> <xforms:insert context="xxforms:instance('errors-instance')" nodeset="error" origin="xxforms:instance('error-template')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('target')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('repeat-indexes'), '-')"/> </xforms:action> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@alert" value="event('alert')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@label" value="event('label')"/> </xforms:action>
<xforms:action ev:event="xforms-valid" if="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"> <xforms:delete nodeset="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"/> </xforms:action>
<xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="xxforms:instance('ws-response')/data-status">dirty</xforms:setvalue> </xforms:action> </xforms:group> </div> </body> ... the first group in works fine, and the logs dispatch the events :
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-67 - at line 27 of XFormsValidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-invalid - dmv-apellido-control - at line 27 of XFormsInvalidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-71 - at line 27 of XFormsValidEvent.java
... but the second group in <div> doesn´t work ok. The events don´t make the setvalue and I don´t know why ... any idea?? thanks ("the xxforms in the instances is because I have a lot of diferent models and this is ok)
|
I think that currently, event handlers have to be children of XForms elements. it´s ok? The problem is that I have dynamics forms and I have to control the diferents alerts. I can´t to go inside the code of them. I have to controls for general events.
Dromela wrote
hi all !!,
I´m trying to control events (xforms-invalid, xforms-valid, xforms-value-changed) but it doesn´t work. I have this :
<head> ...
</head> <body> ...
<xforms:group> ... a lot of controls ... for example :
<xforms:input id="dmv-apellido-control" incremental="true" ref="name/first-apellido" class="dmv-first-apellido"> <xforms:label model="model-language" ref="instance('spain')/detail/labels/first-apellido" class="forms-hidden"/> <xforms:alert model="model-language" ref="instance('spain')/detail/alerts/first-apellido"/> </xforms:input>
| ........
</group>
<div> .... more controls and this control events :
<xforms:group model="common-model"> <xforms:action ev:event="xforms-invalid" if="normalize-space(event('alert')) != ''"> <xforms:action if="not(xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')])"> <xforms:insert context="xxforms:instance('errors-instance')" nodeset="error" origin="xxforms:instance('error-template')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('target')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('repeat-indexes'), '-')"/> </xforms:action> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@alert" value="event('alert')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@label" value="event('label')"/> </xforms:action>
<xforms:action ev:event="xforms-valid" if="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"> <xforms:delete nodeset="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"/> </xforms:action>
<xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="xxforms:instance('ws-response')/data-status">dirty</xforms:setvalue> </xforms:action> </xforms:group> </div> </body> ... the first group in works fine, and the logs dispatch the events :
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-67 - at line 27 of XFormsValidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-invalid - dmv-apellido-control - at line 27 of XFormsInvalidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-71 - at line 27 of XFormsValidEvent.java
... but the second group in <div> doesn´t work ok. The events don´t make the setvalue and I don´t know why ... any idea?? thanks ("the xxforms in the instances is because I have a lot of diferent models and this is ok)
Administrator
|
That's right, in Orbeon Forms event handlers have to be children of
XForms elements.
Can't you put that event handler within an xforms:group element?
-Erik
On Apr 8, 2008, at 4:49 AM, Dromela wrote:
>
> I think that currently, event handlers have to be children of XForms
> elements. it´s ok? The problem is that I have dynamics forms and I
> have to
> control the diferents alerts. I can´t to go inside the code of them.
> I have
> to controls for general events.
>
>
> Dromela wrote:
>>
>> hi all !!,
>>
>> I´m trying to control events (xforms-invalid, xforms-valid,
>> xforms-value-changed) but it doesn´t work. I have this :
>>
>> <head>
>> ...
>> </head>
>> <body>
>> ...
>> <table>
>> <xforms:group>
>> ... a lot of controls ... for example :
>> <td>
>> <xforms:input id="dmv-apellido-control" incremental="true"
>> ref="name/first-apellido" class="dmv-first-apellido">
>> <xforms:label model="model-language"
>> ref="instance('spain')/detail/labels/first-apellido"
>> class="forms-hidden"/>
>> <xforms:alert model="model-language"
>> ref="instance('spain')/detail/alerts/first-apellido"/>
>> </xforms:input>
>> </td>
>> ........
>> </group>
>> </table>
>> <div>
>> .... more controls and this control events :
>>
>> <xforms:group model="common-model">
>> <xforms:action ev:event="xforms-invalid"
>> if="normalize-space(event('alert')) != ''">
>> <xforms:action
>> if="not(xxforms:instance('errors-instance')/error[@id =
>> event('target')
>> and @indexes = string-join(event('repeat-indexes'), '-')])">
>> <xforms:insert context="xxforms:instance('errors-instance')"
>> nodeset="error" origin="xxforms:instance('error-template')"/>
>> <xforms:setvalue
>> ref="xxforms:instance('errors-instance')/error[index('errors-
>> repeat')]/@id"
>> value="event('target')"/>
>> <xforms:setvalue
>> ref="xxforms:instance('errors-instance')/error[index('errors-
>> repeat')]/@indexes"
>> value="string-join(event('repeat-indexes'), '-')"/>
>> </xforms:action>
>> <xforms:setvalue ref="xxforms:instance('errors-instance')/
>> error[@id
>> = event('target') and @indexes = string-join(event('repeat-indexes'),
>> '-')]/@alert" value="event('alert')"/>
>> <xforms:setvalue ref="xxforms:instance('errors-instance')/
>> error[@id
>> = event('target') and @indexes = string-join(event('repeat-indexes'),
>> '-')]/@label" value="event('label')"/>
>> </xforms:action>
>>
>> <xforms:action ev:event="xforms-valid"
>> if="xxforms:instance('errors-instance')/error[@id = event('target')
>> and
>> @indexes = string-join(event('repeat-indexes'), '-')]">
>> <xforms:delete
>> nodeset="xxforms:instance('errors-instance')/error[@id =
>> event('target')
>> and @indexes = string-join(event('repeat-indexes'), '-')]"/>
>> </xforms:action>
>>
>>
>> <xforms:action ev:event="xforms-value-changed">
>> <xforms:setvalue
>> ref="xxforms:instance('ws-response')/data-status">dirty</
>> xforms:setvalue>
>> </xforms:action>
>> </xforms:group>
>> </div>
>> </body>
>>
>> ... the first group in <table> works fine, and the logs dispatch the
>> events :
>> 2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching
>> event:
>> xforms-valid - xforms-element-67 - at line 27 of
>> XFormsValidEvent.java
>>
>> 2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching
>> event:
>> xforms-invalid - dmv-apellido-control - at line 27 of
>> XFormsInvalidEvent.java
>>
>> 2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching
>> event:
>> xforms-valid - xforms-element-71 - at line 27 of
>> XFormsValidEvent.java
>>
>>
>> ... but the second group in <div> doesn´t work ok. The events don´t
>> make
>> the setvalue and I don´t know why ... any idea?? thanks ("the
>> xxforms in
>> the instances is because I have a lot of diferent models and this
>> is ok)
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/--
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
|
|
Thanks Eric, I understand ...
Is correct if I would get to do this? :
<xforms:group>
<xforms:group model="common-model" xmlns=" http://www.w3.org/1999/xhtml" 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:xxforms=" http://orbeon.org/oxf/xml/xforms"> <xforms:action ev:event="xforms-invalid" if="normalize-space(event('alert')) != ''"> <xforms:action if="not(instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')])"> <xforms:insert context="instance('errors-instance')" nodeset="error" origin="instance('error-template')"/> <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('target')"/> <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('repeat-indexes'), '-')"/> </xforms:action> <xforms:setvalue ref="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@alert" value="event('alert')"/> <xforms:setvalue ref="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@label" value="event('label')"/> </xforms:action>
<xforms:action ev:event="xforms-valid" if="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"> <xforms:delete nodeset="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"/> </xforms:action>
<xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="instance('ws-response')/data-status">dirty</xforms:setvalue> </xforms:action> </xforms:group> <xforms:group> <xforms:group ref="instance('document-instance')/personal-information"> </xforms:group> </xforms:group> The idea is to cover the exist 'xforms:group' of the forms that I receive with the 'xforms:group' of the control-events in a 'xforms:group' father ... What you think about this??
Thanks
Dromela wrote
I think that currently, event handlers have to be children of XForms elements. it´s ok? The problem is that I have dynamics forms and I have to control the diferents alerts. I can´t to go inside the code of them. I have to controls for general events.
Dromela wrote
hi all !!,
I´m trying to control events (xforms-invalid, xforms-valid, xforms-value-changed) but it doesn´t work. I have this :
<head> ...
</head> <body> ...
<xforms:group> ... a lot of controls ... for example :
<xforms:input id="dmv-apellido-control" incremental="true" ref="name/first-apellido" class="dmv-first-apellido"> <xforms:label model="model-language" ref="instance('spain')/detail/labels/first-apellido" class="forms-hidden"/> <xforms:alert model="model-language" ref="instance('spain')/detail/alerts/first-apellido"/> </xforms:input>
| ........
</group>
<div> .... more controls and this control events :
<xforms:group model="common-model"> <xforms:action ev:event="xforms-invalid" if="normalize-space(event('alert')) != ''"> <xforms:action if="not(xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')])"> <xforms:insert context="xxforms:instance('errors-instance')" nodeset="error" origin="xxforms:instance('error-template')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('target')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('repeat-indexes'), '-')"/> </xforms:action> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@alert" value="event('alert')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@label" value="event('label')"/> </xforms:action>
<xforms:action ev:event="xforms-valid" if="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"> <xforms:delete nodeset="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"/> </xforms:action>
<xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="xxforms:instance('ws-response')/data-status">dirty</xforms:setvalue> </xforms:action> </xforms:group> </div> </body> ... the first group in works fine, and the logs dispatch the events :
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-67 - at line 27 of XFormsValidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-invalid - dmv-apellido-control - at line 27 of XFormsInvalidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-71 - at line 27 of XFormsValidEvent.java
... but the second group in <div> doesn´t work ok. The events don´t make the setvalue and I don´t know why ... any idea?? thanks ("the xxforms in the instances is because I have a lot of diferent models and this is ok)
|
hi another time,
I´m trying the last idea, but I have new problems ... I´m trying to insert code in another code. I do this :
1- I have a txt with the text por example ... example.txt :
<xforms:group> ....
2- in the xpl I do :
<p:processor name="oxf:url-generator"> <p:input name="config"> <config> <url>oxf:/apps/server/example.txt</url> <content-type>text/plain</content-type> </config> </p:input> <p:output name="data" id="initiallydata-xml"/> </p:processor> <p:processor name="oxf:to-xml-converter"> <p:input name="data" href="#initiallydata-xml"/> <p:input name="config"> <config/> </p:input> <p:output name="data" id="initiallydata"/> </p:processor>
<p:processor name="oxf:xslt"> <p:input name="data"><dummy/></p:input> <p:input name="instance" href="#initiallydata"/> <p:input name="config"> <xsl:stylesheet version="2.0">
<xsl:variable name="update-xml" select="doc('input:instance')"/> <xsl:template match="/"> <xsl:copy-of select="$update-xml"/> </xsl:template> </xsl:stylesheet> </p:input> <p:output name="data" id="initialdatafirma"/> </p:processor> <p:processor name="oxf:xupdate"> ...
<p:input name="instancefirma" href="#initialdatafirma"/> <p:input name="config"> <xu:modifications xmlns:xu=" http://www.xmldb.org/xupdate"><xu:insert-after select="/xhtml:html/xhtml:head/xhtml:link"> <xu:copy-of select="doc('input:instancefirma')/*"/> </xu:insert-after> </xu:modifications> </p:processor> but the result is a fatal error because the "to-xml-converter" checks the correct structure of a xml document ... but it isn´t.
Then I removed the processor "to-xml-converter" but the code result is :
<xforms:group
... and the characteres "<> ... " are changes.
the final result is a invalid xhtml that orbeon doesn´t show right ... Do you have another idea?? Thanks !!
Dromela wrote
Thanks Eric, I understand ...
Is correct if I would get to do this? :
<xforms:group>
<xforms:group model="common-model" xmlns=" http://www.w3.org/1999/xhtml" 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:xxforms=" http://orbeon.org/oxf/xml/xforms"> <xforms:action ev:event="xforms-invalid" if="normalize-space(event('alert')) != ''"> <xforms:action if="not(instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')])"> <xforms:insert context="instance('errors-instance')" nodeset="error" origin="instance('error-template')"/> <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('target')"/> <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('repeat-indexes'), '-')"/> </xforms:action> <xforms:setvalue ref="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@alert" value="event('alert')"/> <xforms:setvalue ref="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@label" value="event('label')"/> </xforms:action>
<xforms:action ev:event="xforms-valid" if="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"> <xforms:delete nodeset="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"/> </xforms:action>
<xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="instance('ws-response')/data-status">dirty</xforms:setvalue> </xforms:action> </xforms:group> <xforms:group> <xforms:group ref="instance('document-instance')/personal-information"> </xforms:group> </xforms:group> The idea is to cover the exist 'xforms:group' of the forms that I receive with the 'xforms:group' of the control-events in a 'xforms:group' father ... What you think about this??
Thanks
Dromela wrote
I think that currently, event handlers have to be children of XForms elements. it´s ok? The problem is that I have dynamics forms and I have to control the diferents alerts. I can´t to go inside the code of them. I have to controls for general events.
Dromela wrote
hi all !!,
I´m trying to control events (xforms-invalid, xforms-valid, xforms-value-changed) but it doesn´t work. I have this :
<head> ...
</head> <body> ...
<xforms:group> ... a lot of controls ... for example :
<xforms:input id="dmv-apellido-control" incremental="true" ref="name/first-apellido" class="dmv-first-apellido"> <xforms:label model="model-language" ref="instance('spain')/detail/labels/first-apellido" class="forms-hidden"/> <xforms:alert model="model-language" ref="instance('spain')/detail/alerts/first-apellido"/> </xforms:input>
| ........
</group>
<div> .... more controls and this control events :
<xforms:group model="common-model"> <xforms:action ev:event="xforms-invalid" if="normalize-space(event('alert')) != ''"> <xforms:action if="not(xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')])"> <xforms:insert context="xxforms:instance('errors-instance')" nodeset="error" origin="xxforms:instance('error-template')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('target')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('repeat-indexes'), '-')"/> </xforms:action> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@alert" value="event('alert')"/> <xforms:setvalue ref="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@label" value="event('label')"/> </xforms:action>
<xforms:action ev:event="xforms-valid" if="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"> <xforms:delete nodeset="xxforms:instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]"/> </xforms:action>
<xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="xxforms:instance('ws-response')/data-status">dirty</xforms:setvalue> </xforms:action> </xforms:group> </div> </body> ... the first group in works fine, and the logs dispatch the events :
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-67 - at line 27 of XFormsValidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-invalid - dmv-apellido-control - at line 27 of XFormsInvalidEvent.java
2008-04-08 12:41:36,434 DEBUG XFormsServer - XForms - dispatching event: xforms-valid - xforms-element-71 - at line 27 of XFormsValidEvent.java
... but the second group in <div> doesn´t work ok. The events don´t make the setvalue and I don´t know why ... any idea?? thanks ("the xxforms in the instances is because I have a lot of diferent models and this is ok)
Administrator
|
On Tue, Apr 8, 2008 at 9:34 AM, Dromela < [hidden email]> wrote:
> 1- I have a txt with the text por example ... example.txt :
>
> <xforms:group>
> ....
> <!-- I don´t close this group because I have another txt with
> "</xforms:group>" that will insert at the end of the code -->
Why not have the <xforms:group> and the </xforms:group> in the same
file, and make sure that this file is well-formed XML? It seems to me
like you are looking for problems by splitting this in 2 text files
:).
Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/Personal Blog: http://avernet.blogspot.com/--
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
|
|
Hi Alessandro,
Because as I said before, I want to wrap the <xforms:group> of the forms that I receive and the handle events in a only <xforms:group>. If I have the </xforms:group> and <xforms:group> in the same file, I can´t do this ...
Maybe you have another idea ...
Thanks
Alessandro Vernet wrote
On Tue, Apr 8, 2008 at 9:34 AM, Dromela <javier.asoler@bahiait.com> wrote:
> 1- I have a txt with the text por example ... example.txt :
>
> <xforms:group> > ....
> Why not have the <xforms:group> and the </xforms:group> in the same
file, and make sure that this file is well-formed XML? It seems to me
like you are looking for problems by splitting this in 2 text files
:).
Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/Personal Blog: http://avernet.blogspot.com/--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
|
Administrator
|
Javier,
On Tue, Apr 8, 2008 at 12:14 PM, Dromela < [hidden email]> wrote:
> Because as I said before, I want to wrap the <xforms:group> of the forms
> that I receive and the handle events in a only <xforms:group>. If I have the
> </xforms:group> and <xforms:group> in the same file, I can´t do this ...
Could you backtrack a little bit and tell us about what you are trying
to do? From what I see in your previous message, if you want to catch
an xforms-invalid event for a number of controls, you would write:
<xforms:group>
<xforms:action ev:event="xforms-invalid">Handler code here</xforms:action>
Rest of the controls and the page here
</xforms:group>
Are you saying that this wouldn't work in your case?
Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/Personal Blog: http://avernet.blogspot.com/--
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
|
|
Ok Alessandro, I will try to explain better. The idea is the following :
- I receive forms of different types ... but the general structure is :
<html> <head> ....
</head> <body> ....
.... controls
</body> </html> - This controls have "alerts". I have to handle the events 'xforms-invalid' and 'xforms-valid' of this controls. Then I thought in 'xupdate' processors and insert text code inside "xhtml:html/xhtml:body" that wrap the existing code in the form. For this I have to 'insert' two parts :
<xforms:group> <xforms:action ev:event="xforms-invalid">Handler code here</xforms:action> , after <body> ... and :
</xforms:group> , before </body> . Then I can handle this events without touching the original code of the form that I receive. Is correct this idea? Another better?
Thanks all
Alessandro Vernet wrote
Javier,
On Tue, Apr 8, 2008 at 12:14 PM, Dromela <javier.asoler@bahiait.com> wrote:
> Because as I said before, I want to wrap the <xforms:group> of the forms
> that I receive and the handle events in a only <xforms:group>. If I have the
> </xforms:group> and <xforms:group> in the same file, I can´t do this ...
Could you backtrack a little bit and tell us about what you are trying
to do? From what I see in your previous message, if you want to catch
an xforms-invalid event for a number of controls, you would write:
<xforms:group> <xforms:action ev:event="xforms-invalid">Handler code here</xforms:action> Rest of the controls and the page here
</xforms:group> Are you saying that this wouldn't work in your case?
Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/Personal Blog: http://avernet.blogspot.com/--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
|
Administrator
|
On Wed, Apr 9, 2008 at 12:08 AM, Dromela < [hidden email]> wrote:
> - This controls have "alerts". I have to handle the events 'xforms-invalid'
> and 'xforms-valid' of this controls. Then I thought in 'xupdate' processors
> and insert text code inside "xhtml:html/xhtml:body" that wrap the existing
> code in the form. For this I have to 'insert' two parts :
>
>
> <xforms:group>
> <xforms:action ev:event="xforms-invalid">Handler code here</xforms:action>
>
> , after <body> ... and :
>
> </xforms:group>
>
> , before </body> . Then I can handle this events without touching the
> original code of the form that I receive. Is correct this idea? Another
> better?
OK, I understand. Thank you for the detailed explanation. How are you
doing the insertion? This looks like a job for XSLT, with a template
that reads something like:
<xsl:template match="xhtml:body">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xforms:group>
<xforms:action ev:event="xforms-invalid">Handler code
here</xforms:action>
<xsl:copy-of select="node()"/>
</xforms:group>
</xsl:copy>
</xsl:template>
Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/Personal Blog: http://avernet.blogspot.com/--
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
|
|
oh, thanks you !! I did it with XSLT too, but your code seems better !! Thanks Alessandro
Alessandro Vernet wrote
On Wed, Apr 9, 2008 at 12:08 AM, Dromela <javier.asoler@bahiait.com> wrote:
> - This controls have "alerts". I have to handle the events 'xforms-invalid'
> and 'xforms-valid' of this controls. Then I thought in 'xupdate' processors
> and insert text code inside "xhtml:html/xhtml:body" that wrap the existing
> code in the form. For this I have to 'insert' two parts :
>
>
> <xforms:group> > <xforms:action ev:event="xforms-invalid">Handler code here</xforms:action> >
> , after <body> ... and :
>
> </xforms:group> >
> , before </body> . Then I can handle this events without touching the
> original code of the form that I receive. Is correct this idea? Another
> better?
OK, I understand. Thank you for the detailed explanation. How are you
doing the insertion? This looks like a job for XSLT, with a template
that reads something like:
<xsl:template match="xhtml:body"> <xsl:copy> <xsl:copy-of select="@*"/> <xforms:group> <xforms:action ev:event="xforms-invalid">Handler code
here</xforms:action> <xsl:copy-of select="node()"/> </xforms:group> </xsl:copy> </xsl:template> Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/Personal Blog: http://avernet.blogspot.com/--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
|
|
|
| |