online Item online

Fagartikler

xPages Del 1 Hold enkelt kontroll med dine CGI variabler

[18.12.2009] Sjekk hvordan du enkelt kan holde styr på blasessionScope, requestScope, applicationScope og viewScope i xPages

Vi så en av Declan Lynch sine bloggs om hvordan enkelt holde styr på sessionScope, requestScope, applicationScope og viewScope i xPages. Da fant vi ut at dette burde jo enkelt kunne gjøres med cgivariabler også. Du finner hans artikkel ved å trykke HER.

Så vi tok hans kode og gjorde noen veldig små endringer og vips....

<?xml version="1.0"encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
CGI
<xp:panel id="applicationVars" styleClass="debugPanel">
<xp:table styleClass="debug">
<xp:tr>
<th>Variable Name</th>
<th>Variable Content</th>
</xp:tr>
<xp:repeat id="varRepeat" rows="30" var="scopeData">
<xp:this.value>
<![CDATA[#{javascript:paramValues.keySet();}]]> </xp:this.value>
 
<xp:tr>
        <xp:td style="white-space:nowrap">
               <xp:text escape="true" id="varName"
value="#{javascript:scopeData}" />
          </xp:td>
        <xp:td style="white-space:nowrap">
            <xp:text escape="true" id="varValue">
<xp:this.value>
<![CDATA[#{javascript:var values:java.lang.Object = paramValues.get(scopeData);values.toString();}]]>
                </xp:this.value>
</xp:text>
</xp:td>
      </xp:tr>
</xp:repeat>
</xp:table>
</xp:panel>
</xp:view>