Error Summary

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

Error Summary

Park, Michael

 

Hello all,

 

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated. 

 

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).  

 

My main goal is to tie it into a save button that will be read only until all errors are cleared.

 

 

Thanks!

Mike

 



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

hello.xhtml (7K) Download Attachment
editor.xsd (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error Summary

Erik Bruchez
Administrator
Mike,

An easy one: the code checks that the alert is not empty:

   if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:

>
> Hello all,
>
> I’m trying to add an error summary to my app just like the  
> Government Forms example with no success.  Any help/suggestions  
> would be greatly appreciated.
>
> I’ve created a very simple XForms sample and added the code noted in  
> the blog (http://www.orbeon.com/blog/2006/08/04/).
>
> My main goal is to tie it into a save button that will be read only  
> until all errors are cleared.
>
>
> Thanks!
> Mike
>
> <hello.xhtml><editor.xsd>
>
> --
> 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
--
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
Reply | Threaded
Open this post in threaded view
|

RE: Error Summary

Park, Michael
Thanks Erik!  That makes sense...

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Thursday, December 20, 2007 9:48 PM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

Mike,

An easy one: the code checks that the alert is not empty:

   if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:

>
> Hello all,
>
> I'm trying to add an error summary to my app just like the  
> Government Forms example with no success.  Any help/suggestions  
> would be greatly appreciated.
>
> I've created a very simple XForms sample and added the code noted in  
> the blog (http://www.orbeon.com/blog/2006/08/04/).
>
> My main goal is to tie it into a save button that will be read only  
> until all errors are cleared.
>
>
> Thanks!
> Mike
>
> <hello.xhtml><editor.xsd>
>
> --
> 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
--
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
Reply | Threaded
Open this post in threaded view
|

Re: Error Summary

StephR
In reply to this post by Erik Bruchez
Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :
Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:


Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

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

view.xhtml (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Error Summary

Park, Michael

Steph,

 

Anything that uses the error summary has to be inside xforms:group.  Therefore, you must put the input control for title inside of the xforms:group block.  That should fix it.

 

-Mike

 


From: Stephane Ruchet [mailto:[hidden email]]
Sent: Tuesday, January 15, 2008 10:12 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :

Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:



Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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

RE: Error Summary

Park, Michael
In reply to this post by StephR

Steph,

 

Try the attached file.  It works now.

 

-Mike

 


From: Stephane Ruchet [mailto:[hidden email]]
Sent: Tuesday, January 15, 2008 10:12 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :

Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:



Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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

view.xhtml (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Error Summary

Park, Michael
In reply to this post by StephR

Steph,

 

Oops, one more time – try this one.  But you’ll need to have a schema which has something like <xs:minLength value="1"/>  I left the code which points to mine and attached a schema.  You’ll have to substitute your own.

 

 


From: Stephane Ruchet [mailto:[hidden email]]
Sent: Tuesday, January 15, 2008 10:12 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :

Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:



Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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

view.xhtml (5K) Download Attachment
editor.xsd (992 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error Summary

StephR
Hi Mark,

Thanks a lot for your feedback.

I'm not too familiar with schemas so I hope I will make it work out. I do still have a question : for there errors to be showed, it ONLY depends on the schema? I saw that if I removed the reference to the schema in the model, no errors will show up even though I have a required="true()" in the bind. In that case, what is the purpose to use binds if anyway we have to add all the constraints in the schema ?

Steph



Park, Michael a écrit :

Steph,

 

Oops, one more time – try this one.  But you’ll need to have a schema which has something like <xs:minLength value="1"/>  I left the code which points to mine and attached a schema.  You’ll have to substitute your own.

 

 


From: Stephane Ruchet [[hidden email]]
Sent: Tuesday, January 15, 2008 10:12 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :

Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:



Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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

RE: Error Summary

Park, Michael

Steph,

 

The relevant attribute has to do with the display of a control.  If the XPath expression in relevant evaluates to false, the control will not be displayed at all.  It is not related to the element being valid or invalid.  A schema defines your XML.  Based on the definition, it is either valid or invalid.  You can read this simple tutorial and get a good idea of schemas: http://www.w3schools.com/schema/default.asp.  The purpose of bind is to apply rules to elements and attributes in an instance.  Type is just one of those rules which is defined in a schema.

 

 

-Mike

 


From: Stephane Ruchet [mailto:[hidden email]]
Sent: Wednesday, January 16, 2008 5:13 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi Mark,

Thanks a lot for your feedback.

I'm not too familiar with schemas so I hope I will make it work out. I do still have a question : for there errors to be showed, it ONLY depends on the schema? I saw that if I removed the reference to the schema in the model, no errors will show up even though I have a required="true()" in the bind. In that case, what is the purpose to use binds if anyway we have to add all the constraints in the schema ?

Steph



Park, Michael a écrit :

Steph,

 

Oops, one more time – try this one.  But you’ll need to have a schema which has something like <xs:minLength value="1"/>  I left the code which points to mine and attached a schema.  You’ll have to substitute your own.

 

 


From: Stephane Ruchet [[hidden email]]
Sent: Tuesday, January 15, 2008 10:12 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :

Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:




Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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

Re: Error Summary

StephR
Mike,

I will read at once the link you passed... but let me ask my question differently (I maybe didn't understand your answer, sorry for my english) :

Let's suppose I don't use at all schemas... and that I have an element that is required in a form. If it is empty, the input will be in red, but no error will be showed. Why ?

Steph


Park, Michael a écrit :

Steph,

 

The relevant attribute has to do with the display of a control.  If the XPath expression in relevant evaluates to false, the control will not be displayed at all.  It is not related to the element being valid or invalid.  A schema defines your XML.  Based on the definition, it is either valid or invalid.  You can read this simple tutorial and get a good idea of schemas: http://www.w3schools.com/schema/default.asp.  The purpose of bind is to apply rules to elements and attributes in an instance.  Type is just one of those rules which is defined in a schema.

 

 

-Mike

 


From: Stephane Ruchet [[hidden email]]
Sent: Wednesday, January 16, 2008 5:13 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi Mark,

Thanks a lot for your feedback.

I'm not too familiar with schemas so I hope I will make it work out. I do still have a question : for there errors to be showed, it ONLY depends on the schema? I saw that if I removed the reference to the schema in the model, no errors will show up even though I have a required="true()" in the bind. In that case, what is the purpose to use binds if anyway we have to add all the constraints in the schema ?

Steph



Park, Michael a écrit :

Steph,

 

Oops, one more time – try this one.  But you’ll need to have a schema which has something like <xs:minLength value="1"/>  I left the code which points to mine and attached a schema.  You’ll have to substitute your own.

 

 


From: Stephane Ruchet [[hidden email]]
Sent: Tuesday, January 15, 2008 10:12 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :

Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:




Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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

RE: Error Summary

Park, Michael

That is correct.  I apologize, I got required mixed up with relevant.  I understand what you are asking.  Why is it invalid but not showing up as a error message.

 

What I’ve noticed when I test with my application is that it doesn’t fire an xforms-invalid event until you submit the form.  In other words it will fail to submit because it is invalid.  However, it will appear invalid when you have the blank form available.  To get the blank form to react you need to use a type from a schema. 

 

 


From: Stephane Ruchet [mailto:[hidden email]]
Sent: Wednesday, January 16, 2008 8:50 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Mike,

I will read at once the link you passed... but let me ask my question differently (I maybe didn't understand your answer, sorry for my english) :

Let's suppose I don't use at all schemas... and that I have an element that is required in a form. If it is empty, the input will be in red, but no error will be showed. Why ?

Steph


Park, Michael a écrit :

Steph,

 

The relevant attribute has to do with the display of a control.  If the XPath expression in relevant evaluates to false, the control will not be displayed at all.  It is not related to the element being valid or invalid.  A schema defines your XML.  Based on the definition, it is either valid or invalid.  You can read this simple tutorial and get a good idea of schemas: http://www.w3schools.com/schema/default.asp.  The purpose of bind is to apply rules to elements and attributes in an instance.  Type is just one of those rules which is defined in a schema.

 

 

-Mike

 


From: Stephane Ruchet [[hidden email]]
Sent: Wednesday, January 16, 2008 5:13 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi Mark,

Thanks a lot for your feedback.

I'm not too familiar with schemas so I hope I will make it work out. I do still have a question : for there errors to be showed, it ONLY depends on the schema? I saw that if I removed the reference to the schema in the model, no errors will show up even though I have a required="true()" in the bind. In that case, what is the purpose to use binds if anyway we have to add all the constraints in the schema ?

Steph



Park, Michael a écrit :

Steph,

 

Oops, one more time – try this one.  But you’ll need to have a schema which has something like <xs:minLength value="1"/>  I left the code which points to mine and attached a schema.  You’ll have to substitute your own.

 

 


From: Stephane Ruchet [[hidden email]]
Sent: Tuesday, January 15, 2008 10:12 AM
To: [hidden email]
Subject: Re: [ops-users] Error Summary

 

Hi all !

I don't see what I have forgotten to add in my form so that an error is showed (title is mandatory and when loaded the form is empty).

Any idea?

Thanks
Steph


Erik Bruchez a écrit :

Mike,

An easy one: the code checks that the alert is not empty:

  if="normalize-space(event('alert')) != ''"

If you add xforms:alert elements to your controls, it works.

-Erik

On Dec 20, 2007, at 5:31 AM, Park, Michael wrote:





Hello all,

I’m trying to add an error summary to my app just like the Government Forms example with no success.  Any help/suggestions would be greatly appreciated.

I’ve created a very simple XForms sample and added the code noted in the blog (http://www.orbeon.com/blog/2006/08/04/).

My main goal is to tie it into a save button that will be read only until all errors are cleared.


Thanks!
Mike

<hello.xhtml><editor.xsd>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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