You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by AM101 <An...@fatwire.com> on 2007/05/18 13:52:24 UTC
Need to wrap image in a div tag but it is failing
I need to wrap an image in a div tag. I have following component in a data
table inside shale clay configuration file:
##########################################################
<component jsfid="maLstURL" extends="t:column" id="maLstURL">
<attributes>
<set name="sortable" value="false" />
</attributes>
<element renderId="1" jsfid="outputText" facetName="header">
<attributes>
<set name="value" value="Picture" />
</attributes>
</element>
<element renderId="2" jsfid="outputLink">
<attributes>
<set name="value"
value="showlistingpage.html?listing_id=#{listings.id}" />
</attributes>
<element renderId="0" jsfid="outputText">
<attributes>
<set name="value" value="<div id='12345'>" />
<set name="escape" value="false" />
</attributes>
</element>
<element renderId="1" jsfid="t:graphicImage">
<attributes>
<set name="selectedRowIndex" value="#{rowIndex}" />
<set name="url"
value="/resources/uploadedimages/#{listings.pictureUrl1}" />
<set name="title" value="Picture" />
<set name="width" value="150" />
<set name="height" value="110" />
<set name="border" value="0" />
</attributes>
</element>
<element renderId="2" jsfid="outputText">
<attributes>
<set name="value" value="</div>" />
<set name="escape" value="false" />
</attributes>
</element>
</element>
</component>
##########################################################
But It throws following exception:
*****************************************************************************
SEVERE: Parse Fatal Error at line 1259 column 31: The value of attribute
"value" associated with an element type "set" must not contain the '<'
character.
org.xml.sax.SAXParseException: The value of attribute "value" associated
with an element type "set" must not contain the '<' character.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:929)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(XMLDocumentFragmentScannerImpl.java:1033)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:851)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at org.apache.commons.digester.Digester.parse(Digester.java:1745)
at
org.apache.shale.clay.config.ClayXmlParser.loadConfigFile(ClayXmlParser.java:138)
at
org.apache.shale.clay.config.beans.ComponentConfigBean$WatchDog.refresh(ComponentConfigBean.java:1292)
at
org.apache.shale.clay.config.beans.ComponentConfigBean.loadConfigFiles(ComponentConfigBean.java:231)
at
org.apache.shale.clay.config.beans.ComponentConfigBean.init(ComponentConfigBean.java:179)
at
org.apache.shale.clay.config.ClayConfigureListener.contextInitialized(ClayConfigureListener.java:85)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
May 18, 2007 7:23:48 AM
org.apache.shale.clay.config.beans.ComponentConfigBean$WatchDog refresh
SEVERE: Exception parsing file
"/localhost/investmentrx/WEB-INF/clay-investmentrx-config.xml".
*****************************************************************************
Please let me what am I missing?
Thanks,
AM
--
View this message in context: http://www.nabble.com/Need-to-wrap-image-in-a-div-tag-but-it-is-failing-tf3777199.html#a10680674
Sent from the Shale - User mailing list archive at Nabble.com.
Re: Need to wrap image in a div tag but it is failing
Posted by AM101 <An...@fatwire.com>.
Thanks for your help, I got it now.
Antonio Petrelli-3 wrote:
>
> 2007/5/18, AM101 <An...@fatwire.com>:
>>
>>
>> I am sorry I am not sure what do you mean, can you please explain?
>
>
>
> you wrote :
>
> value="</div>"
>
> This is not XML compliant, since the "<" and ">" characters are used to
> delimit tags.
> Instead you have to use the corresponding XML entities. In other words
> change your code to:
>
> value="</div>"
>
> where < is < and > is >
>
> HTH
> Antonio
>
>
--
View this message in context: http://www.nabble.com/Need-to-wrap-image-in-a-div-tag-but-it-is-failing-tf3777199.html#a10710393
Sent from the Shale - User mailing list archive at Nabble.com.
Re: Need to wrap image in a div tag but it is failing
Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/18, AM101 <An...@fatwire.com>:
>
>
> I am sorry I am not sure what do you mean, can you please explain?
you wrote :
value="</div>"
This is not XML compliant, since the "<" and ">" characters are used to
delimit tags.
Instead you have to use the corresponding XML entities. In other words
change your code to:
value="</div>"
where < is < and > is >
HTH
Antonio
SV: Need to wrap image in a div tag but it is failing
Posted by Hermod Opstvedt <he...@opstvedt.com>.
Hi
This must be <set name="value" value="</div>" />
By the way, you can also use the t:div component from tomahawk.
Hermod
-----Opprinnelig melding-----
Fra: AM101 [mailto:Anup.Modi@fatwire.com]
Sendt: 18. mai 2007 15:27
Til: user@shale.apache.org
Emne: Re: Need to wrap image in a div tag but it is failing
I am sorry I am not sure what do you mean, can you please explain?
Antonio Petrelli-3 wrote:
>
> 2007/5/18, AM101 <An...@fatwire.com>:
>>
>>
>> <set name="value" value="</div>"
>> />
>
>
>
>
> SEVERE: Parse Fatal Error at line 1259 column 31: The value of
> attribute
>> "value" associated with an element type "set" must not contain the '<'
>> character.
>
>
>
> Use < and > entities.
>
> HTH
> Antonio
>
>
--
View this message in context:
http://www.nabble.com/Need-to-wrap-image-in-a-div-tag-but-it-is-failing-tf37
77199.html#a10682138
Sent from the Shale - User mailing list archive at Nabble.com.
Re: Need to wrap image in a div tag but it is failing
Posted by AM101 <An...@fatwire.com>.
I am sorry I am not sure what do you mean, can you please explain?
Antonio Petrelli-3 wrote:
>
> 2007/5/18, AM101 <An...@fatwire.com>:
>>
>>
>> <set name="value" value="</div>"
>> />
>
>
>
>
> SEVERE: Parse Fatal Error at line 1259 column 31: The value of attribute
>> "value" associated with an element type "set" must not contain the '<'
>> character.
>
>
>
> Use < and > entities.
>
> HTH
> Antonio
>
>
--
View this message in context: http://www.nabble.com/Need-to-wrap-image-in-a-div-tag-but-it-is-failing-tf3777199.html#a10682138
Sent from the Shale - User mailing list archive at Nabble.com.
Re: Need to wrap image in a div tag but it is failing
Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/18, AM101 <An...@fatwire.com>:
>
>
> <set name="value" value="</div>"
> />
SEVERE: Parse Fatal Error at line 1259 column 31: The value of attribute
> "value" associated with an element type "set" must not contain the '<'
> character.
Use < and > entities.
HTH
Antonio