Hello!

I have solved small problem with fi:styling elements.

The problem was: I had form template with action widget
                   <ft:widget id="btnBuild">
<fi:styling type="confirm" message="Are you shure?"/>
                       <fi:styling type="image" src="build-btn.png"/>
                   </ft:widget>

And plus some xslt code to call confirm() when click on button.

In cocoon 2.1.7 it worked, in 2.1.9 - not.
Form transformator now save only one fi:styling element.

Here is patch for EffectWidgetReplacingPipe.WidgetHandler

2.1.9 version

protected class WidgetHandler extends NullHandler {
[skip] public Handler nestedElement(String uri, String loc, String raw, Attributes attrs)
       throws SAXException {
[skip] hasStyling = true;
               beginBuffer();
               // Buffer styling elements
               return hBuffer;
[skip] }
[skip]
}


Recomended version :-)

protected class WidgetHandler extends NullHandler {
[skip] public Handler nestedElement(String uri, String loc, String raw, Attributes attrs)
       throws SAXException {
[skip] if(!hasStyling) { hasStyling = true;
                   beginBuffer();
               }
               // Buffer styling elements
               return hBuffer;
[skip] }
[skip]
}


Yuri Kolesnikov

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to