Iterative MAP on Struts2 in traverse

java code, respectively, in the map of types of data into the List
public String travelIndex() throws DataAccessException{
 OuteType outeType = new OuteType();
                outeType.setFatherName(OuteType.FATHERNAME_C);
                List<OuteType> innerList = outeTypeService.list(outeType, 0, 1000);
                outeTypeMap.put(OuteType.FATHERNAME_C, innerList);
                
                outeType.setFatherName(OuteType.FATHERNAME_I);
                List<OuteType> interList = outeTypeService.list(outeType, 0, 1000);
                outeTypeMap.put(OuteType.FATHERNAME_I, interList);
                return SUCCESS;
}


struts2 page code:
 <s:iterator value="outeTypeMap">
                        <s:set name="typeId" value="#column.key"></s:set>
                        <s:text name="%{typeId}"></s:text>
                        <s:if test='#typeId=="c"'>
                           <h2><a href="" target="_blank"> Domestic tourism  </a></h2>
                           <s:iterator value="#column.value" status="s">
                                <p><a href="" target="_blank"><s:property value="typeName"/></a><span>|</span></p>
                           </s:iterator>
                        </s:if>
                        <s:elseif test='#typeId=="i"'>
                           <h2><a href="" target="_blank"> International tourism  </a></h2>
                           <s:iterator value="#column.value" status="s">
                                <p><a href="" target="_blank"><s:property value="typeName"/></a><span>|</span></p>
                           </s:iterator>
                        </s:elseif>
                      </s:iterator> 


In the page, need to compare map of the key, to achieve different data display.
In <s:if test='#typeId=="c"'> in the original, with <s:if test="#typeId=='c'"> does not work, you must use <s: if test = ' # typeId == "c" '> to be displayed.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Iterative MAP on Struts2 in traverse

  • Hibernate Inteceptor

    The end of the project stage, the client suddenly put forward a very troublesome but normal demand, the system records all changes must be carried out. Formats such as: 2004.1.1 12:30 Ikuya wind orders Sales Order Date 2004.1.2-> 2004.1.3 The firs ...

  • Dynamic loading JS script four kinds of methods

    To achieve dynamic loading JS script has four kinds of methods: 1, direct document.write <script language="javascript"> document.write ( "<script src='test.js'> <\ / script>"); </ script> 2, dynamic scri

  • FLEX: integrating Spring + Hibernate

    Before a friend also wanted to study development of FLEX. Asked me to help him to be a small sample. Spent a weekend time, to integrate a sampleproject. Client: FLEX Server: Spring2.5 + Hibernate3.2 + Hibernate-annotations3.3.1 + MySQL5 FDS: BlazeDS3 IDE:

  • Based on Spring's Hibernate Search full-text search function of sample

    Database: Oracle 9i JDBC Driver: OJDBC14 Development Environment: Eclipse-JEE Spring version: Spring 2.0.6 Hibernate version: Hibernate Core 3.2.5/Hibernate Annotation 3.3.0/Hibernate Validator 3.0.0/Hibernate Search 3.0.0 Beta4 / / jdbc.properties (JDBC

  • spring + hibernate + oracle9i to read and write CLOB

    Database-driven update classes12-9i.jar Hibernate modify the configuration of the following code <bean/> <bean Lazy-init="true"> <property name="nativeJdbcExtractor"> <ref local="nativejdbcExtractor"/>

  • Process migration from tomcat to websphere changes

    Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm's

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

  • The level Hibernate cache

    Hibernate cache level: (1) a cache is very short and the session life cycle consistent, also known as session-level cache-level cache or transaction-level cache (2) Ways of Supporting level cache: get (); load (); iterator (); only entity object cach ...

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries