Usage Example

Top  Previous  Next

Suppose we have an area in our main page whose content will be different depending on the login status of the users. If the login status of a user is not "LoggedIn", we will provide input fields to the user to log in. After the login is done, the input fields will disappear and the user will be displayed with another content.

Insert a condition panel into the page.

"Generate Condition As" property is set to its default value of "xsl:when", meaning that the displaying conditional content will be determined with XSL statements.

The exclamation mark in the elements signals that no conditions are yet defined.

empty

Create two conditions in the condition panel; one will be displayed to the users which not yet logged in and the second to the users which already logged. We will create the conditions with the following content.

condpanel_prjex

Double click onto the condition panel area to call the Conditions dialog. Add two new conditions using plus button.

Name the conditions as "LoggedIn" and "NotLoggedIn". Now, we can select the panel of each condition by clicking [Select] in the Conditions window.

As you can see in the example below, the contents of conditions can be constructed totally different from each other.

Condition: NotLoggedIn

cond1

Condition: LoggedIn

cond2

To test this example, prepare an XML file with the content below and give its name to the "XML File for Preview" property of the page.

 

<?xml version="1.0" encoding="UTF-8"?>

<root>

<Login>

<Status>LoggedIn</Status>

<UserName>John Doe</UserName>

</Login>

</root>

 

To test the both conditions, change the value of the <Status> tag in XML file and use preview (F9) command in the Application Studio.

See Condition Panel