You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christofer Dutz <du...@c-ware.de> on 2005/11/18 17:20:05 UTC

[CForms] Dynamically opening popup with action.

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?

 

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?

 

I would greatly appreciate your help.

 

            Chris


AW: [CForms] Dynamically opening popup with action.

Posted by Christofer Dutz <du...@c-ware.de>.
Thank you for your quick reply. 
I will try that as soon as my head cooled down again. Think you saved my
weekend (as far as I had a look at your solution) ;)

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


Re: AW: [CForms] Dynamically opening popup with action.

Posted by Sylvain Wallez <sy...@apache.org>.
Christofer Dutz wrote:
> 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? 
>   

Setting the target to _blank will post the form in a new window. Isn't 
it what you're looking for?

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     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


AW: [CForms] Dynamically opening popup with action.

Posted by Christofer Dutz <du...@c-ware.de>.
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


Re: [CForms] Dynamically opening popup with action.

Posted by Sylvain Wallez <sy...@apache.org>.
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