You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Renzo Tomaselli <re...@tecnotp.it> on 2008/11/18 17:22:23 UTC
[Trinidad] about using tr:fileDownloadActionListener from a menu
Hi all,
usually I include tr:fileDownloadActionListener from a link - no
problems.
Now I would use it from a menu action (jscookmenu, used as a context-menu).
I know about the long way:
1. select a blob to download from the menu action.
2. render tr:fileDownloadActionListener inside a hidden button (using PPR).
3. include a js chunk to click that button immediately upon rendering.
4. service the download method while processing that click (PPR again).
This sequence simulates the placement of a button on the fly, and its
immediate clicking to enable blob downloading.
Now I wonder if I can shortcut steps 2-4, avoiding the client roundtrip
in step 3 which doesn't provide any UI visible effect.
I known I might render an object/iframe - thus doing it manually - but I
would like to avoid it if possible.
Thanks for any suggestion,
-- Renzo Tomaselli
Re: [Trinidad] about using tr:fileDownloadActionListener from a menu
Posted by Matthias Wessendorf <ma...@apache.org>.
On Tue, Nov 18, 2008 at 5:22 PM, Renzo Tomaselli
<re...@tecnotp.it> wrote:
> Hi all,
> usually I include tr:fileDownloadActionListener from a link - no problems.
> Now I would use it from a menu action (jscookmenu, used as a context-menu).
> I know about the long way:
>
> 1. select a blob to download from the menu action.
> 2. render tr:fileDownloadActionListener inside a hidden button (using PPR).
> 3. include a js chunk to click that button immediately upon rendering.
> 4. service the download method while processing that click (PPR again).
file downloads must be processed with an ordinary request (not XMLHttp
AJAX requests).
-M
>
> This sequence simulates the placement of a button on the fly, and its
> immediate clicking to enable blob downloading.
> Now I wonder if I can shortcut steps 2-4, avoiding the client roundtrip in
> step 3 which doesn't provide any UI visible effect.
> I known I might render an object/iframe - thus doing it manually - but I
> would like to avoid it if possible.
> Thanks for any suggestion,
>
> -- Renzo Tomaselli
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
[Trinidad] ajax load in JSF/Trinidad
Posted by "Bajgier, Gregory" <gr...@lmco.com>.
Ok, heres my issue: I have a JSF application and some JSP files. Let's
say i have main.jsp which has a view and includes sub.jsp. This works
fine. sub.jsp contains a subview. As a result all the ID's of the form
elements in sub.jsp follow the form of 'subview:component'. Now suppose
I'm using some ajax and want to fetch the jsp page sub.jsp and include
it in a DIV somewhere. Now the ID's all are of the form 'component'. I
don't know a way around this, and having to check for 2 different sets
of IDs in my interactive javascript is a pain. Is there any way to get
consistant IDs?
I've tried: Removing the subview - (then the AJAX call will fail because
no view is found)
and
h:form prependid=false - this only removes the form id, not the subview
ids