Hello,
   what i was expecting was that 
- a new Item is created every time  a method on teh Session bean is called 
(which i think it happens, due to the @In create=true annotation)

and i thought that this code

  |   <tr>
  |            <td>Product Name</td>
  |            <td><h:inputText value="#{econtrol.item.name}"/></td>
  |          
  |              </tr>
  |              
  |              <tr>
  |            <td>Price</td>
  |            <td><h:inputText value="#{econtrol.item.price}">
  |                    <f:converter converterId="javax.faces.Double"/>
  |                </h:inputText>
  |            </td>
  |          </tr>
  |          
  |            </table> 
  | 

on the jsf was going to be bound to the @item object injected, after this 
creation.

Effectively, as i realized afterwards, my assumption were wrong..

so, my goal was to create a new Item every time the addItem method of the 
sessio bean  is called, and that item has to be populated with request 
parameter..

i guess the solution will be to define two variables with @Request parameter 
and in the addItem method populate the Item created with those two 
@requestparameter annotation.

The only thing I AM MISSING is how to write the jsf in order to associate 
entered values to the two @RequestParameter variables

for example, assume that  i declare in the SessionBean those two variables


  | Local ( {EControlSession.class})
  | @Name("econtrol")
  | @Scope(SESSION)
  | public class EControlSessionBean
  |     implements EControlSession, java.io.Serializable
  | {
  | @RequestParameter{"price"}
  | double price;
  | 
  | @RequestParameter{"name"}
  | String name;
  | 
  | ...
  | 

what will i put in my jsf now?


  | <h:inputText value="#{econtrol.price}"/>
  | ..
  | 

but then i'll need to write also getter/setters for those two 
variables..otherwise JSF validation will fail....

sorry for the confusion.... could you help me one more time?

thanks and regars
 marco




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949717#3949717

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949717


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to