Changeset 12318 in main


Ignore:
Timestamp:
11/17/16 14:24:48 (6 years ago)
Author:
Garth Braithwaite
Message:

nm epht - water to html content mapping example. Updated the QM exercisers for include data portal - not tested.

Location:
adopters/nm-epht/trunk/src/main/webapps/epht-view
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • adopters/nm-epht/trunk/src/main/webapps/epht-view/WEB-INF/config/spring/SiteSpecific.xml

    r12218 r12318  
    137137                                <entry key="/user/access/email"             value-ref="userEmailAccessController"/>
    138138
     139
    139140                                <!-- G E N E R I C   T R A S F O R M A T I O N -->
    140141                                <entry key="/view.html" value-ref="viewHTTPXMLXSLTRequestParameterController"/>
     142
     143                                <!-- R E D I R E C T S -->
     144                                <entry key="/water"  value-ref="siteSpecificWaterController"/>
    141145
    142146                                <!-- F I L E   C O N T E N T   S T R E A M E R -->
     
    201205
    202206
    203         <!-- DB mods -->       
     207
     208
     209        <!-- REDIRECT CONTROLLER EXAMPLE:
     210                This can be used when you want to have a simple URL to share that maps to
     211                a more complex request.  To make this work three things are needed:
     212                1) web.xml has to map the request to the request dispatcher servlet.
     213                2) the request dispatcher needs to have a URL to controller mapping.
     214                3) the v3 controller definition which is provided below:
     215        <bean id="viewStaticWaterController" class="org.ibisph.web.springmvc.ModelMapAndViewController">
     216                <property name="view">
     217                        <bean class="org.ibisph.web.springmvc.SimpleClientRedirectionView">
     218                                <property name="redirectionAddress" value="/environment/water/Introduction.html"/>
     219                                <property name="prependWebappContextToRedirectionAddress" value="true"/>
     220                        </bean>
     221                </property>
     222        </bean>
     223
     224        NOTES:
     225                Aonther approach would be to simply create another hard coded controller
     226                that handles the request.  The redirect is preferred because the user can
     227                actually see and bookmark the "real" request URL.  This lessens the
     228                confusion of how do I get back to this page and hey this page is the same
     229                as that page - what's the diff?
     230
     231                *** When v3 the modelMap property will not be needed.  Also, at some future
     232                point could create a generic controller to do this but web.xml and the
     233                requset to controller mapping would still be needed.
     234        -->
     235        <bean id="siteSpecificWaterController" class="org.ibisph.web.springmvc.ModelMapAndViewController">
     236                <property name="modelMap"><map/></property>
     237                <property name="view">
     238                        <bean class="org.ibisph.web.springmvc.SimpleClientRedirectionView">
     239                                <property name="redirectionAddress" value="/environment/water/Introduction.html"/>
     240                                <property name="prependWebappContextToRedirectionAddress" value="true"/>
     241                        </bean>
     242                </property>
     243        </bean>
     244
    204245
    205246</beans>
  • adopters/nm-epht/trunk/src/main/webapps/epht-view/WEB-INF/web.xml

    r11195 r12318  
    237237                <url-pattern>/user/*</url-pattern>
    238238                <url-pattern>/dataportal/*</url-pattern>
     239<url-pattern>/water/*</url-pattern>
    239240
    240241                <!--
  • adopters/nm-epht/trunk/src/main/webapps/epht-view/xslt/html/query/module/report/configurations_by_file.xslt

    r12202 r12318  
    9999                <xsl:param name="file"        select="document(concat($ConfigurationsByFile.filePath, $filename), /)"/>
    100100                <xsl:param name="configCount" select="count($file/QUERY_MODULE/CONFIGURATIONS/CONFIGURATION)"/>
    101                 <!-- need to add dataportal for EPHT <xsl:param name="partialURL"  select="concat($ibis.urlPrefix, replace( replace($filename, '.xml', ''), 'query/module/', 'query/result/'))"/> -->
    102                 <xsl:param name="partialURL"  select="concat($ibis.urlPrefix, replace( replace($filename, '.xml', ''), 'query/module/', 'dataportal/query/result/'))"/>
    103                
     101                <xsl:param name="partialURL"  select="concat($ibis.urlPrefix, replace( replace($filename, '.xml', ''), 'query/module/', 'query/result/'))"/>
     102
    104103                <xsl:if test="$configCount &gt; 0">
    105104                        <div class="FileHeader">
  • adopters/nm-epht/trunk/src/main/webapps/epht-view/xslt/html/query/module/report/exercise_configurations - all in one.xslt

    r12218 r12318  
    146146                        <xsl:variable name="baseBuilderPath" select="replace(replace($filename, '.xml', ''), '/module/', '/builder/')"/>
    147147                        <xsl:for-each select="$file/QUERY_MODULE/CONFIGURATIONS/CONFIGURATION">
    148                                 url[index++] = "<xsl:value-of select="concat($ibis.urlPrefix, 'dataportal/', $baseBuilderPath, '/', NAME[1], '.html?AutoSubmit=true')"/>";
     148                                url[index++] = "<xsl:value-of select="concat($ibis.urlPrefix, $baseBuilderPath, '/', NAME[1], '.html?AutoSubmit=true')"/>";
    149149                        </xsl:for-each>
    150150                </xsl:if>
  • adopters/nm-epht/trunk/src/main/webapps/epht-view/xslt/html/query/module/report/exercise_configurations.xslt

    r12218 r12318  
    5858                        <xsl:variable name="baseBuilderPath" select="replace(replace($xml, '.xml', ''), '/module/', '/result/')"/>
    5959                        <xsl:for-each select="/QUERY_MODULE/CONFIGURATIONS/CONFIGURATION">
    60                                 url[index++] = "<xsl:value-of select="concat($ibis.urlPrefix, 'dataportal/', $baseBuilderPath, '/', NAME[1], '.html')"/>";
     60                                url[index++] = "<xsl:value-of select="concat($ibis.urlPrefix, $baseBuilderPath, '/', NAME[1], '.html')"/>";
    6161                        </xsl:for-each>
    6262
Note: See TracChangeset for help on using the changeset viewer.