Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java @ 6546:7106f9b75004
Add SAML authentication to Info-Button.
Not yet working, the saml POST variable is cleared somewhere before submitting.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Mon, 08 Jul 2013 13:59:24 +0200 |
parents | 0341504e9deb |
children | c949681a0ccb |
comparison
equal
deleted
inserted
replaced
6544:b24dc0320b75 | 6546:7106f9b75004 |
---|---|
19 import com.smartgwt.client.widgets.Button; | 19 import com.smartgwt.client.widgets.Button; |
20 import com.smartgwt.client.widgets.Img; | 20 import com.smartgwt.client.widgets.Img; |
21 import com.smartgwt.client.widgets.Label; | 21 import com.smartgwt.client.widgets.Label; |
22 import com.smartgwt.client.widgets.events.ClickEvent; | 22 import com.smartgwt.client.widgets.events.ClickEvent; |
23 import com.smartgwt.client.widgets.events.ClickHandler; | 23 import com.smartgwt.client.widgets.events.ClickHandler; |
24 import com.smartgwt.client.widgets.form.DynamicForm; | |
24 import com.smartgwt.client.widgets.layout.HLayout; | 25 import com.smartgwt.client.widgets.layout.HLayout; |
25 | 26 |
26 import org.dive4elements.river.client.client.Config; | 27 import org.dive4elements.river.client.client.Config; |
27 import org.dive4elements.river.client.client.FLYS; | 28 import org.dive4elements.river.client.client.FLYS; |
28 import org.dive4elements.river.client.client.FLYSConstants; | 29 import org.dive4elements.river.client.client.FLYSConstants; |
135 info.addClickHandler(new ClickHandler() { | 136 info.addClickHandler(new ClickHandler() { |
136 @Override | 137 @Override |
137 public void onClick(ClickEvent event) { | 138 public void onClick(ClickEvent event) { |
138 GWT.log("Clicked 'info' button."); | 139 GWT.log("Clicked 'info' button."); |
139 String wikiLink = Config.getInstance().getWikiUrl() + "/Info"; | 140 String wikiLink = Config.getInstance().getWikiUrl() + "/Info"; |
140 Window.open(wikiLink, "_blank", null); | 141 |
142 // Create a dynamic form which contains the SAML session | |
143 // for the user which is currently logged in | |
144 DynamicForm df = WikiLinks.dynamicForm(getFlys(), wikiLink); | |
145 info.addChild(df); // add the form somewhere | |
146 df.submitForm(); // submit the form to go to the wiki | |
147 info.removeChild(df); // and remove the dynamic form | |
141 } | 148 } |
142 }); | 149 }); |
143 init(); | 150 init(); |
144 } | 151 } |
145 | 152 |