Modal Window without ajaxTarget

2012-05-16 Thread toytown
I would like to show the modal window without using a AjaxRequestTarget 


add(newAjaxFallbackLinkVoid(localAreaSelection) {

private static final long serialVersionUID = 
5507632714061994338L;

@Override
public void onClick(AjaxRequestTarget target) {
modalWindow.show(target); --- do not want ajax 
target

}
});

Is there a way to show ModalWindow unlike in the above code 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Window-without-ajaxTarget-tp4641432.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



Making Autocomplete Form Stateless

2012-03-08 Thread toytown
 I am really facing some hard time making Autocomplete Form statless. The
problem basically stems from 
AutoCompleteBehavior which extends AbstractAutoCompleteBehavior which
evetually extends AbstractAjaxBehavior.

AbstractAjaxBehavior implements IBehaviorListener. I saw in the the
Component class that the method
public boolean getStatelessHint(Component component)
{
if (this instanceof IBehaviorListener)
{
// this behavior implements a callback interface, so it 
cannot be
stateless
return false;
}
return true;
}

So any behaviour implementing IBehaviourlistner is stateful in nature (which
I think is little too restrictive) and closes down possibility to make
AutoComplete behaviour stateless.

Perhaps I am insane  but I do not see any point why Autocomplete behaviour
should be Stateful all the time and in every context of Web Page.  I fully
understand the advantages of being Stateful in most of complex web
interaction but to have a way to make some components Stateless in nature
would be nice.

 
I am not Wicket expert but I would rather do something like 

extends IBehaviorListener and include a method

 getStatelessHint(Component c) ;

 
then in org.apache.wicket.Component class implement the method
getStatelessHint in a slightly different way

public boolean getStatelessHint(Component component)
{
if (this instanceof IBehaviorListener)
{
return this.getStatelessHint(component);
}
return true;
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Making-Autocomplete-Form-Stateless-tp4455817p4455817.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: Wicket 1.5.4 - Application crashing on German umlaut characters

2012-02-27 Thread toytown
Thanks. It worked. But strange that such basic settings are not enabled in
Tomcat

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-4-Application-crashing-on-German-umlaut-characters-tp4412794p4424640.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



Wicket 1.5.4 - Application crashing on German umlaut characters

2012-02-22 Thread toytown

Wicket : 1.5.4
Tomcat : 6.0.28 to 6.0.35
JDK - 1.6  
 I have a simple search application where I could enter search parameters
like city name in a input textbox component. I am using displaying the
results in a separate page by passing search criteria  as pageparameters. 

searchForm.add(new Button(submitSearch) {

@Override
public void onSubmit() {
PageParameters params =  new PageParameters();
params.set(city, req.getCity());
setResponsePage(SearchResultPage.class, params);
}

});

If a pass normal String like 'Munich' without umlauts everything works ok
  The url is like http://localhost:8080/ecom/home/results?city=Munich  which
is ok and working fine

If I pass the city name with umlaut like 'München' then, I get url like 
http://localhost:8080/ecom/home/results?city=Münchencity=Münchencity=Münchencity=Münchencity=Münchencity=Münchencity=MÃÃ

and EXCEPTION  trace in my log file looks like

05:18:28,092 DEBUG pache.wicket.page.PageAccessSynchronizer: 219 -
'http-8080-1' notifying blocked threads
23.02.2012 05:18:28 org.apache.coyote.http11.Http11Processor process
SCHWERWIEGEND: Error processing request
java.lang.ArrayIndexOutOfBoundsException: 8192
at
org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:730)
at
org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:641)
at
org.apache.coyote.http11.InternalOutputBuffer.sendHeader(InternalOutputBuffer.java:514)
at
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1637)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:956)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.sendHeaders(Response.java:379)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314)
at 
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:274)
at 
org.apache.catalina.connector.Response.finishResponse(Response.java:493)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:317)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
23.02.2012 05:18:28 org.apache.coyote.http11.Http11Processor process


   There itself is no RuntimeException thrown from wicket but somehow it
generates some strange url which causes ArrayIndexOutofBoundException.

Is this a bug in Wicket or that my preassumption was wrong that
pageparameters should be encoded by Wicket when displayed in the url ? What
is the wa to get around this problem ?

Thanks in advance.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-4-Application-crashing-on-German-umlaut-characters-tp4412794p4412794.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: Stateless and Ajax

2012-02-07 Thread toytown
Hi igor,

 i certainly do agree that being stateful Wicket can do complex stuff.
However, you have to consider the fact that sometimes it is necessary to
become stateless (especially in public facing website) where I need the
users to be able to bookmark the page .
i do not see whats wrong in integrating some stateless behaviours, links
like those in Jorilla Project into the wicket core so that users can get the
best of both world from wicket framework.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-and-Ajax-tp4344007p4364341.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



Google map without GMap2

2011-12-14 Thread toytown
Currently I am using GMap2 but my app needs a Stateless page. So wheneever I
add GMap2 panel the page becomes Stateful since GMap2 is a stateful
component. I tried to refactor the GMap2 but it seems not to be designed for
extensibility as most methods and fields are privat.
  All I need is a simple map with geocoding and a marker for which I can use
jquery. Has anyone expereince such issues before ?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Google-map-without-GMap2-tp4194249p4194249.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: Google map without GMap2

2011-12-14 Thread toytown
Thanks for a quick reply. 

To correct a little bit - the method signature should be protected.

Also the component are by default stateless . I also refactored getJSinit()
method to remove some listeners or behaviours which case the statless nature
to change to stateful. This is because the class
AbstractAjaxBehavior has stateless hint set to false by default.


@Override
protected boolean getStatelessHint() {
return overlays.isEmpty();
}

//removed some behaviour which can cause stateful component
private String getJSinit()
{
StringBuffer js = new StringBuffer(new WicketMap2(' + 
map.getMarkupId()
+ ');\n);

 //Commented out as OverLayListner implements IBehaviour
//REMOVED js.append(overlayListener.getJSinit());
js.append(getJSsetCenter(getCenter()));
js.append(getJSsetZoom(getZoom()));
js.append(getJSsetDraggingEnabled(draggingEnabled));

js.append(getJSsetDoubleClickZoomEnabled(doubleClickZoomEnabled));

js.append(getJSsetScrollWheelZoomEnabled(scrollWheelZoomEnabled));
js.append(getJSsetGoogleBarEnabled(googleBarEnabled));

js.append(mapType.getJSsetMapType(this));

// Add the controls.
for (GControl control : controls)
{
js.append(control.getJSadd(this));
}

// Add the overlays.
for (GOverlay overlay : overlays)
{
js.append(overlay.getJSadd());
}

js.append(infoWindow.getJSinit());

//REMOVED   for (Object behavior :
getBehaviors(GEventListenerBehavior.class))
//  {
//  
js.append(((GEventListenerBehavior)behavior).getJSaddListener());
//  }


return js.toString();
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Google-map-without-GMap2-tp4194249p4194834.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