English 中文(简体)
1. 确定在Stuts 1.x使用java的甄选的违约价值
原标题:Set default value of select using java in Struts 1.x
  • 时间:2011-08-03 20:10:54
  •  标签:
  • java
  • struts

我对“Stuts 2.x”的答复不一而复一。

All I need to do is select a default value on page load using 1.x of an HTML:SELECT tag that uses an optioncollector:

<html:select property="status">
  <html:optionsCollection name="statusList" label="description" value="id" />
</html:select>

简单明了,但我想避免为此使用 j。

最佳回答
问题回答

插图1中的缺省选择权,其行为非常奇怪。 由于用户159088提到“价值”参数,因此负责确定违约值。 但是,它只是为硬编码而努力:

<html:select name="myForm" property="formField.enabled" title="Enabled" styleId="enabled" value="false">
    <html:option value="true">true</html:option>
    <html:option value="false">false</html:option>
</html:select>

上面的《法典》具有良好效果——通过违约选择的错误价值。 但价值参数中的form Field.enabled”t工作:

<html:select name="myForm" property="formField.enabled" title="Enabled" styleId="enabled" value="formField.enabled">
    <html:option value="true">true</html:option>
    <html:option value="false">false</html:option>
</html:select>

移走价值参数在这种情况下是好的,即从财产参数核对价值,并在违约时选择这一价值。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签