Hi: Thanks for the help and solutions.
I prefer the xslt tranformation at woody template because: 1-write less code. 2-The definition clearly states it is a boolean value. 3-Seems to be a better separation of concerns. AFAIK, the booleanfield is a special case and if it will be used just as a rendering property (to a checkbox), then we can avois the use of boolean field and leave just the normal field + define a attribute that will allow it to render it as a checkbox. Best Regards, Antonio Gallardo Vadim Gritsenko dijo: > Sylvain Wallez wrote: > >> Antonio Gallardo wrote: >> >>> Hi: >>> >>> Recently we needed render some boolean widgets as a combobox with 2 >>> posible values: Yes or No. >>> >>> I ask to the list if this change can be useful to integrate it to the >>> woody sample stylesheet. Currently boolean fields can be only >>> rendered as >>> checkboxes. >>> >> >> The solution to this is to use a <wd:field> of type boolean with a >> selection list. > > > And here is the sample: > > <wd:field id="myBoolean"> > <wd:datatype base="boolean"/> > <wd:selection-list> > <wd:item value="true"> > <wd:label><i18n:text key="yes"/></wd:label> > </wd:item> > <wd:item value="false"> > <wd:label><i18n:text key="no"/></wd:label> > </wd:item> > <wd:item value=""> > <wd:label><i18n:text key="noanswer"/></wd:label> > </wd:item> > </wd:selection-list> > </wd:field> > > > Vadim > >
