diff 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
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java	Mon Jul 08 11:41:10 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java	Mon Jul 08 13:59:24 2013 +0200
@@ -21,6 +21,7 @@
 import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.form.DynamicForm;
 import com.smartgwt.client.widgets.layout.HLayout;
 
 import org.dive4elements.river.client.client.Config;
@@ -137,7 +138,13 @@
             public void onClick(ClickEvent event) {
                 GWT.log("Clicked 'info' button.");
                 String wikiLink = Config.getInstance().getWikiUrl() + "/Info";
-                Window.open(wikiLink, "_blank", null);
+
+                // Create a dynamic form which contains the SAML session
+                // for the user which is currently logged in
+                DynamicForm df = WikiLinks.dynamicForm(getFlys(), wikiLink);
+                info.addChild(df);    // add the form somewhere
+                df.submitForm();      // submit the form to go to the wiki
+                info.removeChild(df); // and remove the dynamic form
             }
         });
         init();

http://dive4elements.wald.intevation.org