|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.form.RepostControl
public class RepostControl
This class is used along with IRepostModel and IRepostAS to partially implement the logic of the repost action. Those two classes are used by the Editor Framework to help implementing the repost mechanism on any Editor page. They can also be used by any other Activity Space. To do so here is what you need to do: - Extend this class in your activity space and add any repost action (e.g.: com.plumtree.portalpagessample.editor.template1.PropRepostControl). - Your model must implement IRepostModel. - Your AS must implement IRepostAS. - In your view, you can implement any repost action using the postToSelf JavaScript method. - If you extend PlumtreeDP and call SetAddMainForm(true) in the init method of your DP, the form and the JS postToSelf will be printed out automatically.
Field Summary | |
---|---|
static java.lang.String |
HTMLINPUT_PASSTHRU_ARGS
HTML Element: Pass thru arguments |
static java.lang.String |
HTMLINPUT_PASSTHRU_CONTROL
The pass thru inputs need to be manually added in 508 mode if they are needed. |
static java.lang.String |
HTMLINPUT_POSTTOSELF
Form element names |
static java.lang.String |
HTMLSUBMIT_508_POSTTOSELF
HTML Element: 508 submit button |
protected AActivitySpace |
m_asOwner
JF- Associated Activity Space. |
protected boolean |
m_bInitialized
has Init() been called properly? |
protected XPHashtable |
m_htFormData
Variables for the lifetime of the execute(). |
protected IRepostModel |
m_model
JF- Associated Model |
protected int |
m_nAction
JF- Value of the repost action |
protected int |
m_nPageStatus
JF- Server side validation. |
protected Redirect |
m_rRedirect
JF- Redirect object. |
static int |
PAGE_STATUS_INVALID
JF- Page status: Invalid |
static int |
PAGE_STATUS_VALID
JF- Page status: Valid |
static int |
POSTTOSELF_ACTION_APPLY_CHANGES
JF- Repost Action: Apply changes |
static int |
POSTTOSELF_ACTION_CANCEL
JF- Repost Action: Cancel |
static int |
POSTTOSELF_ACTION_FINISH
JF- Repost Action: Finish |
static int |
POSTTOSELF_ACTION_GOTOPAGE
JF- Repost Action: Change page |
static int |
POSTTOSELF_ACTION_IN_PLACE_REFRESH
RW- Repost Action: In place refresh |
static int |
POSTTOSELF_ACTION_PASSTHRU
JF- Repost Action: Pass thru |
static int |
POSTTOSELF_ACTION_SIMPLEREPOST
JF- Repost Action: Simple repost |
static int |
POSTTOSELF_ACTION_UNDEFINED
JF- Repost Action: Undefined |
static java.lang.String |
STR_MVC_CLASS_NAME
Object Name for AS |
Constructor Summary | |
---|---|
RepostControl()
|
Method Summary | |
---|---|
Redirect |
CheckActionSecurityAndExecute(XPHashtable arguments)
This code is called by the AS Servlet each time there is a repost. |
java.lang.Object |
Create()
This method is used by the ASManager to return new instances of managed objects. |
java.lang.String |
GetName()
Return the class name. |
int |
GetPageStatus()
Returns the current page status. |
int |
GetRepostAction()
Returns the current value of the repost action. |
void |
Init(IModel model,
AActivitySpace space)
Inits the class with the associated model and activity space. |
protected void |
PerformAction(int _nAction)
Given the repost action mode, calls the associated method in the model. |
protected void |
PerformPassthruAction()
Sets the Pass thru arguments from the pass thru control into m_htFormData. |
protected void |
SaveCurrentPage()
Get the current page name and call the save method on the model. |
void |
SetPageStatus(int _nPageStatus)
Sets a new page status. |
protected void |
SetRedirect(Redirect _rRedirect)
Sets the redirect member variable. |
protected void |
SetRepostAction()
Get the repost action mode from the form data hashtable and set it in the member variable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STR_MVC_CLASS_NAME
public static final java.lang.String HTMLINPUT_POSTTOSELF
public static final java.lang.String HTMLSUBMIT_508_POSTTOSELF
public static final java.lang.String HTMLINPUT_PASSTHRU_CONTROL
public static final java.lang.String HTMLINPUT_PASSTHRU_ARGS
public static final int POSTTOSELF_ACTION_UNDEFINED
public static final int POSTTOSELF_ACTION_IN_PLACE_REFRESH
public static final int POSTTOSELF_ACTION_SIMPLEREPOST
public static final int POSTTOSELF_ACTION_FINISH
public static final int POSTTOSELF_ACTION_CANCEL
public static final int POSTTOSELF_ACTION_GOTOPAGE
public static final int POSTTOSELF_ACTION_APPLY_CHANGES
public static final int POSTTOSELF_ACTION_PASSTHRU
public static final int PAGE_STATUS_VALID
public static final int PAGE_STATUS_INVALID
protected AActivitySpace m_asOwner
protected IRepostModel m_model
protected Redirect m_rRedirect
protected XPHashtable m_htFormData
protected boolean m_bInitialized
protected int m_nAction
protected int m_nPageStatus
Constructor Detail |
---|
public RepostControl()
Method Detail |
---|
public Redirect CheckActionSecurityAndExecute(XPHashtable arguments)
CheckActionSecurityAndExecute
in interface IControl
public java.lang.Object Create()
IManagedObject
Create
in interface IManagedObject
IManagedObject.Create()
public java.lang.String GetName()
GetName
in interface IMVCObject
public int GetPageStatus()
public int GetRepostAction()
public void Init(IModel model, AActivitySpace space)
Init
in interface IControl
model
- space
- public void SetPageStatus(int _nPageStatus)
_nPageStatus
- protected void PerformAction(int _nAction)
_nAction
- protected void PerformPassthruAction()
protected void SaveCurrentPage()
protected void SetRedirect(Redirect _rRedirect)
_rRedirect
- protected void SetRepostAction()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |