You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Barzilai Spinak <ba...@internet.com.uy> on 2003/09/09 08:48:42 UTC

To whom JXForms may concern (selectBoolean?)

Hello list!

I started porting a project from the deprecated XMLForms to JXForms.
One problem I found, though, is the lack of an equivalent to the old
xf:selectBoolean for cases when I don't need a whole set of values to
choose from.

The current "xf:select" works much like the old "xf:selectMany". This
is very good when you have a model that holds the whole universe of 
options, and then you have another part of the model where the actual 
selected values from the universe are stored. But when you have a simple 
"true/false" checkbox, it's not very comfortable to have things 
separated in two places.

For example, with the current xf:select you would have something similar
to this:

<xf:select ref="/chosenOptions" appearance="full">
     <xf:item>
         <xf:value ref="/universe[1]"/>
     </xf:item>
     <xf:item>
         <xf:value ref="/universe[2]"/>
     </xf:item>
</xf:select>


However, in a simple true/false case (like selectBoolean), I don't need 
a separate universe of options. The true/false values are implicit, so I 
just need a storage place for the actual information.

(Note: This could be solved very awkwardly in current JXForms by having 
a couple of radio buttons, one for "true" and one for "false" but it's 
not a nice solution)

Part of the problem in implementation stems from the fact that usually
HTML forms only submit a checkbox value when it has been checked (as a 
parameter like  myCheckBox=on). There's no submission for when it's 
unchecked, or false, or off. If you use, in JXForms, an "xf:select" 
where "xf:item" value is true, it will work the first time, but there's 
no way to turn the value off!!

All this was solveded easily in XMLForms by having the 
"xf:selectBoolean" element, which was treated in a special way, 
differently fomr the other "selects".

Is something similar going to happen in JXForms?  I think it's not that 
hard to implement, although there's no equivalent in XForms (but I have 
read in other messages that 100% conformance is not the goal.. so...)

And who's responsible for JXForms development??  Ivelin says he's not!
Also, inthe jxforms block there are several pieces of code and classes 
from xmlforms, which I'm not sure all of them are used... at least part 
of it looks like leftover code that hasn't been purgued.

Please, any kind of help, direction, comments, or hints about ongoing 
development will be much appreciated. At least to know if I should keep 
wasting my time with JXForms or try something else.

BarZ


ADSL para estar en internet las 24 horas a m�xima velocidad 
	          y sin ocupar el tel�fono.
-----------------------------------------------------------
http://www.internet.com.uy                   Tel. 707.42.52