<s:textfield> struts2中的属性值

Loh*_*hit 2 struts2

如何设置权利价值 <s:textfield>

我试过<s:textfield name="customerName" label="Customer Name" value='<s:property value="userInfo.customerName"' />但它没用.

请帮忙

Joh*_*nes 17

您不能在标签内使用标签.请改用OGNL!

<s:textfield name = "customerName" 
            label = "Customer Name" 
            value = "%{userInfo.customerName}"/>
Run Code Online (Sandbox Code Playgroud)