New TabView update problem

UI Components for JSF
Post Reply
iv12an
Posts: 33
Joined: 16 Nov 2010, 16:59

28 Jul 2011, 16:08

After updating to the latest 3.0M3 SNAPSHOT I am unable to update components inside TabView.

xhtml:

Code: Select all

<h:form>

			<p:commandButton value="Test button"
				 process="innerPanel" update="innerPanel" />			

			<p:outputPanel id="outherPanel">

				<p:tabView>

					<p:tab title="Tab">

						<p:outputPanel id="innerPanel">
							<p:inputText value="#{testBean.text}"/>
							<h:outputText value="#{testBean.text}" />
						</p:outputPanel>

					</p:tab>

				</p:tabView>

			</p:outputPanel>

		</h:form>
Process and update are not working for innerPanel, or anything else inside tabView. I have to update/process outherPanel to get things done.

Ivan
Ivan

PrimeFaces-5.2-SNAPSHOT, PrimeFaces Extensions 3.0.0
GlassFish 4.1, Mojarra 2.2
JUEL, OmniFaces 2.0

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

28 Jul 2011, 16:45


iv12an
Posts: 33
Joined: 16 Nov 2010, 16:59

29 Jul 2011, 08:32

Thanks. I didn't know that. Is there a possibility to add prependId atribute to TabView?

Ivan
Ivan

PrimeFaces-5.2-SNAPSHOT, PrimeFaces Extensions 3.0.0
GlassFish 4.1, Mojarra 2.2
JUEL, OmniFaces 2.0

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

24 Aug 2011, 17:32

seems to be a good thing, but on the other side it hurts a lot if i think of all the updates that i have to change if i want to move on to M3 :-(

any chance there will be something like prependId to make migration to primefaces3 less painfull?
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

huangyi00
Posts: 20
Joined: 28 Aug 2010, 10:36

08 Sep 2011, 08:14

It seems that this will harm ui experience. Most of the time, I am using TabView to divide my large page into several pages, each of which is still large, containing many input components. Everytime, when an event is triggered and a component needs to be updated, now I have to update the whole TabView instead. It will take much longer time. When I switch to M3 or later, I think I have to give up TabView. Unfortunately, there is no similar component now. Hope the update problem can be considered again.

Thanks a lot!

Yi
Primefaces 3.5, Mojarra-2.1.10, JBoss AS 7.0.2

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

08 Sep 2011, 08:36

prependId will break tabView.
Everytime, when an event is triggered and a component needs to be updated, now I have to update the whole TabView instead.
No you don't.

huangyi00
Posts: 20
Joined: 28 Aug 2010, 10:36

08 Sep 2011, 17:41

I wrote a simple test page. The "testBacking.add" method will change the value of "testBacking.text1".

Case 1: when the CommandLink update the TabView (update="p1"), the text1 display will be updated normally.

Code: Select all

<p:commandLink value="add" action="#{testBacking.add}" update="p1" />
<p:tabView id="p1">
	<p:tab title="andrew">
		<p:outputPanel id="p2">
			<h:outputText value="#{testBacking.text1}" />
		</p:outputPanel>
	</p:tab>
</p:tabView>
Case 2: when the CommandLink update the TabView (update="p2"), the text1 display WILL NOT BE UPDATED.

Code: Select all

<p:commandLink value="add" action="#{testBacking.add}" update="p2" />
<p:tabView id="p1">
	<p:tab title="andrew">
		<p:outputPanel id="p2">
			<h:outputText value="#{testBacking.text1}" />
		</p:outputPanel>
	</p:tab>
</p:tabView>
Please help me. Did I do anything wrong? Thanks a lot!

Environment: Primefaces 3.0.M3, Mojarra-2.1.2, Apache Tomcat 6.0.32.

Yi
Primefaces 3.5, Mojarra-2.1.10, JBoss AS 7.0.2

huangyi00
Posts: 20
Joined: 28 Aug 2010, 10:36

11 Sep 2011, 18:09

I am sorry. is there any plan to solve it? or using the current design? Thanks a lot!
Primefaces 3.5, Mojarra-2.1.10, JBoss AS 7.0.2

tferi
Posts: 18
Joined: 23 Mar 2011, 00:53

12 Sep 2011, 15:07

I also came into trouble because of tabview naming container changes.
My workaround was addressing such components with 'full ID path', e.g:

Code: Select all

<h:form id="frmTest">
  <p:tabView id="tvTest">
    <p:tab title="First">
       <h:outputText id="lblToUpdate"/>
    </p:tab>
  </p:tabView>


  <p:commandButton value="Update" update=":frmTest:tabView:lblToUpdate"
</h:form>
I don't know if it is an official solution and will be usable for final version 3.
Any other idea?

huangyi00
Posts: 20
Joined: 28 Aug 2010, 10:36

13 Sep 2011, 06:36

It is very helpful. I will use this way to refactor my application.

Thanks a lot!
tferi wrote:I also came into trouble because of tabview naming container changes.
My workaround was addressing such components with 'full ID path', e.g:

Code: Select all

<h:form id="frmTest">
  <p:tabView id="tvTest">
    <p:tab title="First">
       <h:outputText id="lblToUpdate"/>
    </p:tab>
  </p:tabView>


  <p:commandButton value="Update" update=":frmTest:tabView:lblToUpdate"
</h:form>
I don't know if it is an official solution and will be usable for final version 3.
Any other idea?
Primefaces 3.5, Mojarra-2.1.10, JBoss AS 7.0.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 47 guests