Can't you just change the style name? something like: include a all-in-one css:
change the xpto-class-Style to xyzu-classStyle acording to the user role..? On Mar 17, 12:07 pm, Sush <[email protected]> wrote: > Hi, > > First off my apologies, if this is the duplicate topic. > > I need to change the style of the panel based on the URL parameter > which contains the syle sheet name (css/LoginMenu.css) > > For differrent users, there would be different set of stylesheets. > > I have added below JSNI code in my LoginPanel.java file . In the > constructor of this class, I make a call to the below JSNI, before > adding the panel to the RootPanel. However it throws NPE > > public static native void loadCSS(String url) /*-{ > var fileref=document.createElement("link"); > fileref.setAttribute("rel","stylesheet"); > fileref.setAttribute("type","text/css"); > fileref.setAttribute("href",url); > $doc.getElementsByTagName("head")[0].appendChild(fileref); > > }-*/; > > I tried below code, this doesn't override or replace the default css > file in LoginMenu.gwt.xml > > private native void loadCSS1 (String cssHref) /*-{ > alert(cssHref); > document.write('<link rel="stylesheet" type="text/css" href="' + > cssHref + '">'); > }-*/; > > I would highly appreciate if you could provide me more information or > the already discussed links on this topic. > > Thank you. > > Regards, > -Sushama --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
