deleted node still make validation fail

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

deleted node still make validation fail

milin
Hi,

We have an application where users can add/remove rows in a table by
pressing  "add" and "remove" buttons.

E.g
...
<xforms:repeat nodeset="a:additionalCourses/a:additionalCourse">
  <xforms:input ref="a:points">
     <xforms:label class="forms-hidden" value="$resources/point" />
     <xforms:alert value="$resources/alert/mandatoryValue" />
  </xforms:input>
  <fr:button>
    <xforms:label value="$resources/btns/removeBtn" />
    <xforms:action ev:event="DOMActivate">
      <xforms:delete nodeset="." />
    </xforms:action>
 </fr:button>

</xforms:repeat>
...

The nodes that are added to the instance when a user presses "add" have
bindings that makes them "required" so if a user do not assign a value (e.g
points for a new course) the form validation stops the user from moving to the
next view.

The problem is that if a user adds a new row and then directly deletes it the
row disappears from the screen and the corresponding node in the instance is
deleted (as verified in the inspector) but the validation still fails with
message "xx is required" when the user tries to change view.

It seems as the validation is not performed on the current instance but on the
ui input control and that the ui control still exists on the server ??

I have tried different kinds of refreshes, updating the error component etc,
but nothing works.
 
Does anyone have suggestions on how to solve this?

regards Mikael


--
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
Reply | Threaded
Open this post in threaded view
|

Re: deleted node still make validation fail

Erik Bruchez
Administrator
Mikael,

That sound surprising. Can you create a small reproducible case?

-Erik

On Thu, May 26, 2011 at 2:08 PM,  <[hidden email]> wrote:

> Hi,
>
> We have an application where users can add/remove rows in a table by
> pressing  "add" and "remove" buttons.
>
> E.g
> ...
> <xforms:repeat nodeset="a:additionalCourses/a:additionalCourse">
>  <xforms:input ref="a:points">
>     <xforms:label class="forms-hidden" value="$resources/point" />
>     <xforms:alert value="$resources/alert/mandatoryValue" />
>  </xforms:input>
>  <fr:button>
>    <xforms:label value="$resources/btns/removeBtn" />
>    <xforms:action ev:event="DOMActivate">
>      <xforms:delete nodeset="." />
>    </xforms:action>
>  </fr:button>
>
> </xforms:repeat>
> ...
>
> The nodes that are added to the instance when a user presses "add" have
> bindings that makes them "required" so if a user do not assign a value (e.g
> points for a new course) the form validation stops the user from moving to the
> next view.
>
> The problem is that if a user adds a new row and then directly deletes it the
> row disappears from the screen and the corresponding node in the instance is
> deleted (as verified in the inspector) but the validation still fails with
> message "xx is required" when the user tries to change view.
>
> It seems as the validation is not performed on the current instance but on the
> ui input control and that the ui control still exists on the server ??
>
> I have tried different kinds of refreshes, updating the error component etc,
> but nothing works.
>
> Does anyone have suggestions on how to solve this?
>
> regards Mikael
>
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: deleted node still make validation fail

milin
Hi,

I have created a small example of the problem described.

The view has an "add" button that adds a node to an instance. All nodes are required to have values so when a new node is added the error model will contain errors. These errors remain even when the nodes are deleted (using the delete button).


delete-row-sandbox.zip

regards Mikael
Reply | Threaded
Open this post in threaded view
|

Re: deleted node still make validation fail

milin
In reply to this post by Erik Bruchez
Have you been able to reproduce the problem using the sample code I have submitted ?

/Mikael
Reply | Threaded
Open this post in threaded view
|

Re: Re: deleted node still make validation fail

milin
Den, skrev"milin [via Orbeon Forms (ops-users)]" <[hidden email]>:

>
>
> Have you been able to reproduce the problem using the sample code I have submitted ?
>
>
> /Mikael
>
>
>
>
>
>
>
> If you reply to this email, your message will be added to the discussion below:
>
> http://orbeon-forms-ops-users.24843.n4.nabble.com/deleted-node-still-make-validation-fail-tp3553658p3587687.html
>
>
>
>
> To unsubscribe from deleted node still make validation fail, click here.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Re: deleted node still make validation fail

Erik Bruchez
Administrator
In reply to this post by milin
Mikael,

I am trying your reproducible case with 3.9 and I don't see the issue.
Can you try to see if you have this problem with 3.9?

-Erik

On Thu, Jun 9, 2011 at 11:41 PM, milin <[hidden email]> wrote:

> Have you been able to reproduce the problem using the sample code I have
> submitted ?
>
> /Mikael
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/deleted-node-still-make-validation-fail-tp3553658p3587687.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>
>


--
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