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
Re: Need to wrap image in a div tag but it is failing
2007/5/18, AM101 [EMAIL PROTECTED]: 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=lt;/divgt; where lt; is and gt; is HTH Antonio
Clay @ symbol not setting taglib mutator to null
Hi, Not sure if this is a bug in clay but the clay documentation states If the result of the substitution is a zero length string, a null value is returned and the value is not apply to a property I have a clay config file using acegijsf it is configured as follows component jsfid=acegijsf:authorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAllGranted value=@ifAllGranted/ set name=ifAnyGranted value=@ifAnyGranted/ set name=ifNotGranted value=@ifNotGranted/ /attributes /component If in my html I use span jsfid=acegijsf:authorize ifAnyGranted=ROLE_ADMIN ADMIN ONLY STUFF /span When the page is rendered the Authorize class is having its methd public void setIfAllGranted(String ifAllGranted) set to @ifAllGranted and public void setIfNotGranted(String ifNotGranted) set to @ifNotGranted Now I believe these should be set to null and its causing the acegijsf to work incorrectly as it expects null values for these attributes if they`re not set. If I replace the symbols with el the same problem occurs. I have a temporary work around which is to create separate widgets for each of the attribute options but wondered if any body else had experienced this? So work around is component jsfid=acegijsf:ifAnyAuthorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAnyGranted value=@ifAnyGranted/ /attributes /component Regards Darran White Senior Developer Mobile: +44 (0) 7795577076 Skype: darran.whiteEmail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.opsera.com http://www.opsera.com Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ | UK This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although Opsera routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsera makes no representation or warranty as to the absence of viruses in this e-mail or any attachments.
RE: Clay @ symbol not setting taglib mutator to null
Hi Hermod, Unless I`m mistaken we are using Cagatay Civici http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the jsf component Note the componentType=net.sf.jsfcomp.acegijsf.Authorize We`re just using it from within clay? I`ll raise a bug. Thanks Darran White Senior Developer Mobile: +44 (0) 7795577076 Skype: darran.white Email:[EMAIL PROTECTED] www.opsera.com Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ | UK This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although Opsera routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsera makes no representation or warranty as to the absence of viruses in this e-mail or any attachments. -Original Message- From: Hermod Opstvedt [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 17:40 To: user@shale.apache.org Subject: SV: Clay @ symbol not setting taglib mutator to null Hi First of all why do you not use the Acegi integration library that Cagatay Civici? It works like a charm. I have not checked if what happens when you use symbols in connection with declared components like you do, but I suspect it might be a bug. Please file a Jira issue for it. Hermod -Opprinnelig melding- Fra: Darran White [mailto:[EMAIL PROTECTED] Sendt: 18. mai 2007 18:00 Til: user@shale.apache.org Emne: Clay @ symbol not setting taglib mutator to null Hi, Not sure if this is a bug in clay but the clay documentation states If the result of the substitution is a zero length string, a null value is returned and the value is not apply to a property I have a clay config file using acegijsf it is configured as follows component jsfid=acegijsf:authorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAllGranted value=@ifAllGranted/ set name=ifAnyGranted value=@ifAnyGranted/ set name=ifNotGranted value=@ifNotGranted/ /attributes /component If in my html I use span jsfid=acegijsf:authorize ifAnyGranted=ROLE_ADMIN ADMIN ONLY STUFF /span When the page is rendered the Authorize class is having its methd public void setIfAllGranted(String ifAllGranted) set to @ifAllGranted and public void setIfNotGranted(String ifNotGranted) set to @ifNotGranted Now I believe these should be set to null and its causing the acegijsf to work incorrectly as it expects null values for these attributes if they`re not set. If I replace the symbols with el the same problem occurs. I have a temporary work around which is to create separate widgets for each of the attribute options but wondered if any body else had experienced this? So work around is component jsfid=acegijsf:ifAnyAuthorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAnyGranted value=@ifAnyGranted/ /attributes /component Regards Darran White Senior Developer Mobile: +44 (0) 7795577076 Skype: darran.whiteEmail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.opsera.com http://www.opsera.com Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ | UK This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although Opsera routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsera makes no representation or warranty as to the absence of viruses in this e-mail or any attachments.
SV: Clay @ symbol not setting taglib mutator to null
Hi First of all why do you not use the Acegi integration library that Cagatay Civici? It works like a charm. I have not checked if what happens when you use symbols in connection with declared components like you do, but I suspect it might be a bug. Please file a Jira issue for it. Hermod -Opprinnelig melding- Fra: Darran White [mailto:[EMAIL PROTECTED] Sendt: 18. mai 2007 18:00 Til: user@shale.apache.org Emne: Clay @ symbol not setting taglib mutator to null Hi, Not sure if this is a bug in clay but the clay documentation states If the result of the substitution is a zero length string, a null value is returned and the value is not apply to a property I have a clay config file using acegijsf it is configured as follows component jsfid=acegijsf:authorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAllGranted value=@ifAllGranted/ set name=ifAnyGranted value=@ifAnyGranted/ set name=ifNotGranted value=@ifNotGranted/ /attributes /component If in my html I use span jsfid=acegijsf:authorize ifAnyGranted=ROLE_ADMIN ADMIN ONLY STUFF /span When the page is rendered the Authorize class is having its methd public void setIfAllGranted(String ifAllGranted) set to @ifAllGranted and public void setIfNotGranted(String ifNotGranted) set to @ifNotGranted Now I believe these should be set to null and its causing the acegijsf to work incorrectly as it expects null values for these attributes if they`re not set. If I replace the symbols with el the same problem occurs. I have a temporary work around which is to create separate widgets for each of the attribute options but wondered if any body else had experienced this? So work around is component jsfid=acegijsf:ifAnyAuthorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAnyGranted value=@ifAnyGranted/ /attributes /component Regards Darran White Senior Developer Mobile: +44 (0) 7795577076 Skype: darran.whiteEmail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.opsera.com http://www.opsera.com Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ | UK This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although Opsera routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsera makes no representation or warranty as to the absence of viruses in this e-mail or any attachments.
RE: Clay @ symbol not setting taglib mutator to null
Thanks Hermod, I see what you mean now that could be useful. Darran White Senior Developer Mobile: +44 (0) 7795577076 Skype: darran.white Email:[EMAIL PROTECTED] www.opsera.com Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ | UK This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although Opsera routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsera makes no representation or warranty as to the absence of viruses in this e-mail or any attachments. -Original Message- From: Hermod Opstvedt [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 18:39 To: user@shale.apache.org Subject: SV: Clay @ symbol not setting taglib mutator to null Hi I have a Clay-config file for it, that the define the library as Clay components. The content is: ?xml version='1.0' encoding='utf-8'? !--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !DOCTYPE view PUBLIC -//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN http://struts.apache.org/dtds/shale-clay-config_1_0.dtd; view component jsfid=acegi-jsf:authorize componentType=net.sf.jsfcomp.acegijsf.Authorize extends=baseComponent attributes set name=ifAllGranted bindingType=VB/set set name=ifAnyGranted bindingType=VB/set set name=ifNotGranted bindingType=VB/set /attributes /component component jsfid=acegi-jsf:authentication componentType=net.sf.jsfcomp.acegijsf.Authentication extends=baseComponent attributes set name=operation bindingType=VB/set /attributes /component /view This way, you can use like this as an example: component jsfid=userInfoPanel extends=clay id=userInfoPanel element jsfid=outputText renderId=0 attributes set name=value value=#{messages['username.text']} /set /attributes /element element jsfid=t:htmlTag renderId=1 attributes set name=value value=br/set /attributes /element element jsfid=acegi-jsf:authentication renderId=2 attributes set name=operation value=username/set /attributes /element /component Or like this: component jsfid=infoPanel extends=clay id=infoPanel element jsfid=acegi-jsf:authorize renderId=0 attributes set name=ifAnyGranted value=ROLE_somthing,ROLE_somthingelse /set /attributes element jsfid=infoEditline renderId=0/element /element element jsfid=t:htmlTag renderId=1 attributes set name=value value=h1 / set name=styleClass value=@headstyle/set /attributes element jsfid=outputText renderId=0 attributes set name=value value=@infoPanelHead/set /attributes /element /element element jsfid=t:htmlTag renderId=2 attributes set name=value value=p / set name=styleClass
SV: Clay @ symbol not setting taglib mutator to null
Hi I have a Clay-config file for it, that the define the library as Clay components. The content is: ?xml version='1.0' encoding='utf-8'? !--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !DOCTYPE view PUBLIC -//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN http://struts.apache.org/dtds/shale-clay-config_1_0.dtd; view component jsfid=acegi-jsf:authorize componentType=net.sf.jsfcomp.acegijsf.Authorize extends=baseComponent attributes set name=ifAllGranted bindingType=VB/set set name=ifAnyGranted bindingType=VB/set set name=ifNotGranted bindingType=VB/set /attributes /component component jsfid=acegi-jsf:authentication componentType=net.sf.jsfcomp.acegijsf.Authentication extends=baseComponent attributes set name=operation bindingType=VB/set /attributes /component /view This way, you can use like this as an example: component jsfid=userInfoPanel extends=clay id=userInfoPanel element jsfid=outputText renderId=0 attributes set name=value value=#{messages['username.text']} /set /attributes /element element jsfid=t:htmlTag renderId=1 attributes set name=value value=br/set /attributes /element element jsfid=acegi-jsf:authentication renderId=2 attributes set name=operation value=username/set /attributes /element /component Or like this: component jsfid=infoPanel extends=clay id=infoPanel element jsfid=acegi-jsf:authorize renderId=0 attributes set name=ifAnyGranted value=ROLE_somthing,ROLE_somthingelse /set /attributes element jsfid=infoEditline renderId=0/element /element element jsfid=t:htmlTag renderId=1 attributes set name=value value=h1 / set name=styleClass value=@headstyle/set /attributes element jsfid=outputText renderId=0 attributes set name=value value=@infoPanelHead/set /attributes /element /element element jsfid=t:htmlTag renderId=2 attributes set name=value value=p / set name=styleClass value=@contentstyle/set /attributes element jsfid=outputText renderId=0 attributes set name=value value=@infoPanelText/set set name=escape value=false/set /attributes /element /element /component Hermod -Opprinnelig melding- Fra: Darran White [mailto:[EMAIL PROTECTED] Sendt: 18. mai 2007 18:46 Til: user@shale.apache.org; [EMAIL PROTECTED] Emne: RE: Clay @ symbol not setting taglib mutator to null Hi Hermod, Unless I`m mistaken we are using Cagatay Civici http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the jsf component Note the componentType=net.sf.jsfcomp.acegijsf.Authorize We`re just using it from within clay? I`ll raise a bug. Thanks Darran White Senior Developer Mobile: +44 (0) 7795577076 Skype: darran.white Email:[EMAIL PROTECTED] www.opsera.com Opsera Limited | Unit 69 Suttons
Re: Clay @ symbol not setting taglib mutator to null
From: Darran White [EMAIL PROTECTED] Hi, Not sure if this is a bug in clay but the clay documentation states If the result of the substitution is a zero length string, a null value is returned and the value is not apply to a property I have a clay config file using acegijsf it is configured as follows component jsfid=acegijsf:authorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAllGranted value=@ifAllGranted/ set name=ifAnyGranted value=@ifAnyGranted/ set name=ifNotGranted value=@ifNotGranted/ /attributes /component If in my html I use span jsfid=acegijsf:authorize ifAnyGranted=ROLE_ADMIN ADMIN ONLY STUFF /span The problem is that your symbol names have the same names as your attributes. When you use the Tapestry like html views, clay first tries to match the markup attributes with the component properties. Markup attributes that don't have a corresponding component property, are treated as symbols. Try something like this: component jsfid=acegijsf:authorize componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true attributes set name=ifAllGranted value=@acegijsf:ifAllGranted/ set name=ifAnyGranted value=@acegijsf:ifAnyGranted/ set name=ifNotGranted value=@acegijsf:ifNotGranted/ /attributes /component span jsfid=acegijsf:authorize acegijsf:ifAnyGranted=ROLE_ADMIN ADMIN ONLY STUFF /span In this snippet, the component attribute name is ifNotGranted but the symbol name is acegijsf:ifNotGranted. When the page is rendered the Authorize class is having its methd public void setIfAllGranted(String ifAllGranted) snippet/ Darran White Senior Developer Gary