Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4896

Bug after Struts 2.5.10.1: Using Float values in Form

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.5.12
    • 2.5.14
    • Core, Core Actions
    • None

    Description

      Situation:
      Webfrontend form:

      	<s:textfield key="pvFormular.ost" id="ost" label="%{getText('produkt.ost')}" value="%{#session.prodWerteObjekt.ost}" 
      		requiredLabel="true" cssClass="input_text_4" onchange="changedTab2()" tooltip="%{getText('produkt.ag.tooltip.koordinate')}"
          	tooltipIconPath="/images/question.gif"/>
      

      Input into the form: 10.0

      Incoming Value in Action:

      	private ProdVarianteWerte pvFormular =new ProdVarianteWerte();
        ...
        log.info("=====ost="+pvFormular.getOst());  
      

      Output in Logfile:

      [INFO ] 2017-11-21 14:28:47.133 [http-nio-8080-exec-416] [speichernaendtab2datei]  ProduktAGAction,Zeile:511  - =====ost=100.0
      

      Structure of Bean "ProdVarianteWerte":

      package de.dwd.katalog.beans;
      import ...
      public class ProdVarianteWerte {
      
      ....
      		private float ost;
      ..
      		public float getOst() {
      			return ost;
      		}
      		public void setOst(float ost) {
      			this.ost = ost;
      		}
      ...
      }
      

      Attachments

        1. float.png
          328 kB
          Fechner

        Activity

          People

            Unassigned Unassigned
            sfechner Fechner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: