if (ctx.isAt(m_uri, "preferences")) {
PortletBuilder builder = new PortletBuilder();
ctx.parsePastStartTag(m_uri, "preferences");
while (ctx.isAt(m_uri, "preference")) {
Preference value = (Preference) ctx.unmarshalElement();
builder.add(value.getName(), value.getValues(), value.isReadOnly());
}
ctx.parsePastEndTag(m_uri, "preferences");
state = new TransientApplicationState(contentId, builder.build());
} else {
state = new TransientApplicationState(contentId, null);