I'm trying to use ace:fileEntry
to upload a picture, as I read this component requires a submit from h:commandButton
in order to start downloading. My problem is that when I switched my ice:commandButton
with h:
, my managed bean (which is in Conversation Scope) gets created again (@PostConstruct
called) and the method in h:commandButton
and also the fileEntryListener
aren't called anymore.
commandLink
) the managed bean is created again, and a new conversation is started, after that you can play how long do you want the managed bean doesn't get created again.
Back to my initial question, if I have ice:commandButton
the managed bean ins't created again, if it's with h:
it gets created again.
And to add a little bit more fun in it, if I remove the rendered attribute (which resolves to true) from ace:fileEntry
the fileEntryListener
is called, but the action from h:commandButton
isn't called no matter what.
I tried to add explicit ids to the components, tried to change ice:form
with h:form
.. nothing. Please Help.
Ps: why ICEfaces 2 can't work with all ice components, why does it requires h:commandButton
, instead of ice:commandButton
, why the new JSF 2.0 stuff with f:selectItems
backed by a regular list isn't working with ice:selectOneMenu
, works just with h:selectOneMenu
? What's up with ICEfaces ? And why CDI doesn't work as expected, with Seam 2 also I had problems w开发者_JS百科ith conversations called twice .. ps2: if I don't navigate to another view ?cid=1
isn't present in the URL.Now, with ace:fileEntry and h:commandButton, the reason why the ice:commandButton can not be used is because that is an AJAX component, and browsers will not upload files in an AJAX submit. Even with HTML5 it is not automatic, and new File and XmlHttpRequest APIs must be used. In an HTML4 browser, only a full page, full form, submit will upload the file contents, and only h:commandButton operates that way. For more details, you can see this explained near the top of the page at:
http://wiki.icefaces.org/display/ICE/FileEntry
With our ice: components, which are extended variants of the h: components, such as ice:selectOneMenu, they are lacking some new JSF 2 features because we have been focusing on our newer Advanced Component Environment, due to customer demand for rich client-side components. As well, the focus was on maintaining backwards compatibility with the ice: components, to ease customer migration from ICEfaces 1.8.x to ICEfaces 2.x, and less so to be altering those components' behaviours. But we are still actively maintaining and improving the ice: components, and will be adding the new features soon. Feel free to create any enhancement requests in our Jira system, and to vote on any existing entries, as this does guide our development priorities.
http://jira.icefaces.org/
- Mark Collette
I'm Mark Collette from the ICEfaces component team, and hopefully I can answer some of your questions.
Most of your issues seem more related to CDI integration than problems with the components themselves. I know that the symptoms change depending on which component you use, but I think that's because the ice: components use AJAX and the h: components do not. Many times integration issues with other frameworks are more observable in AJAX interactions than in full page GET/POST interactions. So your issues may be due to either our CDI integration, or your application's configuration. So please review our documentation on using ICEfaces with CDI, and if you you still experience any issues, I recommend posting the details to our forums.
http://wiki.icefaces.org/display/ICE/Using+ICEfaces+with+CDI
http://www.icefaces.org/JForum/forums/list.page
[Sorry, but this forum is not letting me post more than 2 links, so I'll split the rest of my message into another post, and hopefully that will work]
- Mark Collette
精彩评论