cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <d...@c-ware.de>
Subject AW: [CForms] Dynamically opening popup with action.
Date Sun, 20 Nov 2005 16:21:23 GMT
Hi Sylvain,

Thanks again for your reply. But unfortunately I didn't seem to fully
understand the way this should work. I set the target to "_blank" ... so far
so good, and then I reset it again ... but what for? 

Could you illustrate your example a little more? Please :)

Chris

-----Ursprüngliche Nachricht-----
Von: Sylvain Wallez [mailto:sylvain@apache.org] 
Gesendet: Freitag, 18. November 2005 17:51
An: users@cocoon.apache.org
Betreff: Re: [CForms] Dynamically opening popup with action.

Christofer Dutz wrote:
>
> Hi … I am currently trying to solve a thing I couldn’t find any 
> satisfying solution for.
>
> I have a repeater in which every row has a checkbox. At the bottom of 
> the list I have a drop-down-list in which I can select one of the 
> actions “delete selected”, “print selected” and “export selected to 
> Excel”. Next to this I have an action button calling a Java class 
> handling everything. So far so good.
>
> My actual problem now is that if I select delete the deletion is 
> executed and the form is simply redisplayed … everything works fine 
> here. If I select one of the other options I have to display a popup 
> containing the desired report. How would the prettiest way to do this 
> look like?
>

What you need is to post the form to a different target (e.g. _blank for 
a new window), and reset the form's target right after so that 
subsequent actions continue in the main page. Out of my memory, this is 
something like:

<ft:widget id="print">
<fi:styling onclick="form_getForm(this).target='_blank'; 
form_submitForm(this); var input = this; setTimeout(10, 
function(){form.getForm(this).target='')}); return false"/>
</ft:widget>

Notice the delay before restoring the form's target, otherwise you 
sometimes run in some concurrency problems where the target is reset 
before the new window is created.
>
> I created my Java class that way that the methods used simply return 
> the name of the pipeline, which should be displayed. If this is null … 
> no popup should be created, if it is not null … a popup should appear 
> … any ideas?
>

Uh? Where is that Java class?

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message