Hi all,
Using portal 2.6.2, I want to add new column to table 'jbp_users' and make the new column accessed from 'profile.xhtml'.
First modified the jboss-identity 1.0.0 as follow,
domain.hbm.xml
<property name="unit" column="col_unit" type="java.lang.String" update="true" insert="true" unique="false"/>
public String getUnit(); public void setUnit(String unit);
protected String unit; public String getUnit() {return unit;} public void setUnit(String unit) {this.unit = unit;}
<property> <name>user.unit</name> <type>java.lang.String</type> <access-mode>read-write</access-mode> <usage>mandatory</usage> <display-name xml:lang="en">Unit</display-name> <description xml:lang="en">User's Unit</description> <mapping> <database> <type>column</type> <value>col_unit</value> </database> </mapping> </property>
<ui-component name="unit"> <property-ref>user.unit</property-ref> <required>true</required> </ui-component>
<h:panelGroup> <h:outputText value="unit"/> <h:outputText value=" *" rendered="#metadataservice.unit.required}" /> </h:panelGroup> <h:inputText id="unit" value="#{manager.uiUser.attribute.unit}" required="#{metadataservice.unit.required}"/> <h:panelGroup />