aspose file tools*
The moose likes JSF and the fly likes categorize data display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "categorize data display" Watch "categorize data display" New topic
Author

categorize data display

Rodney Hirokane
Greenhorn

Joined: Dec 04, 2009
Posts: 8
Hopefully this is the right forum for this question. I pass a list of data elements to my jsp page in the following format.

DEMO Name
DEMO DOB
DEMO CITIZEN
DESCRIPTOR WEIGHT
DESCRIPTOR HEIGHT
DESCRIPTOR HAIR COLOR

I would like to display this data in the following format

DEMO
NAME
DOB
CITIZEN

DESCRIPTOR
WEIGHT
HEIGHT
HAIR COLOR

Does this need to be done using javascript or could this be done through another technique? Should I manipulate my list to be in some other format? Any suggestions appreciated.

Thank you,

Rod
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

You should format the data more appropriately before getting to the JSP.

Seems like a Map might be a good fit.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rodney Hirokane
Greenhorn

Joined: Dec 04, 2009
Posts: 8
Bear Bibeault wrote:You should format the data more appropriately before getting to the JSP.

Seems like a Map might be a good fit.


I have decided to make a format change as you suggested. Not sure what you meant by a Map. I am using JSP and JSF. I looked online but could not find anything relevant at this time.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?
Rodney Hirokane
Greenhorn

Joined: Dec 04, 2009
Posts: 8
Bear Bibeault wrote:If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?


JSF using JSP for the web app development but maybe you can help better clarify for me. I thought JSF provided the framework that my JSP pages are developed in. My web page files have a .jsp extension that needs to be compiled and the eventual end product is an .ear that is deployed to the application server. I use JSF tags within my .jsp page and also use both session and backing beans for accessing the database. Isn't the JSP being extended using the JSF tags? For what it is worth my development environment is IBM Rational Software Architect and DB2 and my Application Server is Websphere.

Thanks,

Rod
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

I'm going to move this to the JSF forum for sorting out.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Rodney Hirokane wrote:
Bear Bibeault wrote:If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?


JSF using JSP for the web app development but maybe you can help better clarify for me. I thought JSF provided the framework that my JSP pages are developed in. My web page files have a .jsp extension that needs to be compiled and the eventual end product is an .ear that is deployed to the application server. I use JSF tags within my .jsp page and also use both session and backing beans for accessing the database. Isn't the JSP being extended using the JSF tags? For what it is worth my development environment is IBM Rational Software Architect and DB2 and my Application Server is Websphere.

Thanks,

Rod


No. JSF started off being based on JSP, but that was long ago. These days, the ".jsp" files are not compiled to produce servlets like "real" JSPs are. Instead, they're used as templates to be digested into JSF View trees. So a ".jsp" suffix is really an illusion. As of JSF2.0, the preferred mechanism is Facelets, and Facelets resources normally have an extension of ".xhtml", in fact.

All of which provide the primary reasons why scriptlets and JSTL don't work well on JSF "jsp"s.

An additional caveat for WebSphere, BTW. Depending on which version and what service packs are in effect, JSF support is integrated into the WebSphere server itself. That makes some things simpler, but you do have to make sure that the version of WebSphere you're using is sufficiently advanced to support the level of JSF that you're developing in.


Customer surveys are for companies who didn't pay proper attention to begin with.
Rodney Hirokane
Greenhorn

Joined: Dec 04, 2009
Posts: 8
Tim Holloway wrote:
Rodney Hirokane wrote:
Bear Bibeault wrote:If you are using JSF, then this is in the wrong place. Which is it? JSP or JSF?


JSF using JSP for the web app development but maybe you can help better clarify for me. I thought JSF provided the framework that my JSP pages are developed in. My web page files have a .jsp extension that needs to be compiled and the eventual end product is an .ear that is deployed to the application server. I use JSF tags within my .jsp page and also use both session and backing beans for accessing the database. Isn't the JSP being extended using the JSF tags? For what it is worth my development environment is IBM Rational Software Architect and DB2 and my Application Server is Websphere.

Thanks,

Rod


No. JSF started off being based on JSP, but that was long ago. These days, the ".jsp" files are not compiled to produce servlets like "real" JSPs are. Instead, they're used as templates to be digested into JSF View trees. So a ".jsp" suffix is really an illusion. As of JSF2.0, the preferred mechanism is Facelets, and Facelets resources normally have an extension of ".xhtml", in fact.

All of which provide the primary reasons why scriptlets and JSTL don't work well on JSF "jsp"s.

An additional caveat for WebSphere, BTW. Depending on which version and what service packs are in effect, JSF support is integrated into the WebSphere server itself. That makes some things simpler, but you do have to make sure that the version of WebSphere you're using is sufficiently advanced to support the level of JSF that you're developing in.


Thanks for the clarification.

Rod
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: categorize data display