Application<?> app;
TransientApplicationState state;
// Since we don't support dashboard's here, this only works for gadgets using the gadget wrapper portlet.
if ("gadget-application".equals(m_name)) {
ctx.parsePastStartTag(m_uri, "gadget");
String gadgetName = ctx.parseElementText(m_uri, "gadget-ref");
Gadget gadget = null;
// Once the gadget portlet wrapper is able to use gadget userPref's, include parsing logic here.
// Gadget gadget = new Gadget();
// gadget.setUserPref();
state = new TransientApplicationState<Gadget>(gadgetName, gadget);