FileDocCategorySizeDatePackage
SavePrefsAction.javaAPI DocApache Struts 2.0.9 Apps2322Mon Jul 23 13:43:18 BST 2007org.apache.struts2.portlet.example

SavePrefsAction

public class SavePrefsAction extends com.opensymphony.xwork2.ActionSupport

Fields Summary
private String
preferenceOne
private String
preferenceTwo
Constructors Summary
Methods Summary
public java.lang.Stringexecute()

        ActionRequest req = PortletActionContext.getActionRequest();
        PortletPreferences prefs = req.getPreferences();
        prefs.setValue("preferenceOne", preferenceOne);
        prefs.setValue("preferenceTwo", preferenceTwo);
        prefs.store();
        return SUCCESS;
    
public java.lang.StringgetPreferenceOne()

       
        return preferenceOne;
    
public java.lang.StringgetPreferenceTwo()

        return preferenceTwo;
    
public voidsetPreferenceOne(java.lang.String preferenceOne)

        this.preferenceOne = preferenceOne;
    
public voidsetPreferenceTwo(java.lang.String preferenceTwo)

        this.preferenceTwo = preferenceTwo;
    
public java.lang.StringshowForm()

        PortletPreferences prefs = PortletActionContext.getRequest().getPreferences();
        preferenceOne = prefs.getValue("preferenceOne", "not set");
        preferenceTwo = prefs.getValue("preferenceTwo", "not set");
        return SUCCESS;