简体   繁体   English

Struts 2和html标签?

[英]Struts 2 and html tags?

I have a form in Struts2 as follows: 我在Struts2中有一个表单,如下所示:

<s:form >
    <s:select list="#session.circleIdNameMap" label="Select Circle:"
        headerKey="-1" headerValue="Select Circle"
        id="selectCircleDropDown" onchange="getTspList(this.value)"></s:select>

    <select id="selectTspDropDown"></select>

    <s:radio list="#{'0':'Default','1':'Latest'}" label="Select Threshold type:"
        name="flag" id="flag"></s:radio>

    <s:submit type="button" onclick="getThresholdData();return false;" />

</s:form>

Here i am using html select tag in between, due to which there is an alignment issue. 在这里,我在两者之间使用html select标签,由于存在对齐问题。 The second select tag comes up. 第二个选择标签出现。 Using simple theme everything comes in a single line. 使用简单的主题,所有内容都在同一行中。

What should I do to make alignment right?? 我该怎么做才能正确对齐?

The HTML select tag used with the option tag together. HTML select标签和option标签一起使用。 See the example . 参见示例 But you could use struts select tag where the options are generated automatically from the list values. 但是您可以使用struts select标记 ,其中选项是根据列表值自动生成的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM