On 7/27/06, Grzegorz Kossakowski <[EMAIL PROTECTED]> wrote:
Omar Adobati napisaĆ(a): > Good Morning all, > > In which way I could personalize the CForms widgets? > I'd like to be able to set the input sizes, such as the style and the > behavior when certain condition happen (suppose when I check more the > THE_LIMIT checkboxes). > Now, I can do it using "standard" forms, but I don't know what I have > to manage to do the same with CForms. What about generating custom <fi:styling/> [1] tag? You could calculate needed size in event handler[2] (e.g. onValueChanged) and place calculated value in form attribute (CForms has a concept of attributes, see javadocs [3]). Then you could obtain it from JXTemplate while generating <fi:styling/>. This should do the trick in very clean way.
This sound really what I'm looking for... I'll take a look to the link you write here :)
> Another question: > I'm taking a look to the form-samples-styling.xsl and it just import > or include other xsl file using, for example, this line of code: > > <xsl:include > href="resource://org/apache/cocoon/forms/resources/forms-page-styling.xsl"/> > > > I can't understand the "reference" protocol... where it point? Will be > a good choice to try to edit the files included or imported by this > stylesheet? I guess you mean "context://" protocol? ;-) If so, it enables you to access files from servlet context path. Basically these are files placed in WEB-INF/classes and WEB-INF/lib/*.jar. XSL given in example is stored in some CForm's jar. You should not try to edit these included/imported XSLs in need of customization. Only edit them when you make a generic patch that for example fix some bug, and then do not forget to donate it back to the Cocoon :-) So in short: follow good practices, import needed stylesheets and create your own templates that override original ones.
thanks for this too, is now easy clear to understand :)
Hope this helps. If you have additional questions, do not hesitate to ask.
You could be sure, I'll do it... Omar
