1,jsp中
如1:
<dl>
<dt>证件类型</dt> <dd> <div class="selectstyle"> <s:select cssStyle="width:250px" cssClass=" fancy-select select_1" list="@com.xdmz.common.publicenum.PublicenumUtil@getSelect('法人证件类型','')" listKey="id" listValue="name" name="oprBean.proxy_card_type" id="id_cert_type" οnchange="on_cert_type();"></s:select> </div> <span class="f_r" id="proxy_card_typeSpanMsg"></span> </dd> </dl>如2:
<dl>
<dt> <a href="<%=request.getContextPath()%>/help/help!getHelpByCode.action?code=yyzzh&width=200" class="jTip" id="yyzzh" name="提示"><s:property value="@com.xdmz.common.publicenum.PublicenumUtil@getMarchName('证照类型',oprBean.organize_type)" /> </a></dt> <dd> <s:textfield name="oprBean.comp_credentials_code" cssClass="input_1" maxlength="18" οnkeyup="value=value.replace(/\D/g,'')"></s:textfield> <span class="f_r" id="comp_credentials_codeSpanMsg"></span> </dd> </dl>如3:<s:if
test="oprBean.is_credentials==@com.xdmz.common.publicenum.TypeCredentials@yiyou.getId()+''"></if>如4:
<!-- 演出场所经营单位、娱乐场所、网吧没有经营地址 -->
<s:set var="_business_set" value="{@com.xdmz.common.bean.CommonBusinessCode@RESORT,@com.xdmz.common.bean.CommonBusinessCode@BAR_SINGLE_SHOP ,@com.xdmz.common.bean.CommonBusinessCode@BAR_CHAIN,@com.xdmz.common.bean.CommonBusinessCode@SHOW_PLACE_BUSINESS_UNITS}"> </s:set><s:if test="oprBean.business_id in #_business_set"></s:if>
如5:
<dl>
<dt>住所归属</dt> <dd> <s:iterator value="@com.xdmz.common.publicenum.PublicenumUtil@getSelect('住所归属','自有|租赁')" var="tmp"> <s:if test="#tmp.id.equals(oprBean.address_belong)"> <input type="radio" name="oprBean.address_belong" value="${tmp.id }" id="address_belong${tmp.id }" checked="checked"> <label for="address_belong${tmp.id }">${tmp.name } </label> </s:if> <s:else> <input type="radio" name="oprBean.address_belong" value="${tmp.id }" id="address_belong${tmp.id }"> <label for="address_belong${tmp.id }">${tmp.name } </label> </s:else> </s:iterator> <span id="address_belongSpanMsg" class="f_r"></span> </dd> </dl>2,java中在com.xdmz.common.publicenum包下创建类PublicenumUtil创建静态方法
public static List<SelectBean> getSelect(String type, String str) {)