Search in sources :

Example 1 with CharsetAliasEntry

use of com.sun.identity.console.service.model.CharsetAliasEntry in project OpenAM by OpenRock.

the class G11NCharsetAliasViewBeanBase method setValues.

protected void setValues(String value) {
    CharsetAliasEntry entry = new CharsetAliasEntry(value);
    propertySheetModel.setValue(ATTR_MIMENAME, entry.strMimeName);
    propertySheetModel.setValue(ATTR_JAVANAME, entry.strJavaName);
}
Also used : CharsetAliasEntry(com.sun.identity.console.service.model.CharsetAliasEntry)

Example 2 with CharsetAliasEntry

use of com.sun.identity.console.service.model.CharsetAliasEntry in project OpenAM by OpenRock.

the class SMG11NViewBean method populateCharsetAliasTable.

private void populateCharsetAliasTable(Set charsets) {
    tablePopulated = true;
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
    tblModel.clearAll();
    boolean firstEntry = true;
    int counter = 0;
    for (Iterator iter = charsets.iterator(); iter.hasNext(); ) {
        String c = (String) iter.next();
        CharsetAliasEntry entry = new CharsetAliasEntry(c);
        if (entry.isValid()) {
            if (!firstEntry) {
                tblModel.appendRow();
            } else {
                firstEntry = false;
            }
            tblModel.setValue(TBL_CHARSET_ALIAS_DATA_MIMENAME, entry.strMimeName);
            tblModel.setValue(TBL_CHARSET_ALIAS_DATA_JAVANAME, entry.strJavaName);
            tblModel.setValue(TBL_CHARSET_ALIAS_HREF_ACTION, Integer.toString(counter));
        }
        counter++;
    }
    setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS, (OrderedSet) charsets);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CharsetAliasEntry(com.sun.identity.console.service.model.CharsetAliasEntry) Iterator(java.util.Iterator)

Aggregations

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