最近のアクセス:
ユーザーコントロール - Hello World 設計時レンダリングファイル

警告: GeneXus 16 以降では、Web ユーザーコントロールを作成する代わりに、User Control オブジェクトを作成することを強くお勧めします。

このドキュメントでは、Hello World というユーザーコントロールをどのように表示するか設計時に GeneXus IDE で指定する例を紹介します。
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl=" [ http://www.w3.org/1999/XSL/Transform|http://www.w3.org/1999/XSL/Transform ] "
 xmlns:msxml="urn:schemas-microsoft-com:xslt"
 xmlns:gx="urn:shemas-artech-com:gx"
 exclude-result-prefixes="msxml gx"
 xmlns:gxca="urn:GXControlAdap">
  <xsl:output method="html"/>
  <xsl:template match="/" >
    <xsl:apply-templates select="/GxControl"/>
  </xsl:template>
  <xsl:template match="GxControl">
    <xsl:choose>
      <xsl:when test="@type = 'HelloWorld'">
        <xsl:call-template name="RenderHelloWorld"/>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

  <!-- HelloWorld design render -->
  <!-- ///////////////////  ここでレンダリングを実装する  ///////////////////-->
  <xsl:template name="RenderHelloWorld">
    <span atomicselection="true">
      <xsl:call-template name="AddStyleAttribute"/>
      Hello World control    
    </span>

  </xsl:template>

  <!-- Helpers Templates -->

  <xsl:template name="AddStyleAttribute" >
    <xsl:variable name="Style">
      <xsl:text>width: </xsl:text>
      <xsl:value-of select="gxca:GetPropertyValueInt('Width')"/>
      <xsl:text>; </xsl:text>
      <xsl:text>height: </xsl:text>
      <xsl:value-of select="gxca:GetPropertyValueInt('Height')"/>
      <xsl:text>; </xsl:text>
      <xsl:text>border-style: solid; border-width: 2px;</xsl:text>
    </xsl:variable>
    <xsl:attribute name="style">
      <xsl:value-of select="$Style"/>
    </xsl:attribute>
  </xsl:template>
</xsl:stylesheet>











サブページ
Created: 14/09/18 03:16 by Admin Last update: 24/03/25 23:57 by Admin
カテゴリ
Powered by GXwiki 3.0