f:ajax and IceFaces 2.0 Alpha 2
[Logo]
Forums for ICEfaces and ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
f:ajax and IceFaces 2.0 Alpha 2  XML
Forum Index -> Development Build Feedback (ICEfaces 2.0)
Author Message
icordoba

Joined: 15/01/2010 00:00:00
Messages: 17
Offline


Hello,
I am testing IceFaces 2.0 Alpha 2 in a application. I need to user f:ajax and it seems to be broken when used in a webapp with Alpha 2 jars. I've removed the jars and re-tested the ajax links and work ok.
(with Alpha 2 clicking in the ajax link just makes the supposed to be rendered id disappear)

Is there any workaround or there is no problem with f:ajax and I'm missing something?

Thanks for any directions,
Ignacio
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1043
Offline


what type of links are you trying to use with <f:ajax>
Perhaps put a snippet of the xhtml page that you are trying to use?
icordoba

Joined: 15/01/2010 00:00:00
Messages: 17
Offline


Hello,
thanks for the reply...
Code:
<h:commandLink value="#{msgs.standby}" action="#{cervatOH2View.sendStandbyMode}" immediate="true"><!--f:ajax render="cervatOH2Pilot"/--></h:commandLink>


Seems simple (I've tried adding "execute" to f:ajax and making render object be a form (removes all of it) or a h:outputText (also removes it).

If I reload the page all content re-appears. Also if I remove the f:ajax tag and let the commandLink work without ajax, everything goes OK.

I've tried it both in simple xhtml and in ui:composition

thanks,
Ignacio
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1043
Offline


By adding ICEfaces to the page, you automatically add the ajax capability so the <f:ajax> tag really isn't needed. (if you are familiar with pre-jsf2 versions of ICEfaces, you automatically get the partialSubmit behaviour)
You could look at the basic example of the A2 distribution bundle and view icefaces.xhtml vs nonicefaces.xhtml to see the difference. Same behaviour but one is icefaces-enabled.

Hope this helps....
icordoba

Joined: 15/01/2010 00:00:00
Messages: 17
Offline


Thanks for the reply... I can't find those icefaces.xhtml and nonicefaces.xhtml files as I just see the auction demo in the 2.0 Alpha 2 version.

Could you please confirm those examples are there?

thanks a lot,
Ignacio
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1043
Offline


It's in samples/basic of the distribution bundle for A2 release
icordoba

Joined: 15/01/2010 00:00:00
Messages: 17
Offline


Hello,
I am sure I am missing something. Just downloaded again icefaces-2.0.0-alpha2-src and icefaces-2.0.0-alpha2-bin.

In both zip archives I just find "auction" and "build" directories in the samples dir. I enclose a capture.

Sorry and thanks,
Ignacio

[Thumb - content.png]
 Filename content.png [Disk] Download
 Description
 Filesize 26 Kbytes
 Downloaded:  21 time(s)

judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1043
Offline


Link to anonymous subversion repository:-
http://anonsvn.icefaces.org/repo/icefaces/scratchpads/glimmer/samples/basic/
icordoba

Joined: 15/01/2010 00:00:00
Messages: 17
Offline


Thanks,
just downloaded the backing bean and the 2 xhtml files for that simple example and used them to test the problem in my app and the problem persists.
Let me explain it:

If I have two backing beans with the corresponding h:form html code, if I submit one of them, the other gets also refreshed. That is why I need the ajax behaviour. If one of the backing beans has a request or conversation scope, when it is refreshed it looses all the info in the fields. The only workaround I've found is make al request scoped beans use the custom @CustomScoped(value = "#{window}") in icefaces but I wonder if I can use the @Request or @Conversation scopes. I can't if all page is refreshed every time on of the forms is post or an AjaxPush refresh call is invoked.

Is there a way of using real ajax so that only one portion of the code gets refreshed as happens with f:ajax ?

Thanks for any ideas,
Ignacio
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1043
Offline


Since there isn't a Conversation scope with jsf2.0, not sure what you are using (CDI? Weld? SWF?).
You should be able to use @ViewScoped (similar to 1.8.x extended request scope) or the window scope as you have already tried.
icordoba

Joined: 15/01/2010 00:00:00
Messages: 17
Offline


Thanks Judy,
I'd like to use CDI but that forces me to use Request or Conversation scopes (there is no proper Window scope in CDI and Alpha2 IceFaces custom window scope doesn't seem to work with CDI (@Named bean) ). As IceFaces is refreshing all beans, I cannot use those scopes or previous problem arises. It is working fine with custom IceFaces window scope and using @ManagedBean (no @Named CDI) but anyway I was wondering if I can get a real partial HTML rendering in IceFaces or all HTML is always refreshed so I can use CDI (I am using CDI with session managed beans as full window refreshing problem is not a problem with them)

Thanks again,
Ignacio
 
Forum Index -> Development Build Feedback (ICEfaces 2.0)
Go to:   
Powered by JForum 2.1.7ice © JForum Team