Search in sources :

Example 1 with LocaleSupportedCharsetsEntry

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);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) Iterator(java.util.Iterator) LocaleSupportedCharsetsEntry(com.sun.identity.console.service.model.LocaleSupportedCharsetsEntry)

Example 2 with LocaleSupportedCharsetsEntry

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);
}
Also used : LocaleSupportedCharsetsEntry(com.sun.identity.console.service.model.LocaleSupportedCharsetsEntry)

Aggregations

LocaleSupportedCharsetsEntry (com.sun.identity.console.service.model.LocaleSupportedCharsetsEntry)2 CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)1 Iterator (java.util.Iterator)1