You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bruno Dumon <br...@outerthought.org> on 2007/01/21 16:04:10 UTC

cforms dojo updates: calendar, help and validation messages, multivalue editor

Hi,

I've replaced the calendar, the help and validation message popups and
the multi-value editor with dojo-based implementations. Thanks to Jeremy
for upgrading to dojo 0.4, which made this possible and easier.

For the first 3, these now use dojo's popup-things, which has the
user-visible advantages of using a backing iframe in IE (so the popups
are displayed on top of other input fields), correct positioning of the
popups in IE, and at most one popup is open at the same time.

Since validation messages are also displayed via these popups, any mixed
content in them will now be preserved.

For the calendar, it now supports date, time, and datetime selection,
this is driven by the 'variant' attribute of the formatting date
convertor. As before, the server-side date/time patterns are also also
used on the client. The calendar is internationalized, for the precise
supported languages see the dojo-languages parameter in
form-field-styling.xsl.

If anyone notices problems, feel free to fix or report them.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: cforms dojo updates: calendar, help and validation messages, multivalue editor

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2007-01-25 at 19:02 +0100, Grzegorz Kossakowski wrote:
> Bruno Dumon napisał(a):
> > On Thu, 2007-01-25 at 18:34 +0100, Grzegorz Kossakowski wrote:
> >   
> >
> > Ah yes. That could be easily fixed by adding the validation error icon
> > as part of the widget-defining element (i.e. the element that gets
> > replaced by the dojo widget).
> >   
> Could you take care of it or should I apply the patch?

I could have a look at it in the weekend, but a patch is welcome.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: cforms dojo updates: calendar, help and validation messages, multivalue editor

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Bruno Dumon napisał(a):
> On Thu, 2007-01-25 at 18:34 +0100, Grzegorz Kossakowski wrote:
>   
>
> Ah yes. That could be easily fixed by adding the validation error icon
> as part of the widget-defining element (i.e. the element that gets
> replaced by the dojo widget).
>   
Could you take care of it or should I apply the patch?
> Some stuff simply requires javascript (popups, datepickers, etc). But
> you're right that the validation error icon should always be displayed,
> even if the js fails to load. Not sure if you want more than this
Let it be that only basic functionality should work without JS, the rest
that makes Forms "intriguing" demands  JS working properly, dot. I'm
fine with that.
Also thanks for your effort, new dojo-based widgets rock! :)

-- 
Grzegorz Kossakowski

Re: cforms dojo updates: calendar, help and validation messages, multivalue editor

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2007-01-25 at 18:34 +0100, Grzegorz Kossakowski wrote:
> Bruno Dumon napisał(a): 
> > On Thu, 2007-01-25 at 17:39 +0100, Grzegorz Kossakowski wrote:  
> >   
> > 
> > I think you forgot your [1] link.
> >   
> Sorry, here it goes:
> http://thread.gmane.org/gmane.text.xml.cocoon.user/59615
> I'm aware that this particular problem has other reason that need to
> be fixed but this shows exactly what happens were there is no js.
> > All the things I've changed were already Javascript based, so I see
> > little problems there. It's of course possible to override the default
> > XSLs to do something non-javascript based.
> >   
> I know, but AFAIR before dojo transition if js had failed to load
> validation still have been displayed. Or it wasn't the case then?

Ah yes. That could be easily fixed by adding the validation error icon
as part of the widget-defining element (i.e. the element that gets
replaced by the dojo widget).

> What is more important, if there is any agreement on treating this
> kind of issues? Should we just require JS for Forms or try create html
> output that easily fallbacks if there is no js? Is it possible and
> worth the effort?

Some stuff simply requires javascript (popups, datepickers, etc). But
you're right that the validation error icon should always be displayed,
even if the js fails to load. Not sure if you want more than this?

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: cforms dojo updates: calendar, help and validation messages, multivalue editor

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Bruno Dumon napisał(a):
> On Thu, 2007-01-25 at 17:39 +0100, Grzegorz Kossakowski wrote:  
>   
>
> I think you forgot your [1] link.
>   
Sorry, here it goes:
http://thread.gmane.org/gmane.text.xml.cocoon.user/59615
I'm aware that this particular problem has other reason that need to be
fixed but this shows exactly what happens were there is no js.
> All the things I've changed were already Javascript based, so I see
> little problems there. It's of course possible to override the default
> XSLs to do something non-javascript based.
>   
I know, but AFAIR before dojo transition if js had failed to load
validation still have been displayed. Or it wasn't the case then?
What is more important, if there is any agreement on treating this kind
of issues? Should we just require JS for Forms or try create html output
that easily fallbacks if there is no js? Is it possible and worth the
effort?

-- 
Grzegorz Kossakowski

Re: cforms dojo updates: calendar, help and validation messages, multivalue editor

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2007-01-25 at 17:39 +0100, Grzegorz Kossakowski wrote:
> Bruno Dumon napisał(a):
> > Hi,
> >
> > I've replaced the calendar, the help and validation message popups and
> > the multi-value editor with dojo-based implementations. Thanks to Jeremy
> > for upgrading to dojo 0.4, which made this possible and easier.
> > <snip/>
> >
> > If anyone notices problems, feel free to fix or report them.
> >   
> I would like to ask if Forms are still supposed to work without JS
> enabled? If so there is an issue with validation errors, see [1]. I
> think it's quite easy to fix this particular issue (I can take care of
> it) but I would like to know about general guidelines. Also there is
> still issue with loading forms resources in C2.2, but it's topic for
> another thread. I'll start it now.

I think you forgot your [1] link.

All the things I've changed were already Javascript based, so I see
little problems there. It's of course possible to override the default
XSLs to do something non-javascript based.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: cforms dojo updates: calendar, help and validation messages, multivalue editor

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Bruno Dumon napisał(a):
> Hi,
>
> I've replaced the calendar, the help and validation message popups and
> the multi-value editor with dojo-based implementations. Thanks to Jeremy
> for upgrading to dojo 0.4, which made this possible and easier.
> <snip/>
>
> If anyone notices problems, feel free to fix or report them.
>   
I would like to ask if Forms are still supposed to work without JS
enabled? If so there is an issue with validation errors, see [1]. I
think it's quite easy to fix this particular issue (I can take care of
it) but I would like to know about general guidelines. Also there is
still issue with loading forms resources in C2.2, but it's topic for
another thread. I'll start it now.

-- 
Grzegorz Kossakowski

Re: cforms dojo updates: calendar, help and validation messages, multivalue editor

Posted by Jeremy Quinn <je...@apache.org>.
Hi Bruno

Excellent work !!

regards Jeremy


On 21 Jan 2007, at 15:04, Bruno Dumon wrote:

> Hi,
>
> I've replaced the calendar, the help and validation message popups and
> the multi-value editor with dojo-based implementations. Thanks to  
> Jeremy
> for upgrading to dojo 0.4, which made this possible and easier.
>
> For the first 3, these now use dojo's popup-things, which has the
> user-visible advantages of using a backing iframe in IE (so the popups
> are displayed on top of other input fields), correct positioning of  
> the
> popups in IE, and at most one popup is open at the same time.
>
> Since validation messages are also displayed via these popups, any  
> mixed
> content in them will now be preserved.
>
> For the calendar, it now supports date, time, and datetime selection,
> this is driven by the 'variant' attribute of the formatting date
> convertor. As before, the server-side date/time patterns are also also
> used on the client. The calendar is internationalized, for the precise
> supported languages see the dojo-languages parameter in
> form-field-styling.xsl.
>
> If anyone notices problems, feel free to fix or report them.
>
> -- 
> Bruno Dumon                             http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> bruno@outerthought.org                          bruno@apache.org
>