public abstract class AbstractDataController extends Object implements Serializable
To load a document the methods load(id) and onLoad() can be used. The method load expects the uniqueId of a document to be loaded. The onLoad() method extracts the uniqueid from the query parameter 'id'. This is the recommended way to support bookmarkable URLs. To load a document the onLoad method can be triggered by an jsf viewAction placed in the header of a JSF page:
<f:metadata>
<f:viewAction action="... documentController.onLoad()" />
</f:metadata>
A bookmarkable URL looks like this:
/myForm.xthml?id=[UNIQUEID]
In combination with the viewAction the DocumentController is automatically initialized.
https://stackoverflow.com/questions/6377798/what-can-fmetadata-fviewparam-and-fviewaction-be-used-for
| Constructor and Description |
|---|
AbstractDataController() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(String ressourceBundleName,
String messageKey,
Object param)
This method can be used to add a Error Messege to the Application Context
during an actionListener Call.
|
void |
close()
Closes the current conversation and reset the data item.
|
String |
getDefaultType()
This method returns the Default 'type' attribute of the local workitem.
|
boolean |
isNewWorkitem()
Returns true if the current document was never saved before by the
DocumentService.
|
void |
load(String uniqueid)
Loads a workitem by a given $uniqueid and starts a new conversaton.
|
void |
onLoad()
This method extracts a $uniqueid from the query param 'id' and loads the
workitem.
|
void |
reset()
Reset current document
|
void |
setDefaultType(String type)
This method set the default 'type' attribute of the local workitem.
|
protected void |
startConversation()
Starts a new conversation
|
public String getDefaultType()
public void setDefaultType(String type)
type - public void reset()
public boolean isNewWorkitem()
public void addMessage(String ressourceBundleName, String messageKey, Object param)
ressourceBundleName - messageKey - param - public void onLoad()
The method is not running during a JSF Postback of in case of a JSF validation error.
public void load(String uniqueid)
uniqueid - public void close()
protected void startConversation()
Copyright © 2006–2019 Imixs Software Solutions GmbH. All rights reserved.