Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

inputtext- illegal syntax for set operation  RSS feed

 
soon Hong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<h:inputText styleClass="inputText" id="roomtype" value="array[0]#{testEditDelegate_EditBooking.paramBean.arg1}"></h:inputText>

i want set a default value at here for user edit and might to take the value to update data in the data
how can i do about this ??
array[0] = a default value to let user edit
#{testEditDelegate_EditBooking.paramBean.arg1} = call web service method to update data from this input text
 
Kumaravadivel Subramani
Ranch Hand
Posts: 171
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To update data from this text box why don't use event attribute to call particular function/process? value attribute is not responsible for calling web service to update data which is modified in this text box.
 
soon Hong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the original code is <h:inputText styleClass="inputText" id="arg01" value="#{testEditDelegate_SearchBooking.paramBean.arg0}">
i want set a default value from a stored data into the inputText field....
 
Tim Holloway
Bartender
Posts: 18661
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The web service must be invoked before the View is displayed. In order to reduce overhead and to avoid wiping out a user's overriding input value, the optimal way to to this is either in a method that sets up the backing bean before the page is initially displayed or by making the getArg1() method use caching techniques to only invoke the web service if a local copy of the value isn't available. When caching, you'd also want to provide a cache invalidation process unless the backing bean would have been destroyed and re-created.

Any attempt to "simplify" things by making the getArg1() method invoked the web service every time without a cache is discouraged. There may be side effects and performance may suffer. "get" methods on JSF backing beans are frequently invoked multiple times for a single request.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!