|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
after page navigation when clicking on data I am loosing the informationHi ,
I am navigating from page3 to page2 through a hyperlink and when I am pressing a button in page2 the constructor and init methods are getting executed again,so that I am loosing the information that I am fetching from Page3. Please find the jsp pages as attachment.Could you please crack this. Thanks in advance, Pavan. <?xml version="1.0" encoding="UTF-8"?> <!-- Document : Page3 Created on : May 2, 2008, 11:05:31 AM Author : sp201017 --> <jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf"> <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> <f:view> <webuijsf:page id="page1"> <webuijsf:html id="html1"> <webuijsf:head id="head1"> <webuijsf:link id="link1" url="/resources/stylesheet.css"/> </webuijsf:head> <webuijsf:body id="body1" style="-rave-layout: grid"> <webuijsf:form id="form1" virtualFormsConfig="virtualForm1 | |"> <webuijsf:textField binding="#{Page3.txtServiceUnit}" columns="40" id="txtServiceUnit" style="height: 24px; left: 72px; top: 48px; position: absolute; width: 144px" text="#{ServiceUnitBean.serviceUnit}" valueChangeListenerExpression="#{Page3.txtServiceUnit_processValueChange}"/> <webuijsf:dropDown binding="#{Page3.cmbProcessIds}" disabled="true" id="cmbProcessIds" immediate="true" items="#{ServiceUnitBean.cmbProcessIdsDefaultOptions.options}" onChange="" style="height: 24px; left: 408px; top: 48px; position: absolute" valueChangeListenerExpression="#{Page3.cmbProcessIds_processValueChange}" width="550"/> <script type="text/javascript"> function wizard_popup(url, name, height, width) { var top=((screen.height-(screen.height/1.618))-(height/2)); var left=((screen.width-width)/2); var newurl = url + ";WIZARD_NAME=" + name; var args= "height=" + height + ",width=" + width + ",top=" + top + ",left=" + left; window.open(url, name, args); return false; } function wizard_launch(url) { wizard_popup("../faces/" + url, "Wizard", 450, 600); } </script> <webuijsf:label for="txtServiceUnit" id="lblServiceUnit" style="height: 24px; left: 72px; top: 24px; position: absolute; width: 144px" text=" Service Unit :"/> <webuijsf:label for="cmbProcessIds" id="lblProcessIds" style="height: 24px; left: 408px; top: 24px; position: absolute; width: 168px" text=" Process Id :"/> <webuijsf:button actionExpression="#{Page3.btnOk1_action}" id="btnOk1" mini="true" noTextPadding="true" style="height: 24px; left: 71px; top: 72px; position: absolute; width: 48px" text="Ok"/> <webuijsf:table binding="#{Page3.tableInstances}" clearSortButton="true" deselectSingleButton="true" hiddenSelectedRows="true" id="tableInstances" paginationControls="true" sortPanelToggleButton="true" style="height: 53px; left: 72px; top: 168px; position: absolute; width: 888px" title="Instances" width="888"> <webuijsf:tableRowGroup binding="#{Page3.tableRowGroup1}" id="tableRowGroup1" rows="5" sourceData="#{TableBean.provider}" sourceVar="ProcessInstanceList"> <webuijsf:tableColumn id="tableColumn0" width="200"> <webuijsf:checkbox id="checkbox1"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="Instance ID" id="tableColumn1" sort="id"> <webuijsf:staticText id="staticText1" text="#{ProcessInstanceList.value.id}"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="Process ID" id="tableColumn2" sort="bpelId"> <webuijsf:staticText id="staticText2" text="#{ProcessInstanceList.value.bpelId}"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="Status" id="tableColumn3" sort="status"> <webuijsf:staticText id="staticText3" text="#{ProcessInstanceList.value.status}"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="Lasted" id="tableColumn4" sort="lasted"> <webuijsf:staticText id="staticText4" text="#{ProcessInstanceList.value.lasted}"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="StartTime" id="tableColumn5" sort="startTime"> <webuijsf:staticText id="staticText5" text="#{ProcessInstanceList.value.startTime}"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="EndTime" id="tableColumn6" sort="endTime"> <webuijsf:staticText id="staticText6" text="#{ProcessInstanceList.value.endTime}"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="LastUpdateTime" id="tableColumn7" sort="lastUpdateTime"> <webuijsf:staticText id="staticText7" text="#{ProcessInstanceList.value.lastUpdateTime}"/> </webuijsf:tableColumn> <webuijsf:tableColumn headerText="Instance Variables" id="tableColumn8" width="200"> <webuijsf:hyperlink actionExpression="#{Page3.hyperlink1_action}" id="hyperlink1" onClick="wizard_launch('Page2.jsp?instid=#{ProcessInstanceList.value.id}'); return false;" text="Show Variables"/> </webuijsf:tableColumn> </webuijsf:tableRowGroup> </webuijsf:table> <webuijsf:button actionExpression="#{Page3.btnOk2_action}" id="btnOk2" mini="true" noTextPadding="true" style="position: absolute; left: 408px; top: 72px; width: 48px; height: 24px" text="Ok"/> <webuijsf:messageGroup id="messageGroup1" style="position: absolute; left: 96px; top: 432px"/> <webuijsf:imageHyperlink actionExpression="#{Page3.imgLinkRefresh_action}" height="28" id="imgLinkRefresh" imageURL="/resources/Refresh.jpg" style="left: 72px; top: 120px; position: absolute" toolTip="Refresh" width="28"/> <webuijsf:button actionExpression="#{Page3.btnClear_action}" id="btnClear" mini="true" noTextPadding="true" style="height: 24px; left: 144px; top: 72px; position: absolute; width: 47px" text="Clear"/> </webuijsf:form> </webuijsf:body> </webuijsf:html> </webuijsf:page> </f:view> </jsp:root> <?xml version="1.0" encoding="UTF-8"?> <!-- Document : Page2 Created on : May 27, 2008, 12:38:17 PM Author : Pavan --> <jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf"> <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> <f:view> <webuijsf:page id="page1"> <webuijsf:html id="html1"> <webuijsf:head id="head1"> <webuijsf:link id="link1" url="/resources/stylesheet.css"/> </webuijsf:head> <webuijsf:body id="body1" style="-rave-layout: grid"> <webuijsf:form id="form1"> <webuijsf:label id="label1" style="left: 168px; top: 96px; position: absolute" text="VariableID"/> <webuijsf:label id="label2" style="left: 168px; top: 144px; position: absolute" text="Variable Name"/> <webuijsf:label id="label3" style="left: 168px; top: 192px; position: absolute" text="Variable Value"/> <webuijsf:label id="label4" style="left: 168px; top: 240px; position: absolute" text="XPath"/> <webuijsf:dropDown binding="#{Page2.variableID}" id="variableID" items="#{Page2.variableIDDefaultOptions.options}" style="left: 312px; top: 96px; position: absolute"/> <webuijsf:staticText binding="#{Page2.variableName}" id="variableName" style="left: 312px; top: 144px; position: absolute"/> <webuijsf:textField binding="#{Page2.variableValue}" id="variableValue" style="left: 312px; top: 192px; position: absolute"/> <webuijsf:textField binding="#{Page2.XPath}" id="XPath" style="left: 312px; top: 240px; position: absolute"/> <webuijsf:button actionExpression="#{Page2.button1_action}" id="button1" style="position: absolute; left: 168px; top: 312px" text="Display"/> <webuijsf:button actionExpression="#{Page2.button2_action}" id="button2" style="position: absolute; left: 288px; top: 312px" text="Save"/> <webuijsf:button actionExpression="#{Page2.button3_action}" id="button3" style="position: absolute; left: 384px; top: 312px" text="Cancel"/> </webuijsf:form> </webuijsf:body> </webuijsf:html> </webuijsf:page> </f:view> </jsp:root> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: after page navigation when clicking on data I am loosing the informationIf your ManagedBeans (I'm assuming that it is their constructor you are referring to) are RequestScoped then every time a page is submitted the constructors of the ManagedBeans referenced on that page will be called. -rick pavan wrote: > Hi , > > I am navigating from page3 to page2 through a hyperlink and when I am > pressing a button in page2 the constructor and init methods are > getting executed again,so that I am loosing the information that I am > fetching from Page3. Please find the jsp pages as attachment.Could you > please crack this. > > Thanks in advance, > Pavan. > > > > > >------------------------------------------------------------------------ > ><?xml version="1.0" encoding="UTF-8"?> ><!-- >Document : Page3 >Created on : May 2, 2008, 11:05:31 AM >Author : sp201017 >--> ><jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf"> > <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> > <f:view> > <webuijsf:page id="page1"> > <webuijsf:html id="html1"> > <webuijsf:head id="head1"> > <webuijsf:link id="link1" url="/resources/stylesheet.css"/> > </webuijsf:head> > <webuijsf:body id="body1" style="-rave-layout: grid"> > <webuijsf:form id="form1" virtualFormsConfig="virtualForm1 | |"> > <webuijsf:textField binding="#{Page3.txtServiceUnit}" columns="40" id="txtServiceUnit" > style="height: 24px; left: 72px; top: 48px; position: absolute; width: 144px" text="#{ServiceUnitBean.serviceUnit}" valueChangeListenerExpression="#{Page3.txtServiceUnit_processValueChange}"/> > <webuijsf:dropDown binding="#{Page3.cmbProcessIds}" disabled="true" id="cmbProcessIds" immediate="true" > items="#{ServiceUnitBean.cmbProcessIdsDefaultOptions.options}" onChange="" > style="height: 24px; left: 408px; top: 48px; position: absolute" > valueChangeListenerExpression="#{Page3.cmbProcessIds_processValueChange}" width="550"/> > <script type="text/javascript"> > function wizard_popup(url, name, height, width) { > var top=((screen.height-(screen.height/1.618))-(height/2)); > var left=((screen.width-width)/2); > var newurl = url + ";WIZARD_NAME=" + name; > var args= "height=" + height + ",width=" + width + > ",top=" + top + ",left=" + left; > window.open(url, name, args); > return false; > } > function wizard_launch(url) { > wizard_popup("../faces/" + url, > "Wizard", 450, 600); > } > </script> > <webuijsf:label for="txtServiceUnit" id="lblServiceUnit" style="height: 24px; left: 72px; top: 24px; position: absolute; width: 144px" text=" Service Unit :"/> > <webuijsf:label for="cmbProcessIds" id="lblProcessIds" style="height: 24px; left: 408px; top: 24px; position: absolute; width: 168px" text=" Process Id :"/> > <webuijsf:button actionExpression="#{Page3.btnOk1_action}" id="btnOk1" mini="true" noTextPadding="true" > style="height: 24px; left: 71px; top: 72px; position: absolute; width: 48px" text="Ok"/> > <webuijsf:table binding="#{Page3.tableInstances}" clearSortButton="true" deselectSingleButton="true" hiddenSelectedRows="true" > id="tableInstances" paginationControls="true" sortPanelToggleButton="true" > style="height: 53px; left: 72px; top: 168px; position: absolute; width: 888px" title="Instances" width="888"> > <webuijsf:tableRowGroup binding="#{Page3.tableRowGroup1}" id="tableRowGroup1" rows="5" sourceData="#{TableBean.provider}" sourceVar="ProcessInstanceList"> > <webuijsf:tableColumn id="tableColumn0" width="200"> > <webuijsf:checkbox id="checkbox1"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="Instance ID" id="tableColumn1" sort="id"> > <webuijsf:staticText id="staticText1" text="#{ProcessInstanceList.value.id}"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="Process ID" id="tableColumn2" sort="bpelId"> > <webuijsf:staticText id="staticText2" text="#{ProcessInstanceList.value.bpelId}"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="Status" id="tableColumn3" sort="status"> > <webuijsf:staticText id="staticText3" text="#{ProcessInstanceList.value.status}"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="Lasted" id="tableColumn4" sort="lasted"> > <webuijsf:staticText id="staticText4" text="#{ProcessInstanceList.value.lasted}"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="StartTime" id="tableColumn5" sort="startTime"> > <webuijsf:staticText id="staticText5" text="#{ProcessInstanceList.value.startTime}"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="EndTime" id="tableColumn6" sort="endTime"> > <webuijsf:staticText id="staticText6" text="#{ProcessInstanceList.value.endTime}"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="LastUpdateTime" id="tableColumn7" sort="lastUpdateTime"> > <webuijsf:staticText id="staticText7" text="#{ProcessInstanceList.value.lastUpdateTime}"/> > </webuijsf:tableColumn> > <webuijsf:tableColumn headerText="Instance Variables" id="tableColumn8" width="200"> > <webuijsf:hyperlink actionExpression="#{Page3.hyperlink1_action}" id="hyperlink1" > onClick="wizard_launch('Page2.jsp?instid=#{ProcessInstanceList.value.id}'); return false;" text="Show Variables"/> > </webuijsf:tableColumn> > </webuijsf:tableRowGroup> > </webuijsf:table> > <webuijsf:button actionExpression="#{Page3.btnOk2_action}" id="btnOk2" mini="true" noTextPadding="true" > style="position: absolute; left: 408px; top: 72px; width: 48px; height: 24px" text="Ok"/> > <webuijsf:messageGroup id="messageGroup1" style="position: absolute; left: 96px; top: 432px"/> > <webuijsf:imageHyperlink actionExpression="#{Page3.imgLinkRefresh_action}" height="28" id="imgLinkRefresh" > imageURL="/resources/Refresh.jpg" style="left: 72px; top: 120px; position: absolute" toolTip="Refresh" width="28"/> > <webuijsf:button actionExpression="#{Page3.btnClear_action}" id="btnClear" mini="true" noTextPadding="true" > style="height: 24px; left: 144px; top: 72px; position: absolute; width: 47px" text="Clear"/> > </webuijsf:form> > </webuijsf:body> > </webuijsf:html> > </webuijsf:page> > </f:view> ></jsp:root> > > >------------------------------------------------------------------------ > ><?xml version="1.0" encoding="UTF-8"?> ><!-- > Document : Page2 > Created on : May 27, 2008, 12:38:17 PM > Author : Pavan >--> ><jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf"> > <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> > <f:view> > <webuijsf:page id="page1"> > <webuijsf:html id="html1"> > <webuijsf:head id="head1"> > <webuijsf:link id="link1" url="/resources/stylesheet.css"/> > </webuijsf:head> > <webuijsf:body id="body1" style="-rave-layout: grid"> > <webuijsf:form id="form1"> > <webuijsf:label id="label1" style="left: 168px; top: 96px; position: absolute" text="VariableID"/> > <webuijsf:label id="label2" style="left: 168px; top: 144px; position: absolute" text="Variable Name"/> > <webuijsf:label id="label3" style="left: 168px; top: 192px; position: absolute" text="Variable Value"/> > <webuijsf:label id="label4" style="left: 168px; top: 240px; position: absolute" text="XPath"/> > <webuijsf:dropDown binding="#{Page2.variableID}" id="variableID" items="#{Page2.variableIDDefaultOptions.options}" style="left: 312px; top: 96px; position: absolute"/> > <webuijsf:staticText binding="#{Page2.variableName}" id="variableName" style="left: 312px; top: 144px; position: absolute"/> > <webuijsf:textField binding="#{Page2.variableValue}" id="variableValue" style="left: 312px; top: 192px; position: absolute"/> > <webuijsf:textField binding="#{Page2.XPath}" id="XPath" style="left: 312px; top: 240px; position: absolute"/> > <webuijsf:button actionExpression="#{Page2.button1_action}" id="button1" style="position: absolute; left: 168px; top: 312px" text="Display"/> > <webuijsf:button actionExpression="#{Page2.button2_action}" id="button2" style="position: absolute; left: 288px; top: 312px" text="Save"/> > <webuijsf:button actionExpression="#{Page2.button3_action}" id="button3" style="position: absolute; left: 384px; top: 312px" text="Cancel"/> > </webuijsf:form> > </webuijsf:body> > </webuijsf:html> > </webuijsf:page> > </f:view> ></jsp:root> > > > >------------------------------------------------------------------------ > >--------------------------------------------------------------------- >To unsubscribe, e-mail: dev-unsubscribe@... >For additional commands, e-mail: dev-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free Forum Powered by Nabble | Forum Help |