I would like to call a setter directly from a command button and pass a value. My problem is that the setter is expecting a Character and jsf if passing it back as a String. Is
I have tried to use simple quotes directly without using charAt(0) tips ...
and this work correctly when parameter type is char or Character.
Example passing a character:
#{manageItemHandler.dataEntryOp.setBomComplete('Y')}
Example passing a String literal and a character constant:
The code of traceUpdate() java method is following:
@ManagedBean(name = "vC")
@ViewScoped
public class ActionViewController
extends AbstractViewController
{
public String traceUpdate(String s, Character c)
{
System.out.println("s:" + s + " " + c);
return "";
}
OR
@ManagedBean(name = "vC")
@ViewScoped
public class ActionViewController
extends AbstractViewController
{
public String traceUpdate(String s, char c)
{
System.out.println("s:" + s + " " + c);
return "";
}
where Character as been replace by char
This example run on Glassfish 4.1 using Primefaces 6.2.4.