List of usage examples for org.apache.wicket.markup.html.link PopupCloseLink PopupCloseLink
public PopupCloseLink(String id)
From source file:org.openengsb.ui.common.oauth.OAuthPage.java
License:Apache License
public OAuthPage() { String notStarted = new StringResourceModel("oAuth.notStarted", this, null).getString(); add(new PopupCloseLink<String>("close")); add(new Label("oAuthResultLabel", notStarted)); }
From source file:org.openengsb.ui.common.oauth.OAuthPage.java
License:Apache License
public OAuthPage(PageParameters pp) throws Exception { OAuthData oauth = OAuthPageFactory.getOAuthObject(getSession().getId()); if (oauth != null) { String intermediate = oauth.getIntermediateParameterName(); if (!pp.get(intermediate).isEmpty()) { String code = pp.get(intermediate).toOptionalString(); OAuthData data = OAuthPageFactory.getOAuthObject(getSession().getId()); data.addEntryToSecondParams(intermediate, code); String accessToken = performOAuthValidation(new URL(data.generateSecondCallLink())); OAuthPageFactory.removeOAuthObject(getSession().getId()); String successful = new StringResourceModel("oAuth.Successful", this, null).getString(); add(new Label("oAuthResultLabel", successful + accessToken)); add(new PopupCloseLink<String>("close")); return; }/*from w w w.j a v a 2s . c o m*/ } String failed = new StringResourceModel("oAuth.Failed", this, null).getString(); add(new Label("oAuthResultLabel", failed)); add(new PopupCloseLink<String>("close")); }