use of com.sun.identity.console.service.model.LocaleSupportedCharsetsEntry in project OpenAM by OpenRock.
the class SMG11NViewBean method populateSupportedCharsetsTable.
private void populateSupportedCharsetsTable(Set charsets) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator iter = charsets.iterator(); iter.hasNext(); ) {
String c = (String) iter.next();
LocaleSupportedCharsetsEntry entry = new LocaleSupportedCharsetsEntry(c);
if (entry.isValid()) {
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_SUPPORTED_CHARSETS_DATA_LOCALE, entry.strLocale);
tblModel.setValue(TBL_SUPPORTED_CHARSETS_DATA_CHARSETS, entry.strCharsets);
tblModel.setValue(TBL_SUPPORTED_CHARSETS_HREF_ACTION, Integer.toString(counter));
}
counter++;
}
setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS, (OrderedSet) charsets);
}
use of com.sun.identity.console.service.model.LocaleSupportedCharsetsEntry in project OpenAM by OpenRock.
the class G11NSupportedCharsetsViewBeanBase method setValues.
protected void setValues(String value) {
LocaleSupportedCharsetsEntry entry = new LocaleSupportedCharsetsEntry(value);
propertySheetModel.setValue(ATTR_LOCALE, entry.strLocale);
propertySheetModel.setValue(ATTR_CHARSETS, entry.strCharsets);
}
Aggregations