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 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.white Email: [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.