Hello,

Is there a way that I can create a form dynamically based on some XML
configurable file. The configurable file will say  what kind of  input
type it is. Eg "text", "checkbox" etc and accordingly, I  create the
form input types and  then display the fields. 

Eg 

My JSP looks like this right now (I am using tiles and this is the
content section )

------------------------------------------------------------------------
------------
<%@ taglib uri="/core"          prefix="c" %>
<%@ taglib uri="/struts-tiles"  prefix="tiles" %>
<%@ taglib uri="/struts-html"   prefix="html" %>

<br><br>

<html:form action="/createContentAction">
        <table width="60%" border="0.5">
                <c:forEach var="lines" items="${contentForm.map.lines}"
>
                        <tr>       
                                <td><c:out
value="${lines.attributeName}"/> </td>
                                <td><html:text  indexed="true"
name="lines" property="attributeValue"/></td>
                        </tr>    
                </c:forEach>
                        <tr>       
                                <td><html:submit/></td>
                        </tr>    
        </table>
</html:form>
    <tr>       
        <td><html:submit/></td>
    </tr>    
</table>
</html:form>

------------------------------------------------------------------------
----------------------------
Basically my intent is to load  some predefined attributes (by parsing
an XML file) and creating the 
Form on the fly using indexed DynaActionForm (contentForm) . I have been
able to get the fields up in the form, but only 
as text input fields as I am using <html:text tags. However, my input
type can be check boxes, or select type and 
I would like that to be configurable instead of hard coding in the JSP.
Is this doable ??

Any hints/tips would be appreciated. 

TIA
Shishir


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to