Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsp 使用Struts2检查集合是否为空_Jsp_Struts2 - Fatal编程技术网

Jsp 使用Struts2检查集合是否为空

Jsp 使用Struts2检查集合是否为空,jsp,struts2,Jsp,Struts2,我想在jsp页面中执行以下操作 <s:iterator value="familiari" status="entry"> <div id="familiare'<s:property value="#entry.index" />'" style="margin:1% 1%; float:left; width: 48%;"> <h3><a href="#"><s:property

我想在jsp页面中执行以下操作

    <s:iterator value="familiari" status="entry">
        <div id="familiare'<s:property value="#entry.index" />'" style="margin:1% 1%; float:left; width: 48%;">
            <h3><a href="#"><s:property value="nome"/>&nbsp;<s:property value="cognome"/></a></h3>
            <div style="padding:5px;">
                <label><s:text name="detraz.cf"/></label> <s:property value="codiceFiscale"/>
                <label><s:text name="detraz.relParent"/></label> <s:property value="descRelParentale"/>
                <br />
                <br />
                <label><s:text name="detraz.dataNascita"/></label> <s:property value="dataNascita"/><br />
                <label><s:text name="detraz.comuneNascita"/></label> <s:property value="comuneNascita"/><br />
                <label><s:text name="detraz.provNascita"/></label> (<s:property value="provinciaNascita"/>)<br />
                <br />
                <label><s:text name="detraz.indResidenza"/></label><br />
                <s:property value="indirizzo"/><br />
                <s:property value="cap"/>&nbsp;<s:property value="comune"/>&nbsp;(<s:property value="provincia"/>)<br />
                <s:property value="stato"/>
                <s:url id="ajaxModifyAction" value="detraz_getDettagliFamilare"/>
                <button id="modifica-<s:property value="#entry.index" />" style="float:right;"><s:text name="button.modifica"></s:text></button>            
            </div>
        </div>          
    </s:iterator>





()



()

如何使用Struts2 if语句检查熟悉列表是否为空?

要检查列表是否为空,可以执行以下操作:

<s:if test="%{getFamiliari().isEmpty()}">
...
</s:if>

...

要检查列表是否为空,可以执行以下操作:

<s:if test="%{getFamiliari().isEmpty()}">
...
</s:if>

...