<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="/struts-tags" %>

<div id="forDeviceInfo">
<s:if test="%{dataRows!=null}">
    <div class="changesData"></div>
    <form method="post" action="saveDeviceInfo" id="formForDeviceInfo">

        <span class="title"><s:text name="label.serialNumber"/>:<s:property value="serial"/></span>
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="example" style="">
            <thead>
                <tr>
                    <th><s:text name="label.propertyName" /></th>
                    <th><s:text name="label.propertyValue" /></th>
                    <th><s:text name="label.changed" /></th>
                </tr>
            </thead>
            <tbody>
                 <s:iterator value="dataRows"  var="dataRow" status="s_dataRow" >
                    <tr class="gradeX">
                        <td>
                            <s:property value="#dataRow.paramName"  />
                        </td>
                        <td class="value">
                            <s:property value="#dataRow.paramValue"/>
                        </td>
                        <td >
                            <s:if test="%{#dataRow.paramChanged}" >
                                   <img src="<%=request.getContextPath()%>/images/content/flag.png"  class="flag"/>
                                   <input type="hidden" name="property" value="<s:property value="#dataRow.paramName"  />"/>
                            </s:if>
                        </td>
                    </tr>
                 </s:iterator>
                 <s:iterator value="list"   var="eventStructure">
                    <tr class="gradeX">
                        <td>
                            <s:property value="#eventStructure.paramName"  />
                        </td>
                        <td class="value">
                            <s:property value="#eventStructure.paramValue"/>
                        </td>
                        <td >
                            <s:if test="%{#eventStructure.paramChanged}" >
                                   <img src="<%=request.getContextPath()%>/images/content/flag.png"  class="flag"/>
                                   <input type="hidden" name="property" value="<s:property value="#eventStructure.paramName" />" />
                            </s:if>
                        </td>
                    </tr>
                 </s:iterator>
            </tbody>
        </table>
        <input type="hidden" name="serial" value="<s:property value="serial"  />"/>
    </form>
</s:if>
<s:else>
     <s:text name="msg.notChanged.property" />
</s:else>
</div>