2013-03-05 5 views
0

기본 시작 Spring MVC와 Apache Tiles 애플리케이션은 사전 정의 된 tagx 파일 목록을 가지고있다. 변수 $ {param}이 어디서나 사용되었지만 정의되고 시작된 변수를 찾을 수 없습니다. 누군가가 어디에서 왔는지 힌트를 줄 수 있습니까? 감사 language.tagx에서 예Spring MVC/Apache Tiles 애플리케이션에서 'param'변수 정의 위치 :

:

<jsp:directive.attribute name="locale" type="java.lang.String" required="true" rtexprvalue="true" description="The locale for the language to be added." /> 
<jsp:directive.attribute name="label" type="java.lang.String" required="true" rtexprvalue="true" description="The country label for the language to be added." /> 
<jsp:directive.attribute name="render" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicate if the contents of this tag and all enclosed tags should be rendered (default 'true')" /> 

<c:if test="${empty render or render}"> 
<spring:url var="img" value="/images/${locale}.png" /> 
<spring:url var="url" value=""> 
    <c:if test="${null ne param.form}"> 
    <spring:param name="form" value="1" /> 
    </c:if> 
    <c:if test="${not empty param.find}"> 
    <spring:param name="find" value="${param.find}" /> 
    </c:if> 
    <spring:param name="lang" value="${locale}" /> 
    <c:if test="${not empty param.page}"> 
    <spring:param name="page" value="${param.page}" /> 
    </c:if> 
    <c:if test="${not empty param.size}"> 
    <spring:param name="size" value="${param.size}" /> 
    </c:if> 
</spring:url> 
<spring:message code="global_language_switch" arguments="${label}" var="lang_label" htmlEscape="false" /> 
<a href="${url}" title="${fn:escapeXml(lang_label)}"> 
    <img class="flag" src="${fn:escapeXml(img)}" alt="${fn:escapeXml(lang_label)}" /> 
</a> 
<c:out value=" " /> 
</c:if> 
+0

예가 어디에 있습니까? – AlanFoster

+0

@AlanFoster 게시물을 업데이트하십시오. 고맙습니다. – Dreamer

답변

2

paramUnified Expression Language 의해 제공되는 함축적 인 목적이다. 요청 매개 변수의 값에 액세스 할 수 있습니다.

+0

감사합니다. 따라서 $ {param}이 이전 요청의 변수를 전달하는 데 주로 사용되며 사용자 정의 된 데이터를 채우지 않는 것이 좋습니다. – Dreamer

관련 문제