Hi list,
in many forms implemented in FTL there are fields that generates a
different HTML from the one that is generated for the equivalent
formfield widget.

For example many lookup fields are implemented in the FTL like this:

    <input type="text" size="20" maxlength="20" name="productId" value=""/>
    <a 
href="javascript:call_fieldlookup2(document.EditProductForm.productId,'LookupProduct');"><img
src='/images/fieldlookup.gif' width='15' height='14' border='0'
alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a>

A completely different HTML is generated for the formfield widget
using the markup that is defined in the htmlFormMacroLibrary.ftl file.

Could we think a way to let to easily generate in the FTL the same
HTML of the form widget?

I mean, could we think to define a macro that calls the macro
htmlFormMacroLibrary.ftl so, in place of the code above, we could use
something like:
            <@tpl.fieldLookup name="productId" fieldId="productId"
size=20 maxlength=20 value="" lookup="LookupProduct"/>
The fieldLookup macro should call the renderLookupField in the
htmlFormMacroLibrary.ftl file.

What do you think?
Does this make sense?

Thank you
-Bruno

Reply via email to