11-04-2009 11:36 AM
String user_group ="<a:actionLink value=\"#{msg.manage_groups}\" action=\"dialog:manageGroups\" />";
return buildSummary(
new String[] {
bundle.getString("name"), bundle.getString("username"),
bundle.getString("password"), bundle.getString("homespace"),
bundle.getString("email"), bundle.getString("user_organization"),
bundle.getString("user_jobtitle"), bundle.getString("user_location"),
bundle.getString("presence_username"), bundle.getString("quota"),bundle.getString("groups")},
new String[] {
Utils.encode(this.firstName + " " + this.lastName), Utils.encode(this.userName),
"********", Utils.encode(homeSpaceLabel),
Utils.encode(this.email), Utils.encode(this.organisation),
Utils.encode(this.jobtitle), Utils.encode(this.location),
Utils.encode(presenceLabel), quotaLabel, user_group});
}
11-17-2009 11:25 AM
/**
* Build summary table from the specified list of Labels and Values
*
* @param labels Array of labels to display
* @param values Array of values to display
*
* @return summary table HTML
*/
protected String buildSummary(String[] labels, String[] values)
{
if (labels == null || values == null || labels.length != values.length)
{
throw new IllegalArgumentException("Labels and Values passed to summary must be valid and of equal length.");
}
String msg = Application.getMessage(FacesContext.getCurrentInstance(), MSG_NOT_SET);
String notSetMsg = "<" + msg + ">";
StringBuilder buf = new StringBuilder(256);
buf.append("<table cellspacing='4' cellpadding='2' border='0' class='summary'>");
for (int i=0; i<labels.length; i++)
{
String value = values[i];
buf.append("<tr><td valign='top'><b>");
buf.append(labels[i]);
buf.append(":</b></td><td>");
buf.append(value != null ? Utils.encode(value) : notSetMsg);
buf.append("</td></tr>");
}
buf.append("</table>");
return buf.toString();
}
<h:outputText value="#{WizardManager.bean.summary}" escape="false"/>
11-18-2009 06:53 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.