AJAX JS function like rich faces

UI Components for JSF
Post Reply
smooth4me
Posts: 47
Joined: 16 Jul 2010, 18:11

29 Jul 2010, 20:54

Hi,

I am implementing tebView so I have 3 tabs when we switch tabs I want to get that particular tab form updated.

is there any way to do this?

I want to use different beans for different tabs because I will have too many fields in each tab so I want this implementation.

I was trying to implement onload function. How can I rerender the whole form when the AJAX call is completed.

I was able to do this in the following way by using rich faces
<a4j:jsFunction name="test" action="#{notificationSettingsBean.initialSetup}" reRender="notificationSettingsForm"/>

how can I implement the same kind of future using primefaces?

Thanks,

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

29 Jul 2010, 21:23

Have you looked at dynamic tabs?

http://www.primefaces.org:8080/prime-sh ... ewAjax.jsf

Also we have p:remoteCommand;

http://www.primefaces.org:8080/prime-sh ... ommand.jsf

Also tabview enhancements like tabChangeListener and onTabChangeUpdate are on the way for next release.

http://code.google.com/p/primefaces/iss ... ail?id=577

smooth4me
Posts: 47
Joined: 16 Jul 2010, 18:11

29 Jul 2010, 21:50

Hi,

Yes I have looked at Tab view dynamic. I have a question here we need to include tabView in h:form right? my problem here is I have three tabs and created three different forms each form submission has different beans how can I include this tabView in h:form in this situation.

With the h:cremoteCommand I tried in the following way
<p:remoteCommand name="test" action=#{myBean.initialSetup} update="@form">
</p:remoteCommand>

is this the correct way of doing this?

Thanks,

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

30 Jul 2010, 23:34

I see, so in this case you don't need dynamic tabs as you'll implement this behavior yourself. Right now it is not possible as tabView doesn't have tabChangeListener or onTabChangeUpdate options. These will added in 2.2 as I've linked the issue ticket in my previous post. When it's done, it'll be very easy without remoteCommand.

smooth4me
Posts: 47
Joined: 16 Jul 2010, 18:11

31 Jul 2010, 03:04

Hi,

Thanks for your support.

Have a good week end.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Mordets and 7 guests