PageParameters in 1.5: a sanity check request

2011-11-23 Thread Ian Marshall
I have ported my app from 1.4.18 to 1.5.1 (I haven't used 1.5.3 yet).

As part of my porting, I had to adjust the use of page parameters. I would
like to mention my changes for parameter extraction and existence
determination below, in case someone can mention a cleaner way to do these
things...

  import org.apache.wicket.util.string.StringValue;

Replace

  if (params.containsKey([Param name]))
  {
String sValue = params.getString([Param name]);
...
  }

with

  ListStringValue liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
  {
StringValue svValue = liSVs.get(0);
String sValue = svValue.toOptionalString();
...
  }

and replace

  String sUserName = params.getString([Key name], [Empty default string]);
  if (!sUserName.isEmpty())
...

with

  ListStringValue liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageParameters-in-1-5-a-sanity-check-request-tp4099136p4099136.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: PageParameters in 1.5: a sanity check request

2011-11-23 Thread vineet semwal
ListStringValue liSVs = params.getValues([Param name]);
 if ((liSVs != null)  !liSVs.isEmpty())
 {
   StringValue svValue = liSVs.get(0);
   String sValue = svValue.toOptionalString();
   ...
 }

 you can just do
 if(params.getNamedKeys().contains(parameter_name))
{
 String svValue  =  params.get(parameter_name)
  String sValue  = svValue.toOptionalString();
 if(!Strings.isEmpty(sValue)){
--your code--
}
}

On Wed, Nov 23, 2011 at 4:06 PM, Ian Marshall ianmarshall...@gmail.com wrote:
 I have ported my app from 1.4.18 to 1.5.1 (I haven't used 1.5.3 yet).

 As part of my porting, I had to adjust the use of page parameters. I would
 like to mention my changes for parameter extraction and existence
 determination below, in case someone can mention a cleaner way to do these
 things...

  import org.apache.wicket.util.string.StringValue;

 Replace

  if (params.containsKey([Param name]))
  {
    String sValue = params.getString([Param name]);
    ...
  }

 with

  ListStringValue liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
  {
    StringValue svValue = liSVs.get(0);
    String sValue = svValue.toOptionalString();
    ...
  }

 and replace

  String sUserName = params.getString([Key name], [Empty default string]);
  if (!sUserName.isEmpty())
    ...

 with

  ListStringValue liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
    ...

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/PageParameters-in-1-5-a-sanity-check-request-tp4099136p4099136.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





-- 
thank you,

regards,
Vineet Semwal

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



Re: PageParameters in 1.5: a sanity check request

2011-11-23 Thread Matthias Keller

Hi

And you can even leave away the

if(params.getNamedKeys().contains(parameter_name))

and just do:

StringValue param = params.get(param); // or use an index if you wish
if (!param.isEmpty()) {
... param.toString() ...
}

Matt

On 2011-11-23 12:17, vineet semwal wrote:

ListStringValue  liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
  {
StringValue svValue = liSVs.get(0);
String sValue = svValue.toOptionalString();
...
  }

  you can just do
  if(params.getNamedKeys().contains(parameter_name))
{
  String svValue  =  params.get(parameter_name)
   String sValue  = svValue.toOptionalString();
  if(!Strings.isEmpty(sValue)){
--your code--
}
}

On Wed, Nov 23, 2011 at 4:06 PM, Ian Marshallianmarshall...@gmail.com  wrote:

I have ported my app from 1.4.18 to 1.5.1 (I haven't used 1.5.3 yet).

As part of my porting, I had to adjust the use of page parameters. I would
like to mention my changes for parameter extraction and existence
determination below, in case someone can mention a cleaner way to do these
things...

  import org.apache.wicket.util.string.StringValue;

Replace

  if (params.containsKey([Param name]))
  {
String sValue = params.getString([Param name]);
...
  }

with

  ListStringValue  liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
  {
StringValue svValue = liSVs.get(0);
String sValue = svValue.toOptionalString();
...
  }

and replace

  String sUserName = params.getString([Key name], [Empty default string]);
  if (!sUserName.isEmpty())
...

with

  ListStringValue  liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
...





smime.p7s
Description: S/MIME Cryptographic Signature


There are problems with object wicket:id=report width=350 height=100/

2011-11-23 Thread andreyich
If somebody could help me!? It is about showing jasper report in some page!

I have a simple page where only 1 tag
HTML
html xmlns:wicket=http://wicket.sourceforge.net/;
head
titletest/title
/head
body
 
/body
/html

JAVA
It is in page constructor
final Map parameters = new HashMap();
JRResource pdfResource = new
JRPdfResource(reportService.getReportSource().getFile());
EmbeddedJRReport jrReport = new EmbeddedJRReport (report1, pdfResource) ;
add(jrReport);

When I want to go on this page I am getting the error
Caused by:

java.lang.NoSuchMethodError:
wicket.contrib.jasperreports.EmbeddedJRReport.getResponse()Lorg/apache/wicket/Response;
at
wicket.contrib.jasperreports.EmbeddedJRReport.onComponentTag(EmbeddedJRReport.java:71)
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2488)
at
org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:56)
at org.apache.wicket.Component.internalRender(Component.java:2347)
at org.apache.wicket.Component.render(Component.java:2275)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1474)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1638)
at org.apache.wicket.Page.onRender(Page.java:904)
at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:140)
at org.apache.wicket.Component.internalRender(Component.java:2347)
at org.apache.wicket.Component.render(Component.java:2275)
at org.apache.wicket.Page.renderPage(Page.java:1035)


Problem in the method onComponentTag of EmbeddedJRReport component in line
tag.put(data,
getResponse().encodeURL(urlFor(IResourceListener.INTERFACE)));

What is it! Help please!

Andrey

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/There-are-problems-with-object-wicket-id-report-width-350-height-100-tp4099376p4099376.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: Button with 3 images and issues

2011-11-23 Thread D0m3
I did some more research, and I found out how to solve my second problem.
I  have extended AjaxButton and overriden onComponentTagBody.



Simple actually, but difficult to find out that I could use this method when
I have never used it.

About the disable part, I think I will override the setEnable method.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Button-with-3-images-and-issues-tp4082830p4099458.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: PageParameters in 1.5: a sanity check request

2011-11-23 Thread vineet semwal
ha yes just checked out the source ,thanks :)

On Wed, Nov 23, 2011 at 5:46 PM, Matthias Keller
matthias.kel...@ergon.ch wrote:
 Hi

 And you can even leave away the

 if(params.getNamedKeys().contains(parameter_name))

 and just do:

 StringValue param = params.get(param); // or use an index if you wish
 if (!param.isEmpty()) {
    ... param.toString() ...
 }

 Matt

 On 2011-11-23 12:17, vineet semwal wrote:

 ListStringValue  liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
  {
    StringValue svValue = liSVs.get(0);
    String sValue = svValue.toOptionalString();
    ...
  }

  you can just do
  if(params.getNamedKeys().contains(parameter_name))
 {
  String svValue  =  params.get(parameter_name)
   String sValue  = svValue.toOptionalString();
  if(!Strings.isEmpty(sValue)){
 --your code--
 }
 }

 On Wed, Nov 23, 2011 at 4:06 PM, Ian Marshallianmarshall...@gmail.com
  wrote:

 I have ported my app from 1.4.18 to 1.5.1 (I haven't used 1.5.3 yet).

 As part of my porting, I had to adjust the use of page parameters. I
 would
 like to mention my changes for parameter extraction and existence
 determination below, in case someone can mention a cleaner way to do
 these
 things...

  import org.apache.wicket.util.string.StringValue;

 Replace

  if (params.containsKey([Param name]))
  {
    String sValue = params.getString([Param name]);
    ...
  }

 with

  ListStringValue  liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
  {
    StringValue svValue = liSVs.get(0);
    String sValue = svValue.toOptionalString();
    ...
  }

 and replace

  String sUserName = params.getString([Key name], [Empty default string]);
  if (!sUserName.isEmpty())
    ...

 with

  ListStringValue  liSVs = params.getValues([Param name]);
  if ((liSVs != null)  !liSVs.isEmpty())
    ...






-- 
thank you,

regards,
Vineet Semwal

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



Re: Ajax busy indicator getting stuck

2011-11-23 Thread Nazaret Kazarian
Created WICKET-4257 with quickstart.



2011/11/19 Igor Vaynberg igor.vaynb...@gmail.com:
 that might work.

 -igor

 On Fri, Nov 18, 2011 at 1:45 PM, Nazaret Kazarian
 nazaret.kazar...@gmail.com wrote:
 Yep, I will create a quickstart and create a jira.

 If it turns out to be a bug, until it gets solved, I am thinking of
 showing / hiding the busy indicator using js pre/post call handlers.
 And maybe also use the following code as a condition in post call
 handler to hide the indicator:

        wicketAjaxBusy: function() {
            for (var c in Wicket.channelManager.channels) {
                if (Wicket.channelManager.channels[c].busy) {
                    return true;
                }
            }
            return false;
        }

 Do you think that's a good idea?


 2011/11/18 Igor Vaynberg igor.vaynb...@gmail.com:
 quickstart, jira?

 -igor

 On Fri, Nov 18, 2011 at 1:20 PM, Nazaret Kazarian
 nazaret.kazar...@gmail.com wrote:
 That sounds reasonable. According to the scenario I described above,
 the indicator will always get stuck if you use channel type Drop and
 issue an ajax request on a busy channel.



 2011/11/18 coincoinfou olivierandr...@gmail.com:
 Same problem with IndicatingAjaxLink when I switch to 
 AjaxChannel.Type.DROP

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-busy-indicator-getting-stuck-tp4082837p4083026.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



 -
 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



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



Re: PageParameters in 1.5: a sanity check request

2011-11-23 Thread Ian Marshall
Thanks for your comments, Guys.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageParameters-in-1-5-a-sanity-check-request-tp4099136p4099956.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



WiQuery vs JQWicket

2011-11-23 Thread Brian Mulholland
We are considering WiQuery and JQWicket.

1) Which is better and why?
2) Is one more established or better supported than the other?
3) Is one more full featured?

What differentiates the two?

Brian Mulholland

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



Bookmark link

2011-11-23 Thread ridaa
Hiii all,
Please help me out.

I have got struck with a scenario where i need to open a link(on 1st page)
in a new window(2nd page) where say a label is displayed.I will add this
link to my browser favorites and close that window.
Now if i open browser and click the link in favorites my 2nd page should
appear.
For this i have used the below code:

html:
form wicket:id=form
 # 
/form

java:
Form form=new Form(form);
add(form);
form.add(new BookmarkablePageLink(link,NewPage.class));
here NewPage.class would contain a label.

Here comes the twist..I wana use a login page ,which after entry would show
2 links say linkA  lnkB.I click on linkA and add this to favourites.
Now as usual the LinkA page would open if i go from favoritesbut i wana
route this page through the login page..To be more clear when i go to
favorites and clik on the LinkA it should show login page fst and then the
LinkA page.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bookmark-link-tp4100123p4100123.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: WiQuery vs JQWicket

2011-11-23 Thread Pointbreak
I've never used either framework, but your question made me curious
again. (Years ago I evaluated the existing wicket-jquery integrations
and wasn't happy with how they were designed. Since than I've always
just used jquery inside wicket, it's not that hard for simple designs,
and for complex designs these frameworks may be just to rigid). That
being said I just had a quick glance at the projects again and it seems
that WiQuery does the integration via Components (i.e. you create an
Accordion Component), while JqWicket does the integration via Bahaviors
(i.e. you add an AccordionBehavior to an existing Component, e.g. a
ListView). The latter (thus using Behaviors) is how I have always done
it, feels more natural to me, and is a lot more flexible.

On Wednesday, November 23, 2011 10:16 AM, Brian Mulholland
blmulholl...@gmail.com wrote:
 We are considering WiQuery and JQWicket.
 
 1) Which is better and why?
 2) Is one more established or better supported than the other?
 3) Is one more full featured?
 
 What differentiates the two?
 
 Brian Mulholland
 
 -
 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



AW: Bookmark link

2011-11-23 Thread Matthias Braun
Hi,

maybe an intercept page is what you're looking for:
https://cwiki.apache.org/WICKET/using-intercept-pages.html

Another good way to do this is using a custom implementation of 
IAuthorizationStrategy:
http://spatula.net/blog/2006/11/adding-generic-authorization-to-wicket.html

Regards
Matthias


-Ursprüngliche Nachricht-
Von: ridaa [mailto:ridaa...@yahoo.com] 
Gesendet: Mittwoch, 23. November 2011 16:51
An: users@wicket.apache.org
Betreff: Bookmark link

Hiii all,
Please help me out.

I have got struck with a scenario where i need to open a link(on 1st page)
in a new window(2nd page) where say a label is displayed.I will add this
link to my browser favorites and close that window.
Now if i open browser and click the link in favorites my 2nd page should
appear.
For this i have used the below code:

html:
form wicket:id=form
 # 
/form

java:
Form form=new Form(form);
add(form);
form.add(new BookmarkablePageLink(link,NewPage.class));
here NewPage.class would contain a label.

Here comes the twist..I wana use a login page ,which after entry would show
2 links say linkA  lnkB.I click on linkA and add this to favourites.
Now as usual the LinkA page would open if i go from favoritesbut i wana
route this page through the login page..To be more clear when i go to
favorites and clik on the LinkA it should show login page fst and then the
LinkA page.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bookmark-link-tp4100123p4100123.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 wicket: 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



Fireing jQuery script after closing modal Window but in certain situations

2011-11-23 Thread jasp
Hello there,

I have some serious problem with modal window and it's simply driving me
crazy :)
Lets start from the beginning. I have a page with a button. After clicking
it user gets a modal window with some basic form to edit his data. Part of
code looks like this:

HTML:


JAVA:

To explain: PlainModalWindow is class that extends ModalWindow and has some
my own css/js files rendered in head, that's all.

Now my created page via method createPage() contains 3 different clickable
buttons: Submit, Cancel and an X in upper right corner to close modal.

Now when user click Cancel and X, they do same thing, clear inputs and close
modal with method close( AjaxRequestTarget ). They look something like this:

And then there is a Submit button which after validation saves user data and
close modal as well, nothing fancy there. The probles starts here: I'm
setting a WindowClosesCallback with javascript appended to
AjaxRequestTarget. It works great, when I close modal with submit or cancel,
script is fired on parent site. But I want the script to be fired ONLY when
user hits the submit button. I cant override setWindowClosedCallback() in
onSubmit() method of AjaxSubmitLinks and I simply ran out of ideas how to do
it, any help?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Fireing-jQuery-script-after-closing-modal-Window-but-in-certain-situations-tp4099505p4099505.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: WiQuery vs JQWicket

2011-11-23 Thread Brian Mulholland
As I am looking at them, I am not noticing either implementing the
jQuery grid, much less the paging scrollbar.  Am I overlooking it?

Brian Mulholland


On Wed, Nov 23, 2011 at 10:56 AM, Pointbreak
pointbreak+wicketst...@ml1.net wrote:
 I've never used either framework, but your question made me curious
 again. (Years ago I evaluated the existing wicket-jquery integrations
 and wasn't happy with how they were designed. Since than I've always
 just used jquery inside wicket, it's not that hard for simple designs,
 and for complex designs these frameworks may be just to rigid). That
 being said I just had a quick glance at the projects again and it seems
 that WiQuery does the integration via Components (i.e. you create an
 Accordion Component), while JqWicket does the integration via Bahaviors
 (i.e. you add an AccordionBehavior to an existing Component, e.g. a
 ListView). The latter (thus using Behaviors) is how I have always done
 it, feels more natural to me, and is a lot more flexible.

 On Wednesday, November 23, 2011 10:16 AM, Brian Mulholland
 blmulholl...@gmail.com wrote:
 We are considering WiQuery and JQWicket.

 1) Which is better and why?
 2) Is one more established or better supported than the other?
 3) Is one more full featured?

 What differentiates the two?

 Brian Mulholland

 -
 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: What's replaced org.apache.wicket.request.target.basic.URIRequestTargetUrlCodingStrategy in 1.5?

2011-11-23 Thread erac
Thanks for the pointer to using request mappers and the continuing updates to
WicketInAction which are very useful.

After some more work I've then solved my next problem of returning an 'on
the fly' XML response using extended ResourceReference  ByteArrayResource
classes. This is also very different to the solution in 1.4 where I overrode
URIRequestTargetUrlCodingStrategy.decode() returning a new
ResourceStreamRequestTarget.

Can you suggest a way of understanding the relationships of these many
classes and the best way of  choosing a solution? I apologise for such an
open question but at the moment I seem to spend a long time Googling until I
get a hint of a way forward.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/What-s-replaced-org-apache-wicket-request-target-basic-URIRequestTargetUrlCodingStrategy-in-1-5-tp4091780p4100321.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: What's replaced org.apache.wicket.request.target.basic.URIRequestTargetUrlCodingStrategy in 1.5?

2011-11-23 Thread Martin Grigorov
Hi,

On Wed, Nov 23, 2011 at 6:30 PM, erac rich...@octaveassociates.co.uk wrote:
 Thanks for the pointer to using request mappers and the continuing updates to
 WicketInAction which are very useful.

 After some more work I've then solved my next problem of returning an 'on
 the fly' XML response using extended ResourceReference  ByteArrayResource
 classes. This is also very different to the solution in 1.4 where I overrode
 URIRequestTargetUrlCodingStrategy.decode() returning a new
 ResourceStreamRequestTarget.

 Can you suggest a way of understanding the relationships of these many
 classes and the best way of  choosing a solution? I apologise for such an
 open question but at the moment I seem to spend a long time Googling until I
 get a hint of a way forward.

The migration page is the documentation we only have...
Please start a new thread(s) with specific question(s) about your
application needs and we will see how to approach them the best way.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/What-s-replaced-org-apache-wicket-request-target-basic-URIRequestTargetUrlCodingStrategy-in-1-5-tp4091780p4100321.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: Page serialization problem with wicket 1.5?

2011-11-23 Thread Martin Grigorov
See https://issues.apache.org/jira/browse/WICKET-3751 and
https://issues.apache.org/jira/browse/WICKET-3809

On Wed, Nov 23, 2011 at 1:42 AM, Gabriel Landon glan...@piti.pf wrote:
 Hi,

 There seems to have page data that are not correctly unserialized with
 wicket 1.5.x.

 I have done a quickstart application to show you the problem with a
 ModalWindow using a page (not a panel) :
 http://apache-wicket.1842946.n4.nabble.com/file/n4097909/myproject.zip
 myproject.zip

 How to reproduce the problem :
 1- start the application (mvn jetty:run)
 2- open your browser : http://localhost:8080/
 3- Click on click me  a couple of time (optional!)
 4- Enter the label field then submit. You should see submit ok in the
 feedback panel.
 5- Click the open modal link
 6- Enter the description field and submit.
 7- The model is serialized with all the data and next when the data are
 unserialized, the description data is lost.

 Here's the log :

using the click me link!
 INFO  - HomePage - Serialized [Page class = com.mycompany.HomePage, id = 0,
 render count = 1], bean = com.mycompany.bean.MyBean@6da05bdb - nbClick = 0 -
 label null - desc null
 INFO  - HomePage - Serialized [Page class = com.mycompany.HomePage, id = 0,
 render count = 1], bean = com.mycompany.bean.MyBean@6da05bdb - nbClick = 1 -
 label null - desc null
 INFO  - HomePage   - Serialized [Page class = com.mycompany.HomePage, id =
 0, render count = 1], bean = com.mycompany.bean.MyBean@6da05bdb - nbClick =
 2 - label null - desc null

Submit form with the label field
 INFO  - HomePage   - Serialized [Page class = com.mycompany.HomePage, id =
 0, render count = 1], bean = com.mycompany.bean.MyBean@6da05bdb - nbClick =
 2 - label ddd - desc null

 submit modal with the description field
 INFO  - HomePage   - *Serialized *[Page class = com.mycompany.HomePage, id =
 0, render count = 1], bean = com.mycompany.bean.MyBean@6da05bdb - nbClick =
 2 - label ddd - *desc fdfdfd*
 INFO  - HomePage   - *unSerialized *[Page class = com.mycompany.HomePage, id
 = 0, render count = 1], bean = com.mycompany.bean.MyBean@7d98d9cf - nbClick
 = 2 - label ddd - *desc null*
 INFO  - HomePage     - Serialized [Page class = com.mycompany.HomePage, id =
 0, render count = 1], bean = com.mycompany.bean.MyBean@7d98d9cf - nbClick =
 2 - label ddd - desc null
 desc has been set to null


 With wicket 1.4.x it's working just fine (there's a pom.xml.wicket.1.4 in
 the project if you want to try) : there is no page that is unserialized.

 If I use a panel instead of a page in the modal window, it's working just
 fine. So I guess it has something to do with multi-window/multi-page
 handling...

 Is there a new option to turn on with wicket 1.5 to have it works like in
 wicket 1.4?

 Regards,

 Gabriel.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Page-serialization-problem-with-wicket-1-5-tp4097909p4097909.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: There are problems with object wicket:id=report width=350 height=100/

2011-11-23 Thread Igor Vaynberg
you are using incompatible versions of wicket.contrib.jasper and
wicket itself, make sure they are both either 1.4.x or 1.5.x

-igor

On Wed, Nov 23, 2011 at 4:16 AM, andreyich andrey...@mail.ru wrote:
 If somebody could help me!? It is about showing jasper report in some page!

 I have a simple page where only 1 tag
 HTML
 html xmlns:wicket=http://wicket.sourceforge.net/;
 head
    titletest/title
 /head
 body

 /body
 /html

 JAVA
 It is in page constructor
 final Map parameters = new HashMap();
 JRResource pdfResource = new
 JRPdfResource(reportService.getReportSource().getFile());
 EmbeddedJRReport jrReport = new EmbeddedJRReport (report1, pdfResource) ;
 add(jrReport);

 When I want to go on this page I am getting the error
 Caused by:

 java.lang.NoSuchMethodError:
 wicket.contrib.jasperreports.EmbeddedJRReport.getResponse()Lorg/apache/wicket/Response;
        at
 wicket.contrib.jasperreports.EmbeddedJRReport.onComponentTag(EmbeddedJRReport.java:71)
        at 
 org.apache.wicket.Component.internalRenderComponent(Component.java:2488)
        at
 org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:56)
        at org.apache.wicket.Component.internalRender(Component.java:2347)
        at org.apache.wicket.Component.render(Component.java:2275)
        at 
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1474)
        at 
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1638)
        at org.apache.wicket.Page.onRender(Page.java:904)
        at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:140)
        at org.apache.wicket.Component.internalRender(Component.java:2347)
        at org.apache.wicket.Component.render(Component.java:2275)
        at org.apache.wicket.Page.renderPage(Page.java:1035)


 Problem in the method onComponentTag of EmbeddedJRReport component in line
 tag.put(data,
 getResponse().encodeURL(urlFor(IResourceListener.INTERFACE)));

 What is it! Help please!

 Andrey

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/There-are-problems-with-object-wicket-id-report-width-350-height-100-tp4099376p4099376.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: 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
vaghelaprad...@gmail.com 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 wicket: 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



Re: Fireing jQuery script after closing modal Window but in certain situations

2011-11-23 Thread Igor Vaynberg
your html and java got stripped..

-igor

On Wed, Nov 23, 2011 at 5:08 AM, jasp kamilszoka...@gmail.com wrote:
 Hello there,

 I have some serious problem with modal window and it's simply driving me
 crazy :)
 Lets start from the beginning. I have a page with a button. After clicking
 it user gets a modal window with some basic form to edit his data. Part of
 code looks like this:

 HTML:


 JAVA:

 To explain: PlainModalWindow is class that extends ModalWindow and has some
 my own css/js files rendered in head, that's all.

 Now my created page via method createPage() contains 3 different clickable
 buttons: Submit, Cancel and an X in upper right corner to close modal.

 Now when user click Cancel and X, they do same thing, clear inputs and close
 modal with method close( AjaxRequestTarget ). They look something like this:

 And then there is a Submit button which after validation saves user data and
 close modal as well, nothing fancy there. The probles starts here: I'm
 setting a WindowClosesCallback with javascript appended to
 AjaxRequestTarget. It works great, when I close modal with submit or cancel,
 script is fired on parent site. But I want the script to be fired ONLY when
 user hits the submit button. I cant override setWindowClosedCallback() in
 onSubmit() method of AjaxSubmitLinks and I simply ran out of ideas how to do
 it, any help?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Fireing-jQuery-script-after-closing-modal-Window-but-in-certain-situations-tp4099505p4099505.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: Fireing jQuery script after closing modal Window but in certain situations

2011-11-23 Thread Martin Grigorov
Not sure what exactly changed but since recently many mails with code
snippets don't get it
Maybe it is a problem with GMail ...

I think it is better to paste the code in pastebin services. this way
I read it formatted and with syntax highlights but most users don't
know about this my preference :-)

On Wed, Nov 23, 2011 at 8:40 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 your html and java got stripped..

 -igor

 On Wed, Nov 23, 2011 at 5:08 AM, jasp kamilszoka...@gmail.com wrote:
 Hello there,

 I have some serious problem with modal window and it's simply driving me
 crazy :)
 Lets start from the beginning. I have a page with a button. After clicking
 it user gets a modal window with some basic form to edit his data. Part of
 code looks like this:

 HTML:


 JAVA:

 To explain: PlainModalWindow is class that extends ModalWindow and has some
 my own css/js files rendered in head, that's all.

 Now my created page via method createPage() contains 3 different clickable
 buttons: Submit, Cancel and an X in upper right corner to close modal.

 Now when user click Cancel and X, they do same thing, clear inputs and close
 modal with method close( AjaxRequestTarget ). They look something like this:

 And then there is a Submit button which after validation saves user data and
 close modal as well, nothing fancy there. The probles starts here: I'm
 setting a WindowClosesCallback with javascript appended to
 AjaxRequestTarget. It works great, when I close modal with submit or cancel,
 script is fired on parent site. But I want the script to be fired ONLY when
 user hits the submit button. I cant override setWindowClosedCallback() in
 onSubmit() method of AjaxSubmitLinks and I simply ran out of ideas how to do
 it, any help?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Fireing-jQuery-script-after-closing-modal-Window-but-in-certain-situations-tp4099505p4099505.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





-- 
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: add resources to javascript

2011-11-23 Thread Martin Grigorov
Use a TextTemplate to deliver a config JSON or something similar.

See 
https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/autocomplete-tagit-parent/autocomplete-tagit/src/main/java/org/wicketstuff/tagit/TagItAjaxBehavior.java#L109
for example

On Wed, Nov 23, 2011 at 8:52 PM, Philipp Schreiber
der_philippschrei...@web.de wrote:
 Hi,

 Im porting a pure html/javascript app to wicket. The problem is that inside
 the javascript some resources are referenced with a fixed path. Is there a
 easy way to set these resources paths??

 Thanks
 Philipp

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/add-resources-to-javascript-tp4101004p4101004.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: Page serialization problem with wicket 1.5?

2011-11-23 Thread Gabriel Landon
Martin,

I guess I was lucky as I used it many time in wicket 1.4.x without problem.
I've only encountered this with wicket 1.5.x.

Now time to rewrite my applications!

Thank you very much for your help and your time.

Regards,

Gabriel.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Page-serialization-problem-with-wicket-1-5-tp4097909p4101189.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: WiQuery vs JQWicket

2011-11-23 Thread Warren Bell
Have you tried the InMethod grid, and if you have is there a reason you
are looking for something different? I am just curious.

Thanks,

Warren

On 11/23/11 8:26 AM, Brian Mulholland wrote:
 As I am looking at them, I am not noticing either implementing the
 jQuery grid, much less the paging scrollbar.  Am I overlooking it?
 
 Brian Mulholland
 
 
 On Wed, Nov 23, 2011 at 10:56 AM, Pointbreak
 pointbreak+wicketst...@ml1.net wrote:
 I've never used either framework, but your question made me curious
 again. (Years ago I evaluated the existing wicket-jquery integrations
 and wasn't happy with how they were designed. Since than I've always
 just used jquery inside wicket, it's not that hard for simple designs,
 and for complex designs these frameworks may be just to rigid). That
 being said I just had a quick glance at the projects again and it seems
 that WiQuery does the integration via Components (i.e. you create an
 Accordion Component), while JqWicket does the integration via Bahaviors
 (i.e. you add an AccordionBehavior to an existing Component, e.g. a
 ListView). The latter (thus using Behaviors) is how I have always done
 it, feels more natural to me, and is a lot more flexible.

 On Wednesday, November 23, 2011 10:16 AM, Brian Mulholland
 blmulholl...@gmail.com wrote:
 We are considering WiQuery and JQWicket.

 1) Which is better and why?
 2) Is one more established or better supported than the other?
 3) Is one more full featured?

 What differentiates the two?

 Brian Mulholland

 -
 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
 

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



Re: Fireing jQuery script after closing modal Window but in certain situations

2011-11-23 Thread jasp
I was using forum so code, that's odd, anyway repeat message with code pasted
to github:

Hello there, 

I have some serious problem with modal window and it's simply driving me
crazy :) 
Lets start from the beginning. I have a page with a button. After clicking
it user gets a modal window with some basic form to edit his data. Part of
code looks like this: 

https://gist.github.com/84c8839452e4b54d6c39/66d19045c96a558cfd601f4a0e70cbfc39cac8d6
HTML  Java 

To explain: PlainModalWindow is class that extends ModalWindow and has some
my own css/js files rendered in head, that's all. 

Now my created page via method createPage() contains 3 different clickable
buttons: Submit, Cancel and an X in upper right corner to close modal. 

Now when user click Cancel and X, they do same thing, clear inputs and close
modal with method close( AjaxRequestTarget ). They look something like this: 

https://gist.github.com/d0e69d03e2d4deb869b7/4b2701e6519c582262a00bd22eb5752410335786
Rest code 

And then there is a Submit button which after validation saves user data and
close modal as well, nothing fancy there. The probles starts here: I'm
setting a WindowClosesCallback with javascript appended to
AjaxRequestTarget. It works great, when I close modal with submit or cancel,
script is fired on parent site. But I want the script to be fired ONLY when
user hits the submit button. I cant override setWindowClosedCallback() in
onSubmit() method of AjaxSubmitLinks and I simply ran out of ideas how to do
it, any help?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Fireing-jQuery-script-after-closing-modal-Window-but-in-certain-situations-tp4099505p4101536.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



AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-23 Thread Ramona
Hi all!
I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars with
multiple file uploads (it's simulated with a Servlet), but when i try to
upload for example 8 files the behaviour (which has been working and
listening) stops listening for a while (the uploading continues but the
listener isn't called , this listener is used for updating some panels with
files uploading information).
Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
while? ..beacause after for example 3 minutes it restarts (i have it as:
refreshComponent.add(behavior= new
AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

Thanks!


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.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 ReplaceHandlerException on continueToOriginalDestination in wicket 1.5

2011-11-23 Thread peakmop
In MyAuthorizationStrategy that implements IAuthorizationStrategy I throw
RestartResponseAtInterceptPageException( LoginPage.class ) if the user is
not logged in and requests a bookmarkable page.
In the LoginPage onSubmit() the call is made: 
  if ( !continueToOriginalDestination() )
  {
setResponsePage( getApplication().getHomePage() );
  }
  
  return;

The call to  continueToOriginalDestination always throws
ReplaceHandlerException and never gets to the 'return' part because it seems
that there is still an active RequestHandler in the RequestHandlerStack.
Do I need to explicitly handle this exception and detach() the current
RequestHandler to let the next scheduled handler execute (and redirect to
the bookmarkable page request), or do I prevent the exception from occuring
somehow (since there wasn't one thrown in wicket 1.4.x)?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-ReplaceHandlerException-on-continueToOriginalDestination-in-wicket-1-5-tp4101981p4101981.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: AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-23 Thread Dan Retzlaff
Hi Ramona,

Is this one Ajax behavior or many (8)? Does the Wicket AJAX window in your
browser show anything interesting? In particular I would look for channel
busy messages, indicating that some other AJAX request is pending when a
new one is triggered.

Dan

On Wed, Nov 23, 2011 at 2:46 PM, Ramona vicky-ramo...@hotmail.com wrote:

 Hi all!
 I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars
 with
 multiple file uploads (it's simulated with a Servlet), but when i try to
 upload for example 8 files the behaviour (which has been working and
 listening) stops listening for a while (the uploading continues but the
 listener isn't called , this listener is used for updating some panels with
 files uploading information).
 Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
 while? ..beacause after for example 3 minutes it restarts (i have it as:
 refreshComponent.add(behavior= new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

 Thanks!


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.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: GMap2 in a Wiquery Dialog

2011-11-23 Thread Gabriel Landon
I had the same problem with ModalWindow and here's what I've done to handle
this problem:


public class MyGmap extends GMap2 {
/** serialVersionUID. */
private static final long serialVersionUID = 1L;

public MyGmap(final String varId, final String varGMapKey) {
super(varId, varGMapKey);
}

private String getJScheckResize() {
return getJSinvoke(map.checkResize());
}

public void checkResize() {

if (AjaxRequestTarget.get() != null  findPage() != null) {
   
AjaxRequestTarget.get().appendJavaScript(getJScheckResize());
}
}

}

Maybe it can be useful to add this code into the gmap2 project. How can this
be done?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GMap2-in-a-Wiquery-Dialog-tp3627392p4102386.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 ReplaceHandlerException on continueToOriginalDestination in wicket 1.5

2011-11-23 Thread Igor Vaynberg
dont really understand what you mean...

continueToOriginalDestination() does alway sthrow the replacehandler
exception. this is how that method works...

why is it a problem/why are you trying to deal with the new handler?

-igor

On Wed, Nov 23, 2011 at 2:57 PM, peakmop peak...@yahoo.com wrote:
 In MyAuthorizationStrategy that implements IAuthorizationStrategy I throw
 RestartResponseAtInterceptPageException( LoginPage.class ) if the user is
 not logged in and requests a bookmarkable page.
 In the LoginPage onSubmit() the call is made:
      if ( !continueToOriginalDestination() )
      {
        setResponsePage( getApplication().getHomePage() );
      }

      return;

 The call to  continueToOriginalDestination always throws
 ReplaceHandlerException and never gets to the 'return' part because it seems
 that there is still an active RequestHandler in the RequestHandlerStack.
 Do I need to explicitly handle this exception and detach() the current
 RequestHandler to let the next scheduled handler execute (and redirect to
 the bookmarkable page request), or do I prevent the exception from occuring
 somehow (since there wasn't one thrown in wicket 1.4.x)?


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Handling-ReplaceHandlerException-on-continueToOriginalDestination-in-wicket-1-5-tp4101981p4101981.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: GMap2 from wicketstuff: how to dynamically resize?

2011-11-23 Thread Gabriel Landon
You can simply add a checkResize() function to the Gmap2.

See : 
http://apache-wicket.1842946.n4.nabble.com/GMap2-in-a-Wiquery-Dialog-td3627392.html#a4102386

Regards,

Gabriel.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GMap2-from-wicketstuff-how-to-dynamically-resize-tp2218511p4102411.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



Socket write error occurs when you use a modal window wiht Internet Explorer.

2011-11-23 Thread Masaya Seko
Hi,

I using wicket 1.5.3.
When using a modal 
window(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow) with 
IE, I'm having trouble socket write error.
is called when AbstractResource#setResponseHeaders, with high probability to 
cause trouble.

When rendering modal window, sometimes not called 
AbstractResource#setResponseHeaders.
if so, socket write error does not occur.

The root problem is unknown.

I want to know how to prevent a socket write error.


The following stack trace:
org.apache.wicket.protocol.http.servlet.ResponseIOException: 
ClientAbortException:  java.net.SocketException: Connection reset by peer: 
socket write error
at 
org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:255)
at 
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:92)
at 
org.apache.wicket.request.resource.AbstractResource.setResponseHeaders(AbstractResource.java:611)
at 
org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:485)
at 
org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77)
at 
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: ClientAbortException:  java.net.SocketException: Connection reset by 
peer: socket write error
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:319)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:549)
at 
org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:279)
at 
org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:251)
... 24 more
Caused by: java.net.SocketException: Connection reset by peer: socket write 
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at 
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:760)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
at 
org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:318)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:985)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314)
... 28 more


-
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: AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-23 Thread Martin Grigorov
Hi

Try with Firefox and see at how many connections it stops working.
The open about:config page and change the value of
network.http.max-connections-per-server setting and try again.

On Thu, Nov 24, 2011 at 12:46 AM, Ramona vicky-ramo...@hotmail.com wrote:
 Hi all!
 I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars with
 multiple file uploads (it's simulated with a Servlet), but when i try to
 upload for example 8 files the behaviour (which has been working and
 listening) stops listening for a while (the uploading continues but the
 listener isn't called , this listener is used for updating some panels with
 files uploading information).
 Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
 while? ..beacause after for example 3 minutes it restarts (i have it as:
 refreshComponent.add(behavior= new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

 Thanks!


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.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