Jsp 在Struts 2中动态生成name和value属性
我正在将代码从Struts1迁移到Struts2 Struts1代码Jsp 在Struts 2中动态生成name和value属性,jsp,struts2,jstl,struts,ognl,Jsp,Struts2,Jstl,Struts,Ognl,我正在将代码从Struts1迁移到Struts2 Struts1代码 在Struts2中 我试过了,但没有成功 <c:set var="notifListTemp" value="ServicesNotifList-"></c:set> <c:set var="notifListTemp1" >${notifListTemp}${serviceVO.globalId}</c:set> <c:set var="notifListTemp2"
在Struts2中
我试过了,但没有成功
<c:set var="notifListTemp" value="ServicesNotifList-"></c:set>
<c:set var="notifListTemp1" >${notifListTemp}${serviceVO.globalId}</c:set>
<c:set var="notifListTemp2" value="#"></c:set>
<c:set var="notifListTemp3" >${notifListTemp1}${notifListTemp2}${serviceVO.id}</c:set>
<s:textfield theme="simple" value="${serviceVO.notifList}" name="${notifListTemp3}"
size="50" maxlength="1000" />
${notifListTemp}${serviceVO.globalId}
${notifListTemp1}${notifListTemp2}${serviceVO.id}
其中
serviceVO
是display:table
id.您不能在Struts标记的属性中使用JSP EL表达式,但很高兴您可以使用OGNL表达式。不在通过#attr
访问的值堆栈中的对象
<s:textfield theme="simple" value="%{#attr.serviceVO.notifList}" name="%{#attr.notifListTemp3}"
size="50" maxlength="1000" />
您不能在Struts标记的属性中使用JSP EL表达式,但很高兴您可以使用OGNL表达式。不在通过
#attr
访问的值堆栈中的对象
<s:textfield theme="simple" value="%{#attr.serviceVO.notifList}" name="%{#attr.notifListTemp3}"
size="50" maxlength="1000" />