voyent
Upload a file -> Render another form  XML
Forum Index -> General Help
Author Message
Newlukai

Joined: 29/Nov/2006 00:00:00
Messages: 125
Offline


Hi,

maybe the subject sounds a little bit strange but here's what I mean. I use the ice:inputFile component in an ice:popupPanel. So I have a button which shows up the panel, the user chooses a file and sends it to the server. That's fine.
Above the ice:inputFile the user should see all uploaded files matching a certain criteria. Therefore I've a dataTable which shows those files.
But as you might see, the dataTable doesn't show the files that the user uploaded since he opened the popupPanel. To see all the attached files the user has to close the panel and open it again.
The reason is that the ice:inputFile is embedded in an own form. So the dataModel isn't rerendered after uploading a file.

It would be very nice to tell the form which has the dataTable in it that it has to update. Or whoever is responsible for updating the form.
Is there a way to do this? E.g. with server-initiated rendering? Or is there an easier way?

Thanks in advance
Newlukai
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


The ice:inputFile component is a bit different from most of the other components in that it uses an IFrame. If you caused a change with another component, the appropriate changes would be refreshed throughout the page and your table would show the new information.

With ice:inputFile, you get a callback event to your bean which can be used to trigger a server-initiated rende. I would say this is your easiest path for the moment. Does your application or environment have constraints that prevent it from using server-initiated rendering?

In the future, we may look at enhancing the file upload component so that it can optionally (but automatically) update the page from the client side when the file upload is complete.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Newlukai

Joined: 29/Nov/2006 00:00:00
Messages: 125
Offline


I would say this is your easiest path for the moment. 


OK. So I'll try this.

Does your application or environment have constraints that prevent it from using server-initiated rendering? 


What would be such a constraint? Are there any known problems? My application runs on a JBoss AS (4.0.5) with Seam 1.1.5.GA, ICEfaces 1.5.2 and Facelets (the version delivered by ICEfaces).

In the future, we may look at enhancing the file upload component so that it can optionally (but automatically) update the page from the client side when the file upload is complete. 


That would be great!

Thanks
Newlukai
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


The server-initiated rendering requires that a connection remains open until the server needs to update the information. The constraint would be a technical or business decision not to allow long-lived connections in your particular environment (because you have firewalls or proxy servers that won't allow this for some reason or you have scalability concerns, etc).

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team