Hi
I have 100 fields for a JSP.And in the JSP a field can be
mandatory/optiobal/read only.
I am writing a custom tag to display the label bold for mandatory and non
bold for optional.
I am having a indicator for each field and I am passing this indicator to
the custom tag.
I am giving the sample code as below.

In the form bean
private String field1;
private String field2;

private boolean field1Indicator;
private boolean field2Indicator;
(set and get for all)

In the JSP.

<myTag:indicatorStartDisplay indicatorType='<bean:write name="myForm"
property="field1Indicator"/>'/>
              <html:text name="myForm" property="field1"/>
<myTag:indicatorEndDisplay indicatorType='<bean:write name="myForm"
property="field1Indicator"/>'/>

<myTag:indicatorStartDisplay indicatorType='<bean:write name="myForm"
property="field2Indicator"/>'/>
              <html:text name="myForm" property="field2"/>
<myTag:indicatorEndDisplay indicatorType='<bean:write name="myForm"
property="field2Indicator"/>'/>

Here I have two custom tags which writes
<b> and </b> in between the text field.

As I have 100 field,with this approach I have to have 100 field indicator.
Is there any other way to implement this???

--
Thanks and Regards
Hanmayya Udgiri

Reply via email to