Hi, few days ago I migrated my application from Vaadin 6.4.10 to Vaadin 7.3.9, but i’m still having problem with my portlet behaviour after redirect from CAS.
I used this link to integrate vaadin with cas : https://wiki.jasig.org/display/CASC/Vaadin+7+CAS+Client
My application is redirecting me to Cas, after successful login I’m being redirected to portlet site but all content is lost. I think that after redirect I see on my page different UI instance than before. After adding RequestHandler on current VaadinSession I see that every request is adding to main layout another components but I can’t see anything. Am I losing something? Is there possibility that after redirect I see another UI instance? Can I get previous instance and set it as visible?
[code]
public class MyUI extends CasAuthenticatedUI {
@Override
protected void init(VaadinRequest request) {
super.init(request);
setContent(new Label("You're not logged in"));
if (!super.isReadyToDisplayContent()) {
return;
}
setContent(new Label("You're logged in"));
}
}
[/code]CasAuthenticatedUI is copied from here : https://wiki.jasig.org/display/CASC/Vaadin+7+CAS+Client
I don’t have such problems when I use simple button to clear content and set panel I want to see after being logged in.
Part of my portlet.xml
[code]
TestPanel
TestPanel/TestPanel
<portlet-class>com.vaadin.server.VaadinPortlet</portlet-class>
<init-param>
<name>UIProvider</name>
<value>com.test.TestSpringUIProvider</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>TestPanel</title>
<short-title>TestPanel</short-title>
</portlet-info>
</portlet>
[/code]And UIProvider
public class TestSpringUIProvider extends UIProvider {
private static Logger log = LoggerFactory.getLogger(TestSpringUIProvider.class);
@Override
public UI createInstance(UICreateEvent event) {
VaadinPortletRequest vaadinRequest = (VaadinPortletRequest) event.getRequest();
PortletRequest portletRequest = vaadinRequest.getPortletRequest();
ApplicationContext appContext = PortletApplicationContextUtils.getWebApplicationContext(portletRequest.getPortletSession().getPortletContext());
UI app = appContext.getBean("com.test.MyUI", UI.class);
log.info("utworzono aplikacje: " + app);
return app;
}
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent uiClassSelectionEvent) {
return MyUI.class;
}
}