Link to home
Start Free TrialLog in
Avatar of dkim18
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"/>:</span>
<html:text property="flights"  styleClass="formfield" maxlength="10" size="10"/>

++++++++++++++++++
<span class="data_heading"><bean:message key="label.flights"/>:</span>
   <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:option>
         </html:select>&nbsp;&nbsp;&nbsp;
++++++++++++++++++
However, something like this works.
<span class="data_heading"><bean:message key="label.assistance"/>:</span>&nbsp;
      <html:select property="assistance" styleClass="formfield">
               <html:option value="">Select one</html:option>
            <html:option value="Independent">Independent</html:option>
            <html:option value="Supervision">Supervision</html:option>
               <html:option value="Contact">Contact guard</html:option>
         </html:select>

any idea?

Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

What methods do you have for getFlights and setFlights in your form bean...

And how do they differ from getAssistance and setAssistance?

As far as I can see, your code should be ok...
Avatar of dkim18
dkim18

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;
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial