undisputed
undisputed

Reputation: 180

Displaying dynamic value in struts

I m trying to display a value from database to struts.

If I use <html:text> the value is displayed in the text box.

<html:text  property="tCG.year"  size="6"></html:text>

But, if same property when I try to display as label using ${tCG.year} the value is not getting displayed.

Upvotes: 0

Views: 631

Answers (1)

JB Nizet
JB Nizet

Reputation: 691635

<html:text property="tCG.year/> means "display a text box filled with the property year of the property tCG of the form bean associated to the enclosing html:form".

So, if the form bean associated to the form is named myCoolForm, the expression you should use is ${myCoolForm.tCG.year}

Upvotes: 2

Related Questions