This feature applies to the Mainsoft for Java EE Portal Edition
only.
Mainsoft added two new ASP.NET expressions for creating portal
URLs: ActionURL and RenderURL.
These expressions correspond to the Mainsoft.Web.UI.PortletPage.CreateActionURL and Mainsoft.Web.UI.PortletPage.CreateRenderURL methods.
Creating action URLs is useful for interacting with the portlet container,
and for generating URLs that trigger inter portlet communication actions.
For more information, read Interacting with the portlet container and Using inter portlet communication.
In order to use these expressions, the following elements should be
added to the Web.config file of your application.
<compilation>
<expressionBuilders>
<add expressionPrefix="RenderURL" type="Mainsoft.Web.Portal.RenderURLExpressionBuilder"/>
<add expressionPrefix="ActionURL" type="Mainsoft.Web.Portal.ActionURLExpressionBuilder"/>
</expressionBuilders>
</compilation>
Note |
The Web.config file of new portal application projects
includes these expressions automatically.
|
Here is an example of using the ActionURL expression:
<asp:Button runat="server" PostBackUrl='<%$ ActionURL: Default.aspx?param1=value1,param2=value2¶m3=value3 %>' />
The expression above is equivalent to the following code:
PortletURL url = CreateActionURL("Default.aspx?param1=value1");
url.SetParameter("param2", "value2");
url.SetParameter("param3", "value3");
The parameter param1 is accessible through the HttpRequest.QueryString property.
The rest of the parameters are sent as portal parameters of the URL. All the
parameters are accessible through the HttpRequest.Params property.
Related Sections
- Portal integration
Learn about the Mainsoft for Java EE Portal Edition features.