jsf - Setting commandLink value through ManagedBean -


i have been using primefaces in jsf , trying set commandlink value through managedbean class.

<p:commandlink value="#{loginbean.userclass}" id="userclass" action="{user.userclassaction}" /> 

managedbean:

 public string getuserclass()  {         return "userclass";  } 

i asking that, correct way process server side

any suggestion .. format correct , if how can use appropriate way.

what want achieve? value text of link. "userclass" in case , i'm not sure makes sense here.

if want change css class may via styleclass attribute.

if want have kind of dynamic text link. yes, using managed bean (non-hacky) way so.

if want care internationalization, better use standard java-way that. using .properties files, referencing them via #{msg['key']} , declaring them jsf via:

<resource-bundle>     <base-name>your.pkg.messagebundle</base-name>     <var>msg</var> </resource-bundle> 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -