dkim18
asked on
Changing from html:text to html:select
Hi!
I changed from the html:text to html:select and insert doesn’t work. When I view table, there are no record for it.
++++++++++++++++
<span class="data_heading"><bean :message key="label.flights"/>:</sp an>
<html:text property="flights" styleClass="formfield" maxlength="10" size="10"/>
++++++++++++++++++
<span class="data_heading"><bean :message key="label.flights"/>:</sp an>
<html:select property="flights" styleClass="formfield">
<html:option value="">Select one</html:option>
<html:option value="one">1</html:option >
<html:option value="two">2</html:option >
<html:option value="three">3</html:opti on>
</html:select>
++++++++++++++++++
However, something like this works.
<span class="data_heading"><bean :message key="label.assistance"/>:< /span>&nbs p;
<html:select property="assistance" styleClass="formfield">
<html:option value="">Select one</html:option>
<html:option value="Independent">Indepe ndent</htm l:option>
<html:option value="Supervision">Superv ision</htm l:option>
<html:option value="Contact">Contact guard</html:option>
</html:select>
any idea?
I changed from the html:text to html:select and insert doesn’t work. When I view table, there are no record for it.
++++++++++++++++
<span class="data_heading"><bean
<html:text property="flights" styleClass="formfield" maxlength="10" size="10"/>
++++++++++++++++++
<span class="data_heading"><bean
<html:select property="flights" styleClass="formfield">
<html:option value="">Select one</html:option>
<html:option value="one">1</html:option
<html:option value="two">2</html:option
<html:option value="three">3</html:opti
</html:select>
++++++++++++++++++
However, something like this works.
<span class="data_heading"><bean
<html:select property="assistance" styleClass="formfield">
<html:option value="">Select one</html:option>
<html:option value="Independent">Indepe
<html:option value="Supervision">Superv
<html:option value="Contact">Contact guard</html:option>
</html:select>
any idea?
ASKER
I thought it should be ok, but it doesn't work for database part...
+++++++++
public String getFlights() {
return flights;
}
/**
* @param flights The flights to set.
*/
public void setFlights(String flights) {
this.flights = flights;
++++++++++++
public String getAssistance() {
return assistance;
}
/**
* @param assistance The assistance to set.
*/
public void setAssistance(String assistance) {
this.assistance = assistance;
+++++++++
public String getFlights() {
return flights;
}
/**
* @param flights The flights to set.
*/
public void setFlights(String flights) {
this.flights = flights;
++++++++++++
public String getAssistance() {
return assistance;
}
/**
* @param assistance The assistance to set.
*/
public void setAssistance(String assistance) {
this.assistance = assistance;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And how do they differ from getAssistance and setAssistance?
As far as I can see, your code should be ok...