cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yuri Kolesnikov <irl...@pskmill.com>
Subject CFORMS: Double fi:styling problem in 2.1.9 and solve
Date Thu, 13 Apr 2006 08:06:10 GMT
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message