jsp - Struts2 propertytag -
I'm trying to use the Struts2 property tag to display values from a bean As follows:
& lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; S: Been name = "com.section.entity.SectionOrder" var = "section order" /> & lt; Th colspan = "4" class = "head" & gt; & Lt; S: property value = "# sectionorder.name" /> & Lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt;
Although there is no output hope is someone can give thanks.
You do not need to declare work, if your action is for Gator and A for that variable Setter, with the same name, you can just
& lt; S: property value = "sectionOrder.name" /> gt; & Lt; / Th & gt;
The Java class should have a setter and a waiter with the same name
public yourTypeOfObject getSectionOrder () {return.sectionOrder; } Public Zero Set Sections Order (YourTypeOfObject section order) {this.sectionOrder = sectionOrder; }
In addition, the section order object should also be a waiter for name variables.
public string getName () {this.name; }
Hope it helps.
Comments
Post a Comment