Re: ResourceStreamRequestHandler and page refresh

2018-04-20 Thread Martin Grigorov
Hi,

You can use wicket-examples as inspiration:
https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxDownloadPage.java

On Fri, Apr 20, 2018 at 1:20 AM, Lon Varscsak 
wrote:

> Okay, cool.  I did see this, but one of the things I was perplexed about is
> how to get an IResource into the AjaxDownloadBehavior at the time of
> onClick.  I guess in onClick I could set an ivar to some resource and model
> load from there.  Any other ideas?
>
> -Lon
>
> On Wed, Apr 18, 2018 at 9:53 PM, Sven Meier  wrote:
>
> > Hi,
> >
> > you'll have to update your page first and then initiate the download.
> >
> > For Ajax you can use:
> >  https://github.com/apache/wicket/blob/master/wicket-
> > extensions/src/main/java/org/apache/wicket/extensions/ajax/
> > AjaxDownloadBehavior.java
> >
> > For Wicket<8 you'll find its predecessor  AjaxDownload on the web.
> >
> > Have fun
> > Sven
> >
> > Am 19. April 2018 02:20:25 MESZ schrieb Lon Varscsak <
> > lon.varsc...@gmail.com>:
> > >Hey all,
> > >
> > >I've got a Link that I use to generate and download a report.  I'm
> > >using a
> > >ResourceStreamRequestHandler and
> > >getRequestCycle().scheduleRequestHandlerAfterCurrent which works fine,
> > >except that I was expecting my current request to finish as if it were
> > >a
> > >regular link.  In this case, I'd want it to refresh the page I'm on,
> > >but it
> > >doesn't do that.
> > >
> > >Anyway to accomplish this?
> > >
> > >-Lon
> >
>


Re: ResourceStreamRequestHandler and page refresh

2018-04-19 Thread Lon Varscsak
Okay, cool.  I did see this, but one of the things I was perplexed about is
how to get an IResource into the AjaxDownloadBehavior at the time of
onClick.  I guess in onClick I could set an ivar to some resource and model
load from there.  Any other ideas?

-Lon

On Wed, Apr 18, 2018 at 9:53 PM, Sven Meier  wrote:

> Hi,
>
> you'll have to update your page first and then initiate the download.
>
> For Ajax you can use:
>  https://github.com/apache/wicket/blob/master/wicket-
> extensions/src/main/java/org/apache/wicket/extensions/ajax/
> AjaxDownloadBehavior.java
>
> For Wicket<8 you'll find its predecessor  AjaxDownload on the web.
>
> Have fun
> Sven
>
> Am 19. April 2018 02:20:25 MESZ schrieb Lon Varscsak <
> lon.varsc...@gmail.com>:
> >Hey all,
> >
> >I've got a Link that I use to generate and download a report.  I'm
> >using a
> >ResourceStreamRequestHandler and
> >getRequestCycle().scheduleRequestHandlerAfterCurrent which works fine,
> >except that I was expecting my current request to finish as if it were
> >a
> >regular link.  In this case, I'd want it to refresh the page I'm on,
> >but it
> >doesn't do that.
> >
> >Anyway to accomplish this?
> >
> >-Lon
>


Re: ResourceStreamRequestHandler and page refresh

2018-04-18 Thread Sven Meier
Hi,

you'll have to update your page first and then initiate the download.

For Ajax you can use:
 
https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java

For Wicket<8 you'll find its predecessor  AjaxDownload on the web.

Have fun
Sven

Am 19. April 2018 02:20:25 MESZ schrieb Lon Varscsak :
>Hey all,
>
>I've got a Link that I use to generate and download a report.  I'm
>using a
>ResourceStreamRequestHandler and
>getRequestCycle().scheduleRequestHandlerAfterCurrent which works fine,
>except that I was expecting my current request to finish as if it were
>a
>regular link.  In this case, I'd want it to refresh the page I'm on,
>but it
>doesn't do that.
>
>Anyway to accomplish this?
>
>-Lon


ResourceStreamRequestHandler and page refresh

2018-04-18 Thread Lon Varscsak
Hey all,

I've got a Link that I use to generate and download a report.  I'm using a
ResourceStreamRequestHandler and
getRequestCycle().scheduleRequestHandlerAfterCurrent which works fine,
except that I was expecting my current request to finish as if it were a
regular link.  In this case, I'd want it to refresh the page I'm on, but it
doesn't do that.

Anyway to accomplish this?

-Lon


Re: reusable Panel with Delete-Button and Confirmation Dialog (Bootstrap Modal), issue with page refresh

2017-07-11 Thread UlrichKnaack
I guess I bit the hand that fed me...
I attached the confirmation Modal to the Panel, and this was attached to the
cell which belonged to the row which was deleted before.
Will change my code tomorrow 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/reusable-Panel-with-Delete-Button-and-Confirmation-Dialog-Bootstrap-Modal-issue-with-page-refresh-tp4678222p4678224.html
Sent from the Users forum mailing list archive at Nabble.com.

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



reusable Panel with Delete-Button and Confirmation Dialog (Bootstrap Modal), issue with page refresh

2017-07-11 Thread Knaack, Ulrich
Hi,

I've created a reusable panel (DeleteObjectPanel.java) which contains a 
BootstrapAjaxButton
for deleting database entries.
After clicking the button, a Bootstrap Modal  (ConfirmDeleteModal.java) appears 
for confirmation.
Both are in the package example.confirm.

MCVE is here:
https://gitlab.com/UlrichK/pageRefreshAfterConfirmation.gitStart of 
application via test/java/example/Start.java

I need this because in my application I have some BootstrapDefaultDataTables 
with deletion functionality.

The DeleteObjectPanel is used in Customer3.java line 131 , during creation of a 
AbstractColumn.

After the deletion is performed, the datatable is refreshed.
But the hole page is disabled!!! See screenshot.
If a replace
target.add(filterForm);
with
target.add(filterForm, getPage());

the page gets refreshed, but I want to understand what is wrong in my code.

This is were I use DeleteObjectPanel (The DataTable is a child component of 
filterForm"):

columns.add(
new AbstractColumn(new Model<>("Löschen"))
{
private static final long serialVersionUID = 1L;

@Override
public void populateItem(Item> 
cellItem,
String componentId, IModel customerModel)
{
Customer customer = customerModel.getObject();
String customerInfo = "Kunde:\n"
+ customer.getName();
cellItem.add(new DeleteObjectPanel(componentId, 
customerInfo)
{
private static final long serialVersionUID = 
2408937138549967444L;

@Override
protected void performDeletion(AjaxRequestTarget 
target)
{

//customerBean.deleteByUuid(customer.getBopUuid());

DatabaseLocator.getDatabase().delete(customerModel.getObject());

  // Page is "disabled" completely
target.add(filterForm); 

//  THIS WORKS
//target.add(filterForm, getPage());   
}
});
}
});

Mit freundlichen Grüßen
Ulrich Knaack

Landesamt für Geoinformation und Landesvermessung Niedersachsen (LGLN)
- Landesvermessung und Geobasisinformation - Landesbetrieb -
Fachgebiet 224 - Geodateninfrastruktur
Podbielskistraße 331, 30659 Hannover
Tel.:+49 511 64609-287
Fax: +49 511 64609-161
mailto:ulrich.kna...@lgln.niedersachsen.de
www.lgln.niedersachsen.de



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

Re: load JS after page refresh

2015-04-28 Thread Chris
Perfect, thanks  a lot!

Chris


> Am 27.04.2015 um 13:21 schrieb Sven Meier :
> 
> Hi,
> 
> I've tried your sample project and identified the problem:
> 
> Since you're adding the whole page to the AjaxRequestTarget, Wicket will 
> immediately issue a redirect to the current page.
> But at the end of the current request, the page is detached - this removes 
> all temporary behaviors.
> 
> The page is then re-rendered after the redirect, but the behavior is no 
> longer present to write any JavaScript to the header.
> 
> You could change your behavior to mark itself as temporary only *after* it 
> has done its duty:
> 
>@Override
>public void renderHead(Component component, 
> IHeaderResponse response) {
>super.renderHead(component, response);
> response.render(OnDomReadyHeaderItem.forScript("alert('test')"));
>alerted = true;
>}
> 
>@Override
>public boolean isTemporary(Component component) {
>return alerted;
>}
> 
> Regards
> Sven
> 
> 
> On 27.04.2015 12:10, Chris wrote:
>> I understand - I just made a quick start project with the code below that 
>> shows when setting isTemporary=true JS is not called.
>> https://github.com/cat1000/loadjs <https://github.com/cat1000/loadjs> 
>> <https://github.com/cat1000/loadjs <https://github.com/cat1000/loadjs>>
>> 
>> If anyone can point me to the error, it would be great.
>> 
>> Thanks, Chris
>> 
>>> Am 27.04.2015 um 10:59 schrieb Martin Grigorov :
>>> 
>>> I am not sure what problem you face but it should be 'true'.
>>> Otherwise the behavior remains attached to the page and any following
>>> re-renderings of the page will execute this JS code again.
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>> 
>>> On Mon, Apr 27, 2015 at 11:52 AM, Chris  wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> thanks Martin. I have to set isTemporary=false, otherwise the JS will not
>>>> be called.
>>>> 
>>>> 
>>>> public void onClick(AjaxRequestTarget target) {
>>>>target.add(getPage().add(new Behavior() {
>>>>@Override
>>>>public void renderHead(Component component,
>>>> IHeaderResponse response) {
>>>>super.renderHead(component, response);
>>>> 
>>>> response.render(OnDomReadyHeaderItem.forScript("call..."));
>>>>}
>>>> 
>>>>@Override
>>>>public boolean isTemporary(Component component) {
>>>>return false;
>>>>}
>>>>}));
>>>> 
>>>>  }
>>>> 
>>>> 
>>>> Chris
>>>> 
>>>>> Am 27.04.2015 um 08:49 schrieb Martin Grigorov :
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> You can create a Behavior with #renderHead() to render the JS and
>>>>> #isTemporary() {return true} so that it is removed automatically after
>>>> the
>>>>> rendering.
>>>>> Add this Behavior in #onClick() to the page.
>>>>> 
>>>>> Martin Grigorov
>>>>> Wicket Training and Consulting
>>>>> https://twitter.com/mtgrigorov
>>>>> 
>>>>> On Mon, Apr 27, 2015 at 5:15 AM, Chris  wrote:
>>>>> 
>>>>>> Hi all,
>>>>>> 
>>>>>> how is it possible to load a JS function after a specific page refresh
>>>>>> based on an ajax link click?
>>>>>> 
>>>>>> Link link = new AjaxFallbackLink("link") {
>>>>>>   @Override
>>>>>>   public void onClick(AjaxRequestTarget target) {
>>>>>>   target.add(getPage());
>>>>>>   }
>>>>>> };
>>>>>> 
>>>>>> Thanks, Chris
>>>>>> -
>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>> 
>>>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
> <mailto:users-unsubscr...@wicket.apache.org>
> For additional commands, e-mail: users-h...@wicket.apache.org 
> <mailto:users-h...@wicket.apache.org>


Re: load JS after page refresh

2015-04-27 Thread Sven Meier

Hi,

I've tried your sample project and identified the problem:

Since you're adding the whole page to the AjaxRequestTarget, Wicket will 
immediately issue a redirect to the current page.
But at the end of the current request, the page is detached - this 
removes all temporary behaviors.


The page is then re-rendered after the redirect, but the behavior is no 
longer present to write any JavaScript to the header.


You could change your behavior to mark itself as temporary only *after* 
it has done its duty:


@Override
public void renderHead(Component component, 
IHeaderResponse response) {

super.renderHead(component, response);
response.render(OnDomReadyHeaderItem.forScript("alert('test')"));
alerted = true;
}

@Override
public boolean isTemporary(Component component) {
return alerted;
}

Regards
Sven


On 27.04.2015 12:10, Chris wrote:

I understand - I just made a quick start project with the code below that shows 
when setting isTemporary=true JS is not called.
https://github.com/cat1000/loadjs <https://github.com/cat1000/loadjs>

If anyone can point me to the error, it would be great.

Thanks, Chris


Am 27.04.2015 um 10:59 schrieb Martin Grigorov :

I am not sure what problem you face but it should be 'true'.
Otherwise the behavior remains attached to the page and any following
re-renderings of the page will execute this JS code again.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 27, 2015 at 11:52 AM, Chris  wrote:


Hi all,

thanks Martin. I have to set isTemporary=false, otherwise the JS will not
be called.


public void onClick(AjaxRequestTarget target) {
target.add(getPage().add(new Behavior() {
@Override
public void renderHead(Component component,
IHeaderResponse response) {
super.renderHead(component, response);

response.render(OnDomReadyHeaderItem.forScript("call..."));
}

@Override
public boolean isTemporary(Component component) {
return false;
}
}));

  }


Chris


Am 27.04.2015 um 08:49 schrieb Martin Grigorov :

Hi,

You can create a Behavior with #renderHead() to render the JS and
#isTemporary() {return true} so that it is removed automatically after

the

rendering.
Add this Behavior in #onClick() to the page.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 27, 2015 at 5:15 AM, Chris  wrote:


Hi all,

how is it possible to load a JS function after a specific page refresh
based on an ajax link click?

Link link = new AjaxFallbackLink("link") {
   @Override
   public void onClick(AjaxRequestTarget target) {
   target.add(getPage());
   }
};

Thanks, Chris
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




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







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



Re: load JS after page refresh

2015-04-27 Thread Chris
I understand - I just made a quick start project with the code below that shows 
when setting isTemporary=true JS is not called.
https://github.com/cat1000/loadjs <https://github.com/cat1000/loadjs>

If anyone can point me to the error, it would be great.

Thanks, Chris

> Am 27.04.2015 um 10:59 schrieb Martin Grigorov :
> 
> I am not sure what problem you face but it should be 'true'.
> Otherwise the behavior remains attached to the page and any following
> re-renderings of the page will execute this JS code again.
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Mon, Apr 27, 2015 at 11:52 AM, Chris  wrote:
> 
>> Hi all,
>> 
>> thanks Martin. I have to set isTemporary=false, otherwise the JS will not
>> be called.
>> 
>> 
>> public void onClick(AjaxRequestTarget target) {
>>target.add(getPage().add(new Behavior() {
>>@Override
>>public void renderHead(Component component,
>> IHeaderResponse response) {
>>super.renderHead(component, response);
>> 
>> response.render(OnDomReadyHeaderItem.forScript("call..."));
>>}
>> 
>>@Override
>>public boolean isTemporary(Component component) {
>>return false;
>>}
>>}));
>> 
>>  }
>> 
>> 
>> Chris
>> 
>>> Am 27.04.2015 um 08:49 schrieb Martin Grigorov :
>>> 
>>> Hi,
>>> 
>>> You can create a Behavior with #renderHead() to render the JS and
>>> #isTemporary() {return true} so that it is removed automatically after
>> the
>>> rendering.
>>> Add this Behavior in #onClick() to the page.
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>> 
>>> On Mon, Apr 27, 2015 at 5:15 AM, Chris  wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> how is it possible to load a JS function after a specific page refresh
>>>> based on an ajax link click?
>>>> 
>>>> Link link = new AjaxFallbackLink("link") {
>>>>   @Override
>>>>   public void onClick(AjaxRequestTarget target) {
>>>>   target.add(getPage());
>>>>   }
>>>> };
>>>> 
>>>> Thanks, Chris
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>> 
>>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 



Re: load JS after page refresh

2015-04-27 Thread Martin Grigorov
I am not sure what problem you face but it should be 'true'.
Otherwise the behavior remains attached to the page and any following
re-renderings of the page will execute this JS code again.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 27, 2015 at 11:52 AM, Chris  wrote:

> Hi all,
>
> thanks Martin. I have to set isTemporary=false, otherwise the JS will not
> be called.
>
>
>  public void onClick(AjaxRequestTarget target) {
> target.add(getPage().add(new Behavior() {
> @Override
> public void renderHead(Component component,
> IHeaderResponse response) {
> super.renderHead(component, response);
>
> response.render(OnDomReadyHeaderItem.forScript("call..."));
> }
>
> @Override
> public boolean isTemporary(Component component) {
> return false;
> }
> }));
>
>   }
>
>
> Chris
>
> > Am 27.04.2015 um 08:49 schrieb Martin Grigorov :
> >
> > Hi,
> >
> > You can create a Behavior with #renderHead() to render the JS and
> > #isTemporary() {return true} so that it is removed automatically after
> the
> > rendering.
> > Add this Behavior in #onClick() to the page.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Apr 27, 2015 at 5:15 AM, Chris  wrote:
> >
> >> Hi all,
> >>
> >> how is it possible to load a JS function after a specific page refresh
> >> based on an ajax link click?
> >>
> >> Link link = new AjaxFallbackLink("link") {
> >>@Override
> >>public void onClick(AjaxRequestTarget target) {
> >>target.add(getPage());
> >>}
> >>  };
> >>
> >> Thanks, Chris
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: load JS after page refresh

2015-04-27 Thread Chris
Hi all,

thanks Martin. I have to set isTemporary=false, otherwise the JS will not be 
called.


 public void onClick(AjaxRequestTarget target) {
target.add(getPage().add(new Behavior() {
@Override
public void renderHead(Component component, IHeaderResponse 
response) {
super.renderHead(component, response);

response.render(OnDomReadyHeaderItem.forScript("call..."));
}

@Override
public boolean isTemporary(Component component) {
return false;
}
}));

  }


Chris

> Am 27.04.2015 um 08:49 schrieb Martin Grigorov :
> 
> Hi,
> 
> You can create a Behavior with #renderHead() to render the JS and
> #isTemporary() {return true} so that it is removed automatically after the
> rendering.
> Add this Behavior in #onClick() to the page.
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Mon, Apr 27, 2015 at 5:15 AM, Chris  wrote:
> 
>> Hi all,
>> 
>> how is it possible to load a JS function after a specific page refresh
>> based on an ajax link click?
>> 
>> Link link = new AjaxFallbackLink("link") {
>>@Override
>>public void onClick(AjaxRequestTarget target) {
>>target.add(getPage());
>>}
>>  };
>> 
>> Thanks, Chris
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: load JS after page refresh

2015-04-26 Thread Martin Grigorov
Hi,

You can create a Behavior with #renderHead() to render the JS and
#isTemporary() {return true} so that it is removed automatically after the
rendering.
Add this Behavior in #onClick() to the page.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 27, 2015 at 5:15 AM, Chris  wrote:

> Hi all,
>
> how is it possible to load a JS function after a specific page refresh
> based on an ajax link click?
>
>  Link link = new AjaxFallbackLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> target.add(getPage());
> }
>   };
>
> Thanks, Chris
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: load JS after page refresh

2015-04-26 Thread kovaron
Hello,
On the arrival page you can do it in renderHead. Isn't it good for you?

chris.gr [via Apache Wicket] 
ezt írta (időpont: 2015. ápr. 27., Hét 4:16):

> Hi all,
>
> how is it possible to load a JS function after a specific page refresh
> based on an ajax link click?
>
>  Link link = new AjaxFallbackLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> target.add(getPage());
> }
>   };
>
> Thanks, Chris
> -
> To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4670509&i=0>
> For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4670509&i=1>
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/load-JS-after-page-refresh-tp4670509.html
>  To start a new topic under Users forum, email
> ml-node+s1842946n1842947...@n4.nabble.com
> To unsubscribe from Users forum, click here
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842947&code=a292YXJvbjFAZ21haWwuY29tfDE4NDI5NDd8MjY3OTE2NzY=>
> .
> NAML
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/load-JS-after-page-refresh-tp4670509p4670510.html
Sent from the Users forum mailing list archive at Nabble.com.

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



load JS after page refresh

2015-04-26 Thread Chris
Hi all,

how is it possible to load a JS function after a specific page refresh based on 
an ajax link click?

 Link link = new AjaxFallbackLink("link") {
@Override
public void onClick(AjaxRequestTarget target) {
target.add(getPage());
}
  };

Thanks, Chris
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Handling page refresh or redirect when the server reboots

2014-10-31 Thread msalman
myproject.zip
<http://apache-wicket.1842946.n4.nabble.com/file/n4668210/myproject.zip>  


I finally got it working.  And just in case some one needs to do something
similar I am attaching the proof of concept project.  Any feedback would be
highly appreciated.  

Thanks to Sebastian and Martin for their inputs.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465p4668210.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Handling page refresh or redirect when the server reboots

2014-10-20 Thread Martin Grigorov
Hi,

HttpXmlRequest is asynchronous by default.
It is not finished by the time you return from your function.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Oct 21, 2014 at 8:37 AM, msalman  wrote:

> Sebastian, thanks for your response and idea.
>
>
> Taking your idea  myproject.zip
> <http://apache-wicket.1842946.n4.nabble.com/file/n4667990/myproject.zip>
> I
> am trying to use the following javascript code in wicket:
>
>
>
> Http.Get = function(theUrl)
> {
> var xmlHttp = null;
> try
> {
> xmlHttp = new XMLHttpRequest();
> return xmlHttp.open("GET", theUrl, true );
> xmlHttp.send();
> return xmlHttp.statusText;
> //return xmlHttp.responseText;
> }
> catch (error)
> {
> return 'error in my code: ' + error;
> }
> }
>
>
> The above code is called via:
>
> add(new AjaxLink("link")
> {
>
>
> @Override
> public void onClick(AjaxRequestTarget target)
> {
> target.add(testLabel);
> }
>
>
> @Override
> protected IAjaxCallDecorator getAjaxCallDecorator()
> {
> return new IAjaxCallDecorator()
> {
> private static final long
> serialVersionUID = 1L;
>
> public CharSequence decorateScript(
> Component component,
> CharSequence script)
> {
> return
> "document.getElementById('testlabel').innerHTML = 'plain '  +
> Http.Get('http://www.cnn.com') ;" + script;
> }
>
>
> public CharSequence
> decorateOnSuccessScript(
> Component component,
> CharSequence script)
> {
> return
> "document.getElementById('testlabel').innerHTML = 'on success '
> + Http.Get('http://www.cnn.com') ;" + script;
> }
>
>
> public CharSequence
> decorateOnFailureScript(
> Component component,
> CharSequence script)
> {
> return
> "document.getElementById('testlabel').innerHTML = 'on Failure '
> +  Http.Get('http://www.cnn.com') ;" + script;
> }
> };
> }
>
> });
>
>
> The problem is that when I use it in wicket the xmlHttp.statusText or
> xmlHttp.responseText returns nothing.
> Can any one please tell me what I might be doing wrong?
> Does the code or calling it even makes sense?
>
> I am attaching  quickstart project.  Please see:
> com.mytest.javascript.*
>
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465p4667990.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Handling page refresh or redirect when the server reboots

2014-10-20 Thread msalman
Sebastian, thanks for your response and idea.


Taking your idea  myproject.zip
<http://apache-wicket.1842946.n4.nabble.com/file/n4667990/myproject.zip>  I
am trying to use the following javascript code in wicket: 



Http.Get = function(theUrl)
{
var xmlHttp = null;
try
{
xmlHttp = new XMLHttpRequest();
return xmlHttp.open("GET", theUrl, true );
xmlHttp.send();
return xmlHttp.statusText;
//return xmlHttp.responseText;
}
catch (error)
{
return 'error in my code: ' + error;
}
}


The above code is called via:

add(new AjaxLink("link")
{


@Override
public void onClick(AjaxRequestTarget target) 
{
target.add(testLabel);  
}


@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new IAjaxCallDecorator()
{
private static final long 
serialVersionUID = 1L;

public CharSequence decorateScript(
Component component,
CharSequence script) 
{
return 
"document.getElementById('testlabel').innerHTML = 'plain '  +
Http.Get('http://www.cnn.com') ;" + script;
}


public CharSequence 
decorateOnSuccessScript(
Component component, 
CharSequence script) 
{
return 
"document.getElementById('testlabel').innerHTML = 'on success '
+ Http.Get('http://www.cnn.com') ;" + script;
}


public CharSequence 
decorateOnFailureScript(
Component component, 
CharSequence script) 
{
return 
"document.getElementById('testlabel').innerHTML = 'on Failure '
+  Http.Get('http://www.cnn.com') ;" + script;
}
};
}

});


The problem is that when I use it in wicket the xmlHttp.statusText or
xmlHttp.responseText returns nothing.  
Can any one please tell me what I might be doing wrong? 
Does the code or calling it even makes sense?

I am attaching  quickstart project.  Please see:
com.mytest.javascript.*


Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465p4667990.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Handling page refresh or redirect when the server reboots

2014-09-16 Thread Sébastien Gautrin

I don't have a "wicket-way" for this. However, if I had to do something like 
that, I'd try the following simple and extremely basic approach (which would need to be 
refined to be more than just an ugly hack)

1. after the action triggering the upgrade process, trigger a javascript on the 
client side
2. this javascript would poll a given url (e.g. current page or application 
home or a specific bookmarkmable page, the latter being probably better)
1. as long as the polled url does not return (within a short timeout) or 
returns an error code (depending on your setup: if the app is behind a proxy, 
you'd expect a 502/503 error as long as the app is not up)
2. once the poll returns a non-error, the javascript would trigger the 
redirect (it could also probably trigger a modal login form on the current page 
instead)

Note that I myself feel this approach would be very hacky and is most likely 
not the best way to do it with wicket, but this should at least work for your 
purpose, and maybe give you an idea on how to do it better.

On 10/09/14 23:03, msalman wrote:

So we have this feature of online server upgrade in which the user can start
an upgrade on the server while still logged into the (wicket) web app.  This
starts some scripts in the bacground which bring the  jboss server down,
upgrade the db, upgrade the ear file, etc., and then restart the jboss
server.  When the server comes back up we would like the user to be
redirected to the login page of the app automatically.  The last part does
not work.  At this time we just have a message telling the user to refresh
the page and when everything is ready he will be sent to the login page.

Is there a good robust way to make sure that the page is automatically
refreshed and the login page is presented?  Is it even possible to do it?
Personally I don't think this is not a good idea but this feature is a
requirement and I want to explore it as much as possible.


Appreciate any help.

Thanks.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465.html
Sent from the Users forum mailing list archive at Nabble.com.

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






Handling page refresh or redirect when the server reboots

2014-09-10 Thread msalman
So we have this feature of online server upgrade in which the user can start
an upgrade on the server while still logged into the (wicket) web app.  This
starts some scripts in the bacground which bring the  jboss server down,
upgrade the db, upgrade the ear file, etc., and then restart the jboss
server.  When the server comes back up we would like the user to be
redirected to the login page of the app automatically.  The last part does
not work.  At this time we just have a message telling the user to refresh
the page and when everything is ready he will be sent to the login page.

Is there a good robust way to make sure that the page is automatically
refreshed and the login page is presented?  Is it even possible to do it? 
Personally I don't think this is not a good idea but this feature is a
requirement and I want to explore it as much as possible.


Appreciate any help.

Thanks.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Page Refresh Not Really Refreshing

2013-10-17 Thread dhongyt
I am passing the list into the provider.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661858.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: Browser Page Refresh Not Really Refreshing

2013-10-17 Thread dhongyt
Thanks Paul for your guidance.
After reading your link and other links on the web to understand stateful vs
stateless, it has lead me to other questions:

Currently my application is stateful.

1. Since I am authenticating my users, does it need to be stateful because
of authentication?
I have a User Session but I don't believe I really store anything useful
(except for user authentication) or need to store previous actions that a
user may do. Seems to me like I do create stateless links, ie. creating new
pages with a constructor and only passing in PageParameters and nothing
else.

2. If I use sessions, does that mean my application cannot be stateless?

3. If my application needs to be stateful and I understand the article
properly, the reason why my refresh does not give me new data is because the
page versioning is giving me data that is at the current page version. So
how would I do it so that when there is a refresh then it would increment
the page version by one? Or should I never do that? Different way of going
about it?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661857.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Page Refresh Not Really Refreshing

2013-10-17 Thread Sven Meier
So are you passing List to your provider's constructor, or 
are you loading a fresh list for #size() and #iterator() in each request?


Sven

On 10/15/2013 04:20 PM, dhongyt wrote:

I use a DataView and the data comes from the ListProvider which I created a
Sortable ListProvider.
I provided the Sortable ListProvider with a List which I get
through a hibernate database call.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661828.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Browser Page Refresh Not Really Refreshing

2013-10-17 Thread dhongyt
I use a DataView and the data comes from the ListProvider which I created a
Sortable ListProvider.
I provided the Sortable ListProvider with a List which I get
through a hibernate database call.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661828.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: Browser Page Refresh Not Really Refreshing

2013-10-16 Thread Paul Bors
You're stepping on the page cache in Wicket.

See Chapter 7 of the Wicket Guide "Page versioning and caching" at:
http://wicket.apache.org/guide/guide/chapter7.html

It really depends on what type of page you have, statefull (will rebuild
each page refresh) or not (will be cached).

~ Thank you,
  Paul Bors

-Original Message-
From: dhongyt [mailto:davidhtr...@gmail.com] 
Sent: Wednesday, October 16, 2013 2:30 PM
To: users@wicket.apache.org
Subject: Re: Browser Page Refresh Not Really Refreshing

I feel like there isn't a need for Javascript? Should a CRTL+R or an F5
already refresh the page and reload new data in Wicket?

Is there a setting I'm forgetting to set?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-R
efreshing-tp4661826p4661841.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: Browser Page Refresh Not Really Refreshing

2013-10-16 Thread dhongyt
I feel like there isn't a need for Javascript? Should a CRTL+R or an F5
already refresh the page and reload new data in Wicket?

Is there a setting I'm forgetting to set?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661841.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Page Refresh Not Really Refreshing

2013-10-16 Thread MartinoSuperman
Hi,

Isn't it an idea to use Javascript for this?

In JavaScript, it is also possible to refresh a page?

Example code:

http://www.quackit.com/javascript/javascript_refresh_page.cfm





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661837.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Page Refresh Not Really Refreshing

2013-10-15 Thread Andrew Hall



Sent from my HTC One SV

- Reply message -
From: "dhongyt" 
To: 
Subject: Browser Page Refresh Not Really Refreshing
Date: Tue, Oct 15, 2013 8:55 AM




I have a wicket page that contains a dataview of subscriptions.
Any user that subscribes will show up on this page.

If I am already on the page and someone else create a subscription and I do
a browser refresh, like CTRL+R or F5 the user subscription does not show up.
I would have to click on the actually page link again for the new data to
show up.

Is this because I need to set my headers to not cache?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Page Refresh Not Really Refreshing

2013-10-15 Thread Sven Meier

Is this because I need to set my headers to not cache?


No.


How do you iterate over your subscriptions: AbstractRepeater, ListView, 
DataTable?

Where do you get the subscriptions from?

Sven

On 10/15/2013 03:54 PM, dhongyt wrote:

I have a wicket page that contains a dataview of subscriptions.
Any user that subscribes will show up on this page.

If I am already on the page and someone else create a subscription and I do
a browser refresh, like CTRL+R or F5 the user subscription does not show up.
I would have to click on the actually page link again for the new data to
show up.

Is this because I need to set my headers to not cache?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Browser Page Refresh Not Really Refreshing

2013-10-15 Thread dhongyt
I have a wicket page that contains a dataview of subscriptions.
Any user that subscribes will show up on this page.

If I am already on the page and someone else create a subscription and I do
a browser refresh, like CTRL+R or F5 the user subscription does not show up.
I would have to click on the actually page link again for the new data to
show up.

Is this because I need to set my headers to not cache?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: AjaxFormSubmitBehavior causing page refresh in IE

2012-08-16 Thread kshitiz
Solved...actually IE cannot read onSubmit action. So, I used onkeydown as
stated in
http://apache-wicket.1842946.n4.nabble.com/TextField-submit-via-Ajax-td3002094.html

That will solve the problem..:)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormSubmitBehavior-causing-page-refresh-in-IE-tp4651267p4651290.html
Sent from the Users forum mailing list archive at Nabble.com.

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



AjaxFormSubmitBehavior causing page refresh in IE

2012-08-15 Thread kshitiz
Hi,

I have a simple code which is running fine in chrome...


// defining text field for user to search
*   final RequiredTextField searchTextField = new
RequiredTextField(
"search");

searchTextField.add(new AjaxFormSubmitBehavior("onSubmit") {

protected void onSubmit(AjaxRequestTarget target) {
try {
// some processing
if (target != null) {
target.add(searchFeedbackPanel);
}

}

});
*

But in IE, it is causing page refresh...how can i solve this issue?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormSubmitBehavior-causing-page-refresh-in-IE-tp4651267.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread sardo

Lucky for us there are plenty of others who would charge us the same :-)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650720.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread Martin Grigorov
On Mon, Jul 23, 2012 at 12:45 PM, sardo  wrote:
>
>
> I think I did suggest something, "It's a shame the state has to be
> maintained by parameters in the url". You are the people responsible for the
> Wicket code I'm a customer...oh how annoying customers can be ;-)

For the budget your company gave us we believe this is the best solution :-)

>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650718.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread sardo


I think I did suggest something, "It's a shame the state has to be
maintained by parameters in the url". You are the people responsible for the
Wicket code I'm a customer...oh how annoying customers can be ;-) 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650718.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread Martin Grigorov
On Mon, Jul 23, 2012 at 12:25 PM, sardo  wrote:
>
>
> OK thanks Martin. I'll have to raise this as an issue with my management, as
> it may have knock on affects. It's a shame the state has to be maintained by
> parameters in the url.

Either suggest something or don't whine ;-)

>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650716.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread sardo


OK thanks Martin. I'll have to raise this as an issue with my management, as
it may have knock on affects. It's a shame the state has to be maintained by
parameters in the url.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650716.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread Martin Grigorov
The pageId is for a reason in the url.
Without it Wicket doesn't know which page contains the component (in
your case the AjaxTabbedPanel) and recreates a new page instance, thus
recreates the component too and all your state is lost.

The best way to remove the pageId is to make your page stateless. But
that would mean that you cannot use Wicket Ajax in this page, i.e. you
need to use TabbedPanel instead.

On Mon, Jul 23, 2012 at 12:01 PM, sardo  wrote:
>
>
> Good shout Martin that is the problem. I changed it to the following and now
> it's working:
>
> mountPage("/home",  HomePage.class);
>
> You know what's coming next don't you...I've now changed the behavior of the
> url so it's now:
>
> http://localhost:8080/myApp/home?3
>
> Am I stuck with this or is there a way to remove the version bits from the
> url?
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650714.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread sardo


Good shout Martin that is the problem. I changed it to the following and now
it's working:

mountPage("/home",  HomePage.class);

You know what's coming next don't you...I've now changed the behavior of the
url so it's now:

http://localhost:8080/myApp/home?3

Am I stuck with this or is there a way to remove the version bits from the
url?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650714.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread Martin Grigorov
On Mon, Jul 23, 2012 at 11:35 AM, sardo  wrote:
>
>
> BTW. The application has been ported from Wicket 1.4 to 1.5, and it did this
> in 1.4 too. So maybe the  request mapping stuff isn't an issue...

I think it is the issue.
Remove NoVersionMapper temporarily and see.

>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650712.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread sardo


BTW. The application has been ported from Wicket 1.4 to 1.5, and it did this
in 1.4 too. So maybe the  request mapping stuff isn't an issue...



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650712.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-23 Thread sardo

lol. Yes we are indeed tinkering with the custom request mappers. I removed
some code from the code sample above thinking at the time that it wasn't
relevant. Here's the full code (not sure if it helps with the investigation
of the problem or not but since you mentioned it I'll include it anyway): 

mount(new NoVersionMount("/home", HomePage.class));

public class NoVersionMount extends MountedMapper {
public NoVersionMount(String path, Class pageClass) {
super(path, pageClass, new PageParametersEncoder());
}

@Override protected void encodePageComponentInfo(Url url,
 PageComponentInfo info)
{
// do nothing so that component info does not get
// rendered in url
}

@Override public Url mapHandler(IRequestHandler
requestHandler) {
if (requestHandler instanceof
ListenerInterfaceRequestHandler) {
return null;
} else {
return super.mapHandler(requestHandler);
}
}
}




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650711.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-22 Thread Sven Meier

Sure, a new page instance will have a fresh TabbedPanel instance.

Can you compare the URLs of your page and the one in wicket-examples.
Both have the dreaded '?0' suffix, don't they? Or are you tinkering with 
custom request mappers?


Regards
Sven

On 07/22/2012 08:26 PM, sardo wrote:


I can't see any difference between the two...

One thing I have noticed, is that the page's constructor is run when  I
refresh the page. Would that have anything to do with it? The page is
defined in the web application class:

mount("/home",HomePage.class);



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650701.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-22 Thread sardo


I can't see any difference between the two...

One thing I have noticed, is that the page's constructor is run when  I
refresh the page. Would that have anything to do with it? The page is
defined in the web application class:

mount("/home",  HomePage.class);



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650701.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-21 Thread Sven Meier
Please try out org.apache.wicket.examples.ajax.builtin.TabbedPanelPage in
wicket-examples.

I cannot reproduce the problem there.

Sven



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650668.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-19 Thread sardo


Ah yes sorry, the all important version number. It's Wicket 1.5.  

Yes, I *believe* the busy indicator isn't related.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642p4650644.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-19 Thread Sven Meier

Which Wicket version?

The busy indicator is unrelated to the problem, is it?

Regards
Sven

On 07/19/2012 11:29 PM, sardo wrote:

Hi,

I have a class that extends AjaxTabbedPanel, it displays a busy indicator
while the ajax call is running (see code below). This all works fine during
these ajax calls; so a busy indicator is displayed and the tab that has been
selected is displayed correctly in the view.  However, if the page is
refreshed the first tab in the group of tabs is shown as being selected and
the app forgets which tab was previously selected.  To me it seems like the
initial page state for the tabs has been preserved and used again on
refreshing the page (a bit like it's a static model). I can't figure out
though what needs to be done to fix.

public class IndicatingAjaxTabbedPanel extends AjaxTabbedPanel {

private static final long serialVersionUID = 1L;

public IndicatingAjaxTabbedPanel(String id, List tabs) {
super(id, tabs);
}

@SuppressWarnings("unchecked")
@Override
protected WebMarkupContainer newLink(String linkId, final int index) {
return new IndicatingAjaxFallbackLink(linkId) {
private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target)
 {
setSelectedTab(index);
if (target != null)
{

target.add(IndicatingAjaxTabbedPanel.this);
}
onAjaxUpdate(target);
}
};
}
}

Cheers.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642.html
Sent from the Users forum mailing list archive at Nabble.com.

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





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



Class that extends AjaxTabbedPanel does not remember selected panel on page refresh

2012-07-19 Thread sardo

Hi,

I have a class that extends AjaxTabbedPanel, it displays a busy indicator
while the ajax call is running (see code below). This all works fine during
these ajax calls; so a busy indicator is displayed and the tab that has been
selected is displayed correctly in the view.  However, if the page is
refreshed the first tab in the group of tabs is shown as being selected and
the app forgets which tab was previously selected.  To me it seems like the
initial page state for the tabs has been preserved and used again on
refreshing the page (a bit like it's a static model). I can't figure out
though what needs to be done to fix.

public class IndicatingAjaxTabbedPanel extends AjaxTabbedPanel {

private static final long serialVersionUID = 1L;

public IndicatingAjaxTabbedPanel(String id, List tabs) {
super(id, tabs);
}

@SuppressWarnings("unchecked")
@Override
protected WebMarkupContainer newLink(String linkId, final int index) {
return new IndicatingAjaxFallbackLink(linkId) {
private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target)
{
setSelectedTab(index);
if (target != null)
{

target.add(IndicatingAjaxTabbedPanel.this);
}
onAjaxUpdate(target);
}
};
}
}

Cheers.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Class-that-extends-AjaxTabbedPanel-does-not-remember-selected-panel-on-page-refresh-tp4650642.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: problem with page refresh

2012-04-18 Thread Jonathan Tougas
Hi Ale. I had a very similar problem, and I was able to get the behavior I
expected by changing the render strategy to ONE_PASS_RENDER in
Application.init(). Have a look at this
http://apache-wicket.1842946.n4.nabble.com/refresh-and-AjaxFallbackDefaultDataTable-td4384935.html


On Wed, Apr 18, 2012 at 7:12 AM, alezx  wrote:

> Hi guys, I ran into a problem lately,
>
> I have an instance variable in my panel and an ajax behaviour
>
> public final class ScrollLoader extends Panel implements IHeaderContributor
> {
>
>  int number = 0;
>  private AbstractDefaultAjaxBehavior b;
>  ..
>
>  //constructor
>  public Scrolloader (...){
>  b = new AbstractDefaultAjaxBehavior() {
>@Override
>protected void respond(AjaxRequestTarget target) {
>System.out.println("number is "+number);
>number++;
>}
>   }
>  ..
>  }
> }
>
> when I click a button on the page, with ajax I call this behaviour and the
> number is incremented.
>
> if I click on the buttons 5 times, the number increments to 0,1,2,3,4,
> then if I refresh the page and than click on the button other 5 times, the
> number goes to 9 (5,6,7,8,9)
>
> //so far, so good!
>
> but now if I refresh the page again, and I click on the button the number
> starts incrementing from 4 and not from 9!! (so If I press the button 5
> times I see again 5,6,7,8,9 and not 10,11,12..)
>
>
> same problem when I load the page for the first time:
>
> If I *refresh * the page before incrementing the value, the number starts
> incrementing from 0
> so i get 0,1,2,3,4
> if I refresh again, the number starts incrementing from 0 again..
>
> in other words when I refresh the page 2, 3, 4 times, the number starts
> incrementing from the value reached before the first refresh, after that
> first refresh any change to the number is  lost..
>
> so what do I do wrong?
>
> sorry if this is a bit confusing,
>
> and thanks for your help!
>
> ale
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/problem-with-page-refresh-tp4567392p4567392.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: problem with page refresh

2012-04-18 Thread Martin Grigorov
Hi,

I see you use 1.4.x (implementing IHeaderContributor). Which url
coding strategy is used for this page ?
I'd recommend you to use HybridUrlCodingStrategy because it keeps the
page id in the url (something like: my/page.4)
This is the reason why urls for stateful pages in Wicket 1.5 also keep
the pageId in the url (my/page?4). This way even the refresh keeps the
last state of the page. Without the page id Wicket would create a new
instance of the page.

On Wed, Apr 18, 2012 at 2:12 PM, alezx  wrote:
> Hi guys, I ran into a problem lately,
>
> I have an instance variable in my panel and an ajax behaviour
>
> public final class ScrollLoader extends Panel implements IHeaderContributor
> {
>
>  int number = 0;
>  private AbstractDefaultAjaxBehavior b;
>  ..
>
>  //constructor
>  public Scrolloader (...){
>      b = new AbstractDefaultAjaxBehavior() {
>            @Override
>            protected void respond(AjaxRequestTarget target) {
>                System.out.println("number is "+number);
>                number++;
>            }
>       }
>      ..
>  }
> }
>
> when I click a button on the page, with ajax I call this behaviour and the
> number is incremented.
>
> if I click on the buttons 5 times, the number increments to 0,1,2,3,4,
> then if I refresh the page and than click on the button other 5 times, the
> number goes to 9 (5,6,7,8,9)
>
> //so far, so good!
>
> but now if I refresh the page again, and I click on the button the number
> starts incrementing from 4 and not from 9!! (so If I press the button 5
> times I see again 5,6,7,8,9 and not 10,11,12..)
>
>
> same problem when I load the page for the first time:
>
> If I *refresh * the page before incrementing the value, the number starts
> incrementing from 0
> so i get 0,1,2,3,4
> if I refresh again, the number starts incrementing from 0 again..
>
> in other words when I refresh the page 2, 3, 4 times, the number starts
> incrementing from the value reached before the first refresh, after that
> first refresh any change to the number is  lost..
>
> so what do I do wrong?
>
> sorry if this is a bit confusing,
>
> and thanks for your help!
>
> ale
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/problem-with-page-refresh-tp4567392p4567392.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



problem with page refresh

2012-04-18 Thread alezx
Hi guys, I ran into a problem lately,

I have an instance variable in my panel and an ajax behaviour

public final class ScrollLoader extends Panel implements IHeaderContributor
{

  int number = 0;
  private AbstractDefaultAjaxBehavior b;
  ..

  //constructor
  public Scrolloader (...){
  b = new AbstractDefaultAjaxBehavior() {
@Override
protected void respond(AjaxRequestTarget target) {
System.out.println("number is "+number);
number++;
}
   }
  ..
  }
}

when I click a button on the page, with ajax I call this behaviour and the
number is incremented.

if I click on the buttons 5 times, the number increments to 0,1,2,3,4, 
then if I refresh the page and than click on the button other 5 times, the
number goes to 9 (5,6,7,8,9)

//so far, so good!

but now if I refresh the page again, and I click on the button the number
starts incrementing from 4 and not from 9!! (so If I press the button 5
times I see again 5,6,7,8,9 and not 10,11,12..)


same problem when I load the page for the first time:

If I *refresh * the page before incrementing the value, the number starts
incrementing from 0
so i get 0,1,2,3,4
if I refresh again, the number starts incrementing from 0 again..

in other words when I refresh the page 2, 3, 4 times, the number starts
incrementing from the value reached before the first refresh, after that
first refresh any change to the number is  lost..

so what do I do wrong? 

sorry if this is a bit confusing,

and thanks for your help!

ale



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/problem-with-page-refresh-tp4567392p4567392.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: [1.5] unwanted page refresh

2012-03-21 Thread Pierre Goupil
> Sounds like you have a redirect somewhere.
>

Yes, but one which didn't triggered in 1.4!




> Do you have any components on the page which at some point in time call
> setResponsePage or an equivalent?
>

I have no setResponsePage. I'll look through the js to see if there is any
window.location but it's doubtful.

Thank you,

 Pierre






> Bas
>
> Op 21-3-2012 12:49, schreef Pierre Goupil:
>
>  Good afternoon,
>>
>> I have a couple of ModalWindow s in my code that respond to closing using
>> an AjaxButton and its AjaxRequestTarget. My problem is that, in 1.5, after
>> the page displays its components added to the target, the page refreshes
>> itself. Which I don't want, indeed.
>>
>> The problem is weird since the same code used to work in 1.4 without any
>> such side-effects.
>>
>> Details: Wicket 1.5.5, Firefox 11, Opera (?), Debian Linux 6, Tomcat
>> 7.0.22.
>>
>> Any help will be much appreciated.
>>
>> Regards,
>>
>> Pierre Goupil
>>
>>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Re: [1.5] unwanted page refresh

2012-03-21 Thread Bas Gooren

Hi,

Sounds like you have a redirect somewhere.
Do you have any components on the page which at some point in time call 
setResponsePage or an equivalent?


Bas

Op 21-3-2012 12:49, schreef Pierre Goupil:

Good afternoon,

I have a couple of ModalWindow s in my code that respond to closing using
an AjaxButton and its AjaxRequestTarget. My problem is that, in 1.5, after
the page displays its components added to the target, the page refreshes
itself. Which I don't want, indeed.

The problem is weird since the same code used to work in 1.4 without any
such side-effects.

Details: Wicket 1.5.5, Firefox 11, Opera (?), Debian Linux 6, Tomcat 7.0.22.

Any help will be much appreciated.

Regards,

Pierre Goupil



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



[1.5] unwanted page refresh

2012-03-21 Thread Pierre Goupil
Good afternoon,

I have a couple of ModalWindow s in my code that respond to closing using
an AjaxButton and its AjaxRequestTarget. My problem is that, in 1.5, after
the page displays its components added to the target, the page refreshes
itself. Which I don't want, indeed.

The problem is weird since the same code used to work in 1.4 without any
such side-effects.

Details: Wicket 1.5.5, Firefox 11, Opera (?), Debian Linux 6, Tomcat 7.0.22.

Any help will be much appreciated.

Regards,

Pierre Goupil


Re: Component not found error after ajax page refresh

2011-11-24 Thread Ernesto Reinaldo Barreiro
I would block the page with an overlay div while page while links are refreshed.

Regards,

Ernesto


On Thu, Nov 24, 2011 at 5:55 AM, jalbert
 wrote:
> I have developed a data list page using Wicket. The list displays rows of
> data with some action links like View or Edit for each row. The page has an
> AbstractAjaxTimerBehavior attached to it. On timer of this behaviour, the
> action links are changed based on the status of the data row. For example
> the user may lose the ability to Edit a row, so the Edit link would no
> longer be available after the ajax page refresh. Randomly users of the page
> are getting the error below. I suspect it occurs when they try to click on
> one of the action links exactly as the refresh is happening. Is there any
> way I can prevent the user from clicking on a link when the page is being
> refreshed and resolve this error? It occurs randomly and is very hard to
> replicate.
>
> This is the stack trace:
>
> org.apache.wicket.protocol.http.request.InvalidUrlException:
> org.apache.wicket.WicketRuntimeException: component layout:
> inspectionListForm:currentInspections:currentInspectionsListPanel:inspectionEntries:body:rows:1:cells:8:cell:actionLinks
> Container:actionLinks:1:cols:2:actionLinkPanel:editInspectionLink not found
> on page au.gov.wa.dpi.trelis.web.vehicleinsp
> ection.inspectionList.InspectionListPage[id = 16], listener interface =
> [RequestListenerInterface name=ILinkListener, me
> thod=public abstract void
> org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>        at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
>        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
>        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
>        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>        at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
>        at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
>        at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
>        at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
>        at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
>        at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>        at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>        at
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
>        at
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
>        at
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> Caused by: *org.apache.wicket.WicketRuntimeException: component
> layout:inspectionListForm:currentInspections:currentInspe
> ctionsListPanel:inspectionEntries:body:rows:1:cells:8:cell:actionLinksContainer:actionLinks:1:cols:2:actionLinkPanel:edi
> tInspectionLink not found on page*
> au.gov.wa.dpi.trelis.web.vehicleinspection.inspectionList.InspectionListPage[id
> = 16],
>  listener interface = [RequestListenerInterface name=ILinkListener,
> method=public abstract void org.apache.wicket.markup
> .html.link.ILinkListener.onLinkClicked()]
>        at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCyclePr
> ocessor.java:426)
>        at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.jav
> a:471)
>        at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>        ... 15 more
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Component-not-found-error-after-ajax-page-refresh-tp4102756p4102756.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Component not found error after ajax page refresh

2011-11-23 Thread jalbert
I have developed a data list page using Wicket. The list displays rows of
data with some action links like View or Edit for each row. The page has an
AbstractAjaxTimerBehavior attached to it. On timer of this behaviour, the
action links are changed based on the status of the data row. For example
the user may lose the ability to Edit a row, so the Edit link would no
longer be available after the ajax page refresh. Randomly users of the page
are getting the error below. I suspect it occurs when they try to click on
one of the action links exactly as the refresh is happening. Is there any
way I can prevent the user from clicking on a link when the page is being
refreshed and resolve this error? It occurs randomly and is very hard to
replicate.

This is the stack trace:

org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: component layout:
inspectionListForm:currentInspections:currentInspectionsListPanel:inspectionEntries:body:rows:1:cells:8:cell:actionLinks
Container:actionLinks:1:cols:2:actionLinkPanel:editInspectionLink not found
on page au.gov.wa.dpi.trelis.web.vehicleinsp
ection.inspectionList.InspectionListPage[id = 16], listener interface =
[RequestListenerInterface name=ILinkListener, me
thod=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: *org.apache.wicket.WicketRuntimeException: component
layout:inspectionListForm:currentInspections:currentInspe
ctionsListPanel:inspectionEntries:body:rows:1:cells:8:cell:actionLinksContainer:actionLinks:1:cols:2:actionLinkPanel:edi
tInspectionLink not found on page*
au.gov.wa.dpi.trelis.web.vehicleinspection.inspectionList.InspectionListPage[id
= 16],
 listener interface = [RequestListenerInterface name=ILinkListener,
method=public abstract void org.apache.wicket.markup
.html.link.ILinkListener.onLinkClicked()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCyclePr
ocessor.java:426)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.jav
a:471)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
... 15 more

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Component-not-found-error-after-ajax-page-refresh-tp4102756p4102756.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to avoid Page refresh after closing modal window

2011-11-23 Thread Igor Vaynberg
can you debug and see where the second request for a page refresh is
coming from? because there should not be one

if you cant debug it create a quickstart and attach it to jira..

-igor

On Wed, Nov 23, 2011 at 6:14 AM, vaghelapradeep
 wrote:
> Hello,
>
> In my application I am creating a search panel and data panel (that shows
> result of search). At first page load data panel is populated with complete
> result set. This datapanel is basically listView and first row consists of
> link to view/edit data for that particular row. When I click on this link
> modal window is displayed showing data, but when I close this modal window
> complete page is refreshed. What I have noticed is first a request is sent
> to close the modal window and then consecutively another request is sent for
> load the complete page again.
> following is the overrided init() code
>
> @Override
>        public void init()
>        {
>                getComponentInstantiationListeners().add(new
> SpringComponentInjector(this));
>
>
>                /**
>                 *  remove  tags in generated markup
>                 */
>                getMarkupSettings().setStripWicketTags(true);
>                /**
>                 *  remove html comments from markup
>                 */
>                getMarkupSettings().setStripComments(true);
>
> //              Application errorpage settings
>                IApplicationSettings settings = getApplicationSettings();
>                settings.setAccessDeniedPage(getAccessDeniedPage());
>                settings.setPageExpiredErrorPage(getPageExpiredErrorPage());
>                settings.setInternalErrorPage(getInternalErrorPage());
>
>                /**
>                 *  Providing our own implementation of AuthorizationStrategy
>                 */
>
> getSecuritySettings().setAuthorizationStrategy(BaseAppAuthorizationStrategy.getInstance());
>
> getSecuritySettings().setUnauthorizedComponentInstantiationListener(BaseAppAuthorizationStrategy.getInstance());
>
>                setPageManagerProvider(new DefaultPageManagerProvider(this)
>                   {
>                       protected IDataStore newDataStore()
>                       {
>                           return  new 
> HttpSessionDataStore(getPageManagerContext(), new
> PageNumberEvictionStrategy(10));
>                       }
>                   });
>
>                /**
>                 * Page Map Settings and eviction strategy
>                 */
>
>                //Commented below lines since PageMap is no more used in 1.5
> //          getPageSettings().setVersionPagesByDefault(false);
>
>            getStoreSettings().setInmemoryCacheSize(3);
>            getStoreSettings().setAsynchronousQueueCapacity(5);
>
>
>            /**
>                 *  Cache duration for resources
>                 */
>                
> getResourceSettings().setDefaultCacheDuration(Duration.days(30)); // 30
> days
>
>
> getResourceSettings().setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE);
>
>
>                //Added below code since every request was being processed 
> twice thus
> causing page expiration
>
> getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
>
>                /**
>                 *  make bookmarkable pages for easy linking from Menu
>                 */
>
>                mountPage("/ForwardTo", ForwardPage.class); //Changed for 
> migration 1.5
>
>                        configure();
>
>
>        }
>
>  Above code worked fine with Wicket 1.4
>
> Thanks and Regards
> Pradeep
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/How-to-avoid-Page-refresh-after-closing-modal-window-tp4099726p4099726.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



How to avoid Page refresh after closing modal window

2011-11-23 Thread vaghelapradeep
Hello,

In my application I am creating a search panel and data panel (that shows
result of search). At first page load data panel is populated with complete
result set. This datapanel is basically listView and first row consists of
link to view/edit data for that particular row. When I click on this link
modal window is displayed showing data, but when I close this modal window
complete page is refreshed. What I have noticed is first a request is sent
to close the modal window and then consecutively another request is sent for
load the complete page again.
following is the overrided init() code

@Override
public void init() 
{   
getComponentInstantiationListeners().add(new
SpringComponentInjector(this));


/**
 *  remove  tags in generated markup
 */
getMarkupSettings().setStripWicketTags(true);
/**
 *  remove html comments from markup
 */
getMarkupSettings().setStripComments(true);

//  Application errorpage settings
IApplicationSettings settings = getApplicationSettings();
settings.setAccessDeniedPage(getAccessDeniedPage()); 
settings.setPageExpiredErrorPage(getPageExpiredErrorPage());
settings.setInternalErrorPage(getInternalErrorPage());

/**
 *  Providing our own implementation of AuthorizationStrategy
 */

getSecuritySettings().setAuthorizationStrategy(BaseAppAuthorizationStrategy.getInstance());

getSecuritySettings().setUnauthorizedComponentInstantiationListener(BaseAppAuthorizationStrategy.getInstance());

setPageManagerProvider(new DefaultPageManagerProvider(this) 
   {
   protected IDataStore newDataStore() 
   { 
   return  new 
HttpSessionDataStore(getPageManagerContext(), new
PageNumberEvictionStrategy(10));
   }
   });

/** 
 * Page Map Settings and eviction strategy
 */ 

//Commented below lines since PageMap is no more used in 1.5

//  getPageSettings().setVersionPagesByDefault(false);

getStoreSettings().setInmemoryCacheSize(3);
getStoreSettings().setAsynchronousQueueCapacity(5);


/**
 *  Cache duration for resources
 */

getResourceSettings().setDefaultCacheDuration(Duration.days(30)); // 30
days


getResourceSettings().setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE);


//Added below code since every request was being processed 
twice thus
causing page expiration

getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);

/**
 *  make bookmarkable pages for easy linking from Menu
 */

mountPage("/ForwardTo", ForwardPage.class); //Changed for 
migration 1.5

configure(); 


}   

 Above code worked fine with Wicket 1.4

Thanks and Regards
Pradeep

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-avoid-Page-refresh-after-closing-modal-window-tp4099726p4099726.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Force toolbar to update on page refresh

2010-05-27 Thread Jeremy Thomerson
On Thu, May 27, 2010 at 3:55 PM, sahuja  wrote:

>
> Jeremy, I am not really sure what you mean by using a model that gets the
> columns on every repaint, but here's how I have changed my code now.
>
>public TotalsToolbar(final DataTable table, final IModel
> dataProviderModel)
>{
>super(table);
>
>WebMarkupContainer totals = new WebMarkupContainer("totals");
>add(totals);
>
>AbstractReportingBean row =
> (AbstractReportingBean)dataProviderModel.getObject();
>
>List totalList = new ArrayList();
> final IColumn[] columns = table.getColumns();
>for (int i = 0; i < columns.length; i++)
>{
>   final IColumn column = columns[i];
>String val =
> row.getStringForFieldNamed(column.getSortProperty());
>   if (val == null || val.length() == 0) {
>   val = " ";
>   }
>totalList.add(val);
>}
>
>ListView listView = new ListView("total", totalList){
>protected void populateItem(ListItem item) {
>String totalItem = (String) item.getModelObject();
>item.add(new Label("value",
> totalItem.getValue()).setEscapeModelStrings(false));
>}
>};
>
>totals.add(listView);
>return;
>}
>
> I changed the way I was creating my toolbar to use a model wrapped around
> the data.
>
>public GrandTotalsDataTable(String id, final List columns,
>ISortableDataProvider sortableDataProvider, IDataProvider
> dataProvider,
>int rowsPerPage)
>{
>super(id, columns, sortableDataProvider, rowsPerPage);
>addBottomToolbar(new TotalsToolbar(this,
> dataProvider.model(dataProvider.iterator(0, 1).next(;
>}
>
> And, here is my markup for the TotalsToolbar:
> 
>  
>[span wicket:id="totals">
>  
>  [span wicket:id="value">[amount][/span>
>  
>[/span>
>  
> 
>
> (Changing the '<' before span tags to display it).
>
> BTW, I tried to put breakpoints like you suggested, but interestingly when
> I
> hit F5, the debugger doesn't hit any of my code. I do see the table being
> updated though...
>

This is the whole point.  You are only constructing that list of values when
the table is instantiated - which only happens on the initial view.  This is
why you don't hit breakpoints when you click a navigation link.
 Understanding this is key to using Wicket correctly - so make sure that by
the end of this exercise you have learned enough to understand what I'm
saying.

In your constructor, you are creating a list of values.  This is wrong.
 Instead, you need to do this:

IModel> model = new LoadableDetachableModel>() {
  List load() {
// move all of that list generation code here so that it is re-created
on every request
  }
};
new ListView("idhere", model) {
  // populateItem, etc goes here
}



-- 
Jeremy Thomerson
http://www.wickettraining.com


Re: Force toolbar to update on page refresh

2010-05-27 Thread sahuja

Jeremy, I am not really sure what you mean by using a model that gets the
columns on every repaint, but here's how I have changed my code now.

public TotalsToolbar(final DataTable table, final IModel
dataProviderModel)
{
super(table);

WebMarkupContainer totals = new WebMarkupContainer("totals");
add(totals);

AbstractReportingBean row =
(AbstractReportingBean)dataProviderModel.getObject();

List totalList = new ArrayList();
final IColumn[] columns = table.getColumns();
for (int i = 0; i < columns.length; i++)
{
   final IColumn column = columns[i];
   String val =
row.getStringForFieldNamed(column.getSortProperty());
   if (val == null || val.length() == 0) {
   val = " ";
   }
   totalList.add(val);
}

ListView listView = new ListView("total", totalList){
protected void populateItem(ListItem item) {
String totalItem = (String) item.getModelObject();
item.add(new Label("value",
totalItem.getValue()).setEscapeModelStrings(false));
}
};

totals.add(listView);
return;
}

I changed the way I was creating my toolbar to use a model wrapped around
the data.

public GrandTotalsDataTable(String id, final List columns,
ISortableDataProvider sortableDataProvider, IDataProvider
dataProvider,
int rowsPerPage)
{
super(id, columns, sortableDataProvider, rowsPerPage);
addBottomToolbar(new TotalsToolbar(this,
dataProvider.model(dataProvider.iterator(0, 1).next(;
}

And, here is my markup for the TotalsToolbar:

  
[span wicket:id="totals">
  
  [span wicket:id="value">[amount][/span>
  
[/span>
  


(Changing the '<' before span tags to display it).

BTW, I tried to put breakpoints like you suggested, but interestingly when I
hit F5, the debugger doesn't hit any of my code. I do see the table being
updated though...

Thanks.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Force-toolbar-to-update-on-page-refresh-tp2233347p2233773.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Force toolbar to update on page refresh

2010-05-27 Thread Jeremy Thomerson
On Thu, May 27, 2010 at 2:19 PM, sahuja  wrote:

>
> Thanks for your suggestions, Jeremy and Igor.
>
> I tried to use a ListView. With that I succeeded in refreshing the toolbar
> on a bookmarkable page, but not a page that I navigated through the
> Navigation Toolbar.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Force-toolbar-to-update-on-page-refresh-tp2233347p2233646.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
is your listview using a model that gets the columns on every repaint?  the
problem that you have is that your columns in your toolbar are only being
generated on the initial construction of the page.  please put a breakpoint
there so that you can see this.  then, try wrapping that in a model that
feeds the list view and watch your break point.  after every navigation
click, you should see the list of columns be regenerated.  if you don't,
it's still broken

-- 
Jeremy Thomerson
http://www.wickettraining.com


Re: Force toolbar to update on page refresh

2010-05-27 Thread sahuja

Thanks for your suggestions, Jeremy and Igor.

I tried to use a ListView. With that I succeeded in refreshing the toolbar
on a bookmarkable page, but not a page that I navigated through the
Navigation Toolbar.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Force-toolbar-to-update-on-page-refresh-tp2233347p2233646.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Force toolbar to update on page refresh

2010-05-27 Thread Igor Vaynberg
you dont need to use models per se as long as you are rebuilding your
component hierarchy on every request. RepeatingView does not do that.
so either use models like Jeremy said, or rebuild the component
hierarchy using a RefreshingView or a ListView

-igor

On Thu, May 27, 2010 at 9:10 AM, Jeremy Thomerson
 wrote:
> On Thu, May 27, 2010 at 10:53 AM, sahuja  wrote:
>
>>
>> Thanks, Igor. Copied below is the implementation for my toolbar. Could you
>> please take a look and see if you can spot a problem with it?
>>
>> public class TotalsToolbar extends AbstractToolbar
>> {
>>
>>    public TotalsToolbar(final DataTable table, final IDataProvider
>> dataProvider)
>>    {
>>        super(table);
>>
>>        RepeatingView totals = new RepeatingView("totals");
>>        add(totals);
>>
>>        AbstractReportingBean row =
>> (AbstractReportingBean)dataProvider.iterator(0, 1).next();
>>        final IColumn[] columns = table.getColumns();
>>        for (int i = 0; i < columns.length; i++)
>>        {
>>            final IColumn column = columns[i];
>>
>>            WebMarkupContainer item = new
>> WebMarkupContainer(totals.newChildId());
>>            totals.add(item);
>>
>>            WebMarkupContainer total = new WebMarkupContainer("total");
>>
>>            item.add(total);
>>            item.setRenderBodyOnly(true);
>>
>> *                String val =
>> row.getStringForFieldNamed(column.getSortProperty());
>>                if (val == null || val.length() == 0) {
>>                    val = " ";
>>                    total.add(new Label("value",
>> val).setEscapeModelStrings(false));
>>                } else
>>                    total.add(new Label("value", val));
>> *
>>        }
>>    }
>> }
>>
>>
> You're not using a model for your label - so you are "pushing" data into it
> on creation and never changing the data after it's initially created.  This
> is easily learned / proven if you put a breakpoint there where you are
> creating your label.
>
> Actually, now that I look at it, you're also not using a model for your
> columns in your toolbar.  I'm not sure what your AbstractReportingBean is,
> but you will probably also need to change your RepeatingView to something
> that takes an IModel and creates the columns on the fly - or else
> you'll get old data.
>
> Here's an example for the Label - but you'll have to do the repeater on your
> own.
>
> total.add(new Label("value", new AbstractReadOnlyModel() {
>  String getObject() {
>    String val = row.getStringForFieldNamed(column.getSortProperty());;
>    return StringUtils.isEmpty(val) ? "nbsp;" : val;
>  }
> });
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>

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



Re: Force toolbar to update on page refresh

2010-05-27 Thread Jeremy Thomerson
On Thu, May 27, 2010 at 10:53 AM, sahuja  wrote:

>
> Thanks, Igor. Copied below is the implementation for my toolbar. Could you
> please take a look and see if you can spot a problem with it?
>
> public class TotalsToolbar extends AbstractToolbar
> {
>
>public TotalsToolbar(final DataTable table, final IDataProvider
> dataProvider)
>{
>super(table);
>
>RepeatingView totals = new RepeatingView("totals");
>add(totals);
>
>AbstractReportingBean row =
> (AbstractReportingBean)dataProvider.iterator(0, 1).next();
>final IColumn[] columns = table.getColumns();
>for (int i = 0; i < columns.length; i++)
>{
>final IColumn column = columns[i];
>
>WebMarkupContainer item = new
> WebMarkupContainer(totals.newChildId());
>totals.add(item);
>
>WebMarkupContainer total = new WebMarkupContainer("total");
>
>item.add(total);
>item.setRenderBodyOnly(true);
>
> *String val =
> row.getStringForFieldNamed(column.getSortProperty());
>if (val == null || val.length() == 0) {
>val = " ";
>total.add(new Label("value",
> val).setEscapeModelStrings(false));
>} else
>total.add(new Label("value", val));
> *
>}
>}
> }
>
>
You're not using a model for your label - so you are "pushing" data into it
on creation and never changing the data after it's initially created.  This
is easily learned / proven if you put a breakpoint there where you are
creating your label.

Actually, now that I look at it, you're also not using a model for your
columns in your toolbar.  I'm not sure what your AbstractReportingBean is,
but you will probably also need to change your RepeatingView to something
that takes an IModel and creates the columns on the fly - or else
you'll get old data.

Here's an example for the Label - but you'll have to do the repeater on your
own.

total.add(new Label("value", new AbstractReadOnlyModel() {
  String getObject() {
String val = row.getStringForFieldNamed(column.getSortProperty());;
return StringUtils.isEmpty(val) ? "nbsp;" : val;
  }
});
-- 
Jeremy Thomerson
http://www.wickettraining.com


Re: Force toolbar to update on page refresh

2010-05-27 Thread sahuja

Thanks, Igor. Copied below is the implementation for my toolbar. Could you
please take a look and see if you can spot a problem with it?

public class TotalsToolbar extends AbstractToolbar
{

public TotalsToolbar(final DataTable table, final IDataProvider
dataProvider)
{
super(table);

RepeatingView totals = new RepeatingView("totals");
add(totals);

AbstractReportingBean row =
(AbstractReportingBean)dataProvider.iterator(0, 1).next();
final IColumn[] columns = table.getColumns();
for (int i = 0; i < columns.length; i++)
{
final IColumn column = columns[i];

WebMarkupContainer item = new
WebMarkupContainer(totals.newChildId());
totals.add(item);

WebMarkupContainer total = new WebMarkupContainer("total");

item.add(total);
item.setRenderBodyOnly(true);

String val =
row.getStringForFieldNamed(column.getSortProperty());
if (val == null || val.length() == 0) {
val = " ";
total.add(new Label("value",
val).setEscapeModelStrings(false));
} else
total.add(new Label("value", val));
 
}
}
}

This is how I add the toolbar to my table:

public class GrandTotalsDataTable extends DefaultDataTable {
public GrandTotalsDataTable(String id, final List columns,
ISortableDataProvider sortableDataProvider, IDataProvider
dataProvider,
int rowsPerPage)
{
super(id, columns, sortableDataProvider, rowsPerPage);
addBottomToolbar(new TotalsToolbar(this, dataProvider));
}

}


Thanks.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Force-toolbar-to-update-on-page-refresh-tp2233347p2233368.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Force toolbar to update on page refresh

2010-05-27 Thread Igor Vaynberg
the toolbar does refetch the data on every request, the problem is you
are probably caching the data via an improper use of models.

-igor

On Thu, May 27, 2010 at 8:41 AM, sahuja  wrote:
>
> Hi,
>
> I have a DefaultDataTable with a BottomToolbar that I wrote to display the
> sum of amounts in each column of the table.
>
> If the underlying data changes, and I press F5 to refresh the browser page,
> the table reflects the data change, but the toolbar is not refreshed and
> continues to display previous amounts.
>
> Is there a way for me to force the toolbar to re-fetch data from its
> DataProvider?
>
> Thanks.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Force-toolbar-to-update-on-page-refresh-tp2233347p2233347.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Force toolbar to update on page refresh

2010-05-27 Thread sahuja

Hi,

I have a DefaultDataTable with a BottomToolbar that I wrote to display the
sum of amounts in each column of the table.

If the underlying data changes, and I press F5 to refresh the browser page,
the table reflects the data change, but the toolbar is not refreshed and
continues to display previous amounts.

Is there a way for me to force the toolbar to re-fetch data from its
DataProvider?

Thanks.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Force-toolbar-to-update-on-page-refresh-tp2233347p2233347.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Bug in Page refresh?

2010-04-16 Thread Xavier López
Hi Wolfgang,

If I had to refresh the entire page on language change, I would not do it
with an Ajax Request, but with a normal one instead. I do not know how will
setResponsePage behave in a serverside Ajax callback. However, if you need
to do it with ajax, you should add the language dependent components to the
AjaxRequestTarget...

Hope that helped.

Cheers,
Xavier

2010/4/16 Wolfgang Grossinger 

> We have a DropDownChoice to change the language of a page (the language in
> mapped through an enum). The handler to change the code is as follows.
>
>@Override
>protected void onSubmit(AjaxRequestTarget target) {
>
>  getSession().setLocale(getLanguage().getObject().getLocale());
>setResponsePage(getPage());
>}
>
> We just have 3 pages and a login page. The code works on 2 of 3 pages but I
> don't know why it doesn't work on the third page (the code to find the
> language and to get the current page seems also to be correct and working).
> My question is does anybody have some hints what I could do wrong?
>
> Regards,
>
> Wolfgang
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Bug in Page refresh?

2010-04-16 Thread Wolfgang Grossinger
We have a DropDownChoice to change the language of a page (the language 
in mapped through an enum). The handler to change the code is as follows.


@Override
protected void onSubmit(AjaxRequestTarget target) {

getSession().setLocale(getLanguage().getObject().getLocale());

setResponsePage(getPage());
}

We just have 3 pages and a login page. The code works on 2 of 3 pages 
but I don't know why it doesn't work on the third page (the code to find 
the language and to get the current page seems also to be correct and 
working). My question is does anybody have some hints what I could do wrong?


Regards,

Wolfgang



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



Re: Page refresh increases size of pagemap disk storage

2010-01-23 Thread Andrew Lombardi
Hrmmm, okay  12K for every page refresh though sounds like a bit much ... 
obviously its a super small page, but pages with lots of these components on 
them can get up there in sizes

It seems that the diskpagestore is endless ... I thought only a certain number 
of page versions were kept ... something like 5?

On Jan 23, 2010, at 2:00 AM, Ilja Pavkovic wrote:

> Hi,
> 
> I think at least you increase the version number of the page with every 
> refresh (as your page seems to have state). Therefore the PageMap keeps the 
> old revisions of your page.
> 
> Best Regards,
>   Ilja Pavkovic
> 
> 
> Am Samstag, 23. Januar 2010 08:42:49 schrieb Andrew Lombardi:
>> I've got a really simple page, which has components of Label, ListView,
>> etc.
>> 
>> The only component (and correctly so) that stores anything in the Pagemap
>> that gets saved to disk is a Link.  But subsequent refreshes of that same
>> page, without doing anything in the UI, keeps increasing the storage for
>> that pagemap store?  Is this the intended behavior?  The link is really
>> fairly simple, it's only adding 12K or so on every refresh ... but if
>> nothing has changed, I don't know why it needs to increase at all
>> 
>> Any thoughts?
>> 
>> Thanks!
>> 
>> 
>> To our success!
>> 
>> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>> 
>> ANDREW LOMBARDI | and...@mysticcoders.com
>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
>> ofc: 714-816-4488
>> fax: 714-782-6024
>> cell: 714-697-8046
>> linked-in: http://www.linkedin.com/in/andrewlombardi
>> twitter: http://www.twitter.com/kinabalu
>> 
>> Eco-Tip: Printing e-mails is usually a waste.
>> 
>> 
>> This message is for the named person's use only. You must not, directly or
>> indirectly, use, disclose, distribute, print, or copy any part of this
>> message if you are not the intended recipient.
>> 
>> 
> 
> -- 
> binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
> 
>   +49 · 171 · 9342 465
> 
> Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
> Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.




Re: Page refresh increases size of pagemap disk storage

2010-01-23 Thread Ilja Pavkovic
Hi,

I think at least you increase the version number of the page with every 
refresh (as your page seems to have state). Therefore the PageMap keeps the 
old revisions of your page.

Best Regards,
Ilja Pavkovic


Am Samstag, 23. Januar 2010 08:42:49 schrieb Andrew Lombardi:
> I've got a really simple page, which has components of Label, ListView,
>  etc.
> 
> The only component (and correctly so) that stores anything in the Pagemap
>  that gets saved to disk is a Link.  But subsequent refreshes of that same
>  page, without doing anything in the UI, keeps increasing the storage for
>  that pagemap store?  Is this the intended behavior?  The link is really
>  fairly simple, it's only adding 12K or so on every refresh ... but if
>  nothing has changed, I don't know why it needs to increase at all
> 
> Any thoughts?
> 
> Thanks!
> 
> 
> To our success!
> 
> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
> 
> ANDREW LOMBARDI | and...@mysticcoders.com
> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
> ofc: 714-816-4488
> fax: 714-782-6024
> cell: 714-697-8046
> linked-in: http://www.linkedin.com/in/andrewlombardi
> twitter: http://www.twitter.com/kinabalu
> 
> Eco-Tip: Printing e-mails is usually a waste.
> 
> 
> This message is for the named person's use only. You must not, directly or
>  indirectly, use, disclose, distribute, print, or copy any part of this
>  message if you are not the intended recipient.
>  
> 

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

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



Page refresh increases size of pagemap disk storage

2010-01-22 Thread Andrew Lombardi
I've got a really simple page, which has components of Label, ListView, etc.

The only component (and correctly so) that stores anything in the Pagemap that 
gets saved to disk is a Link.  But subsequent refreshes of that same page, 
without doing anything in the UI, keeps increasing the storage for that pagemap 
store?  Is this the intended behavior?  The link is really fairly simple, it's 
only adding 12K or so on every refresh ... but if nothing has changed, I don't 
know why it needs to increase at all

Any thoughts?

Thanks!


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.




Re: page refresh after setLocale

2009-06-08 Thread Jonas
I think you just have to make sure the locale-dependent strings are not 'static'
within the page. e.g. don't use new Model("My localized label from db") but
something like new LoadableDetachableModel() {
protected Object load() {
return "the string, taking the current locale into account";
}
}


On Mon, Jun 8, 2009 at 11:34 AM, Juri Prokofiev wrote:
> I have a link that just changes a locale. How is it possible to refresh the
> same page after setting the locale?
>
> The problem is that after I click the link the translation links are
> changed, but the content(that comes from hibernate) of the page is still the
> same in different language. If I add a setResponsePage(HomePage.class) then
> it will do the trick, but I need to stay on the same page. Is suppose it
> should be a common case. Any ideas?
>
> Thank you

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



page refresh after setLocale

2009-06-08 Thread Juri Prokofiev
I have a link that just changes a locale. How is it possible to refresh the
same page after setting the locale?

The problem is that after I click the link the translation links are
changed, but the content(that comes from hibernate) of the page is still the
same in different language. If I add a setResponsePage(HomePage.class) then
it will do the trick, but I need to stay on the same page. Is suppose it
should be a common case. Any ideas?

Thank you
-- 
http://www.autoladu.ee  - kõik varuosad ühes kohas


Re: DataTable testability - RepeatingView.childIdCounter not reset after a page refresh

2009-03-20 Thread helmers

I solved it as follows:

dataTable.setItemReuseStrategy(new ReuseIfModelsEqualStrategy());

This will prevent the table from creating new items over and over again,
even if they represent the same object. See the javadoc for
ReuseIfModelsEqualStrategy.



helmers wrote:
> 
> I have a page with a DefaultDataTable containing an AjaxFallbackLink in
> one
> of its columns. When the page is rendered for the first time, the link in
> row 1 has component id path "table:rows:1:cells:3:cell". When I click this
> link while Ajax is disabled, the page is refreshed, and now the link in
> row
> 1 (which is still displaying exactly the same item) has changed to
> "table:rows:3:cells:3:cell" (my table has 2 rows, hence the row id
> increase
> from 1 to 3).
> 
> In my data table tests I would like to refer to data table rows and cells
> by
> their component id paths (see DataTablePageTest.java). Currently my tests
> are not very robust, because the component id paths of the DataTable rows
> and cells vary over time and depend on the page size and number of items
> displayed (if page size = 2, after a click, row id 1 has suddenly become 1
> +
> 2 = 3).
> 
> The reason that in case of no ajax the row ids increase, is that on a page
> refresh the DataGridView.onPopulate() is called, and if you look in
> RefreshingView.onPopulate() -> newItemFactory() you will see that a new
> child id is retrieved for every item. Because childIdCounter is a private
> field of RepeatingView, and the counter is never reset to 0, my row #1 has
> suddenly become row #3.
> 

-- 
View this message in context: 
http://www.nabble.com/DataTable-testability---RepeatingView.childIdCounter-not-reset-after--a-page-refresh-tp22568486p22626268.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DataTable testability - RepeatingView.childIdCounter not reset after a page refresh

2009-03-17 Thread Igor Vaynberg
in the test you can always associate metadata with any component you
want to identify it later. or for simple scenarios you can call
setoutputmarkupid(some unique string)

-igor

On Tue, Mar 17, 2009 at 2:40 PM, Guido Helmers  wrote:
> Hi,
>
> (Wicket 1.3.5 / Java 1.6)
>
> I have a page with a DefaultDataTable containing an AjaxFallbackLink in one
> of its columns. When the page is rendered for the first time, the link in
> row 1 has component id path "table:rows:1:cells:3:cell". When I click this
> link while Ajax is disabled, the page is refreshed, and now the link in row
> 1 (which is still displaying exactly the same item) has changed to
> "table:rows:3:cells:3:cell" (my table has 2 rows, hence the row id increase
> from 1 to 3). A sample page and unit test can be found at the bottom of this
> email (I provided a complete package, including WebApplication and markup
> page).
>
> In my data table tests I would like to refer to data table rows and cells by
> their component id paths (see DataTablePageTest.java). Currently my tests
> are not very robust, because the component id paths of the DataTable rows
> and cells vary over time and depend on the page size and number of items
> displayed (if page size = 2, after a click, row id 1 has suddenly become 1 +
> 2 = 3).
>
> The reason that in case of no ajax the row ids increase, is that on a page
> refresh the DataGridView.onPopulate() is called, and if you look in
> RefreshingView.onPopulate() -> newItemFactory() you will see that a new
> child id is retrieved for every item. Because childIdCounter is a private
> field of RepeatingView, and the counter is never reset to 0, my row #1 has
> suddenly become row #3.
>
> So I'm wondering:
> * Is there trick to reset the counter on a page refresh and what side
> effects will it have? (RepeatingView.childIdCounter is private and there are
> no public/protected methods to influence the counter so I have no idea how
> to do it).
> * Does anyone have suggestions to improve the below code / unit test, so
> that table rows and table cells can be referenced (in the unit test) by a
> constant identifier that does not depend on the page size and that doesn't
> change over time?
>
> Cheers,
> Guido
>
>
> *___
> MyWebApplication.java
> *
> package wicket;
>
> import org.apache.wicket.protocol.http.WebApplication;
>
> public class MyWebApplication extends WebApplication {
>
>   �...@override
>    public Class getHomePage() {
>        return DataTablePage.class;
>    }
> }
>
>
>
> *___
> MyItem.java
> *
> package wicket;
>
> import java.io.Serializable;
>
> public class MyItem implements Serializable {
>
>    private static final long serialVersionUID = 1L;
>
>    private String code;
>
>    private String description;
>
>    public MyItem(String code, String description) {
>        this.code = code;
>        this.description = description;
>    }
>
>    public String getCode() {
>        return code;
>    }
>
>    public String getDescription() {
>        return description;
>    }
> }
>
>
>
> *___
> MyDataProvider.java
> *
> package wicket;
>
> import java.util.ArrayList;
> import java.util.Iterator;
> import java.util.List;
>
> import nl.rotterdam.ioo.pzr.midoffice.domain.search.SortParams;
>
> import
> org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
> import org.apache.wicket.model.IModel;
> import org.apache.wicket.model.Model;
>
> public class MyDataProvider extends SortableDataProvider {
>
>    private static final long serialVersionUID = 1L;
>
>    private static List items = new ArrayList();
>    static {
>        items.add(new MyItem("CODE1", "description1"));
>        items.add(new MyItem("CODE2", "description2"));
>    }
>
>    protected SortParams sortParams;
>
>    public void setQueryParam(SortParams sortParams) {
>        this.sortParams = sortParams;
>    }
>
>    public MyDataProvider() {
>    }
>
>    public Iterator iterator(int first, int count) {
>        return items.iterator();
>    }
>
>    public IModel model(Object object) {
>        return new Model((MyItem) object);
>    }
>
>    public int size() {
>        return items.size();
>    }
> }
>
>
> *___
> DataTablePage.java
> *
> package wicket;
>
> import java.util.Arrays;
>
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;
> import
> org.apache.wicket.extensions.markup.html.repeater.data.tab

DataTable testability - RepeatingView.childIdCounter not reset after a page refresh

2009-03-17 Thread Guido Helmers
Hi,

(Wicket 1.3.5 / Java 1.6)

I have a page with a DefaultDataTable containing an AjaxFallbackLink in one
of its columns. When the page is rendered for the first time, the link in
row 1 has component id path "table:rows:1:cells:3:cell". When I click this
link while Ajax is disabled, the page is refreshed, and now the link in row
1 (which is still displaying exactly the same item) has changed to
"table:rows:3:cells:3:cell" (my table has 2 rows, hence the row id increase
from 1 to 3). A sample page and unit test can be found at the bottom of this
email (I provided a complete package, including WebApplication and markup
page).

In my data table tests I would like to refer to data table rows and cells by
their component id paths (see DataTablePageTest.java). Currently my tests
are not very robust, because the component id paths of the DataTable rows
and cells vary over time and depend on the page size and number of items
displayed (if page size = 2, after a click, row id 1 has suddenly become 1 +
2 = 3).

The reason that in case of no ajax the row ids increase, is that on a page
refresh the DataGridView.onPopulate() is called, and if you look in
RefreshingView.onPopulate() -> newItemFactory() you will see that a new
child id is retrieved for every item. Because childIdCounter is a private
field of RepeatingView, and the counter is never reset to 0, my row #1 has
suddenly become row #3.

So I'm wondering:
* Is there trick to reset the counter on a page refresh and what side
effects will it have? (RepeatingView.childIdCounter is private and there are
no public/protected methods to influence the counter so I have no idea how
to do it).
* Does anyone have suggestions to improve the below code / unit test, so
that table rows and table cells can be referenced (in the unit test) by a
constant identifier that does not depend on the page size and that doesn't
change over time?

Cheers,
Guido


*___
MyWebApplication.java
*
package wicket;

import org.apache.wicket.protocol.http.WebApplication;

public class MyWebApplication extends WebApplication {

@Override
public Class getHomePage() {
return DataTablePage.class;
}
}



*___
MyItem.java
*
package wicket;

import java.io.Serializable;

public class MyItem implements Serializable {

private static final long serialVersionUID = 1L;

private String code;

private String description;

public MyItem(String code, String description) {
this.code = code;
this.description = description;
}

public String getCode() {
return code;
}

public String getDescription() {
return description;
}
}



*___
MyDataProvider.java
*
package wicket;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import nl.rotterdam.ioo.pzr.midoffice.domain.search.SortParams;

import
org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

public class MyDataProvider extends SortableDataProvider {

private static final long serialVersionUID = 1L;

private static List items = new ArrayList();
static {
items.add(new MyItem("CODE1", "description1"));
items.add(new MyItem("CODE2", "description2"));
}

protected SortParams sortParams;

public void setQueryParam(SortParams sortParams) {
this.sortParams = sortParams;
}

public MyDataProvider() {
}

public Iterator iterator(int first, int count) {
return items.iterator();
}

public IModel model(Object object) {
return new Model((MyItem) object);
}

public int size() {
return items.size();
}
}


*___
DataTablePage.java
*
package wicket;

import java.util.Arrays;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;
import
org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import
org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import
org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

public class DataTablePage extends WebPage {

private final DefaultDataTable table;

public DataTablePage() {

MyDataProvider dataProvider = new MyDataProvider();
IColumn[] columns = new IColumn[3];

columns[0] = new PropertyColumn(new Model("Code"), "code", "code");
columns[1] = new PropertyColumn(new Model("Description"),
"description");
columns[2] = new AbstractColumn(new

SV: page refresh cleans my page state

2008-11-24 Thread Singh Mukesh
Hi 

I have gone through the HybridUrlCodingStrategy. The HybridUrlCodingStrategy is 
working porperly in WebApplication but not in portal environment. In 
WebApplication it retain the page state but not in portal environment.

Please suggest what should I do in portal environment.

Thanks in advance.
 


Med vennlig hilsen

MUKESH SINGH
CAPGEMINI Consultant
Arrive AS
T (+47) 46 47 90 16
E-post: [EMAIL PROTECTED]



-Opprinnelig melding-
Fra: jWeekend [mailto:[EMAIL PROTECTED] 
Sendt: 20 November 2008 14:25
Til: users@wicket.apache.org
Emne: Re: page refresh cleans my page state


Singh,

Take a look at  http://cwiki.apache.org/WICKET/url-coding-strategies.html
HybridUrlCodingStrategy .

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 


Singh Mukesh wrote:
> 
> 
> Hi,
> 
> I am using wicket. I have a page with one links which increase the 
> counter value based on user click on the link, for all these actions I 
> am using Ajax. For instance user click 5 times on link the counter shows 
> value 5.
> It is ok but if I click on browsers refresh button all changes are 
> lost and it shows the counter value 0 instead of 5. How to handle the 
> refresh button?
> 
> Please find the code below.
> 
> TestPage.java
> 
> import org.apache.wicket.PageParameters; import 
> org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.markup.html.AjaxLink;
> import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.model.IModel; import 
> org.apache.wicket.model.Model;
> 
> public class TestPage extends WebPage {
>   
>   public TestPage(PageParameters parameters) {
>   super(parameters);
>   final Model modell = new Model(new 
> Integer(0));
>   // Slik at telleverdien legges i session
>   setDefaultModel(modell);
>   final Label telleLabel = new Label("teller", modell);
>   telleLabel.setOutputMarkupId(true);
>   final Label hashcodeLabel = new Label("hashcode", new 
> IModel() {
>   private static final long serialVersionUID = 1L;
> 
>   public String getObject() {
>   return 
> String.valueOf(System.identityHashCode(TestPage.this));
>   }
> 
>   public void setObject(String object) {
>   /* NOOP */
>   }
> 
>   public void detach() {
>   /* NOOP */
>   }
>   
>   });
>   hashcodeLabel.setOutputMarkupId(true);
>   add(telleLabel);
>   add(new AjaxLink("link", modell) {
>   private static final long serialVersionUID = 1L;
> 
>   @Override
>   public void onClick(AjaxRequestTarget target) {
>   // Øk det delte modellobjektet
>   Integer tall = getModelObject();
>   int verdi = tall.intValue() + 1;
>   tall = new Integer(verdi);
>   setModelObject(tall);
>   // Fortell klienten hvilken komponent som skal 
> oppdateres
>   target.addComponent(telleLabel);
>   target.addComponent(hashcodeLabel);
>   }   
>   });
>   add(hashcodeLabel);
>   add(new AjaxCheckBox("versioned", new 
> Model(Boolean.TRUE)) {
>   private static final long serialVersionUID = 1L;
> 
>   @Override
>   protected void onUpdate(AjaxRequestTarget target) {
>   
> setVersioned(this.getModelObject().booleanValue());
>   }
>   
>   });
>   setVersioned(true);
>   }
>   
>   
> 
>   
> }
> 
> 
> 
> TestApplication.java
> 
> import org.apache.wicket.Page;
> import org.apache.wicket.Request;
> import org.apache.wicket.Response;
> import org.apache.wicket.Session;
> import org.apache.wicket.protocol.http.WebApplication;
> 
> public class TestApplication extends WebApplication {
> 
>   @Override
>   public Class getHomePage() {
>   return TestPage.class;
>   }
>   
> }
> 
> TestPage.html
> 
>xmln

Re: page refresh cleans my page state

2008-11-20 Thread jWeekend

Singh,

Take a look at  http://cwiki.apache.org/WICKET/url-coding-strategies.html
HybridUrlCodingStrategy .

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 


Singh Mukesh wrote:
> 
> 
> Hi,
> 
> I am using wicket. I have a page with one links which increase the counter
> value based on user click on the link, for all these actions I am using
> Ajax. For instance user click 5 times on link the counter shows value 5.
> It is ok but if I click on browsers refresh button all changes are lost
> and it shows the counter value 0 instead of 5. How to handle the refresh
> button?
> 
> Please find the code below.
> 
> TestPage.java
> 
> import org.apache.wicket.PageParameters;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.markup.html.AjaxLink;
> import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.model.IModel;
> import org.apache.wicket.model.Model;
> 
> public class TestPage extends WebPage {
>   
>   public TestPage(PageParameters parameters) {
>   super(parameters);
>   final Model modell = new Model(new 
> Integer(0));
>   // Slik at telleverdien legges i session
>   setDefaultModel(modell);
>   final Label telleLabel = new Label("teller", modell);
>   telleLabel.setOutputMarkupId(true);
>   final Label hashcodeLabel = new Label("hashcode", new 
> IModel() {
>   private static final long serialVersionUID = 1L;
> 
>   public String getObject() {
>   return 
> String.valueOf(System.identityHashCode(TestPage.this));
>   }
> 
>   public void setObject(String object) {
>   /* NOOP */
>   }
> 
>   public void detach() {
>   /* NOOP */
>   }
>   
>   });
>   hashcodeLabel.setOutputMarkupId(true);
>   add(telleLabel);
>   add(new AjaxLink("link", modell) {
>   private static final long serialVersionUID = 1L;
> 
>   @Override
>   public void onClick(AjaxRequestTarget target) {
>   // Øk det delte modellobjektet
>   Integer tall = getModelObject();
>   int verdi = tall.intValue() + 1;
>   tall = new Integer(verdi);
>   setModelObject(tall);
>   // Fortell klienten hvilken komponent som skal 
> oppdateres
>   target.addComponent(telleLabel);
>   target.addComponent(hashcodeLabel);
>   }   
>   });
>   add(hashcodeLabel);
>   add(new AjaxCheckBox("versioned", new 
> Model(Boolean.TRUE)) {
>   private static final long serialVersionUID = 1L;
> 
>   @Override
>   protected void onUpdate(AjaxRequestTarget target) {
>   
> setVersioned(this.getModelObject().booleanValue());
>   }
>   
>   });
>   setVersioned(true);
>   }
>   
>   
> 
>   
> }
> 
> 
> 
> TestApplication.java
> 
> import org.apache.wicket.Page;
> import org.apache.wicket.Request;
> import org.apache.wicket.Response;
> import org.apache.wicket.Session;
> import org.apache.wicket.protocol.http.WebApplication;
> 
> public class TestApplication extends WebApplication {
> 
>   @Override
>   public Class getHomePage() {
>   return TestPage.class;
>   }
>   
> }
> 
> TestPage.html 
> 
>xmlns="http://www.w3.org/1999/xhtml";  
>   xmlns:wicket="http://wicket.apache.org/";>
> 
>   
>   Testside
> 
> 
># +  0
>   Denne portleten har hashCode lik 34563.
>class="portlet-form-field"
> wicket:id="versioned"> Versjonert
> 
> 
> 
> 
> Please suggest me the way how to handle the refresh button problem.
> 
> Please do the needful.
> 
> 
> Med vennlig hilsen
> 
> MUKESH SINGH
> CAPGEMINI Consultant
> Arrive AS
> T (+47) 46 47 90 16
> E-post: [EMAIL PROTECTED]
> http://servicedesk.arrive.no
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/page-refresh-cleans-my-page-state-tp20598492p20601031.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: page refresh cleans my page state

2008-11-20 Thread Ernesto Reinaldo Barreiro
store the value on the session? make it a static member  variable or store
it at application level? it all depends on what you want: the value to
change independently for each user or be the "same" for all users...
Ernesto

On Thu, Nov 20, 2008 at 11:30 AM, Singh Mukesh <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I am using wicket. I have a page with one links which increase the counter
> value based on user click on the link, for all these actions I am using
> Ajax. For instance user click 5 times on link the counter shows value 5. It
> is ok but if I click on browsers refresh button all changes are lost and it
> shows the counter value 0 instead of 5. How to handle the refresh button?
>
> Please find the code below.
>
> TestPage.java
>
> import org.apache.wicket.PageParameters;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.markup.html.AjaxLink;
> import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.model.IModel;
> import org.apache.wicket.model.Model;
>
> public class TestPage extends WebPage {
>
>public TestPage(PageParameters parameters) {
>super(parameters);
>final Model modell = new Model(new
> Integer(0));
>// Slik at telleverdien legges i session
>setDefaultModel(modell);
>final Label telleLabel = new Label("teller", modell);
>telleLabel.setOutputMarkupId(true);
>final Label hashcodeLabel = new Label("hashcode", new
> IModel() {
>private static final long serialVersionUID = 1L;
>
>public String getObject() {
>return
> String.valueOf(System.identityHashCode(TestPage.this));
>}
>
>public void setObject(String object) {
>/* NOOP */
>}
>
>public void detach() {
>/* NOOP */
>}
>
>});
>hashcodeLabel.setOutputMarkupId(true);
>add(telleLabel);
>add(new AjaxLink("link", modell) {
>private static final long serialVersionUID = 1L;
>
>@Override
>public void onClick(AjaxRequestTarget target) {
>// Øk det delte modellobjektet
>Integer tall = getModelObject();
>int verdi = tall.intValue() + 1;
>tall = new Integer(verdi);
>setModelObject(tall);
>// Fortell klienten hvilken komponent som
> skal oppdateres
>target.addComponent(telleLabel);
>target.addComponent(hashcodeLabel);
>}
>});
>add(hashcodeLabel);
>add(new AjaxCheckBox("versioned", new
> Model(Boolean.TRUE)) {
>private static final long serialVersionUID = 1L;
>
>@Override
>protected void onUpdate(AjaxRequestTarget target) {
>
>  setVersioned(this.getModelObject().booleanValue());
>}
>
>});
>setVersioned(true);
>}
>
>
>
>
> }
>
>
>
> TestApplication.java
>
> import org.apache.wicket.Page;
> import org.apache.wicket.Request;
> import org.apache.wicket.Response;
> import org.apache.wicket.Session;
> import org.apache.wicket.protocol.http.WebApplication;
>
> public class TestApplication extends WebApplication {
>
>@Override
>public Class getHomePage() {
>return TestPage.class;
>}
>
> }
>
> TestPage.html
>
>   xmlns="http://www.w3.org/1999/xhtml";
>  xmlns:wicket="http://wicket.apache.org/";>
> 
>
>Testside
> 
> 
> wicket:id="link">+ 0
>Denne portleten har hashCode lik  wicket:id="hashcode">34563.
> class="portlet-form-field" wicket:id="versioned">  class="portlet-form-label">Versjonert
> 
> 
>
>
> Please suggest me the way how to handle the refresh button problem.
>
> Please do the needful.
>
>
> Med vennlig hilsen
>
> MUKESH SINGH
> CAPGEMINI Consultant
> Arrive AS
> T (+47) 46 47 90 16
> E-post: [EMAIL PROTECTED]
> http://servicedesk.arrive.no
>
>
>


page refresh cleans my page state

2008-11-20 Thread Singh Mukesh

Hi,

I am using wicket. I have a page with one links which increase the counter 
value based on user click on the link, for all these actions I am using Ajax. 
For instance user click 5 times on link the counter shows value 5. It is ok but 
if I click on browsers refresh button all changes are lost and it shows the 
counter value 0 instead of 5. How to handle the refresh button?

Please find the code below.

TestPage.java

import org.apache.wicket.PageParameters;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

public class TestPage extends WebPage {

public TestPage(PageParameters parameters) {
super(parameters);
final Model modell = new Model(new 
Integer(0));
// Slik at telleverdien legges i session
setDefaultModel(modell);
final Label telleLabel = new Label("teller", modell);
telleLabel.setOutputMarkupId(true);
final Label hashcodeLabel = new Label("hashcode", new 
IModel() {
private static final long serialVersionUID = 1L;

public String getObject() {
return 
String.valueOf(System.identityHashCode(TestPage.this));
}

public void setObject(String object) {
/* NOOP */
}

public void detach() {
/* NOOP */
}

});
hashcodeLabel.setOutputMarkupId(true);
add(telleLabel);
add(new AjaxLink("link", modell) {
private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
// Øk det delte modellobjektet
Integer tall = getModelObject();
int verdi = tall.intValue() + 1;
tall = new Integer(verdi);
setModelObject(tall);
// Fortell klienten hvilken komponent som skal 
oppdateres
target.addComponent(telleLabel);
target.addComponent(hashcodeLabel);
}   
});
add(hashcodeLabel);
add(new AjaxCheckBox("versioned", new 
Model(Boolean.TRUE)) {
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate(AjaxRequestTarget target) {

setVersioned(this.getModelObject().booleanValue());
}

});
setVersioned(true);
}




}



TestApplication.java

import org.apache.wicket.Page;
import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;

public class TestApplication extends WebApplication {

@Override
public Class getHomePage() {
return TestPage.class;
}

}

TestPage.html 

http://www.w3.org/1999/xhtml";  
  xmlns:wicket="http://wicket.apache.org/";>


Testside


+ 0
Denne portleten har hashCode lik 34563.
 Versjonert




Please suggest me the way how to handle the refresh button problem.

Please do the needful.


Med vennlig hilsen

MUKESH SINGH
CAPGEMINI Consultant
Arrive AS
T (+47) 46 47 90 16
E-post: [EMAIL PROTECTED]
http://servicedesk.arrive.no




Re: page refresh cleans my page

2008-11-13 Thread jWeekend

Miro,

Take a look at HybridUrlCodingStrategy.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 



miro wrote:
> 
> I have page with search and several links which sort data etc for all
> these actions i am using ajax  and any of this action will change the page
> data  now if i ckick on  browsers refersh button all changes are lost how
> to handle refresh ?
> 

-- 
View this message in context: 
http://www.nabble.com/page-refresh-cleans-my-page-tp20474951p20477243.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



page refresh cleans my page

2008-11-12 Thread miro

I have page with search and several links which sort data etc for all these
actions i am using ajax  and any of this action will change the page data 
now if i ckick on  browsers refersh button all changes are lost how to
handle refresh ?
-- 
View this message in context: 
http://www.nabble.com/page-refresh-cleans-my-page-tp20474951p20474951.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need help regarding Base Page refresh.

2008-10-06 Thread Igor Vaynberg
is it really so hard to google "refresh parent window from child window"

wow

-igor

On Mon, Oct 6, 2008 at 1:50 PM, ravichand <[EMAIL PROTECTED]> wrote:
>
> Have the same problem. Can any one help
> --
> View this message in context: 
> http://www.nabble.com/Need-help-regarding-Base-Page-refresh.-tp19602473p19846169.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need help regarding Base Page refresh.

2008-10-06 Thread ravichand

Have the same problem. Can any one help
-- 
View this message in context: 
http://www.nabble.com/Need-help-regarding-Base-Page-refresh.-tp19602473p19846169.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need help regarding Base Page refresh.

2008-09-21 Thread kamlesh Wadhwani
I have a Wicket Page containing tabbedPanels which opens few other pages 
depending on the tabs. But in few of my tabs, I have BookmarkablePageLink to 
open a popup for some operation. I want to refresh corresponding tab after 
popup is closed. Please help.



Kammy


  Add more friends to your messenger and enjoy! Go to 
http://in.messenger.yahoo.com/invite/

Re: FeedbackPanel and page refresh (f5) after submit

2008-09-12 Thread Ajayi Yinka
Hurray, i have got over it. The problem I was having is that, I forgort to
implement the cleanupFeedbackMessages() method which I declare in my session
class. I called the method but forgot to put the codes therein. thanks so
much.
Now, i can continue with my app.
I will appreciate it if anyone can give me a simplest way of implement
jasper report with wicket.

Regards,
Yinka.


On Thu, Sep 11, 2008 at 9:26 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:

> here is how it works:
>
> if the message is reported against session it is held until rendered,
> if the message is reported against a component it is held only during
> the request in which it has been reported. wicket is smart enough to
> look at the render strategy and not clear messages during the redirect
> between post and get, so i am not sure why this is not working for you
> as it is working fine in the forminput wicket example.
>
> if you want to change this behavior you can override
> session.cleanupFeedbackMessages() and implement whatever behavior you
> wish.
> by the way, this is all very apparent from the code. i suggest you
> learn your ide and useful ide tools such as call hieararchy,
> ctrl+click to follow, etc.
>
> -igor
>
> On Thu, Sep 11, 2008 at 8:43 PM, Timo Rantalaiho <[EMAIL PROTECTED]>
> wrote:
> > On Thu, 11 Sep 2008, Ajayi Yinka wrote:
> >> > Thomas Lutz wrote:
> >> > >
> >> > > I've a form with some validation added, nothing special (Required,
> Email
> >> > > check). When I submit the form I get the validation messages in the
> >> > > FeedbackPanel as expected, but :-), hitting f5 for a page refresh
> after
> >> > > the submit removes them (don't ask why refresh after submit... users
> of
> >> > > my webapp do stuff like this :-)).
> >> > > The form is not submitted, only redisplayed, but the validation
> messages
> >> > > are missing.
> >> > > Is there something I can do about this ?
> >
> > I think that what happens is that
> >
> > a) the normal POST
> >
> > b) the redirect to GET after POST [1]
> >
> > c) feedback messages are cleared from session on detaching
> >   the request [2]
> >
> > d) refresh does the GET again, and the flash feedback
> >   messages cannot be displayed, because they are already
> >   cleared from the session
> >
> > The solution is left as an exercise for the reader ;)
> > Because now I must get going...
> >
> > Best wishes,
> > Timo
> >
> >
> > [1] http://en.wikipedia.org/wiki/Post/Redirect/Get
> > [2]
> >
> http://fisheye6.atlassian.com/browse/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?r=645227#l1058
> >
> > --
> > Timo Rantalaiho
> > Reaktor Innovations Oyhttp://www.ri.fi/ >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread Igor Vaynberg
here is how it works:

if the message is reported against session it is held until rendered,
if the message is reported against a component it is held only during
the request in which it has been reported. wicket is smart enough to
look at the render strategy and not clear messages during the redirect
between post and get, so i am not sure why this is not working for you
as it is working fine in the forminput wicket example.

if you want to change this behavior you can override
session.cleanupFeedbackMessages() and implement whatever behavior you
wish.
by the way, this is all very apparent from the code. i suggest you
learn your ide and useful ide tools such as call hieararchy,
ctrl+click to follow, etc.

-igor

On Thu, Sep 11, 2008 at 8:43 PM, Timo Rantalaiho <[EMAIL PROTECTED]> wrote:
> On Thu, 11 Sep 2008, Ajayi Yinka wrote:
>> > Thomas Lutz wrote:
>> > >
>> > > I've a form with some validation added, nothing special (Required, Email
>> > > check). When I submit the form I get the validation messages in the
>> > > FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
>> > > the submit removes them (don't ask why refresh after submit... users of
>> > > my webapp do stuff like this :-)).
>> > > The form is not submitted, only redisplayed, but the validation messages
>> > > are missing.
>> > > Is there something I can do about this ?
>
> I think that what happens is that
>
> a) the normal POST
>
> b) the redirect to GET after POST [1]
>
> c) feedback messages are cleared from session on detaching
>   the request [2]
>
> d) refresh does the GET again, and the flash feedback
>   messages cannot be displayed, because they are already
>   cleared from the session
>
> The solution is left as an exercise for the reader ;)
> Because now I must get going...
>
> Best wishes,
> Timo
>
>
> [1] http://en.wikipedia.org/wiki/Post/Redirect/Get
> [2]
> http://fisheye6.atlassian.com/browse/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?r=645227#l1058
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oyhttp://www.ri.fi/ >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread Timo Rantalaiho
On Thu, 11 Sep 2008, Ajayi Yinka wrote:
> > Thomas Lutz wrote:
> > >
> > > I've a form with some validation added, nothing special (Required, Email
> > > check). When I submit the form I get the validation messages in the
> > > FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
> > > the submit removes them (don't ask why refresh after submit... users of
> > > my webapp do stuff like this :-)).
> > > The form is not submitted, only redisplayed, but the validation messages
> > > are missing.
> > > Is there something I can do about this ?

I think that what happens is that

a) the normal POST

b) the redirect to GET after POST [1]

c) feedback messages are cleared from session on detaching 
   the request [2]

d) refresh does the GET again, and the flash feedback
   messages cannot be displayed, because they are already 
   cleared from the session

The solution is left as an exercise for the reader ;) 
Because now I must get going...

Best wishes,
Timo


[1] http://en.wikipedia.org/wiki/Post/Redirect/Get 
[2]
http://fisheye6.atlassian.com/browse/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?r=645227#l1058

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread Ajayi Yinka
this is exacltly the same problem I am having. Could anyone render any
solution to this.

Thanks
Yinka.

On Thu, Sep 11, 2008 at 7:40 AM, kayce <[EMAIL PROTECTED]> wrote:

>
> Did you find a solution for this?
> Thanks
>
>
> Thomas Lutz wrote:
> >
> > I've a form with some validation added, nothing special (Required, Email
> > check). When I submit the form I get the validation messages in the
> > FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
> > the submit removes them (don't ask why refresh after submit... users of
> > my webapp do stuff like this :-)).
> > The form is not submitted, only redisplayed, but the validation messages
> > are missing.
> > Is there something I can do about this ?
> >
> > Thanks in advance,
> > Tom
> >
>
> --
> View this message in context:
> http://www.nabble.com/FeedbackPanel-and-page-refresh-%28f5%29-after-submit-tp14413642p19436382.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread kayce

Did you find a solution for this?
Thanks


Thomas Lutz wrote:
> 
> I've a form with some validation added, nothing special (Required, Email 
> check). When I submit the form I get the validation messages in the 
> FeedbackPanel as expected, but :-), hitting f5 for a page refresh after 
> the submit removes them (don't ask why refresh after submit... users of 
> my webapp do stuff like this :-)).
> The form is not submitted, only redisplayed, but the validation messages 
> are missing.
> Is there something I can do about this ?
> 
> Thanks in advance,
> Tom
> 

-- 
View this message in context: 
http://www.nabble.com/FeedbackPanel-and-page-refresh-%28f5%29-after-submit-tp14413642p19436382.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-06-26 Thread James Carman
Right, I don't know what the exact settings were, but my IE version
automatically did a refresh on a page when FF didn't (this is my vague
recollection).  I don't typically do a whole lot of tweaking of my
browser settings.  I'm way too lazy for that.

On Thu, Jun 26, 2008 at 10:15 PM, Timo Rantalaiho <[EMAIL PROTECTED]> wrote:
> On Thu, 26 Jun 2008, James Carman wrote:
>> Well, IE actually does refresh the page in certain situations, I've
>> seen.  Firefox doesn't have this problem at least in my experience.
>
> It depends on the cache settings of the browser and the
> relevant headers sent by the page.
>
> Best wishes,
> Timo
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oyhttp://www.ri.fi/ >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-06-26 Thread Timo Rantalaiho
On Thu, 26 Jun 2008, James Carman wrote:
> Well, IE actually does refresh the page in certain situations, I've
> seen.  Firefox doesn't have this problem at least in my experience.

It depends on the cache settings of the browser and the 
relevant headers sent by the page.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-06-26 Thread James Carman
Well, IE actually does refresh the page in certain situations, I've
seen.  Firefox doesn't have this problem at least in my experience.

On Thu, Jun 26, 2008 at 12:00 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> this has nothing to do with versioning. when you press the back button
> in the browser there shouldnt even be a hit to the serverside, the
> browser simply pulls what it thinks the last page is out of its cache.
>
> -igor
>
> On Thu, Jun 26, 2008 at 12:36 AM, Benny Weingarten
> <[EMAIL PROTECTED]> wrote:
>>
>> I am fronting a similar problem. My users don't refresh, they go back and
>> forward using the browser's back and forward buttons.
>>
>> In my wicket application, I have a FeedbackPanel in my page that displays
>> error or success, depending on whether the form submitted successfully or
>> not. My Form is a personal information edit form, in which a user can change
>> information about themselves (such as name, interests, hobbies, etc`..)
>>
>> Lets say a user does the following in the form:
>> 1) changes a hobby, submit the form (success). A success message is
>> idsplayed via the FeedbackPanel
>> 2) blanks the name field, submit the form (failure. In wicket terms, the
>> validation failed on the TexfField Model object, and the Form's onError
>> method was called) an error message displayed via the Feedback Panel
>> 3) changes the name field to a valid name, then submit.  (success). A
>> success message is displayed via the FeedbackPanel
>>
>> At this point, if the user clicks on the browser's back button, I would
>> expect the form to be visible with the erroneous "name" field, and the error
>> message. However, the form is displayed with the value entered at (3),
>> without any error message.
>>
>> User clicks back again and I would expect the form to display the new hobby
>> field, with the success message from (1).  What I see is the same page as
>> after (3), with no feedback message.
>>
>> Its as if once I submit the form, the previous values of the form are not
>> retained. I am calling setVersioned(true) on the form, and according to the
>> docuumentation that should make the form retian previous states, but it
>> doesn't seem to work.
>> Suggestions?
>>
>>
>> SantiagoA wrote:
>>>
>>> feedbackMessages are stored to show them once, aftewards they were
>>> deleted. Perhaps, try to store them in your own List and feed the
>>> FeedbackPanel with the List when the page is displayed again. Maybe this
>>> work, i´m not sure about that. ;-)
>>>
>>> -Santiago
>>>
>>>
>>> Thomas Lutz wrote:
>>>>
>>>> Hi,
>>>>
>>>> First of all, great framework !
>>>>
>>>> I've a form with some validation added, nothing special (Required, Email
>>>> check). When I submit the form I get the validation messages in the
>>>> FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
>>>> the submit removes them (don't ask why refresh after submit... users of
>>>> my webapp do stuff like this :-)).
>>>> The form is not submitted, only redisplayed, but the validation messages
>>>> are missing.
>>>> Is there something I can do about this ?
>>>>
>>>> Thanks in advance,
>>>> Tom
>>>>
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/FeedbackPanel-and-page-refresh-%28f5%29-after-submit-tp14413642p18128149.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-06-26 Thread Igor Vaynberg
this has nothing to do with versioning. when you press the back button
in the browser there shouldnt even be a hit to the serverside, the
browser simply pulls what it thinks the last page is out of its cache.

-igor

On Thu, Jun 26, 2008 at 12:36 AM, Benny Weingarten
<[EMAIL PROTECTED]> wrote:
>
> I am fronting a similar problem. My users don't refresh, they go back and
> forward using the browser's back and forward buttons.
>
> In my wicket application, I have a FeedbackPanel in my page that displays
> error or success, depending on whether the form submitted successfully or
> not. My Form is a personal information edit form, in which a user can change
> information about themselves (such as name, interests, hobbies, etc`..)
>
> Lets say a user does the following in the form:
> 1) changes a hobby, submit the form (success). A success message is
> idsplayed via the FeedbackPanel
> 2) blanks the name field, submit the form (failure. In wicket terms, the
> validation failed on the TexfField Model object, and the Form's onError
> method was called) an error message displayed via the Feedback Panel
> 3) changes the name field to a valid name, then submit.  (success). A
> success message is displayed via the FeedbackPanel
>
> At this point, if the user clicks on the browser's back button, I would
> expect the form to be visible with the erroneous "name" field, and the error
> message. However, the form is displayed with the value entered at (3),
> without any error message.
>
> User clicks back again and I would expect the form to display the new hobby
> field, with the success message from (1).  What I see is the same page as
> after (3), with no feedback message.
>
> Its as if once I submit the form, the previous values of the form are not
> retained. I am calling setVersioned(true) on the form, and according to the
> docuumentation that should make the form retian previous states, but it
> doesn't seem to work.
> Suggestions?
>
>
> SantiagoA wrote:
>>
>> feedbackMessages are stored to show them once, aftewards they were
>> deleted. Perhaps, try to store them in your own List and feed the
>> FeedbackPanel with the List when the page is displayed again. Maybe this
>> work, i´m not sure about that. ;-)
>>
>> -Santiago
>>
>>
>> Thomas Lutz wrote:
>>>
>>> Hi,
>>>
>>> First of all, great framework !
>>>
>>> I've a form with some validation added, nothing special (Required, Email
>>> check). When I submit the form I get the validation messages in the
>>> FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
>>> the submit removes them (don't ask why refresh after submit... users of
>>> my webapp do stuff like this :-)).
>>> The form is not submitted, only redisplayed, but the validation messages
>>> are missing.
>>> Is there something I can do about this ?
>>>
>>> Thanks in advance,
>>> Tom
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/FeedbackPanel-and-page-refresh-%28f5%29-after-submit-tp14413642p18128149.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-06-26 Thread Benny Weingarten

I am fronting a similar problem. My users don't refresh, they go back and
forward using the browser's back and forward buttons.

In my wicket application, I have a FeedbackPanel in my page that displays
error or success, depending on whether the form submitted successfully or
not. My Form is a personal information edit form, in which a user can change
information about themselves (such as name, interests, hobbies, etc`..)

Lets say a user does the following in the form:
1) changes a hobby, submit the form (success). A success message is
idsplayed via the FeedbackPanel
2) blanks the name field, submit the form (failure. In wicket terms, the
validation failed on the TexfField Model object, and the Form's onError
method was called) an error message displayed via the Feedback Panel
3) changes the name field to a valid name, then submit.  (success). A
success message is displayed via the FeedbackPanel

At this point, if the user clicks on the browser's back button, I would
expect the form to be visible with the erroneous "name" field, and the error
message. However, the form is displayed with the value entered at (3),
without any error message.

User clicks back again and I would expect the form to display the new hobby
field, with the success message from (1).  What I see is the same page as
after (3), with no feedback message.

Its as if once I submit the form, the previous values of the form are not
retained. I am calling setVersioned(true) on the form, and according to the
docuumentation that should make the form retian previous states, but it
doesn't seem to work. 
Suggestions?


SantiagoA wrote:
> 
> feedbackMessages are stored to show them once, aftewards they were
> deleted. Perhaps, try to store them in your own List and feed the
> FeedbackPanel with the List when the page is displayed again. Maybe this
> work, i´m not sure about that. ;-)
> 
> -Santiago
> 
> 
> Thomas Lutz wrote:
>> 
>> Hi,
>> 
>> First of all, great framework !
>> 
>> I've a form with some validation added, nothing special (Required, Email 
>> check). When I submit the form I get the validation messages in the 
>> FeedbackPanel as expected, but :-), hitting f5 for a page refresh after 
>> the submit removes them (don't ask why refresh after submit... users of 
>> my webapp do stuff like this :-)).
>> The form is not submitted, only redisplayed, but the validation messages 
>> are missing.
>> Is there something I can do about this ?
>> 
>> Thanks in advance,
>> Tom
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FeedbackPanel-and-page-refresh-%28f5%29-after-submit-tp14413642p18128149.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page refresh

2008-06-10 Thread Igor Vaynberg
right, your problem is : (ID, new Model((Serializable) models) that,
you should use a detachable model. if i were you i would read the
models page on the wiki.

-igor

On Tue, Jun 10, 2008 at 10:31 AM, Ricky <[EMAIL PROTECTED]> wrote:
> I just do a simple DB search to get the list of models. (calling business
> tier --> to hibernate).
>
> and then : * new RefreshingView(ID, MODELs){ };*
>
> I tried, changing above to : *new RefreshingView(ID, new Model(
> (Serializable) models) { };
> *But to no effect. =(
> *
> Rick.
> *
> On Tue, Jun 10, 2008 at 11:13 AM, Igor Vaynberg <[EMAIL PROTECTED]>
> wrote:
>
>> you dont actually show how you feed data to these dataviews. my guess
>> is that you cache the data you feed them and that is why it doesnt
>> refresh.
>>
>> -igor
>>
>> On Tue, Jun 10, 2008 at 6:41 AM, Ricky <[EMAIL PROTECTED]> wrote:
>> > Ok, I have tried to keep it as simple as possible, hopefully this should
>> > give enough details to know as to what is happening:
>> >
>> > //  Page Code here ///
>> > public ReviewPlanPage(final PageParameters pageParameters) {
>> >// get MODEL from session, code removed for clarity.
>> >setModel(new Model((MODELfromSession)));
>> >final Form sectionAForm = new
>> > Form("form-review-plan-page-section-a");
>> >sectionAForm.add(new
>> > SectionAPanel("panel-review-plan-page-section-a", MODEL));
>> >add(sectionAForm);
>> >final Form behaviorsForm = new Form("form-behavior-standards-b");
>> >behaviorsForm.add(new SectionBPanel("panel-behaviors-section-b",
>> > MODEL));
>> >add(behaviorsForm);
>> >}
>> >
>> >public final boolean isVersioned() {
>> >return true;
>> >}
>> >
>> >// Panel Code here ///
>> >// Panel A Code
>> >public SectionAPanel(final PageParameters pageParameters){
>> >super(id);
>> >setOutputMarkupId(true);
>> >addDataView(reviewPlan);
>> >// add buttons here.
>> >}
>> >
>> >// add data view code :
>> >addPerspectiveDataView(createPerspectiveDataView(BACKINGModelList));
>> >// in create Perspective Data View I have another refreshing view
>> >createNestedDataView(NestedBackingModelListForPerspective);
>> >
>> >
>> > Thanks
>> > Rick
>> >
>> > On Mon, Jun 9, 2008 at 8:20 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> >> paste your code
>> >>
>> >> -igor
>> >>
>> >> On Mon, Jun 9, 2008 at 3:34 PM, Ricky <[EMAIL PROTECTED]> wrote:
>> >> > Hi,
>> >> >
>> >> > My page class consists of :
>> >> > 1.) Panel -A  2.) Panel - B.
>> >> >
>> >> > Just for FYI - Panel A has Refreshing View and a refreshing view
>> nested
>> >> > within it (nested tables).
>> >> >
>> >> > When I do a refresh (F5 or simple refresh clicked on browser) on a
>> page,
>> >> and
>> >> > nothing seems to happen and all data that was present is lost in
>> process.
>> >> > Nothing seems to happen as in:
>> >> > 1.) No query is executed (it is expected to do thing that it was doing
>> at
>> >> > the time of clicking the link to the page).
>> >> > 2.) I put in debug points on the page constructor, refreshing views in
>> >> the
>> >> > panel, panel constructor, but it doesn't go anywhere.
>> >> > 3.) The page version doesn't seem to be changing either?! (it does
>> show
>> >> > everything normally when i click the link to the page again).
>> >> >
>> >> > I am overriding isVersioned( ) on the page to return true but to no
>> >> effect;
>> >> > ( I checked, all children components are getting isVersioned with the
>> >> same).
>> >> > I tried isVersioned to false (just to see if something else happens :)
>> ),
>> >> > but no change ...
>> >> > (the versionManager behaves as it should, meaning, when the page
>> returns
>> >> > false, it is not added to the version manager).
>> >> >
>> >> > Am i missing something!!? any help would be appreciable.
>> >> >
>> >> > Thanks
>> >> > Rick
>> >> >
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page refresh

2008-06-10 Thread Ricky
I just do a simple DB search to get the list of models. (calling business
tier --> to hibernate).

and then : * new RefreshingView(ID, MODELs){ };*

I tried, changing above to : *new RefreshingView(ID, new Model(
(Serializable) models) { };
*But to no effect. =(
*
Rick.
*
On Tue, Jun 10, 2008 at 11:13 AM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> you dont actually show how you feed data to these dataviews. my guess
> is that you cache the data you feed them and that is why it doesnt
> refresh.
>
> -igor
>
> On Tue, Jun 10, 2008 at 6:41 AM, Ricky <[EMAIL PROTECTED]> wrote:
> > Ok, I have tried to keep it as simple as possible, hopefully this should
> > give enough details to know as to what is happening:
> >
> > //  Page Code here ///
> > public ReviewPlanPage(final PageParameters pageParameters) {
> >// get MODEL from session, code removed for clarity.
> >setModel(new Model((MODELfromSession)));
> >final Form sectionAForm = new
> > Form("form-review-plan-page-section-a");
> >sectionAForm.add(new
> > SectionAPanel("panel-review-plan-page-section-a", MODEL));
> >add(sectionAForm);
> >final Form behaviorsForm = new Form("form-behavior-standards-b");
> >behaviorsForm.add(new SectionBPanel("panel-behaviors-section-b",
> > MODEL));
> >add(behaviorsForm);
> >}
> >
> >public final boolean isVersioned() {
> >return true;
> >}
> >
> >// Panel Code here ///
> >// Panel A Code
> >public SectionAPanel(final PageParameters pageParameters){
> >super(id);
> >setOutputMarkupId(true);
> >addDataView(reviewPlan);
> >// add buttons here.
> >}
> >
> >// add data view code :
> >addPerspectiveDataView(createPerspectiveDataView(BACKINGModelList));
> >// in create Perspective Data View I have another refreshing view
> >createNestedDataView(NestedBackingModelListForPerspective);
> >
> >
> > Thanks
> > Rick
> >
> > On Mon, Jun 9, 2008 at 8:20 PM, Igor Vaynberg <[EMAIL PROTECTED]>
> > wrote:
> >
> >> paste your code
> >>
> >> -igor
> >>
> >> On Mon, Jun 9, 2008 at 3:34 PM, Ricky <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >> >
> >> > My page class consists of :
> >> > 1.) Panel -A  2.) Panel - B.
> >> >
> >> > Just for FYI - Panel A has Refreshing View and a refreshing view
> nested
> >> > within it (nested tables).
> >> >
> >> > When I do a refresh (F5 or simple refresh clicked on browser) on a
> page,
> >> and
> >> > nothing seems to happen and all data that was present is lost in
> process.
> >> > Nothing seems to happen as in:
> >> > 1.) No query is executed (it is expected to do thing that it was doing
> at
> >> > the time of clicking the link to the page).
> >> > 2.) I put in debug points on the page constructor, refreshing views in
> >> the
> >> > panel, panel constructor, but it doesn't go anywhere.
> >> > 3.) The page version doesn't seem to be changing either?! (it does
> show
> >> > everything normally when i click the link to the page again).
> >> >
> >> > I am overriding isVersioned( ) on the page to return true but to no
> >> effect;
> >> > ( I checked, all children components are getting isVersioned with the
> >> same).
> >> > I tried isVersioned to false (just to see if something else happens :)
> ),
> >> > but no change ...
> >> > (the versionManager behaves as it should, meaning, when the page
> returns
> >> > false, it is not added to the version manager).
> >> >
> >> > Am i missing something!!? any help would be appreciable.
> >> >
> >> > Thanks
> >> > Rick
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Page refresh

2008-06-10 Thread Igor Vaynberg
you dont actually show how you feed data to these dataviews. my guess
is that you cache the data you feed them and that is why it doesnt
refresh.

-igor

On Tue, Jun 10, 2008 at 6:41 AM, Ricky <[EMAIL PROTECTED]> wrote:
> Ok, I have tried to keep it as simple as possible, hopefully this should
> give enough details to know as to what is happening:
>
> //  Page Code here ///
> public ReviewPlanPage(final PageParameters pageParameters) {
>// get MODEL from session, code removed for clarity.
>setModel(new Model((MODELfromSession)));
>final Form sectionAForm = new
> Form("form-review-plan-page-section-a");
>sectionAForm.add(new
> SectionAPanel("panel-review-plan-page-section-a", MODEL));
>add(sectionAForm);
>final Form behaviorsForm = new Form("form-behavior-standards-b");
>behaviorsForm.add(new SectionBPanel("panel-behaviors-section-b",
> MODEL));
>add(behaviorsForm);
>}
>
>public final boolean isVersioned() {
>return true;
>}
>
>// Panel Code here ///
>// Panel A Code
>public SectionAPanel(final PageParameters pageParameters){
>super(id);
>setOutputMarkupId(true);
>addDataView(reviewPlan);
>// add buttons here.
>}
>
>// add data view code :
>addPerspectiveDataView(createPerspectiveDataView(BACKINGModelList));
>// in create Perspective Data View I have another refreshing view
>createNestedDataView(NestedBackingModelListForPerspective);
>
>
> Thanks
> Rick
>
> On Mon, Jun 9, 2008 at 8:20 PM, Igor Vaynberg <[EMAIL PROTECTED]>
> wrote:
>
>> paste your code
>>
>> -igor
>>
>> On Mon, Jun 9, 2008 at 3:34 PM, Ricky <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> >
>> > My page class consists of :
>> > 1.) Panel -A  2.) Panel - B.
>> >
>> > Just for FYI - Panel A has Refreshing View and a refreshing view nested
>> > within it (nested tables).
>> >
>> > When I do a refresh (F5 or simple refresh clicked on browser) on a page,
>> and
>> > nothing seems to happen and all data that was present is lost in process.
>> > Nothing seems to happen as in:
>> > 1.) No query is executed (it is expected to do thing that it was doing at
>> > the time of clicking the link to the page).
>> > 2.) I put in debug points on the page constructor, refreshing views in
>> the
>> > panel, panel constructor, but it doesn't go anywhere.
>> > 3.) The page version doesn't seem to be changing either?! (it does show
>> > everything normally when i click the link to the page again).
>> >
>> > I am overriding isVersioned( ) on the page to return true but to no
>> effect;
>> > ( I checked, all children components are getting isVersioned with the
>> same).
>> > I tried isVersioned to false (just to see if something else happens :) ),
>> > but no change ...
>> > (the versionManager behaves as it should, meaning, when the page returns
>> > false, it is not added to the version manager).
>> >
>> > Am i missing something!!? any help would be appreciable.
>> >
>> > Thanks
>> > Rick
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page refresh

2008-06-10 Thread Ricky
Ok, I have tried to keep it as simple as possible, hopefully this should
give enough details to know as to what is happening:

//  Page Code here ///
public ReviewPlanPage(final PageParameters pageParameters) {
// get MODEL from session, code removed for clarity.
setModel(new Model((MODELfromSession)));
final Form sectionAForm = new
Form("form-review-plan-page-section-a");
sectionAForm.add(new
SectionAPanel("panel-review-plan-page-section-a", MODEL));
add(sectionAForm);
final Form behaviorsForm = new Form("form-behavior-standards-b");
behaviorsForm.add(new SectionBPanel("panel-behaviors-section-b",
MODEL));
add(behaviorsForm);
}

public final boolean isVersioned() {
return true;
}

// Panel Code here ///
// Panel A Code
public SectionAPanel(final PageParameters pageParameters){
super(id);
setOutputMarkupId(true);
addDataView(reviewPlan);
// add buttons here.
}

// add data view code :
addPerspectiveDataView(createPerspectiveDataView(BACKINGModelList));
// in create Perspective Data View I have another refreshing view
createNestedDataView(NestedBackingModelListForPerspective);


Thanks
Rick

On Mon, Jun 9, 2008 at 8:20 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> paste your code
>
> -igor
>
> On Mon, Jun 9, 2008 at 3:34 PM, Ricky <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > My page class consists of :
> > 1.) Panel -A  2.) Panel - B.
> >
> > Just for FYI - Panel A has Refreshing View and a refreshing view nested
> > within it (nested tables).
> >
> > When I do a refresh (F5 or simple refresh clicked on browser) on a page,
> and
> > nothing seems to happen and all data that was present is lost in process.
> > Nothing seems to happen as in:
> > 1.) No query is executed (it is expected to do thing that it was doing at
> > the time of clicking the link to the page).
> > 2.) I put in debug points on the page constructor, refreshing views in
> the
> > panel, panel constructor, but it doesn't go anywhere.
> > 3.) The page version doesn't seem to be changing either?! (it does show
> > everything normally when i click the link to the page again).
> >
> > I am overriding isVersioned( ) on the page to return true but to no
> effect;
> > ( I checked, all children components are getting isVersioned with the
> same).
> > I tried isVersioned to false (just to see if something else happens :) ),
> > but no change ...
> > (the versionManager behaves as it should, meaning, when the page returns
> > false, it is not added to the version manager).
> >
> > Am i missing something!!? any help would be appreciable.
> >
> > Thanks
> > Rick
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Page refresh

2008-06-09 Thread Igor Vaynberg
paste your code

-igor

On Mon, Jun 9, 2008 at 3:34 PM, Ricky <[EMAIL PROTECTED]> wrote:
> Hi,
>
> My page class consists of :
> 1.) Panel -A  2.) Panel - B.
>
> Just for FYI - Panel A has Refreshing View and a refreshing view nested
> within it (nested tables).
>
> When I do a refresh (F5 or simple refresh clicked on browser) on a page, and
> nothing seems to happen and all data that was present is lost in process.
> Nothing seems to happen as in:
> 1.) No query is executed (it is expected to do thing that it was doing at
> the time of clicking the link to the page).
> 2.) I put in debug points on the page constructor, refreshing views in the
> panel, panel constructor, but it doesn't go anywhere.
> 3.) The page version doesn't seem to be changing either?! (it does show
> everything normally when i click the link to the page again).
>
> I am overriding isVersioned( ) on the page to return true but to no effect;
> ( I checked, all children components are getting isVersioned with the same).
> I tried isVersioned to false (just to see if something else happens :) ),
> but no change ...
> (the versionManager behaves as it should, meaning, when the page returns
> false, it is not added to the version manager).
>
> Am i missing something!!? any help would be appreciable.
>
> Thanks
> Rick
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >