Archive | jsf
RSS for this section
How to conditional process action in JSF?
If validation failed, it should have a way to decide what action to do:
@Common JSF
<a4j:commandButton ... oncomplete="if (#{!facesContext.validationFailed}) $('#dialog_id').dialog('close')" />
@Primefaces
<p:commandButton value="submit" oncomplete="if (args && !args.validationFailed) dialog.show()" process="@this"/>
How to align a component to right corner of JSF page?
solution:
1. include component in html table tag with align to right:
<table valign=”top” width=”100%”>
<tr>
<td align=”right”> <place component here> </td>
</tr>
</table>
2. use style in jsf component
put style=”float: right;” in component
eg. <h:outputText value=”test” style=”float: right;”/>