문제
이것은 설명하기가 조금 까다로울 것입니다. 주소 필드를 구성하기 위해 태그를 작성하려고하지만 Ognl 표현식을 해결하는 데 어려움이 있습니다.
예상 사용 :
Member.address는 주소 개체에지도를 맵핑합니다 (아무것도 Cleaver도 없음).
내 태그 (가장 간단한 버전) :
<%@taglib prefix="s" uri="/struts-tags" %>
<%@attribute name="name" required="true" rtexprvalue="true" type="java.lang.String" %>
<s:push value="%{#attr.name}">
Address line 1:
<s:property value="line1"/>
</s:push>
문제는 그게 생각합니다 <s:push value="%{#attr.name}"/>
실제로 memb
해결책
조금 더 많은 연구와 오랜 시간이 OGNL 문서 결과는 다음과 같습니다.
<%@taglib prefix="s" uri="/struts-tags" %>
<%@attribute name="name" required="true" rtexprvalue="true" type="java.lang.String" %>
<s:push value="%{(#attr.name)(#attr)}">
Address line 1:
<s:property value="line1"/>
</s:push>
트릭을 할 것 같습니다.
제휴하지 않습니다 StackOverflow