[Yanel-dev] Re: [Yanel-commits] rev 45177
- public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/jelly/tags
Guillaume Déflache
guillaume.deflache at wyona.com
Mon Nov 2 14:28:22 CET 2009
Hi!
michi at wyona.com schrieb:
> Author: michi
> Date: 2009-10-25 00:34:45 +0200 (Sun, 25 Oct 2009)
> New Revision: 45177
>
> Modified:
> public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/jelly/tags/CheckboxTag.java
> Log:
> checked attribute fixed
>
> Modified: public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/jelly/tags/CheckboxTag.java
> ===================================================================
> --- public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/jelly/tags/CheckboxTag.java 2009-10-24 22:33:38 UTC (rev 45176)
> +++ public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/jelly/tags/CheckboxTag.java 2009-10-24 22:34:45 UTC (rev 45177)
> @@ -31,6 +31,12 @@
> attributes.addAttribute(XHTML_NAMESPACE, "", "type", "CDATA", "checkbox");
> attributes.addAttribute(XHTML_NAMESPACE, "", "name", "CDATA", item.getName());
> attributes.addAttribute(XHTML_NAMESPACE, "", "value", "CDATA", selection[i].getValue());
> + if (selection[i].getValue().equals("true")) {
> + log.debug("Checked!");
> + attributes.addAttribute(XHTML_NAMESPACE, "", "checked", "CDATA", "true");
> + } else {
> + log.debug("NOT Checked!");
> + }
>
> if (isSelected(selection[i])) {
> attributes.addAttribute(XHTML_NAMESPACE, "", "checked", "CDATA", "checked");
>
This does not seem to work because in some cases the "checked" attribute
is added two times (see exception at the bottom of the message).
What was the purpose of this change? Did it fix some bug?
Also using "true" as a value for the "checked" attribute seems wrong
(this is not valid XHTML), why wasn't "checked" used?
Cheers,
Guillaume
--
java.lang.Exception: Due to an exception the request has been canceled.
Exception message: org.xml.sax.SAXParseException: Attribute "checked"
was already specified for element "input".
java.lang.Exception: Due to an exception the request has been canceled.
Exception message: org.xml.sax.SAXParseException: Attribute "checked"
was already specified for element "input".
at
org.wyona.yanel.impl.resources.JellyAdapterForCUDResource.getView(JellyAdapterForCUDResource.java:147)
at org.wyona.yanel.servlet.YanelServlet.getContent(YanelServlet.java:449)
at org.wyona.yanel.servlet.YanelServlet.doGet(YanelServlet.java:297)
at org.wyona.yanel.servlet.YanelServlet.service(YanelServlet.java:218)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.wyona.yanel.servlet.communication.YanelFilter.doFilter(YanelFilter.java:37)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.Exception: org.xml.sax.SAXParseException: Attribute
"checked" was already specified for element "input".
at
org.wyona.yanel.impl.resources.JellyControllerAdapter.getView(JellyControllerAdapter.java:222)
at
org.wyona.yanel.impl.resources.JellyAdapterForCUDResource.getView(JellyAdapterForCUDResource.java:142)
... 22 more
Caused by: org.xml.sax.SAXParseException: Attribute "checked" was
already specified for element "input".
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.wyona.yanel.impl.resources.JellyControllerAdapter.processTemplate(JellyControllerAdapter.java:317)
at
org.wyona.yanel.impl.resources.JellyControllerAdapter.getView(JellyControllerAdapter.java:211)
... 23 more
More information about the Yanel-development
mailing list