[Yanel-commits] rev 23900 - in public/yanel/trunk/src:
realms/welcome-admin/yanel/rti resources/add-realm/xslt
michi at wyona.com
michi at wyona.com
Fri Apr 20 00:15:44 CEST 2007
Author: michi
Date: 2007-04-20 00:15:42 +0200 (Fri, 20 Apr 2007)
New Revision: 23900
Added:
public/yanel/trunk/src/realms/welcome-admin/yanel/rti/add-realm-demo.html.yanel-rc
public/yanel/trunk/src/resources/add-realm/xslt/add-realm-demo.xsl
Log:
add demo realm started
Added: public/yanel/trunk/src/realms/welcome-admin/yanel/rti/add-realm-demo.html.yanel-rc
===================================================================
--- public/yanel/trunk/src/realms/welcome-admin/yanel/rti/add-realm-demo.html.yanel-rc 2007-04-19 22:02:36 UTC (rev 23899)
+++ public/yanel/trunk/src/realms/welcome-admin/yanel/rti/add-realm-demo.html.yanel-rc 2007-04-19 22:15:42 UTC (rev 23900)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+
+<yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0">
+ <yanel:rti name="add-realm" namespace="http://www.wyona.org/yanel/resource/1.0"/>
+
+ <yanel:property name="add-type" value="demo"/>
+ <yanel:property name="xslt" value="xslt/add-realm-demo.xsl"/>
+
+ <yanel:custom-config xmlns:arr="http://www.wyona.org/yanel/resource/add-realm-resource/1.0">
+ <arr:parameter name="realmid" samplevalue="234797234273242" required="true" hidden="false"/>
+ <arr:parameter name="realmname" samplevalue="My Realm" required="true"/>
+ <!-- NOTE: An empty value means that the parent directory of the "from-scratch-realm" is being used. No value attribute means that the value becomes configurable by the user. -->
+ <arr:parameter name="fslocation" value="" samplevalue="C:/realms" required="true" hidden="true"/>
+ </yanel:custom-config>
+</yanel:resource-config>
Added: public/yanel/trunk/src/resources/add-realm/xslt/add-realm-demo.xsl
===================================================================
--- public/yanel/trunk/src/resources/add-realm/xslt/add-realm-demo.xsl 2007-04-19 22:02:36 UTC (rev 23899)
+++ public/yanel/trunk/src/resources/add-realm/xslt/add-realm-demo.xsl 2007-04-19 22:15:42 UTC (rev 23900)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:yanel="http://www.wyona.org/yanel/1.0"
+ xmlns:i18n="http://www.wyona.org/yanel/i18n/1.0"
+>
+
+ <xsl:output method="xhtml" encoding="UTF-8"/>
+
+ <xsl:param name="yanel.back2context" select="''" />
+
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Add Realm as Demo</title>
+ </head>
+ <body>
+ <h1>Add Realm as Demo</h1>
+ <a href="?yanel.resource.viewid=xml">Show XML</a>
+
+ <xsl:choose>
+ <xsl:when test="/yanel:add-realm/yanel:from-scratch/yanel:realm-created">
+ <p>Realm has been created and registered</p>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="/yanel:add-realm/yanel:from-scratch/yanel:not-valid"/>
+ <xsl:apply-templates select="/yanel:add-realm/yanel:from-scratch/yanel:valid"/>
+ <form>
+ <xsl:if test="/yanel:add-realm/yanel:from-scratch/yanel:valid">
+ <input type="hidden" name="confirm" value="true"/>
+ </xsl:if>
+ <table>
+ <xsl:apply-templates select="/yanel:add-realm/yanel:from-scratch/yanel:parameter"/>
+ <xsl:choose>
+ <xsl:when test="/yanel:add-realm/yanel:from-scratch/yanel:valid">
+ <tr><td colspan="2" align="right"><input type="submit" name="submit-from-scratch" value="Yes, Add Realm"/></td></tr>
+ </xsl:when>
+ <xsl:otherwise>
+ <tr><td colspan="2" align="right"><input type="submit" name="submit-from-scratch" value="Add Realm"/></td></tr>
+ </xsl:otherwise>
+ </xsl:choose>
+ <tr><td colspan="2" align="right"><br/><i18n:message key="requiredFields"/>fields marked with (*) are required</td></tr>
+ </table>
+ </form>
+ </xsl:otherwise>
+ </xsl:choose>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="yanel:parameter">
+ <xsl:apply-templates select="@yanel:exception"/>
+ <xsl:choose>
+ <xsl:when test="@yanel:configuration-value">
+ <tr><td><b><xsl:value-of select="@yanel:name"/></b></td><td><xsl:value-of select="@yanel:configuration-value"/></td></tr>
+ </xsl:when>
+ <xsl:otherwise>
+ <tr><td><b><xsl:value-of select="@yanel:name"/></b></td><td><input type="text" name="{@yanel:name}" value="{@yanel:value}"/> <xsl:apply-templates select="@yanel:required"/></td></tr>
+ <tr><td> </td><td align="right">(i.e. <xsl:value-of select="@yanel:sample-value"/>)</td></tr>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="@yanel:exception">
+ <tr><td colspan="2"><font color="red">Exception:</font> <xsl:value-of select="."/></td></tr>
+ </xsl:template>
+
+ <xsl:template match="yanel:not-valid">
+ <p>Something is wrong with one or more input parameters. Please see below for more details.</p>
+ </xsl:template>
+
+ <xsl:template match="yanel:valid">
+ <p>All input parameters are valid. Do you want to create a new realm from scratch with the parameters below?</p>
+ </xsl:template>
+
+ <xsl:template match="@yanel:required">
+ <xsl:if test=". = 'true'">
+ *
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
More information about the Yanel-commits
mailing list