right alignment with richpanel
bogomaster Sep 5, 2009 4:08 PMI'm using a rich:panel component in a jsf page. I want the panel and all components in it to be aligned to the right of the page. I tried putting align="right" and dir="rtl" in different tags, but that didn't work. Any idea?
Here's the code:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
<h:form id="user" styleClass="edit">
<rich:panel>
<f:facet name="header"> #{messages.edituser} </f:facet>
<s:decorate id="addressField" template="layout/edit.xhtml">
<ui:define name="label">#{messages.address}</ui:define>
<h:inputTextarea id="address"
cols="80"
rows="2"
value="#{userHome.instance.address}"/>
</s:decorate>
<s:decorate id="emailField" template="layout/edit.xhtml">
<ui:define name="label">#{messages.email}</ui:define>
<h:inputText id="email"
required="true"
size="32"
maxlength="32"
value="#{userHome.instance.email}">
<a:support event="onblur" reRender="emailField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="nameField" template="layout/edit.xhtml">
<ui:define name="label">#{messages.name}</ui:define>
<h:inputText id="name"
required="true"
size="32"
maxlength="32"
value="#{userHome.instance.name}">
<a:support event="onblur" reRender="nameField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="familyNameField" template="layout/edit.xhtml">
<ui:define name="label">#{messages.family_name}</ui:define>
<h:inputText id="familyName"
required="true"
size="32"
maxlength="32"
value="#{userHome.instance.familyName}">
<a:support event="onblur" reRender="familyNameField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="nationalIdField" template="layout/edit.xhtml">
<ui:define name="label">#{messages.nationalid}</ui:define>
<h:inputText id="nationalId"
required="true"
value="#{userHome.instance.nationalId}">
<a:support event="onblur" reRender="nationalIdField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="passwordField" template="layout/edit.xhtml">
<ui:define name="label">#{messages.password}</ui:define>
<!--
<h:inputText id="password"
required="true"
size="32"
maxlength="32"
value="#{userHome.instance.password}">
<a:support event="onblur" reRender="passwordField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText> -->
<h:inputSecret id="password" maxlength="32" size="32" value="#{userHome.instance.password}" required="true"/>
</s:decorate>
<s:decorate id="postalCodeField" template="layout/edit.xhtml">
<ui:define name="label">#{messages.postalcode}</ui:define>
<h:inputText id="postalCode"
value="#{userHome.instance.postalCode}">
<a:support event="onblur" reRender="postalCodeField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<div style="clear:both">
<span class="required">*</span>
required fields
</div>
</rich:panel>
<div class="actionButtons">
<h:commandButton id="update"
value="Save"
action="#{userHome.update}"
rendered="#{userHome.managed}"/>
</div>
</h:form>
</ui:define>
</ui:composition>
P.S: This is my first post here. I must be quite interesting :D