You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by pixotec <ra...@pixotec.de> on 2007/11/02 13:36:09 UTC

Get Page expired after closing javascript opened window (containing a wicket page)

I'm developing a CMS in wicket and have a selfmade wysiwyg textarea in the
page.
when clicking on "insert image" an image dialog is opened in a new window.
the dialog is a wicket page.
I provide the url for the dialog in the textarea page by this (shortened):

CharSequence charSequence = RequestCycle.get().urlFor(new
DialogImagePage(settings));
js.append("var dialogImageUrl='" + charSequence.toString() + "';\n");
add(new StringHeaderContributor(js.toString()));

the source code of the calling page is then:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
  ...
  <script type="text/javascript">
    <!--/*--><![CDATA[/*><!--*/
    var dialogImageUrl='/kms/app/?wicket:interface=:16::';
    /*-->]]>*/
  </script>
  ...
  <script type="text/javascript">
  <!--
    function openImageDialog() {
      var dialog = window.open(dialogImageUrl, "Image",
"status=no,modal=yes,width=700,height=550");
    }
  -->
  ...
  <script type="text/javascript" >
    <!--/*--><![CDATA[/*><!--*/
    if (window.name=='') {
window.location="/kms/app/?wicket:interface=:14::INewBrowserWindowListener";
}
    /*-->]]>*/
  </script>
  ...
</head>

<body>
...
<td>&lt;img width="25" height="24" title="Insert image" wicket:id="btnImage"
onclick="openImageDialog();" onmouseup="drawButtonDown(this);"
src="/kms/app/resources/wicket.extensions.markup.html.form.wysiwyg.WysiwygTextarea/res/btnImage_up.gif"
border="0" alt="Insert image" id="btnImage"/&gt;</td>
...
</body>
</html>


after closing the dialog window (using javascript's window.close() or a
PopupCloseLink) the dialog window is closed.


When I click then on "save" in the calling page containing the textarea I
always get a "Page expired".
Why?

(even doing a getPageSettings().setAutomaticMultiWindowSupport(true); in my
application did not help...)
-- 
View this message in context: http://www.nabble.com/Get-Page-expired-after-closing-javascript-opened-window-%28containing-a-wicket-page%29-tf4737168.html#a13546851
Sent from the Wicket - User mailing list archive at Nabble.com.


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


[SOLVED] Re: Get Page expired after closing javascript opened window (containing a wicket page)

Posted by pixotec <ra...@pixotec.de>.
thank you igor, you saved my project!
after using a link with popupsettings instead using a homebrewed
resquestcycle.urlFor-url it works.
(a speaking exception would have helped...)

thank you


igor.vaynberg wrote:
> 
> make sure you are opening your popup in a different pagemap
> 
> -igor
> 
> 
> On 11/2/07, pixotec <ra...@pixotec.de> wrote:
>>
>> I'm developing a CMS in wicket and have a selfmade wysiwyg textarea in
>> the
>> page.
>> when clicking on "insert image" an image dialog is opened in a new
>> window.
>> the dialog is a wicket page.
>> I provide the url for the dialog in the textarea page by this
>> (shortened):
>>
>> CharSequence charSequence = RequestCycle.get().urlFor(new
>> DialogImagePage(settings));
>> js.append("var dialogImageUrl='" + charSequence.toString() + "';\n");
>> add(new StringHeaderContributor(js.toString()));
>>
>> the source code of the calling page is then:
>>
>> <?xml version='1.0' encoding='UTF-8'?>
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>>   <head>
>>   ...
>>   <script type="text/javascript">
>>     <!--/*--><![CDATA[/*><!--*/
>>     var dialogImageUrl='/kms/app/?wicket:interface=:16::';
>>     /*-->]]>*/
>>   </script>
>>   ...
>>   <script type="text/javascript">
>>   <!--
>>     function openImageDialog() {
>>       var dialog = window.open(dialogImageUrl, "Image",
>> "status=no,modal=yes,width=700,height=550");
>>     }
>>   -->
>>   ...
>>   <script type="text/javascript" >
>>     <!--/*--><![CDATA[/*><!--*/
>>     if (window.name=='') {
>> window.location="/kms/app/?wicket:interface=:14::INewBrowserWindowListener";
>> }
>>     /*-->]]>*/
>>   </script>
>>   ...
>> </head>
>>
>> <body>
>> ...
>> <td>&lt;img width="25" height="24" title="Insert image"
>> wicket:id="btnImage"
>> onclick="openImageDialog();" onmouseup="drawButtonDown(this);"
>> src="/kms/app/resources/wicket.extensions.markup.html.form.wysiwyg.WysiwygTextarea/res/btnImage_up.gif"
>> border="0" alt="Insert image" id="btnImage"/&gt;</td>
>> ...
>> </body>
>> </html>
>>
>>
>> after closing the dialog window (using javascript's window.close() or a
>> PopupCloseLink) the dialog window is closed.
>>
>>
>> When I click then on "save" in the calling page containing the textarea I
>> always get a "Page expired".
>> Why?
>>
>> (even doing a getPageSettings().setAutomaticMultiWindowSupport(true); in
>> my
>> application did not help...)
>> --
>> View this message in context:
>> http://www.nabble.com/Get-Page-expired-after-closing-javascript-opened-window-%28containing-a-wicket-page%29-tf4737168.html#a13546851
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Get-Page-expired-after-closing-javascript-opened-window-%28containing-a-wicket-page%29-tf4737168.html#a13586488
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Get Page expired after closing javascript opened window (containing a wicket page)

Posted by Igor Vaynberg <ig...@gmail.com>.
make sure you are opening your popup in a different pagemap

-igor


On 11/2/07, pixotec <ra...@pixotec.de> wrote:
>
> I'm developing a CMS in wicket and have a selfmade wysiwyg textarea in the
> page.
> when clicking on "insert image" an image dialog is opened in a new window.
> the dialog is a wicket page.
> I provide the url for the dialog in the textarea page by this (shortened):
>
> CharSequence charSequence = RequestCycle.get().urlFor(new
> DialogImagePage(settings));
> js.append("var dialogImageUrl='" + charSequence.toString() + "';\n");
> add(new StringHeaderContributor(js.toString()));
>
> the source code of the calling page is then:
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>   <head>
>   ...
>   <script type="text/javascript">
>     <!--/*--><![CDATA[/*><!--*/
>     var dialogImageUrl='/kms/app/?wicket:interface=:16::';
>     /*-->]]>*/
>   </script>
>   ...
>   <script type="text/javascript">
>   <!--
>     function openImageDialog() {
>       var dialog = window.open(dialogImageUrl, "Image",
> "status=no,modal=yes,width=700,height=550");
>     }
>   -->
>   ...
>   <script type="text/javascript" >
>     <!--/*--><![CDATA[/*><!--*/
>     if (window.name=='') {
> window.location="/kms/app/?wicket:interface=:14::INewBrowserWindowListener";
> }
>     /*-->]]>*/
>   </script>
>   ...
> </head>
>
> <body>
> ...
> <td>&lt;img width="25" height="24" title="Insert image" wicket:id="btnImage"
> onclick="openImageDialog();" onmouseup="drawButtonDown(this);"
> src="/kms/app/resources/wicket.extensions.markup.html.form.wysiwyg.WysiwygTextarea/res/btnImage_up.gif"
> border="0" alt="Insert image" id="btnImage"/&gt;</td>
> ...
> </body>
> </html>
>
>
> after closing the dialog window (using javascript's window.close() or a
> PopupCloseLink) the dialog window is closed.
>
>
> When I click then on "save" in the calling page containing the textarea I
> always get a "Page expired".
> Why?
>
> (even doing a getPageSettings().setAutomaticMultiWindowSupport(true); in my
> application did not help...)
> --
> View this message in context: http://www.nabble.com/Get-Page-expired-after-closing-javascript-opened-window-%28containing-a-wicket-page%29-tf4737168.html#a13546851
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Wicket jBPM

Posted by Eelco Hillenius <ee...@gmail.com>.
> Come on! Recreating the wheel is what us software engineers do best!
> Imagine how boring the wheel would be if we hadn't already recreated it
> 500 times.

That wheel would then also be rectangular ;-)

Eelco

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


RE: Wicket jBPM

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
> I was wondering if anyone has started a Wicket project (instead of the
JSF
> endorsed one). I would hate to recreate the wheel if someone has
already
> started a similar project.

Come on! Recreating the wheel is what us software engineers do best!
Imagine how boring the wheel would be if we hadn't already recreated it
500 times.

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


Re: Wicket jBPM

Posted by Eelco Hillenius <ee...@gmail.com>.
On 11/3/07, William Hoover <wh...@nemours.org> wrote:
> When you download jBPM (http://www.jboss.com/products/jbpm/downloads) the deploy directory contains the "jBPM Web Console Application" (http://docs.jboss.com/jbpm/v3/userguide/introduction.html#d0e100) that...
>
> "The jBPM console web application serves two purposes. First, it serves as a central user interface for interacting with runtime tasks generated by the process executions. Secondly, it is an administration and monitoring console that allows to inspect and manipulate runtime instances. The third functionality is Business Activity Monitoring. These are statistics about process executions. This is useful information for managers to find bottlenecks or other kinds of optimisations."

So you would build a new one so that you can extend/ customize/
integrate in your own application, right?

> I was wondering if anyone has started a Wicket project (instead of the JSF endorsed one). I would hate to recreate the wheel if someone has already started a similar project. I don't know if it would be possible to have this as a contributed project under both Wicket and Red Hat licenses, but it would defiantly be a useful integration tool either way.

The license might be a problem for Wicket core projects, but it can
have a place in the wicket-stuff repo.

> Also, the RHDS Eclipse plug-in is a very robust tool that is able to generate not only the graphs, process definitions, etc. but is also capable of generating the corresponding JSF pages. There is a flash demo (http://docs.jboss.com/jbpm/v3/demos/movies/jbpm-overview.htm) that gives a simple demonstration of the plug-in, but it doesn't really show the full functionality of the tool- including JSF code generation (you can download the Eclipse plug-in to see how the JSF code generation works through the Eclipse auto update site: http://downloads.jboss.org/jbosside/updates/development). I would be interested in contributing a Wicket code generation module for this plug-in (if licenses allow).

Would definitively be nice to have such a project for Wicket.

Eelco

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


RE: Wicket jBPM

Posted by William Hoover <wh...@nemours.org>.
When you download jBPM (http://www.jboss.com/products/jbpm/downloads) the deploy directory contains the "jBPM Web Console Application" (http://docs.jboss.com/jbpm/v3/userguide/introduction.html#d0e100) that...

"The jBPM console web application serves two purposes. First, it serves as a central user interface for interacting with runtime tasks generated by the process executions. Secondly, it is an administration and monitoring console that allows to inspect and manipulate runtime instances. The third functionality is Business Activity Monitoring. These are statistics about process executions. This is useful information for managers to find bottlenecks or other kinds of optimisations."

I was wondering if anyone has started a Wicket project (instead of the JSF endorsed one). I would hate to recreate the wheel if someone has already started a similar project. I don't know if it would be possible to have this as a contributed project under both Wicket and Red Hat licenses, but it would defiantly be a useful integration tool either way.

Also, the RHDS Eclipse plug-in is a very robust tool that is able to generate not only the graphs, process definitions, etc. but is also capable of generating the corresponding JSF pages. There is a flash demo (http://docs.jboss.com/jbpm/v3/demos/movies/jbpm-overview.htm) that gives a simple demonstration of the plug-in, but it doesn't really show the full functionality of the tool- including JSF code generation (you can download the Eclipse plug-in to see how the JSF code generation works through the Eclipse auto update site: http://downloads.jboss.org/jbosside/updates/development). I would be interested in contributing a Wicket code generation module for this plug-in (if licenses allow).

-----Original Message-----
From: Eelco Hillenius [mailto:eelco.hillenius@gmail.com]
Sent: Saturday, November 03, 2007 3:28 AM
To: users@wicket.apache.org
Subject: Re: Wicket jBPM


On 11/2/07, William Hoover <wh...@nemours.org> wrote:
> I guess what I'm really asking is if anyone actually composed the UI integration piece that supports the API (similar to the JBoss jBPM webapp) so that all of the controller variables could be seamlessly linked to models.

I don't know whether someone did exactly that. Is there a public demo
of that web app? Or can you expand a bit on what it does? Since it is
super easy to create self-contained components with Wicket (see for
instance Gerolf's JMX panel[1]), the sky is probably the limit when it
comes to creating jBPM integration. From what I remember working with
it about 2.5 years ago is that jBPM has a nice straightforward Java
API, so the two should go together well.

If you have more concrete ideas, you could consider starting a
wicket-stuff project for it, and see whether other's hop on board (I
for one might be interested in that, though I won't actually have time
for that the next few months).

Eelco

[1] http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jmx-panel

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



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


Re: Wicket jBPM

Posted by Eelco Hillenius <ee...@gmail.com>.
On 11/2/07, William Hoover <wh...@nemours.org> wrote:
> I guess what I'm really asking is if anyone actually composed the UI integration piece that supports the API (similar to the JBoss jBPM webapp) so that all of the controller variables could be seamlessly linked to models.

I don't know whether someone did exactly that. Is there a public demo
of that web app? Or can you expand a bit on what it does? Since it is
super easy to create self-contained components with Wicket (see for
instance Gerolf's JMX panel[1]), the sky is probably the limit when it
comes to creating jBPM integration. From what I remember working with
it about 2.5 years ago is that jBPM has a nice straightforward Java
API, so the two should go together well.

If you have more concrete ideas, you could consider starting a
wicket-stuff project for it, and see whether other's hop on board (I
for one might be interested in that, though I won't actually have time
for that the next few months).

Eelco

[1] http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jmx-panel

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


RE: Wicket jBPM

Posted by William Hoover <wh...@nemours.org>.
I guess what I'm really asking is if anyone actually composed the UI integration piece that supports the API (similar to the JBoss jBPM webapp) so that all of the controller variables could be seamlessly linked to models.

-----Original Message-----
From: Eelco Hillenius [mailto:eelco.hillenius@gmail.com]
Sent: Friday, November 02, 2007 1:31 PM
To: users@wicket.apache.org
Subject: Re: Wicket jBPM


On 11/2/07, William Hoover <wh...@nemours.org> wrote:
> Has anyone successfully setup JBoss jBPM with Wicket?

Several people who I know. You can use jBPM like any regular Java API.

Eelco

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



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


Re: Wicket jBPM

Posted by Eelco Hillenius <ee...@gmail.com>.
On 11/2/07, William Hoover <wh...@nemours.org> wrote:
> Has anyone successfully setup JBoss jBPM with Wicket?

Several people who I know. You can use jBPM like any regular Java API.

Eelco

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


Wicket jBPM

Posted by William Hoover <wh...@nemours.org>.
Has anyone successfully setup JBoss jBPM with Wicket?


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