English 中文(简体)
• 如何建立“强硬”名单?
原标题:How to create Struts Drop down List?
  • 时间:2011-03-17 04:46:54
  •  标签:
  • struts

I m New to struts.

我不想在网页上增加。 这一下降应包含四个价值观。 违约和第一价值将是(当选)。

如果使用者不从下降中选择任何价值(即存在违约值),我就希望保持所选择的价值。 我想向用户发出警报,然后不允许在用户选择从下降开始的选择之前提交。

有一项行动:java, 表格.java, javascript file and jsp file. 在行动方面,我敢于利用ArrayList控制不同的下跌值。 如何做到这一点。 请帮助我。

问题回答
<s:select list="#{  : Select ,  key1 : Value 1 ,  key2 : Value 2 }" key="selectedValue"></s:select>

或您有清单标(id, 价值)

<s:select key="selectedValue" list="yourlists" headerKey="" headerValue="Select" listKey="id" listValue="value"/>

首先,你需要在这里展示你的法典。 如果你对辅导感兴趣,我建议——/VaanNila,这是学习闯入者框架的伟大场所。 (Here 链接。)





相关问题
Struts 1.2.9 Action Chaining

I m having trouble calling a method in one Struts action from a method in another Struts Action (I ve been told that this is possible). I m working with two Struts DynaValidatorForms - one is used to ...

Java Struts Report

I am writing an excel report using an action,controller, servlet struts framework. The report is very congested and has already around 10 separate queries. I need to add about 10 more queries due to a ...

Struts Tiles 1 - nested tiles issue

I am using Struts tiles 1 succesfully, however I have come across a problem when trying to nest tiles. I currently have a layout like so: I wish to have another template like this, for use in quite ...

array as hidden variable

can array be used as hidden variable on jsp.....like I have a form i.e a simple java class,I want it to be as hidden variable can I do it.. Thanks in advance

GZIP JSON AJAX response text is empty

I am facing a problem, while encoding the response that I send back for an AJAX request, using GZIP. Can anyone give me some pointers on this please? There is an AJAX request from the JSP, An action ...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured ...

热门标签