| Issue 74: | ConstraintsTagProcessor doesn't take namespaces into account on processComponent(...) | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. Define namespace (even default) for component markup as per [UseSchema] 2. Use GridBagLayout as a layout and <gridbagconstraints .../> elements to define constraints for elements as per (rev.1050, line 72)[https://code.google.com/p/swixml2/source/browse/trunk/core/src/main/java/org/swixml/layoutconverters/GridBagLayoutConverter.java?r=1050#72] 3. Render layout with SwingApplication.render() What is the expected output? What do you see instead? <gridbagconstraints .../> elements should be taken into account but they are not. What version of the product are you using? On what operating system? swixml 2.5.20110914 with JDK 1.6.26b on WinXP Please provide any additional information below. It appears that ConstraintTagProcessor code ignores possible usage of XML namespaces on component processing and hence cannot find <gridbagconstraints .../> child elements (and other actually - it seems to be a common issue with markup document parsing). Here is a link to the code line ignoring namespaces (rev.1050, line 54): https://code.google.com/p/swixml2/source/browse/trunk/core/src/main/java/org/swixml/processor/ConstraintsTagProcessor.java?r=1050#54 <code language="java"> Element grandchild = child.getChild(Parser.TAG_GRIDBAGCONSTRAINTS); </code> Whether you update this line as follows it becomes able to find desired child element: <code language="java"> Element grandchild = child.getChild(Parser.TAG_GRIDBAGCONSTRAINTS, child.getNamespace()); </code>
Sep 16, 2011
#1
kozlovda...@gmail.com
Sep 16, 2011
thx for feedback i'll cjheck asap
Status:
Accepted
Sep 16, 2011
I've verified your fix and deployed a new SNAPSHOT (2.5-SNAPSHOT) Soon i'll arrange a new release Thanks again for contribution
Status:
Fixed
Sep 16, 2011
Hi! Thank you for great responsiveness :-)
Sep 19, 2011
Hi i've release the 2.5-20110919 with your patch thx again
Sep 19, 2011
Hi i've release the 2.5-20110919 with your patch thx again |