|
Home > Archive > WebSphere Portal Server > March 2007 > A page with 2 hyper links does not work on portal server 6.0
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
A page with 2 hyper links does not work on portal server 6.0
|
|
|
| I have devloped one portlet with JSP and IBM on RAD trial 6.0.
I have 2 hyper links on the page.
Using 2 div tags I am displaying different contents on the page by setting the display property of the style attribute.
On clicking a link , I get one set of data. And after clicking the other link,
I get a another set of data.
This way it is working fine on the test server.
But when I deploy the same portlet on the portal server 6.0,
and I click on one of the link ,first the required data is displayed and then the page is reloaded.
COde:
<%@ page session="false" contentType="text/html" import="java.util.*, propertydetails1.*"%>
<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %>
<%@ taglib prefix="fmt" uri="/WEB-INF/tld/fmt.tld" %>
<portletAPI:init/>
<%
PropertyDetails1PortletSessionBean sessionBean = (PropertyDetails1PortletSessionBean)port
letRequest.getPortletSession().getAttribute(PropertyDetails1Portlet.SESSION_BEAN);
%>
<LINK rel="stylesheet" type="text/css"
href='<%= response.encodeURL("/theme/workspace.css") %>' title="Style">
<fmt:setBundle basename="nls.Common"/>
<HTML>
<BODY onLoad="xyz()";>
<TABLE border="1">
<TR>
<TD></TD><TD><A href="#" styleClass="button" onclick="abc();">PROPERTY DETAILS</A></TD><TD></TD><TD><A href="#" styleClass="button" onclick="pq
r();">PROPERTY ADDRESS</A></TD>
</TR>
</TABLE>
<DIV style="margin: 6px">
<FORM method="POST" onLoad="pqr();" action="<portletAPI:createURI><portletAPI:URIAction name='<%=PropertyDetails1Portlet.FORM_ACTION%>'/></portletAPI:createURI>">
<DIV id ="propertyaddress" style="margin: 12px; margin-bottom: 36px;display:none">
propertyaddress
</DIV>
<DIV id ="propertydetails" style="margin: 12px; margin-bottom: 36px;display:block">
<% /******** Start of sample code ********/ %>
<TABLE border="0" cellspacing="0" cellpadding="3">
<TR>
<TD align="right"><LABEL styleClass="4CN" for="<portletAPI:encodeNamespace value='<%=PropertyDetails1Portlet.TEXT%>'/>"><fmt:message key="LAN_NO" /></LABEL></TD>
<TD><INPUT styleClass="4FM" name="<portletAPI:encodeNamespace value='<%=PropertyDetails1Portlet.TEXT%>'/>" type="text"/></TD>
<TD><INPUT styleClass="4BT" name="<portletAPI:encodeNamespace value='<%=PropertyDetails1Portlet.SUBMIT%>'/>" value="Fetch" type="submit"/></TD>
</TR>
<% /******** End of sample code *********/ %>
<%
String formText = sessionBean.getFormText();
// Note: January data imported from com.ibm.wps.portlets.shippingc2a.ShippingDB sample DB
ArrayList propdetailslist =(ArrayList)sessionBean.getDetails();
for (int i = 0; i<propdetailslist.size(); i++) {
PropertyDetails od1 =(PropertyDetails)propdetailslist.get(i);
%>
<TR>
</TR>
<TR>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="Commercial_Value" /></TD>
<TD>
<%=od1.getTxtCommValue() %>
</TD>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="Appraisal_Value" /></TD>
<TD>
<%=od1.getTxtAppValue()%>
</TD>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="Construction_Value" /></TD>
<TD>
<%=od1.getTxtConstrutVal()%>
</TD>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="Construction_Advance" /></TD>
<TD>
<%= od1.getTxtConstructAdv()%>
</TD>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="Remaining_Life" /></TD>
<TD>
<%=od1.getTxtRemainingLife()%>
</TD>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="Appraisal_No" /></TD>
<TD>
<%=od1.getTxtApprisalNo()%>
</TD>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="CUV" /></TD>
<TD>
<%=od1.getTxtCUV()%>
</TD>
</TR>
<TR>
<TD align="right" styleClass="4CN"><fmt:message key="Nomenclature" /></TD>
<TD>
<%=od1.getTxtNomenclature()%>
</TD>
</TR>
<% } %>
</TABLE>
</FORM>
</DIV>
</DIV>
<DIV id ="mapContainer" style="margin: 12px; margin-bottom: 36px;display:block">
<script>
function abc()
{
var k= document.getElementById('propertyaddress');
document.all.propertyaddress.style.display="none";
document.all.propertydetails.style.display="block";
//alert("abc hello kkkk"+k);
}
function pqr()
{
var k= document.getElementById('propertydetails');
document.all.propertydetails.style.display="none";
document.all.propertyaddress.style.display="block";
//alert("abc hello kkkk"+k);
//alert("pqr hello");
}
function xyz()
{
//alert("xyz hello");
}
</script>
</BODY>
</HTML>
I will be really thankful to u if u provide me the proper solution to the problem.
Thanks in advance.
From,
Satyaprakash Pandey
| |
| yurykats 2006-11-03, 7:23 pm |
| JSF IBM Portlets developed in RAD6 do not run on WPS6 due to a change in Portal server implementation. An update to jsf-portlet and jsf-wp jars is required.
WPS6 support (and updated jars mentioned above) is available with RAD7.
| |
|
| Hi:
Just wondering did you ever got the onload part of code working. I would appreciate if you could share how?
|
|
|
|
|