Changeset 12319 in main
- Timestamp:
- 11/17/16 14:54:10 (6 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ibisph-view/src/main/webapp/WEB-INF/config/SiteSpecific.properties
r8817 r12319 47 47 # can be one value while the app knows its context path differently). 48 48 # This value is then used internally by the code to build the actual request 49 # URL. This value defaults to http://localhost/ibisph-view so if any50 # outside requests WILL fail if this value is not overridden. Note that there51 # is NO trailing slash "/".49 # URL. This value defaults to http://localhost/ibisph-view so if this is not 50 # the webapp's address and context the outside request WILL fail (ie set this 51 # to the approp value). Note that there is NO trailing slash "/". 52 52 commonWebAppRemoteURLPrefix.string =http://ibis.health.utah.gov 53 53 -
trunk/ibisph-view/src/main/webapp/WEB-INF/config/spring/SiteSpecific.xml
r10985 r12319 122 122 <entry key="/indicator/index/Categorized.html" value-ref="indicatorCategorizedIndexController"/> 123 123 124 <entry key="/indicator/view/*.html" 125 <entry key="/indicator/view/classic/*.html" 126 <entry key="/indicator/ important_facts/*.html"value-ref="indicatorImportantFactsController"/>127 <entry key="/indicator/ available_services/*.html"value-ref="indicatorAvailableServicesController"/>128 <entry key="/indicator/related/*/*.html" 129 <entry key="/indicator/ other_resources/*.html"value-ref="indicatorOtherResourcesController"/>130 <entry key="/indicator/ complete_profile/*.html"value-ref="indicatorCompleteProfileController"/>131 <entry key="/indicator/view _numbers/*.html"value-ref="indicatorViewNumbersController"/>132 133 <entry key="/indicator/chart/**" 134 <entry key="/indicator/graph/**" 124 <entry key="/indicator/view/*.html" value-ref="indicatorViewController"/> 125 <entry key="/indicator/view/classic/*.html" value-ref="indicatorViewClassicController"/> 126 <entry key="/indicator/facts/*.html" value-ref="indicatorImportantFactsController"/> 127 <entry key="/indicator/services/*.html" value-ref="indicatorAvailableServicesController"/> 128 <entry key="/indicator/related/*/*.html" value-ref="indicatorRelatedIndicatorsController"/> 129 <entry key="/indicator/resources/*.html" value-ref="indicatorOtherResourcesController"/> 130 <entry key="/indicator/report/*.html" value-ref="indicatorCompleteProfileController"/> 131 <entry key="/indicator/view/numbers/*.html" value-ref="indicatorViewNumbersController"/> 132 133 <entry key="/indicator/chart/**" value-ref="indicatorChartGraphicController"/> 134 <entry key="/indicator/graph/**" value-ref="indicatorChartGraphicController"/> 135 135 <!-- 136 136 <entry key="/indicator/all.html" value-ref="indicatorAllController"/> -
trunk/ibisph-view/src/main/webapp/WEB-INF/config/spring/common.xml
r11197 r12319 239 239 </description> 240 240 <property name="modelMapKey" value="#{commonXMLModelMapKey.string}"/> 241 <property name="model"><value><![CDATA[< BLANK/>]]></value></property>241 <property name="model"><value><![CDATA[<?xml version="1.0" encoding="UTF-8"?><BLANK/>]]></value></property> 242 242 </bean> 243 243 -
trunk/ibisph-view/src/main/webapp/WEB-INF/config/spring/view.xml
r10985 r12319 198 198 199 199 <bean id="viewAccessDeniedController" class="org.ibisph.web.springmvc.ModelMapAndViewController"> 200 <!-- Note that the view resolver adds the /WEB-INF/jsp prefix and .jsp suffix. --> 200 <!-- Note that a view resolver can add the /WEB-INF/jsp prefix and .jsp 201 suffix. However, for the view webapp a view resolver is not configured 202 so the path has to be explicit (relative to the webapp). See the admin 203 app for an example of a configured view resolver. 204 --> 201 205 <property name="view" value="/WEB-INF/jsp/access_denied.jsp"/> 202 206 </bean> 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 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 --> 203 231 204 232 -
trunk/ibisph-view/src/main/webapp/css/_kendo_overrides.css
r8761 r12319 27 27 margin-left: 1px; 28 28 } 29 30 29 31 30 .k-icon, … … 143 142 } 144 143 144 145 .k-loading-image 146 { 147 background-image: none; 148 /* background-image: url('Silver/loading-image.gif') */ 149 } 150 151 145 152 /*============================ End of Style Sheet ============================*/ -
trunk/ibisph-view/src/main/webapp/xslt/html/SiteSpecific.xslt
r11498 r12319 363 363 title="Share this page on Facebook" 364 364 rel="nofollow" target="_blank"> 365 <img typeof="foaf:Image" src="{$ibis.urlPrefix} /image/icon/32/facebook-blue.png"365 <img typeof="foaf:Image" src="{$ibis.urlPrefix}image/icon/32/facebook-blue.png" 366 366 alt="Facebook logo"/> 367 367 </a> … … 369 369 title="Share this page on Twitter" 370 370 rel="nofollow" target="_blank"> 371 <img typeof="foaf:Image" src="{$ibis.urlPrefix} /image/icon/32/twitter-blue.png"371 <img typeof="foaf:Image" src="{$ibis.urlPrefix}image/icon/32/twitter-blue.png" 372 372 alt="Twitter logo"/> 373 373 </a> … … 375 375 title="Share this page on Google+" 376 376 rel="nofollow" target="_blank"> 377 <img typeof="foaf:Image" src="{$ibis.urlPrefix} /image/icon/32/google_plus-red.png"377 <img typeof="foaf:Image" src="{$ibis.urlPrefix}image/icon/32/google_plus-red.png" 378 378 alt="Google+ logo"/> 379 379 </a> … … 381 381 title="Share this page on LinkedIn" 382 382 rel="nofollow" target="_blank"> 383 <img typeof="foaf:Image" src="{$ibis.urlPrefix} /image/icon/32/linkedin-blue.png"383 <img typeof="foaf:Image" src="{$ibis.urlPrefix}image/icon/32/linkedin-blue.png" 384 384 alt="LinkedIn logo"/> 385 385 </a> -
trunk/ibisph-view/src/main/webapp/xslt/html/community/highlight/SiteSpecific.xslt
r9074 r12319 25 25 <xsl:param name="SiteSpecific.navigationPathSelections"> 26 26 <SELECTION> 27 <TITLE>Related Links</TITLE> 28 <SELECTIONS> 29 <SELECTION> 30 <TITLE>community</TITLE> 31 <LOCAL_URL>community</LOCAL_URL> 32 </SELECTION> 33 <SELECTION> 34 <TITLE>comparison</TITLE> 35 <URL>#</URL> 36 </SELECTION> 37 <SELECTION> 38 <TITLE>selection</TITLE> 39 <LOCAL_URL>community/highlight/Selection.html</LOCAL_URL> 40 </SELECTION> 41 </SELECTIONS> 27 <TITLE>community</TITLE> 28 <LOCAL_URL>community</LOCAL_URL> 29 </SELECTION> 30 <SELECTION> 31 <TITLE>comparison</TITLE> 32 <URL>#</URL> 33 </SELECTION> 34 <SELECTION> 35 <TITLE>selection</TITLE> 36 <LOCAL_URL>community/highlight/Selection.html</LOCAL_URL> 42 37 </SELECTION> 43 38 </xsl:param> -
trunk/ibisph-view/src/main/webapp/xslt/html/community/highlight/index/Page.xslt
r9908 r12319 133 133 <xsl:param name="communityValue"/> 134 134 135 <!-- xsl:message select="$Page.indicatorProfileSetIndicatorNames"/ --> 135 136 <xsl:call-template name="ContentContainer.contentBlock"> 136 137 <xsl:with-param name="title" select="$title"/> … … 138 139 <ul> 139 140 <xsl:for-each select="$Page.communityProfile/INDICATOR_PROFILES/INDICATOR_PROFILE[HEADING_GROUP = $headingGroup]"> 140 <xsl:variable name="indicatorViewName" select="current()[INDICATOR_NAME = $Page.indicatorProfileSet /INDICATOR_NAMES/INDICATOR_NAME]/INDICATOR_VIEW_NAME"/>141 <xsl:variable name="indicatorViewName" select="current()[INDICATOR_NAME = $Page.indicatorProfileSetIndicatorNames/INDICATOR_NAME]/INDICATOR_VIEW_NAME"/> 141 142 <xsl:if test="string-length($indicatorViewName) != 0"> 142 143 <xsl:variable name="indicatorView" select="document(concat($Page.indicatorProfileXMLFilePath, '/', $indicatorViewName, '.xml'))/INDICATOR_VIEW"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/index/alphabetical/Page.xslt
r9075 r12319 57 57 <th scope="col" width="100" title="This is the date these data were certified current and valid.">Published Date</th> 58 58 </tr></thead> 59 <!-- using the grid's row count 59 60 <tfoot><tr><td colspan="2"> 60 61 <div class="RecordCount">Record Count: <xsl:value-of select="count(/INDICATORS/INDICATOR)"/></div> 61 62 </td></tr></tfoot> 62 63 --> 63 64 <!-- loop for all published indicators --> 64 65 <tbody> … … 80 81 <br/> 81 82 <xsl:call-template name="alphaJumpToLine"/> 83 84 <script> 85 $("table.Info").kendoGrid({ 86 sortable: true 87 ,filterable: true 88 ,reorderable: true 89 ,resizable: true 90 ,selectable: "multiple, row" 91 ,sortable: {mode: "multiple"} 92 ,scrollable: false 93 // ,pageable: false 94 ,pageable: 95 { 96 numeric: false 97 ,previousNext: false 98 ,messages: { display: "Total Records: {2}"} 99 } 100 }); 101 </script> 82 102 </xsl:template> 83 103 -
trunk/ibisph-view/src/main/webapp/xslt/html/query/definition/detail/Page.xslt
r10451 r12319 374 374 title="Share this page on Facebook" 375 375 rel="nofollow" target="_blank"> 376 <img src="{$ibis.urlPrefix} /image/icon/32/facebook-blue.png" alt="Facebook logo"/>376 <img src="{$ibis.urlPrefix}image/icon/32/facebook-blue.png" alt="Facebook logo"/> 377 377 </a> 378 378 <a href="javascript:window.open('http://twitter.com/share?url={$url}')" 379 379 title="Share this page on Twitter" 380 380 rel="nofollow" target="_blank"> 381 <img src="{$ibis.urlPrefix} /image/icon/32/twitter-blue.png" alt="Twitter logo"/>381 <img src="{$ibis.urlPrefix}image/icon/32/twitter-blue.png" alt="Twitter logo"/> 382 382 </a> 383 383 <a href="javascript:window.open('https://plus.google.com/share?url={$url}')" 384 384 title="Share this page on Google+" 385 385 rel="nofollow" target="_blank"> 386 <img src="{$ibis.urlPrefix} /image/icon/32/google_plus-red.png" alt="Google+ logo"/>386 <img src="{$ibis.urlPrefix}image/icon/32/google_plus-red.png" alt="Google+ logo"/> 387 387 </a> 388 388 <a href="javascript:window.open('http://www.linkedin.com/shareArticle?url={$url}'')" 389 389 title="Share this page on LinkedIn" 390 390 rel="nofollow" target="_blank"> 391 <img src="{$ibis.urlPrefix} /image/icon/32/linkedin-blue.png" alt="LinkedIn logo"/>391 <img src="{$ibis.urlPrefix}image/icon/32/linkedin-blue.png" alt="LinkedIn logo"/> 392 392 </a> 393 393 </td> -
trunk/ibisph-view/src/main/webapp/xslt/html/user/access/Page.xslt
r9126 r12319 158 158 <td> 159 159 <xsl:call-template name="Help.popup"> 160 <xsl:with-param name="additionalClasses" select="'Right'"/> 160 161 <xsl:with-param name="title" select="'Captcha'"/> 161 162 <xsl:with-param name="content"> -
trunk/ibisph-view/src/main/webapp/xslt/html/user/login/Page.xslt
r8637 r12319 175 175 <td> 176 176 <xsl:call-template name="Help.popup"> 177 <xsl:with-param name="additionalClasses" select="'Right'"/> 177 178 <xsl:with-param name="title" select="'User ID/Email Address'"/> 178 179 <xsl:with-param name="content"> … … 202 203 <td> 203 204 <xsl:call-template name="Help.popup"> 205 <xsl:with-param name="additionalClasses" select="'Right'"/> 204 206 <xsl:with-param name="title" select="'Password Security Note'"/> 205 207 <xsl:with-param name="content"> … … 216 218 <button type="submit" accesskey="L">Login</button> 217 219 <xsl:call-template name="Help.popup"> 220 <xsl:with-param name="additionalClasses" select="'Right'"/> 218 221 <xsl:with-param name="title" select="'Already Logged In'"/> 219 222 <xsl:with-param name="content"> -
trunk/ibisph-view/src/main/webapp/xslt/html/user/registration/Page.xslt
r11122 r12319 220 220 <td> 221 221 <xsl:call-template name="Help.popup"> 222 <xsl:with-param name="additionalClasses" select="'Right'"/> 222 223 <xsl:with-param name="title" select="'Captcha'"/> 223 224 <xsl:with-param name="content"> -
trunk/ibisph-view/src/main/webapp/xslt/ibis.xslt
r8818 r12319 36 36 contains the definition. 37 37 --> 38 <xsl:param name="ibis.adopterTitle" select="'State'" 39 ibis:doc="Value to be used when the XSLT code needs a title usage example 40 is CP reports that compare community, state, and US. This should be 41 overridden in the main ss.xslt with values like 'Utah', 'New Mexico' etc. 42 " 43 /> 38 44 39 45 <!-- RESOURCE ADDRESSING: The "WebAppURLContextPrefix" parameter is used to … … 85 91 <xsl:variable name="webappURLContextPrefix" select="org.ibisph:SystemProperties.getProperty('WebAppURLContextPrefix')" xmlns:org.ibisph="org.ibisph"/> 86 92 --> 87 <xsl:param name="ibis.adopterTitle" select="'State'"88 ibis:doc="Value to be used when the XSLT code needs a title usage example89 is CP reports that compare community, state, and US. This should be90 overridden in the main ss.xslt with values like 'Utah', 'New Mexico' etc.91 "92 />93 94 93 <xsl:param name="WebAppContextURLPrefix" 95 94 ibis:doc="Prefix used/needed for referencing resources within the site." -
trunk/ibisph/src/main/java/org/ibisph/indicatorprofile/databean/DatasetRecord.java
r11972 r12319 28 28 addField("LABEL", Field.TYPE_STRING); 29 29 addField("NOTE", Field.TYPE_STRING); 30 31 addField("LONGITUDE", Field.TYPE_BIGDECIMAL); 32 addField("LATITUDE", Field.TYPE_BIGDECIMAL); 33 34 // this is not used/needed as the dataset is defined by active dimension values... 30 35 addField("ACTIVE_FLAG", Field.TYPE_STRING); 31 36 … … 66 71 } 67 72 73 public String getDimension1Title() { 74 return( getStringFieldValue("DIMENSION_1_TITLE") ); 75 } 68 76 public String getDimension1ValueTitle() { 69 77 return( getStringFieldValue("DIMENSION_1_VALUE_TITLE") ); 78 } 79 public String getDimension2Title() { 80 return( getStringFieldValue("DIMENSION_2_TITLE") ); 70 81 } 71 82 public String getDimension2ValueTitle() { 72 83 return( getStringFieldValue("DIMENSION_2_VALUE_TITLE") ); 73 84 } 85 public String getPeriodDimensionTitle() { 86 return( getStringFieldValue("PERIOD_DIMENSION_TITLE") ); 87 } 74 88 public String getPeriodDimensionValueTitle() { 75 89 return( getStringFieldValue("PERIOD_DIMENSION_VALUE_TITLE") ); 76 }77 public String getDimension1Title() {78 return( getStringFieldValue("DIMENSION_1_TITLE") );79 }80 public String getDimension2Title() {81 return( getStringFieldValue("DIMENSION_2_TITLE") );82 }83 public String getPeriodDimensionTitle() {84 return( getStringFieldValue("PERIOD_DIMENSION_TITLE") );85 90 } 86 91 … … 100 105 return( getStringFieldValue("DENOMINATOR") ); 101 106 } 107 108 public String getLongitude() { 109 return( getStringFieldValue("LONGITUDE") ); 110 } 111 public String getLatitude() { 112 return( getStringFieldValue("LATITUDE") ); 113 } 114 102 115 public String getLabel() { 103 116 return( getStringFieldValue("LABEL") ); -
trunk/ibisph/src/main/java/org/ibisph/indicatorprofile/springmvc/databean/EditDatasetDimensionsController.java
r11972 r12319 75 75 dimensionToDataset.setFieldValue("DATASET_NAME", dataset.getName()); 76 76 this.dataBeanDAOService.load(dimensionToDatasetCollection, dimensionToDataset); 77 HashMap<String,DimensionToDataset> dimension Map = new HashMap<String,DimensionToDataset>();77 HashMap<String,DimensionToDataset> dimensionToDatasetMap = new HashMap<String,DimensionToDataset>(); 78 78 for(DataBean db : dimensionToDatasetCollection) { 79 79 dimensionToDataset = (DimensionToDataset)db; 80 80 if(dimensionToDataset.isPeriod()) periodDimensionName = dimensionToDataset.getDimensionName(); 81 dimension Map.put(dimensionToDataset.getDimensionName(), dimensionToDataset);81 dimensionToDatasetMap.put(dimensionToDataset.getDimensionName(), dimensionToDataset); 82 82 } 83 modelMap.put(this.datasetDimensionMapModelName, dimension Map);83 modelMap.put(this.datasetDimensionMapModelName, dimensionToDatasetMap); 84 84 modelMap.put(this.periodDimensionNameModelName, periodDimensionName); 85 85 -
trunk/ibisph/src/main/java/org/ibisph/indicatorprofile/springmvc/databean/EditDatasetRecordsController.java
r11972 r12319 33 33 protected String nameValueDelimiter = "|"; 34 34 35 protected String periodDimensionValueParameterName = "periodDimensionValue"; 36 protected String dimension1NameValueParameterName = "dimension1NameValue"; 37 protected String dimension2NameValueParameterName = "dimension2NameValue"; 38 35 protected String selectedDimension1NameParameterName = "selctedDimension1Name"; 36 protected String selectedDimension2NameParameterName = "selctedDimension2Name"; 37 protected String selectedPeriodDimensionValueParameterName = "selectedPeriodDimensionValue"; 38 39 protected String dimension1ModeName = "dimension1"; 40 protected String dimension2ModeName = "dimension2"; 41 protected String periodDimensionModelName = "periodDimension"; 39 42 protected String periodDimensionValueModelName = "periodDimensionValue"; 40 protected String dimension1NameValueModelName = "dimension1NameValue"; 41 protected String dimension 2NameValueMode2Name = "dimension2NameValue";42 43 44 protected String dimension1CollectionModelName = "dimension1s"; 45 protected String dimension2CollectionModelName = "dimension2s"; 43 46 protected String periodDimensionValueCollectionModelName = "periodDimensionValues"; 44 protected String dimension1ValueCollectionModelName = "dimension1Values"; 45 protected String dimension2ValueCollectionModelName = "dimension2Values"; 46 protected String datasetRecordCollectionModelName = "datasetRecords"; 47 48 protected String showPeriodSelectionsModelName = "showPeriodSelections"; 47 48 49 50 protected String datasetRecordCollectionModelName = "datasetRecords"; 51 52 protected String showPeriodSelectionsModelName = "showPeriodSelections"; 49 53 50 54 /** … … 83 87 /** 84 88 * Sets the requested/selected http request period dimension value. 85 * @param periodDimensionValueParameterName 86 */ 87 public void setPeriodDimensionValueParameterName(String periodDimensionValueParameterName) { 88 this.periodDimensionValueParameterName = periodDimensionValueParameterName; 89 } //-------------------------- End of Method ------------------------------ 90 91 92 /** 93 - get/set the selected dim2 set name|value http request param value 94 - get/set the selected period dim value http request param value 95 96 1. build the list of dim 1 set name|value and title. 97 2. build the list of dim 2 set name|value and title. 98 3. build the list of period dim values & titles 99 4. get the assoc records based on selected period and dim2 100 5. Loop through the records and build the approp dim 1 titles. 89 * @param selectedPeriodDimensionValueParameterName 90 */ 91 public void setSelectedPeriodDimensionValueParameterName(String selectedPeriodDimensionValueParameterName) { 92 this.selectedPeriodDimensionValueParameterName = selectedPeriodDimensionValueParameterName; 93 } //-------------------------- End of Method ------------------------------ 94 95 96 /** 97 * Handler that: 98 * - get the dataset from super. 99 * - get the dataset's dimensions from super. 100 * 101 * - get the selected dim1 name load and set the selected dim1 102 * - get the selected dim2 name load and set the selected dim2 103 * - get the selected period dim value, set the value / all values 104 * 105 * - build the list of group 1 dims. 106 * - build the list of group 2 dims. 107 * - load the period dim. 108 * - build the list of period dim values 109 * - get the assoc records based on selected period value(s), dim1 and dim2 110 * - Loop through the records and build the assoc period, dim 1 & 2 titles. 101 111 * 102 112 * @param request HTTP Servlet Request passed from the requestHandler. … … 112 122 if((null == dataset) || !StrLib.isSomething(dataset.getName())) return(modelMap); 113 123 114 // Get all the current dataset records and put into the model map.115 Collection<DataBean> datasetRecordCollection = getDatasetRecordCollection(request, dataset);116 modelMap.put(this.datasetRecordCollectionModelName, datasetRecordCollection);117 118 124 // Get super's dataset dimensions (DimensionToDataset by dimension name) 119 125 // and the collection of all associated dataset dimensions. The all 120 126 // dimensions collection is used to get the dimension object via loop so 121 127 // that the dimension does not have to be requeried. 122 Map<String,DimensionToDataset> dimensionMap = (Map<String,DimensionToDataset>)modelMap.get(this.datasetDimensionMapModelName); 123 ArrayList<DataBean> dimensionCollection = (ArrayList<DataBean>)modelMap.get(this.dimensionCollectionModelName); 128 Map<String,DimensionToDataset> dimensionToDatasetMap = (Map<String,DimensionToDataset>)modelMap.get(this.datasetDimensionMapModelName); 129 ArrayList<DataBean> dimensionCollection = (ArrayList<DataBean>)modelMap.get(this.dimensionCollectionModelName); 130 131 // gets the selected dim name request param, grabs the selected dim and 132 // puts into the model, loops the dataset dims and creates a dim collection 133 // and puts into the model for the drop down selections. 134 String dimension1Name = processDimension( 135 request, 136 dimensionToDatasetMap, 137 dimensionCollection, 138 DimensionToDataset.DIMENSION_1_USAGE, 139 this.selectedDimension1NameParameterName, 140 this.dimension1ModeName, 141 this.dimension1CollectionModelName, 142 modelMap 143 ); 144 String dimension2Name = processDimension( 145 request, 146 dimensionToDatasetMap, 147 dimensionCollection, 148 DimensionToDataset.DIMENSION_2_USAGE, 149 this.selectedDimension2NameParameterName, 150 this.dimension2ModeName, 151 this.dimension2CollectionModelName, 152 modelMap 153 ); 154 155 // next get the period dimension values 156 String periodDimensionName = (String)modelMap.get(this.periodDimensionNameModelName); 157 Dimension periodDimension = getDimension(dimensionCollection, periodDimensionName); 158 Collection<DataBean> periodDimensionValueCollection = new ArrayList<DataBean>(); 159 DimensionValue periodDimensionValue = new DimensionValue(); 160 periodDimensionValue.setFieldValue("DIMENSION_NAME", periodDimensionName); 161 periodDimensionValue.setFieldValue("ACTIVE_FLAG", this.dataBeanFlagValue); 162 ArrayList<DataBean> dimensionValueCollection = new ArrayList<DataBean>(); 163 this.dataBeanDAOService.load(periodDimensionValueCollection, periodDimensionValue); 164 modelMap.put(this.periodDimensionValueCollectionModelName, periodDimensionValueCollection); 165 166 // Get all the current dataset records and put into the model map. 167 // NOTE: because the UI needs the dim titles and all dim values need to 168 // loop and dynically build the collection. 169 Collection<DataBean> datasetRecordCollection = getDatasetRecordCollection(request, dataset); 124 170 125 171 // create a map of dimension name: dimension value collection. Loop through 126 172 // the selected dimensions and build the dim value collection and add. 127 Collection<DimensionValue> periodDimensionValueCollection = new ArrayList<DimensionValue>();128 173 Collection<DimensionValue> dimension1ValueCollection = new ArrayList<DimensionValue>(); 129 174 Collection<DimensionValue> dimension2ValueCollection = new ArrayList<DimensionValue>(); 130 for(Map.Entry<String, DimensionToDataset> entry : dimension Map.entrySet()) {175 for(Map.Entry<String, DimensionToDataset> entry : dimensionToDatasetMap.entrySet()) { 131 176 DimensionToDataset dimensionToDataset = (DimensionToDataset)entry.getValue(); 132 177 Dimension dimension = getDimension(dimensionCollection, dimensionToDataset.getDimensionName()); … … 136 181 dimensionValue.setFieldValue("DIMENSION_NAME", dimensionToDataset.getDimensionName()); 137 182 dimensionValue.setFieldValue("ACTIVE_FLAG", this.dataBeanFlagValue); 138 ArrayList<DataBean> dimensionValueCollection = new ArrayList<DataBean>();183 // ArrayList<DataBean> dimensionValueCollection = new ArrayList<DataBean>(); 139 184 this.dataBeanDAOService.load(dimensionValueCollection, dimensionValue); 140 185 … … 156 201 } 157 202 } 158 modelMap.put(this.periodDimensionValueCollectionModelName, periodDimensionValueCollection); 159 modelMap.put(this.dimension1ValueCollectionModelName, dimension1ValueCollection); 160 modelMap.put(this.dimension2ValueCollectionModelName, dimension2ValueCollection); 203 // modelMap.put(this.dimension1ValueCollectionModelName, dimension1ValueCollection); 204 // modelMap.put(this.dimension2ValueCollectionModelName, dimension2ValueCollection); 205 206 modelMap.put(this.datasetRecordCollectionModelName, datasetRecordCollection); 161 207 162 208 // get the assoc measure (ui uses the title) and put into the model. … … 170 216 171 217 218 /** 219 * Localizes getting the selected dim name request param, grabs the selected 220 * dim and puts into the model, loops the dataset dims and creates a dim 221 * collection and puts into the model for the drop down selections. 222 * 223 * @param request 224 * @param dimensionMap 225 * @param dimensionCollection 226 * @param selectedDimensionNameParameterName 227 * @param dimensionModeName 228 * @param dimensionCollectionModelName 229 * @param modelMap 230 */ 231 protected String processDimension( 232 HttpServletRequest request, 233 Map<String,DimensionToDataset> dimensionToDatasetMap, 234 ArrayList<DataBean> completeDimensionCollection, 235 String selectedDimensionNameParameterName, 236 String dimensionUsage, 237 String dimensionModeName, 238 String dimensionCollectionModelName, 239 Map<String, Object> modelMap 240 ) { 241 String selectedDimensionName = request.getParameter(selectedDimensionNameParameterName); 242 243 // Build the associated dimension collection and add to the modelmap. 244 Dimension selectedDimension = null; 245 Collection<DimensionToDataset> dimensionToDatasetCollection = (Collection<DimensionToDataset>)dimensionToDatasetMap.values(); 246 ArrayList<Dimension> dimensionCollection = new ArrayList<Dimension>(); 247 for(DimensionToDataset dimensionToDataset : dimensionToDatasetCollection) { 248 if(dimensionToDataset.getDimensionUsage().equals(dimensionUsage)) { 249 Dimension dimension = getDimension(completeDimensionCollection, dimensionToDataset.getDimensionName()); 250 dimensionCollection.add(dimension); 251 if(dimension.getName().equals(selectedDimensionName)) selectedDimension = dimension; 252 } 253 } 254 if(null == selectedDimension) selectedDimension = dimensionCollection.get(0); 255 modelMap.put(dimensionModeName, selectedDimension); 256 modelMap.put(dimensionCollectionModelName, dimensionCollection); 257 258 return(selectedDimensionName); 259 } //-------------------------- End of Method ------------------------------ 260 261 262 263 264 265 266 267 268 269 270 271 172 272 /** 173 273 * Helper to delete from the collection/list any dim value not selected. … … 242 342 ) throws Exception { 243 343 Collection<DataBean> datasetRecordCollection = new ArrayList<DataBean>(); 344 /* 244 345 DatasetRecord datasetRecord = new DatasetRecord(); 245 346 datasetRecord.setFieldValue("DATASET_NAME", dataset.getName()); 246 347 this.dataBeanDAOService.load(datasetRecordCollection, datasetRecord); 247 348 248 /* 349 249 350 250 351 String periodDimensionName = (String)modelMap.get(this.periodDimensionNameModelName); … … 325 426 allPossibleDatasetRecordCollection.add(datasetRecord); 326 427 } 327 */428 */ 328 429 return((Collection<DataBean>)datasetRecordCollection); 329 430 } //-------------------------- End of Method ------------------------------ -
trunk/ibisph/src/main/java/org/ibisph/web/springmvc/SimpleClientRedirectionView.java
r9600 r12319 2 2 3 3 import java.util.Map; 4 import java.net.URL; 4 5 5 6 import javax.servlet.http.HttpServletRequest; … … 7 8 8 9 import org.ibisph.util.IOPath; 10 import org.ibisph.util.StrLib; 9 11 10 12 /** … … 67 69 HttpServletResponse response 68 70 ) throws Exception { 69 java.net.URL url = (java.net.URL)modelMap.get(this.urlModelMapKey); 70 if(url != null) 71 response.sendRedirect(url.toExternalForm()); 72 else { 73 if(this.prependWebappContextToRedirectionAddress) 74 response.sendRedirect( IOPath.concat(request.getContextPath(), this.redirectionAddress, "/") ); 75 else 76 response.sendRedirect(this.redirectionAddress); 71 String redirectionRequestAddress = this.redirectionAddress; 72 73 if((null != modelMap) && StrLib.isSomething(this.urlModelMapKey)) { 74 Object url = modelMap.get(this.urlModelMapKey); 75 if(null != url) { 76 if(url instanceof URL) { 77 response.sendRedirect( ((URL)url).toExternalForm() ); 78 return; 79 } 80 else if(url instanceof String) 81 redirectionRequestAddress = (String)url; 82 } 77 83 } 84 85 if(this.prependWebappContextToRedirectionAddress) 86 response.sendRedirect( IOPath.concat(request.getContextPath(), redirectionRequestAddress, "/") ); 87 else 88 response.sendRedirect(redirectionRequestAddress); 78 89 } //-------------------------- End of Method ------------------------------ 79 90
Note: See TracChangeset
for help on using the changeset viewer.