从 jsp 调用方法并使用它

Calling a method from jsp and using it

我正在尝试从 jsp 调用一个方法,以便将结果与 null 进行比较,这样:

<s:if test="%{@registradores.utiles.enumerados.EstadoTramite.tipoMensajeSegunEstado('#attr.listaContatosTable.estado_Nue')!='null'}">

但显然不起作用,它总是跳过 if,就像结果总是 false

完整代码为:

    <s:if test="%{@registradores.utiles.enumerados.EstadoTramite.tipoMensajeSegunEstado('#attr.listaContatosTable.estado_Nue')!='null'}">
        <display:column title="Archivo" headerClass="sortable"
                        defaultorder="descending" style="width:12% ;color:black">
            <s:submit id="botonDescargarNotificacion" value="Notificación"
                      cssClass="boton"
                      onclick="enviarADesde('descargarDocumentoAcuse.action#Notificaciones#', 'formNotificaciones')" />
            &nbsp;
        </display:column>
    </s:if>

顺便说一句:

此代码有效

<s:property
    value="%{@registradores.utiles.enumerados.EstadoTramite@tipoMensajeSegunEstado(#attr.listaContatosTable.estado_Nue)}" />

好久没用JSP了

你能试试这个吗,如果有效请告诉我?

<s:if test="%{@registradores.utiles.enumerados.EstadoTramite.tipoMensajeSegunEstado('#attr.listaContatosTable.estado_Nue')!=null}">