I am using a servlet 2.3/jsp1.2 container and I want to create reusable fields i.e. text, checkbox, etc... One of the reason I am doing this is that I want to inject JS functions to all fields. For this to be truly generic, the path attribute should be dynamic. Can I do this?
<!-- input.jsp -->
<spring:bind path="${name}">
<input type="text" name="${status.expression}" value="${status.value}" onfocus="callSomeJsFunction();"/>
</spring:bind>
<!-- Some sample JSP -->
<tiles:insert page="/WEB-INF/jsp/templates/input.jsp">
<tilesut name="id" value="someId"/>
<tilesut name="name" value="pathAttributeNameString"/>
</tiles:insert>
Has anyone tried anything like that?


ut name="id" value="someId"/>
Reply With Quote