Plumtree Tags API  
 

ATag.SetStateSharedVariable Method 

Sets a variable in memory in the appropriate scope.

The scope determines who can see this variable and how long it stays in memory.

For instance, a variable stored in Tag Scope can only be seen by children of the current tag and will be removed from memory when the tag is finished.

A variable stored in Portlet Request Scope will be visible to all tags in the same portlet as the current tag, and will be removed from memory when the portlet is finished displaying. Tags in other portlets on the same page will not be able to see the variable.

Shared variables (as opposed to standard variables) can be accessed by tags from any library. If bOwnerEditOnly is set to true when a shared variable is first stored, then any tag can read the variable, but only tags from the same library as the tag that originally stored the variable can edit it (and replace the value in memory).

Note: Displaying an HTMLElement in a tag and then caching it so that another tag can add more HTML to the original tag later is not supported. HTMLElement trees can be generated and stored for later use, as long as they are self-contained trees and used in a read only way. It is safest to make clones of a cached HTMLElement tree before trying to display it again to make sure there are no threading problems.

Tag State Variable Method
public virtual void SetStateSharedVariable(
   string _strKey,
   object _oValue,
   Scope _scope,
   bool bOwnerEditOnly
);

Parameters

_strKey
_oValue
_scope
bOwnerEditOnly
True implies that only tags from the same tag library should be able to store the value for this tag. If this variable has already been saved, then the original bOwnerEditOnly value will be retained and this argument will be ignored.

See Also

ATag Class | com.plumtree.portaluiinfrastructure.tags Namespace