FAQ
Welcome to the wingS FAQ
A: Quick answer: Try button.setStyle(null).
Long answer: Overwrite/add a new CSS default style for buttons, wings 2 comes with a default CSS style sheet, which also styles the SButtons. Try the Web Developer Plugin, which is freely available for the FireFox browser, then you can live edit the style of the buttons.
To ignore the Styles for SButton elements you could simply a) overwrite and modify the .SButton CSS declarations or b) apply a different/no css class name to SButtons
On initialisation the current PLAF assign the component class name as CSS class name (So SButtons will render <button … class="SButton">). This default CSS styles are predefined in the default wings2 style.
You can either overwrite them by adding custom own styles, meaning registering a new CSS file as demonstrated in wingset demo or by applying antother/no style class to buttons.
Q: For what do I need SDefaultBorder? ![]()
A: Every component has the SDefaultBorder by default. It is installed by the CG on initialization. If a component has the default border associated, its border styling is determined by the rules in the stylesheet. If the border property is set to null, the component will be rendered without a border, no matter if the stylesheet says something different. If a certain SBorder implementation is applied, it will override the stylesheet rules
Q: How do I get rif of the NullpointerExceptions during redeployment of my wingS application in Tomcat? ![]()
A: Either retrieve the current CVS version or add the following statement to the webapp context:
<Context ...>
<Manager className="org.apache.catalina.session.PersistentManager"
saveOnRestart="false"/>
</Context>
Here is the solution for Glassfish:
You must have an sun-web.xml configuration file into the WEB-INF folder of your .war application package configured in this way:
<sun-web-app>
<session-config>
<session-manager>
<manager-properties>
<property name="sessionFilename" value="" />
</manager-properties>
</session-manager>
</session-config>
</sun-web-app>
More details on
http://blogs.sun.com/jluehe/entry/how_to_disable_persisting_of
Background: wingS dynamically tries to load and instantiate the PLAF (renderer) classes on session initialization and therefore consults the context class loader. If you stop your application Tomcat tries to serialized your session, hence the whole application state. If this failes (i.e. your classes are not fully serializable) the tomcat does not replace the classloader. So after refresh wingS only sees the outdated, old classlaoder which does no longer know the CG classes. We disabled the session serialization as a whole to avoid this in the future.
Q: How to hide the browsers context menu for SPopupMenu?![]()
A: If you use Firefox, make sure the option Preferences > Content > Enable Javascript > Advanced > Disable or replace context menus is checked, so that context menus are not hidden by the browsers default context menu.