Problem with tabview

UI Components for JSF
Post Reply
sophie
Posts: 6
Joined: 12 Aug 2009, 18:31

12 Aug 2009, 18:40

Hi,

I am having problem with primefaces tabview.I have created two tab using tabview.Whenever I clicked on any component on 2nd tab the content of 1st tab get merged into 2nd tab.All the components in tab are working well they provide right function the only promlem is that content of 1st tab get merged into 2nd tab wjen clicking on any componet on 2nd tab(i.e commandbutton,commanlink).

Could you please help me what is triggering this kind of action.

Sophie

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

12 Aug 2009, 18:42

Can you provide the related source of your JSF page

sophie
Posts: 6
Joined: 12 Aug 2009, 18:31

12 Aug 2009, 18:46

<f:view xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:p="http://primefaces.prime.com.tr/ui">

<f:loadBundle basename="mbQSInterview" var="msgs"/>

<html>
<head>
<p:resources />
<title>Main Page</title>

</head>
<body>
<div >

<table align="center" width="100%" cellspacing="0" cellpadding="0">
<tr valign="top" ><td align="center" bgcolor="#000000" width="100%"> <ui:insert name="navigation">
<ui:include src="../../../../templates/includes/usertop.jspx" />
</ui:insert>

</td></tr>

<tr><td valign="top" bgcolor="#4A4848" width="80%" >
<h:form binding="#{network.init}">

<div id="style4">
<p:tabView>
<p:tab title="Nodes" rendered="true">
<h1>Add new network</h1>

<table>

<tr><td><ice:outputText value="Network Specification file:"/> </td><td align="right">

<ice:panelGrid visible="#{network.editFileUpload}" columns="3" >

<ice:inputFile id="inputFileComponent1" uniqueFolder="false" file="#{network.file}"
action="#{network.uploadLogic}" >

</ice:inputFile>

<ice:commandButton value="Load Nodes" action="#{network.nodeExtract}"/>

<ice:commandButton value="Download" action="#{network.dldNetFile }" />

</ice:panelGrid>


<ice:panelGrid visible="#{ not network.editFileUpload}" columns="3" >
<ice:outputText styleClass="textstyle3" value="#{network.networkfilepath}" />
<ice:commandLink style="color:#FFFFFF;" value="Edit" action="#{network.editFile}"/>
<ice:commandButton value="Download" action="#{network.dldNetFile }" />

</ice:panelGrid>


</td></tr>

<tr><td colspan="2" align="left">
<ice:dataTable columnWidths="15px,100px,150px,60px,30px,200px"
rows="6"
id="node"
sortColumn="#{network.sortColumnName}"
sortAscending="#{network.ascending}"
value="#{network.nodeName}"
var="node">

<ice:column>
<f:facet name="header">
<ice:commandSortHeader
columnName="#{network.columnName}"
arrow="true" >
<ice:outputText value="#{network.columnName}"/>
</ice:commandSortHeader>
</f:facet>
<ice:outputText value="#{node.node}"/>
</ice:column>


<ice:column>
<f:facet name="header">

<ice:outputText value="Interview Process"/>

</f:facet>
<ice:selectBooleanCheckbox value="#{node.check}" />
</ice:column>


<ice:column>
<f:facet name="header">
<ice:outputText value="Action"/>
</f:facet>
<table><tr><td align="center">
<ice:commandLink value="Edit" /> </td>
<td align="center"><ice:commandLink value="Delete" actionListener="#{inode.delete}" /></td>
</tr></table>

</ice:column>

</ice:dataTable>
<ice:dataPaginator id="dataScroll_3"
for="node"
paginator="true"
fastStep="3"
paginatorMaxPages="4">
<f:facet name="first">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-first.gif"
style="border:none;"
title="First Page"/>
</f:facet>
<f:facet name="last">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-last.gif"
style="border:none;"
title="Last Page"/>
</f:facet>
<f:facet name="previous">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-previous.gif"
style="border:none;"
title="Previous Page"/>
</f:facet>
<f:facet name="next">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-next.gif"
style="border:none;"
title="Next Page"/>
</f:facet>
<f:facet name="fastforward">
<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-ff.gif"
style="border:none;"
title="Fast Forward"/>
</f:facet>
<f:facet name="fastrewind">
<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-fr.gif"
style="border:none;"
title="Fast Backwards"/>
</f:facet>
</ice:dataPaginator>


</td></tr>
<tr><td>
<ice:commandButton value="Add New Node" action="#{navigator.reset}"/>
</td></tr></table>
</p:tab>
<p:tab title="Network Information " rendered="true">
<table >

<tr>

<br></br>
<br></br>
</tr>
<tr>
<td>
<ice:outputText value="NetworkName:"/></td><td align="right" >
<ice:panelGrid visible="#{not file.editFileName}" columns="2">
<ice:outputText value="#{file.networkName}"/>
<ice:commandLink value="Edit" action="#{file.editName}"/>
</ice:panelGrid>
<ice:panelGrid visible="#{file.editFileName}" columns="2">
<ice:inputText id="netNameID" value="#{file.networkName}" partialSubmit="true" rendered="true" required="true" valueChangeListener="#{file.nameChange}"/>
<ice:commandButton value="Save" action="#{file.edit }" />
<ice:message for="netNameID" />
</ice:panelGrid>


</td>
</tr>

<tr><td valign="top"><ice:outputText value="Description:"/></td><td align="right" >
<ice:panelGrid visible="#{not file.editFileDesc}" columns="2">
<ice:outputText value="#{file.networkDescription}" />
<ice:commandLink value="Edit" action="#{file.editDescription}"/>
</ice:panelGrid>
<ice:panelGrid columns="2" visible="#{file.editFileDesc}">
<ice:inputTextarea value="#{file.networkDescription}" partialSubmit="true" rendered="true" valueChangeListener="#{file.descChange }"/>
<ice:commandButton value="Save" action="#{file.edit }" />
</ice:panelGrid>
</td></tr>

<tr> <td><ice:outputText value="Share To:" /></td>
<!--<td> <ice:selectOneMenu rows="2" value="test">
<f:selectItems value="user1" />
<f:selectItems value="user2" />
</ice:selectOneMenu> </td></tr>-->
<td><ice:inputText style="width:170px" id="email" value="#{network.semail}"></ice:inputText></td>
<td>
<ice:selectOneRadio id = "permission" value="#{network.spermissionSelect}" >
<f:selectItem style= "color:#FFFFFF" itemLabel="Create Copy"/>
<f:selectItem style= "color:#FFFFFF" itemLabel="Read Only"/>
<f:selectItem style= "color:#FFFFFF" itemLabel="Edit"/>
</ice:selectOneRadio></td>
<td><ice:commandButton value="Share" action="#{network.sconfirm}" /></td> </tr>
<tr><td></td>
<td><ice:outputText value="#{network.msgo}"></ice:outputText></td>

</tr>

<tr><td colspan="2" align="left">
<ice:dataTable columnWidths="150px,100px,150px,60px"
rows="4"
id="user"
sortColumn="#{network.sortColumnName}"
sortAscending="#{network.ascending}"
value="#{network.userval}"
var="user">

<ice:column>
<f:facet name="header">


<ice:outputText value="Username"/>

</f:facet>
<ice:outputText value="#{user.name}"/>
</ice:column>


<ice:column>
<f:facet name="header">


<ice:outputText value="Status"/>

</f:facet>
<ice:outputText value="#{user.status}" />
</ice:column>
<ice:column>
<f:facet name="header">

<ice:outputText value="Permission"/>

</f:facet>
<ice:outputText value="#{user.permission}" />
</ice:column>

<ice:column>
<f:facet name="header">
<ice:outputText value="Action"/>
</f:facet>

<ice:commandLink value="Unshare" actionListener="#{network.unshareUser}" />

</ice:column>

</ice:dataTable>
<ice:dataPaginator id="dataScroll_3"
for="user"
paginator="true"
fastStep="3"
paginatorMaxPages="4">
<f:facet name="first">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-first.gif"
style="border:none;"
title="First Page"/>
</f:facet>
<f:facet name="last">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-last.gif"
style="border:none;"
title="Last Page"/>
</f:facet>
<f:facet name="previous">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-previous.gif"
style="border:none;"
title="Previous Page"/>
</f:facet>
<f:facet name="next">
<ice:graphicImage
url="./xmlhttp/css/xp/css-images/arrow-next.gif"
style="border:none;"
title="Next Page"/>
</f:facet>
<f:facet name="fastforward">
<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-ff.gif"
style="border:none;"
title="Fast Forward"/>
</f:facet>
<f:facet name="fastrewind">
<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-fr.gif"
style="border:none;"
title="Fast Backwards"/>
</f:facet>
</ice:dataPaginator>
</td>
</tr>
</table>
</p:tab>
</p:tabView>
</div>

</h:form>

sophie
Posts: 6
Joined: 12 Aug 2009, 18:31

12 Aug 2009, 18:49

I have posted the whole page.I have problem when i clicked on commandbutton share and all those command link in 2nd tab.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

12 Aug 2009, 19:56

The problem doesn't seem to be related to PrimeFaces tabView, trigger that's causing the problem is icefaces button. Try replacing ice:commandButton with p:commandButton.

sophie
Posts: 6
Joined: 12 Aug 2009, 18:31

12 Aug 2009, 20:32

I replaced ice:commandButton with h:commandbutton for value "share"

And i get this error

Aug 12, 2009 1:28:14 PM com.sun.faces.lifecycle.Phase doPhase
SEVERE: JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1482747]
Aug 12, 2009 1:28:14 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException




I am really stuck in this problem for 2-3 days.Plz do provide me some soln.:)
Last edited by sophie on 13 Aug 2009, 02:06, edited 1 time in total.

sophie
Posts: 6
Joined: 12 Aug 2009, 18:31

13 Aug 2009, 00:12

I replaced with h:commandLink but the result is same

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Aug 2009, 02:08

Both h:commandLink and h:commandButton are manipulated by icefaces so we can't do nothing on our end also I'm not sure if IceFaces is friendly to any other component library. As far as I know due their direct to dom rendering approach conflicts with other libs occur in this case with PrimeFaces. My advice would be not to merge any other lib with IceFaces.

sophie
Posts: 6
Joined: 12 Aug 2009, 18:31

13 Aug 2009, 08:05

but it works for othee pages...and I tried replacing ice faces component with primefaces..all commandlink..comandbutton from ur suggestion but still facing same problem

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests