0 Replies Latest reply on Nov 28, 2007 7:33 AM by victoria122

    Client side value assignment

      Hello Everyone,

      I have a form that asks the user to fill in a time as two <h:inputText> boxes for the hours and minutes. I have a backing bean that stores their inputted time and it also has a link to a bean object that stores the users default time. I am presently using the <a4j:commandButton with <a4j:actionparam inside the tag. When clicked the value from BeanOne.defaultTime is put into BeanOne.currentTime. But that's inefficient and requires a server trip. Is there a way to get the default time to the page and use a tag that will asign it on screen to the inputText box for the current time (so that everything is done client side and the only server interaction is at the end when the user submits the form)?

      Thank you
      Victoria

      -----
      Code used at the moment:

      
      <h:inputText id="amStartTimeHours" value="#{Time.currentTime.amStartHours}" />
      
      <a4j:commandButton reRender="amBlock">
       <a4j:actionparam value="#{Time.defautTime.amStartHours}" assignTo="#{Time.currentTime.amStartHours}" />