Opened 14 years ago
Closed 14 years ago
#138 closed enhancement (fixed)
Database config - template - printAllWidgetExecutions error
Reported by: | adube | Owned by: | adube |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | documentation | Version: | |
Keywords: | Cc: |
Description
With the new "PGSQLMapContextConfig" config driver, the 'name' of the mapcontext is used as the name of the 'map' widget dynamically created. When browsing from one mapcontext to an other, the name of the map can change, so the following 'printAllWidgetExecutions' won't work :
<xsl:call-template name="printAllWidgetExecutions" > <xsl:with-param name="pMapName"><xsl:text>DefaultMap</xsl:text></xsl:with-param> </xsl:call-template> <xsl:if test="count(/geoprisma/widgets/widget[./type = 'map']) = 0 "> <center> <br /><br /> <h1>Inssufisant rights</h1> </center> </xsl:if>
The following method gets the name of the map widget dynamically and use it :
<!-- Check if one map node exists --> <xsl:variable name="bOneMap"> <xsl:value-of select="count(/geoprisma/widgets/widget[./type = 'map']) = 1"></xsl:value-of> </xsl:variable> <xsl:choose> <xsl:when test="$bOneMap = 'true'"> <xsl:variable name="pstrMapName"> <xsl:value-of select="/geoprisma/widgets/widget[./type = 'map']/name"></xsl:value-of> </xsl:variable> <!-- Call printAllWidgetExecutions with map name as parameter --> <xsl:call-template name="printAllWidgetExecutions" > <xsl:with-param name="pMapName"> <xsl:value-of select="$pstrMapName"></xsl:value-of> </xsl:with-param> </xsl:call-template> </xsl:when> <!-- Error, no ore more than one map node found --> <xsl:otherwise> <center> <br /><br /> <h1>Error : No or more than one maps detected.</h1> </center> </xsl:otherwise> </xsl:choose>
This should be added to the doc of the driver.
Change History (3)
comment:1 by , 14 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
r880, fixed.