Tks Angel, for the help. Here is my solution to may problem:
<h:commandButton value="Salvar" actionListener="#{scheduleSettings2.add}">
<f:param id="entidadeId" name="entidadeId"
value="2" />
</h:commandButton>
and the backing bean
public void add(ActionEvent event)
{
UIParameter parameter = (UIParameter)
event.getComponent().findComponent("entidadeId");
long idEntidade = Long.parseLong( parameter.getValue().toString() );
System.out.println("-->> " + idEntidade + " <<--");
}
Angel Miralles Arevalo wrote:
>
> I don't undestand very well what you want to do but try with:
>
> <t:commandLink id="save1_buttom" forceId="true" value="save1">
> <f:param name="operation" value="1" />
> </t:commandLink>
>
> <t:commandLink id="save2_buttom" forceId="true" value="save2">
> <f:param name="operation" value="2" />
> </t:commandLink>
>
>
> Then in backing bean you can get param value like this:
>
> this.operation =
> (String)getApplication().createValueBinding("#{param.operation}").getValue(facesContext);
>
> I hope it will help you.
>
>
>
> ----- Mensaje original ----
> De: ignicolist <[EMAIL PROTECTED]>
> Para: [email protected]
> Enviado: jueves, 9 de agosto, 2007 14:05:34
> Asunto: commandButton
>
>
> Hi, i have this code:
>
> <h:selectOneRadio id="mode" value="#{scheduleSettings2.mode}">
> <f:selectItem itemValue="0" itemLabel="day"/>
> <f:selectItem itemValue="1" itemLabel="workweek"/>
> <f:selectItem itemValue="2" itemLabel="week" />
> <f:selectItem itemValue="3" itemLabel="month" />
> </h:selectOneRadio>
> <h:commandButton action="#{scheduleSettings2.save}" value="save" />
>
> when i do save just pass the value that is selected in selectItem (0,1,2,
> or
> 3)
>
> So what i want its something like having 4 commandButton or 4 commandLink
> that each one have the value 0,1,2 and 3, for when a click in each one
> make
> the save and send the respective value.
>
> Its thar possible? how?
>
> Tks
>
> --
> View this message in context:
> http://www.nabble.com/commandButton-tf4242215.html#a12071201
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
>
> ____________________________________________________________________________________
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
> http://advision.webevents.yahoo.com/reto/entretenimiento.html
>
--
View this message in context:
http://www.nabble.com/commandButton-tf4242215.html#a12073292
Sent from the MyFaces - Users mailing list archive at Nabble.com.