• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue while trying to display dynamic section

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Currently we have a project in production which is deployed in WAS 6.1. We are trying to migrate that to WAS7

I have a piece of code as given below. if "ShowView" is set to "true", we need to display set of section under that block. All business logic has been written in onPageLoadBegin and at the end, based on certain conditions, we set "ShowView" flag. Acutally what is happening is that, when it comes to the page, it first executes the java piece of code(skips all the code comes under if block) and then control goes to onPageLoadBegin. After executing that method, it does not display those sections, because, java piece of code already executed and those section skipped already.

It is perfectly working in WAS 6.1. I am pretty new to JSF and not sure how exactly preRender and server piece of code works together. Logically, in general, always server piece of code executes first, followed by JSP/Struts code. According to that, what is happening is correct. Since it is working in WAS 6.1 already, am confused.

<hx:scriptCollector id="scriptCollector2" preRender="#{pc_CustomerHistoryView.onPageLoadBegin}">
<h:panelGrid columns="1" rowClasses="rowX1, rowX2">
<%
String showview=(String)request.getAttribute("ShowView");
if(showview != null && showview.equals("true"))
{
%>
//set of JSF tags
<% } %>

Any help appreciated and let me know if you require more info.

 
Sivakumar Subburaman
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also tried replacing the java piece of code to JSTL tags for comparision. Still it is the same issue.

<c:set var="showView" value="#{pc_CustomerHistoryView.showView}" scope="page" />
<c:if test="${showView == 'true'}">

Any help appreciated

Regards,
Siva
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic