I am trying to re-use several widgets. I added <tiles:useAttribute name="disable" classname="java.lang.String" /> to my widget, and:
<tiles:insert page="/WEB-INF/default/comp/phoneType.jsp" >
<tiles:put name="property" value="phone3" />
<tiles:put name="bean" beanName="registrationForm" />
</tiles:insert>
To my JSP.But I have an optional
<tiles:put name="disable" value="true" /> that I add in there. But when I check for it, the check does not work:
<logic:present name="disable"><html:select property='<%= beanName + "type" %>' disabled="true" ></logic:present>
<logic:notPresent name="disable"><html:select property='<%= beanName + "type" %>' ></logic:notPresent>
--- Thanks... Mick Knutson ---
phoneType.jsp: ============ <%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%-- Edit an Address object
@param bean An address object to edit.
@param beanName The path to add between the bean and the properties to edit.
--%>
<%-- Retrieve parameters from component context, and declare them as page variable --%>
<tiles:useAttribute id="beanName" name="property" classname="java.lang.String" ignore="true" />
<tiles:useAttribute name="disable" classname="java.lang.String" />
<tiles:importAttribute name="bean" />
<%-- Declare an html input field.
--%>
<%-- We use the bean passed as parameter.
--%>
<%-- Property name is prefixed by the sub-bean name if any. --%><logic:present name="disable"><html:select property='<%= beanName + "type" %>' disabled="true" ></logic:present>
<logic:notPresent name="disable"><html:select property='<%= beanName + "type" %>' ></logic:notPresent>
<html:option value="" key="form.select"/>
<html:option value="home" key="form.phone.type.home" />
<html:option value="work" key="form.phone.type.work" />
<html:option value="sms" key="form.phone.type.sms" />
<html:option value="mobile" key="form.phone.type.mobile" />
<html:option value="pager" key="form.phone.type.pager" />
<html:option value="other" key="form.phone.type.other" />
</html:select>
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

