model.org.orgId

*

@Transient
public TBaseOrg getOrg() {

if (this.getTBaseOrgs() != null && this.getTBaseOrgs().size() > 0) {
for (TBaseOrg org : this.getTBaseOrgs()) {
this.org = org;
return this.org;
}
}
//return null;
return this.org;
}

数据库中有,可以查询出来,从action带到jsp

jsp重新设置了值,可以从jsp带回到action

<td width="10%" align="right" class="table_td"><span
                                        class="input_wenzi">部门:&nbsp;&nbsp;</span></td>
                                    <td width="15%" align="left" class="table_td">
                                        <select id="orgId" name="model.org.orgId" style=" 140px;">
                                            <option value="">
                                                请选择
                                            </option>
                                            <s:iterator value="orgList" var="org">
                                                <option value="${orgId}"
                                                    <s:if test="orgId == model.org.orgId"> selected="selected" </s:if>>
                                                    ${orgName}
                                                </option>
                                            </s:iterator>
                                        </select>    
                                    </td>

*

有问题在公众号【清汤袭人】找我,时常冒出各种傻问题,然一通百通,其乐无穷,一起探讨


原文地址:https://www.cnblogs.com/qingmaple/p/4245460.html