Re: ATOM display in wicket?

2011-10-30 Thread Peter Karich
 Hi Boris,

hmmh I thought it was in:
http://wicketstuff.org/maven/repository

but it seems to be down... I have it here:
http://peat_hal.users.sourceforge.net/m2repository/
(org/wicketstuff/wicketstuff-rome/1.4-SNAPSHOT/)

Regards,
Peter.

 Thanks for the reply.

 Are you pulling it in via maven? I'm not seeing it in the regular 
 repositories.

 Thanks!

 Boris


 On Oct 13, 2011, at 2:34 AM, Peter Karich wrote:

 Hi,

 I'm using it with wicket 1.4.18. Not sure if it works or exists for 1.5

 For 1.4 this intro was useful (with my comment there):
 http://it-essence.xs4all.nl/roller/technology/entry/rss_feeds_with_wicket_and

 Regards,
 Peter.

 Is wicketstuff-rome still a usable package with recent Wicket versions, or 
 does anyone have an alternative simple way to display an ATOM or RSS feed 
 on a wicket page?

 Thanks!

 Boris


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



Re: ATOM display in wicket?

2011-10-13 Thread Peter Karich
 Hi,

I'm using it with wicket 1.4.18. Not sure if it works or exists for 1.5

For 1.4 this intro was useful (with my comment there):
http://it-essence.xs4all.nl/roller/technology/entry/rss_feeds_with_wicket_and

Regards,
Peter.

 Is wicketstuff-rome still a usable package with recent Wicket versions, or 
 does anyone have an alternative simple way to display an ATOM or RSS feed on 
 a wicket page?

 Thanks!

 Boris


-- 
http://jetsli.de news reader for geeks


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



Getting Error for custom PageExpiredErrorPage

2011-09-14 Thread Peter Karich
 Hi,

I'm getting this error in the logs:
ERROR org.apache.wicket.RequestCycle - unable to find component with
path urltrends:urls:9:urlLink on stateless page [Page class =
de.jetwick.ui.slide.ChooseJetslideOrJetwick, id = 0, version = 0] it
could be that the component is inside a repeater make your component
return false in getStatelessHint()

Here is how I set the custom page in my init method:
getApplicationSettings().setPageExpiredErrorPage(ChooseJetslideOrJetwick.class);

Why has wicket a problem when there is a session timeout on a stateful
page and then 'redirecting' to my expired page? How should I implement
my custom PageExpiredErrorPage ... I only have 2 BookmarkablePageLink:s
in it!?

I wasn't able to reproduce this message when browsing on my site
jetsli.de/tweets ... probably because it is only a google bot request ** ?
How can I fix this?

Regards,
Peter.

**
http://apache-wicket.1842946.n4.nabble.com/Page-expired-stateless-page-td1891032.html

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



Re: Getting Error for custom PageExpiredErrorPage

2011-09-14 Thread Peter Karich
 Hi Andrea,

sorry, I forgot to mention that I tried it with 1.4.18

I'm using mount(new MixedParamUrlCodingStrategy(slide,
ChooseJetslideOrJetwick.class, new String[]{}));
because I'm using the same strategy for the page where this problem
occurs (the page which has the path urltrends:urls:9:urlLink in my example)

and yes, issue 3992 really sounds like my issue. Thanks for the pointer!
Do you know a workaround?

Regards,
Peter.

 Hi,

 which version are you using? Are mounting an UrlCodingStrategy class?
 Maybe your problem is related with this issue

 https://issues.apache.org/jira/browse/WICKET-3992
   Hi,

 I'm getting this error in the logs:
 ERROR org.apache.wicket.RequestCycle - unable to find component with
 path urltrends:urls:9:urlLink on stateless page [Page class =
 de.jetwick.ui.slide.ChooseJetslideOrJetwick, id = 0, version = 0] it
 could be that the component is inside a repeater make your component
 return false in getStatelessHint()

 Here is how I set the custom page in my init method:
 getApplicationSettings().setPageExpiredErrorPage(ChooseJetslideOrJetwick.class);


 Why has wicket a problem when there is a session timeout on a stateful
 page and then 'redirecting' to my expired page? How should I implement
 my custom PageExpiredErrorPage ... I only have 2 BookmarkablePageLink:s
 in it!?

 I wasn't able to reproduce this message when browsing on my site
 jetsli.de/tweets ... probably because it is only a google bot request
 ** ?
 How can I fix this?

 Regards,
 Peter.

 **
 http://apache-wicket.1842946.n4.nabble.com/Page-expired-stateless-page-td1891032.html


 -
 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




-- 
http://jetsli.de news reader for geeks


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



Re: Apache Wicket releases Wicket 1.5

2011-09-08 Thread Peter Karich
 Thanks a lot wicketers! Wicket is a really great and smart piece of
software!

Regards,
Peter.


-- 
http://jetsli.de news reader for geeks



 The Apache Wicket team is proud to announce the immediate availability of the
 newest release of their component oriented open source Java web framework.
 Apache Wicket 1.5 has been in development for the last two years and brings
 many improvements over previous versions.

 Downloading Apache Wicket 1.5
 -

 You can download the release here:
 http://www.apache.org/dyn/closer.cgi/wicket/1.5.0

 Or use this in your Maven POM to upgrade to the new version:

 dependency
 groupIdorg.apache.wicket/groupId
 artifactIdwicket-core/artifactId
 version1.5.0/version
 /dependency

 Please note that Wicket’s main artifact ID has been renamed to wicket-core.

 You will need to upgrade all modules (i.e. wicket, wicket-extensions,
 wicket-ioc, wicket-spring, etc) to 1.5.0. It is not possible to mix previous
 versions of Wicket with modules of this release.

 Most notable changes
 

 With this release the Wicket team has revised many of its internals. A
 short list:

  - HTML5 components added: EmailTextField, NumberTextField, UrlTextField and
RangeTextField

  - New inter-component events (explained below)

  - Minimum required servlet API is servlet-api 2.5

  - All standard validators now extend Behavior to allow for client side
validations

  - IBehavior has been removed and AbstractBehavior has been deprecated, you
should now extend Behavior instead

  - Simplified the request cycle processing and made it more extensible

  - URL handling is now in one place

  - Wicket’s rendering code has been greatly simplified

  - Improved browser caching support

  - ClientSideImageMap replaces old ImageMap

  - Better support for running behind proxies with x-forwarded-for header

  - Request cycle listeners make it easier to integrate frameworks in your
Wicket application

  - Consistent naming: methods with Javascript in the name have been renamed to
use proper capitalization: JavaScript

  - Switching to HTTPS is as simple as configuring a new root mapper to make
Wicket HTTPS aware and annotating a page with @RequireHttps

 A longer list of changes and improvements can be found in our migration
 guide.

 Inter-component events
 --

 Wicket 1.5 offers a simple, yet flexible, way for component to communicate
 with each other in a decoupled manner. The two major interfaces that
 facilitate this are:

   /**
* Objects that can send events
*/
   public interface IEventSource {
   T void send(IEventSink sink, Broadcast broadcast, T payload);
   }

 and

   /**
* Objects that can receive events
*/
   public interface IEventSink
   {
   /**
* Called when an event is sent to this sink
*/
   void onEvent(IEvent? event);
   }

 The classes that implement these interfaces, and can thus participate in the
 event mechanism are: Component, RequestCycle, Session, and Application.

 The mechanism allows for different event broadcast methods defined here:

   /**
* Defines the event broadcast type.
*/
   public enum Broadcast {
   BREADTH,
   DEPTH,
   BUBBLE,
   EXACT;
   }

 There is an example in wicket-examples which demonstrates the usage of this.

 Applications can register custom event dispatchers in FrameworkSettings; the
 dispatchers can be used to build custom event delivery mechanisms. For example
 a custom IEventDispatcher mechanism can route events to annotated methods, for
 example:

   public class MyComponent extends Component {
   @OnEvent
   private void onUserAdded(UserAddedEvent event) {...}
   }

 where UserAddedEvent is the event payload object.

 The default Component#onEvent method will be called even if custom dispatchers
 are registered.

 A default event is raised whenever Wicket begins to create an AJAX response.
 The payload of the event is the AjaxRequestTarget used for event. Sample
 implementation:

   // component that always adds itself to the ajax response
   public class MyComponent extends Component {
   public void onEvent(IEvent event) {
   if (event.getPayload() instanceof AjaxRequestTarget) {
   ((AjaxRequestTarget)event.getPayload()).add(this);
}
   }
   }

 -
 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: Static Files (CSS, JPG) not Found by Wicket in HTML

2011-07-27 Thread Peter Karich
 Am 27.07.2011 14:21, schrieb Peter Ertl:
 You can put your resources in src/main/webapp but I would not recommend to do 
 so (they will work by using an absolute path with the correct web app 
 context) but it's quite ugly *imho*

no, you can just reference them via css/style.css eg. if you have
src/main/webapp/css
and wicket will do the magic for you...

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



Re: best search engine framework to use with wicket

2011-07-16 Thread Peter Karich
 This is a bit mailinglist off topic but here are my suggestions ;)

Have a deep look into ElasticSearch:

http://www.elasticsearch.org/

Here is some code: wicket + guice + Elasticsearch:
http://karussell.wordpress.com/2011/02/07/get-started-with-elasticsearch/

I started with wicket and solr:
http://java.dzone.com/articles/twitter-search-jetwick-%E2%80%93

But then switched to elasticsearch:
http://karussell.wordpress.com/2011/02/07/why-jetwick-moved-from-solr-to-elasticsearch/

Now jetsli.de uses ElasticSearch and wicket ...

Here is how those search engines compare:
http://stackoverflow.com/questions/2271600/elasticsearch-sphinx-lucene-solr-xapian-which-fits-for-which-usage
http://stackoverflow.com/questions/2856427/situations-to-prefer-apache-lucene-over-solr

Do not hesitate to ask further stuff directly via mail ;)

Kind Regards,
Peter.

 can anyone suggest the best search engine framework for wicket

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/best-search-engine-framework-to-use-with-wicket-tp3671651p3671651.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




-- 
http://jetsli.de News Reader 4 Geeks


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



Re: YSlow still complaining Add Expires headers

2011-07-11 Thread Peter Karich
 anyone an idea how to change cache duration of resources?
(as setDefaultCacheDuration doesn't work for me)

  Martin,

 I'm using 1.4.17

 Your [1] is about the page itself, not about the resources
  (.css, .js, images, ...).
 ok. I just wasn't sure.

 Regards,
 Peter.

 Which version of Wicket ?
 Your [1] is about the page itself, not about the resources (.css, .js,
 images, ...).

 On Sun, Jul 10, 2011 at 6:08 PM, Peter Karich peat...@yahoo.de wrote:
  Hi all,

 because of the advice in

 http://apache-wicket.1842946.n4.nabble.com/expires-header-td1866672.html
 https://issues.apache.org/jira/browse/WICKET-1602

 I used getResourceSettings().setDefaultCacheDuration(30 * 24 * 3600);
 in my WebApplication. I also did some other hacking [1] to set the
 Expires header.
 But I still see Add Expires headers in YSlow [2] and Page Speed [3].

 What is the correct way to set the Expires headers?

 Regards,
 Peter.

 [1]
 @Override
protected void configureResponse() {
super.configureResponse();
// Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT
SimpleDateFormat formatter = new SimpleDateFormat(EEE, dd MMM
  HH:mm:ss z);
formatter.setTimeZone(TimeZone.getTimeZone(GMT));

WebResponse response = getWebRequestCycle().getWebResponse();
int minutes = 30 * 24 * 60;
response.setHeader(Cache-Control, public, max-age= + minutes
 * 60);
String str = formatter.format(new
 MyDate().plusMinutes(minutes).toDate());
response.setHeader(Expires, str);

str = formatter.format(new MyDate().minusMinutes(minutes).toDate());
response.setHeader(Last-Modified, str);

// response.setHeader(Pragma, no-cache);
// response.setHeader(Keep-Alive,  + minutes * 60);
}

 [2]
 There are 29 static components without a far-future expiration date.

 [3]
 http://code.google.com/intl/de-DE/speed/page-speed/docs/caching.html#LeverageBrowserCaching


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



Re: YSlow still complaining Add Expires headers

2011-07-11 Thread Peter Karich
 Am 11.07.2011 14:44, schrieb Martin Grigorov:
 See what happens in
 org.apache.wicket.markup.html.WebResource.setHeaders(WebResponse).
 Then check the response headers for your resources.

 I guess that your resources are located next to WEB-INF folder and are
 delivered directly by the web container and thus Wicket doesn't set
 the headers.
 If this is the case then you here are two options:
 - check your web container documentation
 - add a filter in web.xml that will set the headers for all requests
 to /css/*.css, /js/*.js, ...

Thanks Martin, that helped! I wrote a filter:

@Override public void doFilter(ServletRequest request, ServletResponse
response,
FilterChain chain) throws IOException, ServletException {

HttpServletResponse rsp = (HttpServletResponse) response;
SimpleDateFormat formatter = new
SimpleDateFormat(Helper.cacheDateFormatString);
formatter.setTimeZone(TimeZone.getTimeZone(GMT));
int minutes = 30 * 24 * 60;
rsp.setHeader(Cache-Control, public, max-age= + minutes * 60);
chain.doFilter(request, response);
}

Also this helped with all the confusing options in the header:
http://onjava.com/pub/a/onjava/2004/03/03/filters.html?page=2

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



YSlow still complaining Add Expires headers

2011-07-10 Thread Peter Karich
 Hi all,

because of the advice in

http://apache-wicket.1842946.n4.nabble.com/expires-header-td1866672.html
https://issues.apache.org/jira/browse/WICKET-1602

I used getResourceSettings().setDefaultCacheDuration(30 * 24 * 3600);
in my WebApplication. I also did some other hacking [1] to set the
Expires header.
But I still see Add Expires headers in YSlow [2] and Page Speed [3].

What is the correct way to set the Expires headers?

Regards,
Peter.

[1]
@Override
protected void configureResponse() {
super.configureResponse();
// Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT
SimpleDateFormat formatter = new SimpleDateFormat(EEE, dd MMM
 HH:mm:ss z);
formatter.setTimeZone(TimeZone.getTimeZone(GMT));

WebResponse response = getWebRequestCycle().getWebResponse();
int minutes = 30 * 24 * 60;
response.setHeader(Cache-Control, public, max-age= + minutes
* 60);
String str = formatter.format(new
MyDate().plusMinutes(minutes).toDate());
response.setHeader(Expires, str);

str = formatter.format(new MyDate().minusMinutes(minutes).toDate());
response.setHeader(Last-Modified, str);

// response.setHeader(Pragma, no-cache);
// response.setHeader(Keep-Alive,  + minutes * 60);
}

[2]
There are 29 static components without a far-future expiration date.

[3]
http://code.google.com/intl/de-DE/speed/page-speed/docs/caching.html#LeverageBrowserCaching

-- 
http://jetsli.de Hackernews+


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



Re: YSlow still complaining Add Expires headers

2011-07-10 Thread Peter Karich
 Martin,

I'm using 1.4.17

 Your [1] is about the page itself, not about the resources
  (.css, .js, images, ...).

ok. I just wasn't sure.

Regards,
Peter.

 Which version of Wicket ?
 Your [1] is about the page itself, not about the resources (.css, .js,
 images, ...).

 On Sun, Jul 10, 2011 at 6:08 PM, Peter Karich peat...@yahoo.de wrote:
  Hi all,

 because of the advice in

 http://apache-wicket.1842946.n4.nabble.com/expires-header-td1866672.html
 https://issues.apache.org/jira/browse/WICKET-1602

 I used getResourceSettings().setDefaultCacheDuration(30 * 24 * 3600);
 in my WebApplication. I also did some other hacking [1] to set the
 Expires header.
 But I still see Add Expires headers in YSlow [2] and Page Speed [3].

 What is the correct way to set the Expires headers?

 Regards,
 Peter.

 [1]
 @Override
protected void configureResponse() {
super.configureResponse();
// Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT
SimpleDateFormat formatter = new SimpleDateFormat(EEE, dd MMM
  HH:mm:ss z);
formatter.setTimeZone(TimeZone.getTimeZone(GMT));

WebResponse response = getWebRequestCycle().getWebResponse();
int minutes = 30 * 24 * 60;
response.setHeader(Cache-Control, public, max-age= + minutes
 * 60);
String str = formatter.format(new
 MyDate().plusMinutes(minutes).toDate());
response.setHeader(Expires, str);

str = formatter.format(new MyDate().minusMinutes(minutes).toDate());
response.setHeader(Last-Modified, str);

// response.setHeader(Pragma, no-cache);
// response.setHeader(Keep-Alive,  + minutes * 60);
}

 [2]
 There are 29 static components without a far-future expiration date.

 [3]
 http://code.google.com/intl/de-DE/speed/page-speed/docs/caching.html#LeverageBrowserCaching


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



Re: Users, sessions, data...

2011-06-15 Thread Peter Karich
 Am 15.06.2011 08:36, schrieb Zeldor:
 Hi,

 My last attempts to fix my session and advices here made me thinking if my
 approach is good. So I'm curious - how do you handle users and their data?
 In my case I have session, when user logs in entire entity gets loaded into
 session. Later I get user data from that session and when he changes
 anything it gets persisted to db. There is no direct interaction between
 user and only that user can access his data. What is your approach? :)

My approach is: load user data every time from DB. This way your session
is always small

or take a look to LoadableDetachableModel:
https://cwiki.apache.org/WICKET/detachable-models.html

Regards,
Peter.

-- 
http://jetwick.com open twitter search


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



Re: Users, sessions, data...

2011-06-15 Thread Peter Karich

 But what are benefits of small session really? With entire user in session I
 can skip getting data from db and serve data faster...

wicket's (de-)serialization is not done in 0ms ;)

but if that works for you then this strategy is great.

and also if you have a lot of users or big user data (or both)
then you'll quickly run out of memory for your app server

another problem is that you'll have to make sure that the user is always
redirected to
the same server/node with the user its session data, which makes load
balancing more complicated.

-- 
http://jetwick.com open twitter search


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



Re: navigation menu

2011-06-08 Thread Peter Karich
 Hi,

why not use the 'tutsplus' code which you like and bind the links to
bookmarkable pages?
You could also inject some variables (e.g. the urls) into javascript
from wicket:

private HeaderContributor contrib = new HeaderContributor(
new IHeaderContributor() {

@Override
public void renderHead(IHeaderResponse response) {
PageParameters params = new PageParameters();
params.add(myparam, true);
String url = RequestUtils.toAbsolutePath(urlFor(MyPage1.class,
params).toString());
response.renderJavascript(var myurl1 = ' + url + ';,
myjsinjection);
}
});

of course this should be injected before the external code:

public void init(final PageParameters parameters) {
add(contrib);
add(new HeaderContributor(
new IHeaderContributor() {
public void renderHead(IHeaderResponse response) {
response.renderJavascriptReference(js/external.js);
}
}));}

Would this help?

Regards,
Peter.

 http://code.google.com/p/wicket-menu/

 Not complete but if you see the source code, it will give you an idea.

 cheers,
 -fatih

 On 8 June 2011 16:28, hubert_hupe hubert_h...@gmx.de wrote:
 hi guys,

 i have no clue how to create a simple navigation bar like this: 
 http://net.tutsplus.com/tutorials/javascript-ajax/a-different-top-navigation/
 if possible i need images for the headlines.
 when you move the mouse over the menu it drops down - there are millions of 
 website with this functionality.
 the problem is: i have to ceate the menu dynamically. the informations which 
 menuitem should be in the menu comes from the database. so i cannot use a 
 static javascript code in the html file.
 is anybody there who can give me a hint or even an example?

 best regards

 hubert

-- 
http://jetwick.com open twitter search


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



Re: ListView inside a ListView

2011-05-25 Thread Peter Karich

   add(new ListViewAllocation(allocation, 
 allocationListModel) {
shouldn't this be item.add ?

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



Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Anybody?

 Hi,

 when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls
 ala ?q=something e.g. for typing something in the textfield. The problem
 is that it prints two GET requests (why not POST + GET?):

 NOW: q = [todo] query=todo GET
 NOW:  query=null GET

 In firebug I can see POST + GET:

 POST
 http://localhost:8080/wicket1.4.17/?wicket:interface=:0:searchform::IFormSubmitListener::
 GET http://localhost:8080/wicket1.4.17/?q=test

 How can I avoid the second call of HomePage with query=null?? When I do
 setRedirect(false) after setResponsePage I don't get the nice url but it
 prints only one POST request with the correct parameter:

 NOW: q = test query=test POST

 Finally I tried to explicitely set the form method to GET:

 @Override protected String getMethod() { return METHOD_GET; }

 but then I would need to declare every url parameter as hidden field or
 can I somehow overwrite the form action with my need parameters? About a
 similar problem was blogged here [2]

 Could someone enlight me whats going wrong here?

 Regards,
 Peter.


 [1]
 public HomePage(final PageParameters parameters) {

 Form form = new Form(searchform) {
 @Override protected void onSubmit() {
 PageParameters pp = new PageParameters();
 pp.add(q, query);
 // add other params from previous request
 setResponsePage(HomePage.class, pp);
 }
 };
 add(form);
 query = parameters.getString(q);
 TextField text = new TextField(textField, new PropertyModel(this,
 query));
 form.add(text);

 logger.info(NOW:  + parameters +  query= + query +   + getMethod());

 }

 public String getMethod() {
  return ((WebRequest) getRequest()).getHttpServletRequest().getMethod();
 }


 [2]
 http://blog.solidcraft.eu/2010/10/wicket-form-submit-not-safe-for.html


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



Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Hi Martin,

thanks for the explanation!

Why is the first call done to submit my form?

Because my app is doing an 'expensive' search query for every
instantiation,
thus I would like to trigger the search only with the necessary
submitted query.

Can I somehow distinguish a request with an empty q
and the pre-query with an empty q when submitting a form?
Or should I place my expensive operation somewhere else?

Regards,
Peter.

 Hi Peter,

 Here is how it should work:
 - Home page constructor is called initially without 'q' thus null
 - the submit makes a POST call to Form.onSubmit() (the print is not called
 because the page is not re-instanciated, unless it is stateless)
 - onSubmit() calls setResponsePage(Class, PageParameters) which causes a
 redirect to the Home page with the parameters you pass
 - HomePage's ctor is called with 'q' and a value

 This is how it should be! Now you take a look and tell us where are the
 differences.


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



Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Hi Martin,

 I don't understand your question.

sorry :(
I try to explain it again :)

When I access my app with the url
http://localhost:8080/app/?q=test
all is fine. But when I submit a new query 'todo' then wicket somehow
1. calls the submit (ok)
2. redirects to HomePage (ok)
3. *but then again wicket is doing*** another POST+GET with empty q

So 4 requests for one submit. Please also try this quickstart for
wicket 1.4.17: https://gist.github.com/974349
and see if you get the same problem.

Regards,
Peter.

**
post: onSubmit textField object:todo
GET: HomePage ctor params: q = [todo]
post: onSubmit textField object:
GET: HomePage ctor params: q = []


Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Hopefully I do not waste your time with my stupidity:

https://issues.apache.org/jira/browse/WICKET-3720

https://issues.apache.org/jira/secure/attachment/12479325/double-form-submit.zip


 Please create a quickstart app (.zip, .tgz) and attach it to a ticket in our
 Jira.

 On Mon, May 16, 2011 at 2:33 PM, Peter Karich peat...@yahoo.de wrote:

  Hi Martin,

 I don't understand your question.
 sorry :(
 I try to explain it again :)

 When I access my app with the url
 http://localhost:8080/app/?q=test
 all is fine. But when I submit a new query 'todo' then wicket somehow
 1. calls the submit (ok)
 2. redirects to HomePage (ok)
 3. *but then again wicket is doing*** another POST+GET with empty q

 So 4 requests for one submit. Please also try this quickstart for
 wicket 1.4.17: https://gist.github.com/974349
 and see if you get the same problem.

 Regards,
 Peter.

 **
 post: onSubmit textField object:todo
 GET: HomePage ctor params: q = [todo]
 post: onSubmit textField object:
 GET: HomePage ctor params: q = []


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



Form submit and nice urls

2011-05-13 Thread Peter Karich
Hi,

when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls
ala ?q=something e.g. for typing something in the textfield. The problem
is that it prints two GET requests (why not POST + GET?):

NOW: q = [todo] query=todo GET
NOW:  query=null GET

In firebug I can see POST + GET:

POST
http://localhost:8080/wicket1.4.17/?wicket:interface=:0:searchform::IFormSubmitListener::
GET http://localhost:8080/wicket1.4.17/?q=test

How can I avoid the second call of HomePage with query=null?? When I do
setRedirect(false) after setResponsePage I don't get the nice url but it
prints only one POST request with the correct parameter:

NOW: q = test query=test POST

Finally I tried to explicitely set the form method to GET:

@Override protected String getMethod() { return METHOD_GET; }

but then I would need to declare every url parameter as hidden field or
can I somehow overwrite the form action with my need parameters? About a
similar problem was blogged here [2]

Could someone enlight me whats going wrong here?

Regards,
Peter.


[1]
public HomePage(final PageParameters parameters) {

Form form = new Form(searchform) {
@Override protected void onSubmit() {
PageParameters pp = new PageParameters();
pp.add(q, query);
// add other params from previous request
setResponsePage(HomePage.class, pp);
}
};
add(form);
query = parameters.getString(q);
TextField text = new TextField(textField, new PropertyModel(this,
query));
form.add(text);

logger.info(NOW:  + parameters +  query= + query +   + getMethod());

}

public String getMethod() {
 return ((WebRequest) getRequest()).getHttpServletRequest().getMethod();
}


[2]
http://blog.solidcraft.eu/2010/10/wicket-form-submit-not-safe-for.html

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



Form submit and nice urls

2011-05-13 Thread Peter Karich
Hi,

when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls
ala ?q=something e.g. for typing something in the textfield. The problem
is that it prints two GET requests (why not POST + GET?):

NOW: q = [todo] query=todo GET
NOW:  query=null GET

In firebug I can see POST + GET:

POST
http://localhost:8080/wicket1.4.17/?wicket:interface=:0:searchform::IFormSubmitListener::
GET http://localhost:8080/wicket1.4.17/?q=test

How can I avoid the second call of HomePage with query=null?? When I do
setRedirect(false) after setResponsePage I don't get the nice url but it
prints only one POST request with the correct parameter:

NOW: q = test query=test POST

Finally I tried to explicitely set the form method to GET:

@Override protected String getMethod() { return METHOD_GET; }

but then I would need to declare every url parameter as hidden field or
can I somehow overwrite the form action with my need parameters? About a
similar problem was blogged here [2]

Could someone enlight me whats going wrong here?

Regards,
Peter.


[1]
public HomePage(final PageParameters parameters) {

Form form = new Form(searchform) {
@Override protected void onSubmit() {
PageParameters pp = new PageParameters();
pp.add(q, query);
// add other params from previous request
setResponsePage(HomePage.class, pp);
}
};
add(form);
query = parameters.getString(q);
TextField text = new TextField(textField, new PropertyModel(this,
query));
form.add(text);

logger.info(NOW:  + parameters +  query= + query +   + getMethod());

}

public String getMethod() {
 return ((WebRequest) getRequest()).getHttpServletRequest().getMethod();
}


[2]
http://blog.solidcraft.eu/2010/10/wicket-form-submit-not-safe-for.html

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



Re: Question on sessions

2011-05-09 Thread Peter Karich
 Hi,

 and effectively bind it to a real session

What do you mean with this?

I'm having exactly the same issue, that a new session is opened after
redirection
 ... but only for android devices (built-in browser+opera)!? For desktop
firefox it works.

The redirect-url looks in both cases similar to:
http://jetwick.com/login/callback/true/slide/true?oauth_token=oatoauth_verifier=oav

Is this a browser issue or probably a tomcat 6 issue when appending the
session id? Or is this wicket (1.4.17) related?

Here is the code from my Login class:
Form form = new Form(form) {
@Override public void onSubmit() {
// create url:
String url = ...;
setRedirect(true);
getRequestCycle().setRequestTarget(new RedirectRequestTarget(url));
}
...

When receiving the redirect-url I'm doing the following in my login class:

String callback = parameters.getString(callback);
if (true.equals(callback)) {
   parameters.remove(callback);
   setRedirect(true);
   setResponsePage(new Jetslide(parameters));
   return;
}

Regards,
Peter.

BTW: I was having session related issues with desktop browsers when
doing setResponsePage(Jetslide.class, params) instead of
setResponsePage(new Jetslide(params)) !?

 just and idea, declare an anonymous role in your app. and effectively bind
 it to a real session, once the token is obtained elevate the users right.

 On Mon, Apr 25, 2011 at 6:35 PM, nimmy [via Apache Wicket] 
 ml-node+3474193-959482693-65...@n4.nabble.com wrote:

 Hi,

 I have a user who has a temporary session (i.e. is not logged in).  I need
 to redirect him/her to an external page for to get an access token (e.g.
 Facebook/Flickr access token).

 Is there anyway to keep the same session? I find that the user has a
 different session after the redirection.

 Thanks for your help.

 Cheers,
 Nim

 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/Question-on-sessions-tp3474193p3474193.html
  To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.






-- 
http://jetwick.com open twitter search


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



Re: Question on sessions

2011-05-09 Thread Peter Karich
 ok stupid question. seems to be nothing related to android or wicket ...

it was a jetwick.com vs. www.jetwick.com issue so good old apache is the
bad man ;)

  Hi,

 and effectively bind it to a real session
 What do you mean with this?

 I'm having exactly the same issue, that a new session is opened after
 redirection
  ... but only for android devices (built-in browser+opera)!? For desktop
 firefox it works.

 The redirect-url looks in both cases similar to:
 http://jetwick.com/login/callback/true/slide/true?oauth_token=oatoauth_verifier=oav

 Is this a browser issue or probably a tomcat 6 issue when appending the
 session id? Or is this wicket (1.4.17) related?

 Here is the code from my Login class:
 Form form = new Form(form) {
 @Override public void onSubmit() {
 // create url:
 String url = ...;
 setRedirect(true);
 getRequestCycle().setRequestTarget(new RedirectRequestTarget(url));
 }
 ...

 When receiving the redirect-url I'm doing the following in my login class:

 String callback = parameters.getString(callback);
 if (true.equals(callback)) {
parameters.remove(callback);
setRedirect(true);
setResponsePage(new Jetslide(parameters));
return;
 }

 Regards,
 Peter.

 BTW: I was having session related issues with desktop browsers when
 doing setResponsePage(Jetslide.class, params) instead of
 setResponsePage(new Jetslide(params)) !?

 just and idea, declare an anonymous role in your app. and effectively bind
 it to a real session, once the token is obtained elevate the users right.

 On Mon, Apr 25, 2011 at 6:35 PM, nimmy [via Apache Wicket] 
 ml-node+3474193-959482693-65...@n4.nabble.com wrote:

 Hi,

 I have a user who has a temporary session (i.e. is not logged in).  I need
 to redirect him/her to an external page for to get an access token (e.g.
 Facebook/Flickr access token).

 Is there anyway to keep the same session? I find that the user has a
 different session after the redirection.

 Thanks for your help.

 Cheers,
 Nim

 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/Question-on-sessions-tp3474193p3474193.html
  To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.






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



Re: moving from development to deployment mode

2011-05-04 Thread Peter Karich


 Could it be a result of the wicket version that am using?Because i have
 cleared web container and i still get same message.Take a look at this.


 [Application] Started Wicket version 1.4-rc1 in development mode

maybe 1.4-rc1 ist just too old? why not using at least a stable release?

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



Re: wicket facebook application

2011-05-02 Thread Peter Karich
 Why not doing this directly the wicket-way with PageParameters and your
own Session?

FBPage(PageParameters params) {
   // do something with: params.getString(xy);

   // construct a new MySession object within the WicketApp.init method:
   // @Override Session newSession(Request request, Response response) {
   //   return new MySession(request); }

   // No need for complicated stuff just call 'getSession()' and get or
set the token:
   MySession session = (MySession)getSession();
   // session.getToken();
}

I've done similar things in jetwick for twitter authentication.

Regards,
Peter.



-- 
http://jetwick.com open twitter search


 I am doing a facebook application in wicket. To get facebook authentication
 token, I have written a wicket filter as below:



 package com.mycompany.myapp.config;

 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;

 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;

 import com.visural.common.StringUtil;

 public class FBOAuth implements Filter {
 public void init(FilterConfig fc) throws ServletException {
 }

 public void doFilter(ServletRequest sr, ServletResponse sr1, FilterChain
 fc)
 throws IOException, ServletException {
 HttpServletRequest req = (HttpServletRequest) sr;
 HttpServletResponse res = (HttpServletResponse) sr1;
 res.sendRedirect(FaceBook.getLoginRedirectURL());
 String code = sr.getParameter(code);
 if (StringUtil.isNotBlankStr(code)) {
 String authURL = FaceBook.getAuthURL(code);
 URL url = new URL(authURL);
 try {
 String result = readURL(url);
 String accessToken = null;
 Integer expires = null;
 String[] pairs = result.split();
 for (String pair : pairs) {
 String[] kv = pair.split(=);
 if (kv.length != 2) {
 throw new RuntimeException(Unexpected auth
 response);
 } else {
 if (kv[0].equals(access_token)) {
 accessToken = kv[1];
 }
 if (kv[0].equals(expires)) {
 expires = Integer.valueOf(kv[1]);
 }
 }
 }
 if (accessToken != null  expires != null)
 {
 HttpSession ses = req.getSession();
 ses.setAttribute(authToken, accessToken);


 } else {
 throw new RuntimeException(
 Access token and expires not found);
 }
 } catch (IOException e) {
 throw new RuntimeException(e);
 }

 }
 }
 private String readURL(URL url) throws IOException {
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 InputStream is = url.openStream();
 int r;
 while ((r = is.read()) != -1) {
 baos.write(r);
 }
 return new String(baos.toByteArray());
 }

 public void destroy() {
 }
 }





 In the doFilter method, I have done all the redirects required and gotten
 the authentication token(accesstoken). At this point, I store the value as
 an attribute to the httpSession which i have gotten by
 ServleteRequest.getSession();

 I want to acess this token in a wicket page class so that I use RestFB to
 create a FaceBook Client etc. This is what I have done in the wicket page
 class:

 HttpSession session = null;

 if (RequestCycle.get()!= null)
 session = ((WebRequest) RequestCycle.get().getRequest())
 .getHttpServletRequest().getSession();

 if (session != null) {

 System.out.print(# AuthToken: 
 + session.getAttribute(authToken));

 }


 However, this is the output I get and I am totally stuck:

 # AuthToken: null


 Where am i going wrong?



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



Re: Specific redirect after session timeout

2011-04-26 Thread Peter Karich
 ah, ok. I'll try that url strategy change :)

Regards,
Peter.


-- 
http://jetwick.com open twitter search


 With non-hybrid url strategy using back button will fail with
 PageExpiredException because there is no session where to find the
 page instance and the disk store already cleaned all data for this
 expired session.

 On Tue, Apr 26, 2011 at 3:35 AM, Pedro Santos pedros...@gmail.com wrote:
 Tracking the last visited page with a cookie would do the trick, but IMO the
 browser back button is enough. You can even use it with some JavaScript and
 move the user back to the last page.

 On Mon, Apr 25, 2011 at 4:51 AM, Peter Karich peat...@yahoo.de wrote:

  Hi there,

 is it possible to grab the parameters (and the path) of the url and
 redirect the
 user automatically back to that page if he hits a session timeout?

 At the moment I'm using in my app.init() method

 getApplicationSettings().setPageExpiredErrorPage(SessionTimeout.class);

 and

 public SessionTimeout(final PageParameters oldParams) {
 setResponsePage(HomePage.class, oldParams);
 }

 But the oldParams variable does not contain the parameters the user had
 when he hits the session timeout.

 Or do I need to store that in a separate cookie?

 Regards,
 Peter.


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



Specific redirect after session timeout

2011-04-25 Thread Peter Karich
 Hi there,

is it possible to grab the parameters (and the path) of the url and
redirect the
user automatically back to that page if he hits a session timeout?

At the moment I'm using in my app.init() method

getApplicationSettings().setPageExpiredErrorPage(SessionTimeout.class);

and

public SessionTimeout(final PageParameters oldParams) {
 setResponsePage(HomePage.class, oldParams);
}

But the oldParams variable does not contain the parameters the user had
when he hits the session timeout.

Or do I need to store that in a separate cookie?

Regards,
Peter.

-- 
http://jetwick.com open twitter search


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



Re: Migrating from 1.4.16 to 1.5 RC3 - problem when trying to avoid pages caching (not calling the constructor of the java pages)

2011-04-21 Thread Peter Karich
 Hi Martin,

I'm using the same technic in 1.4 to avoid exceptions with ajax +
backbutton(not sure if this is true for Ismael too):

 * click on an ajax linkA, and click another one.
 * hitting back button
 * clicking again ajax linkA
 * WicketRuntimeException: component
filterPanel:filterNames:1:filterValues:2:filterValueLink not found on
page de.jetwick.ui.HomePage

So it wouldn't be an option, at least not for me, to avoid that via
bookmarkable mappings or something.
Or am I wrong? How would you avoid the exeption mentioned above?

Then I followed those suggestions:

http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/
http://blogs.atlassian.com/developer/2007/12/cachecontrol_nostore_considere.html

But I'm sure there must be a cleaner way e.g. via HistoryAjaxBehavior or
reallysimplehistory.

Any hints?

Regards,
Peter.

 Hi,

 In 1.5 there is org.apache.wicket.request.http.WebResponse.disableCaching()
 which does the same as you did. But this is not related to your problem.

 When reloading the page Wicket will re-render the same page if it is
 stateful, i.e. there is a special parameter in the URL, e.g.
 ?2something=else - here '2' means the second version.
 To reload a new instance of the page it has to be either stateless or
 bookmarkable.
 By default bookmarkable means loaded with BookmarkableMapper, the URL looks
 like /wicket/bookmarkable/com.example.MyPage, but if you don't like this URL
 then you can create your own IRequestMapper which will be something between
 BookmarkableMapper and MountedMapper.


 On Wed, Apr 20, 2011 at 5:29 PM, Ismael Hasan ismael.hasan.rom...@gmail.com
 wrote:
 Hello.

 I am facing the following problem when migrating from Wicket 1.4.16 to
 1.5 RC3. First, I'll explain what I want to accomplish, how I do that
 in 1.4.16 and the result obtained. Next, I'll explain how I try to do
 the same wich 1.5 RC3, and which are the results I get.

 1.- I want all of the pages in my web application to avoid caching, so
 they are loaded every time I use the back or reload buttons in the web
 application. To accomplish this, I use the following code in my
 BasePage class:
@Override
protected void configureResponse() {
super.configureResponse();
WebResponse response =
 getWebRequestCycle().getWebResponse();
response.setHeader(Cache-Control,
no-cache, max-age=0,must-revalidate,
 no-store);
}
 By doing this, every time I reload a page from a browser, and every
 time I use the back button on the browser, the page is fully reloaded:
 it's constructor in the Java class is called, and every item in the
 page is reloaded.

 2.- To accomplish the same thing in Wicket 1.5, I use following code
 in my BasePage class:
@Override
protected void configureResponse() {
super.configureResponse();
WebResponse response = (WebResponse)
 getRequestCycle().getResponse();
response.setHeader(Cache-Control,
no-cache, max-age=0,must-revalidate,
 no-store);
}
 The problem is that when I hit the back button or the reload button in
 the browser, the constructor of the page is not called, and so the
 page is not fully reloaded. If the back button is used, the
 applications throws  java.lang.ClassCastException:
 javax.swing.tree.DefaultMutableTreeNode cannot be cast to
 java.lang.String.I think this is motivated because the tree is
 created via Ajax, and since the constructor of the page is not called,
 it is not initialized when hitting the back button and tries to create
 the tree using a null model.

 May the root problem has something to do with the must-revalidate
 option? In the caching tutorial of wicket 1.5 it explicitly says
 We are not sending Cache-Control: must-revalidate anymore since it
 implies the resource can theoretically be cached when in fact it must
 not.
 If this is the problem, is there some workaround to obtain the same
 result as with the must-revalidate option?


 Any advice or hint will be appreciated, and thank you very much for
 your attention.

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





-- 
http://jetwick.com open twitter search


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



Re: Migrating from 1.4.16 to 1.5 RC3 - problem when trying to avoid pages caching (not calling the constructor of the java pages)

2011-04-21 Thread Peter Karich
 Hi Martin,

 AFAIU Ismael wanted each request to instantiate a new page instance. 

ah, ok. I thought he did this to avoid the same exception like me ...

 Recently I wrote such integration between Wicket and 
 http://tkyk.github.com/jquery-history-plugin/ for a client. 

I guess nothing open source :) ?

 But this will have to wait for Wicket 1.6+.

ok. but I'll try to make use of HistoryAjaxBehavior in the mean time :)

Regards,
Peter.

 Hi Peter,

 AFAIU Ismael wanted each request to instantiate a new page instance. That's
 why I suggested either use completely stateless page or use a mapper which
 will create a new instance every time. And this should be combined with
 #disableCaching() so that the browser hits the server every time.

 For your case you'll need something that supports (emulates support for)
 Ajax back button.
 Recently I wrote such integration between Wicket and
 http://tkyk.github.com/jquery-history-plugin/ for a client. It is based on
 the idea in my previous solution - HistoryAjaxBehavior but now it is more
 advanced. It is based on a mix between browser events (popstate or
 hashchange) + Wicket 1.5 events.

 Otherwise Igor started even more advanced solution at
 https://github.com/ivaynberg/wicket/tree/ajax-history. But this will have to
 wait for Wicket 1.6+.

 On Thu, Apr 21, 2011 at 2:52 PM, Peter Karich peat...@yahoo.de wrote:

  Hi Martin,

 I'm using the same technic in 1.4 to avoid exceptions with ajax +
 backbutton(not sure if this is true for Ismael too):

  * click on an ajax linkA, and click another one.
  * hitting back button
  * clicking again ajax linkA
  * WicketRuntimeException: component
 filterPanel:filterNames:1:filterValues:2:filterValueLink not found on
 page de.jetwick.ui.HomePage

 So it wouldn't be an option, at least not for me, to avoid that via
 bookmarkable mappings or something.
 Or am I wrong? How would you avoid the exeption mentioned above?

 Then I followed those suggestions:


 http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/

 http://blogs.atlassian.com/developer/2007/12/cachecontrol_nostore_considere.html

 But I'm sure there must be a cleaner way e.g. via HistoryAjaxBehavior or
 reallysimplehistory.

 Any hints?

 Regards,
 Peter.

 Hi,

 In 1.5 there is
 org.apache.wicket.request.http.WebResponse.disableCaching()
 which does the same as you did. But this is not related to your problem.

 When reloading the page Wicket will re-render the same page if it is
 stateful, i.e. there is a special parameter in the URL, e.g.
 ?2something=else - here '2' means the second version.
 To reload a new instance of the page it has to be either stateless or
 bookmarkable.
 By default bookmarkable means loaded with BookmarkableMapper, the URL
 looks
 like /wicket/bookmarkable/com.example.MyPage, but if you don't like this
 URL
 then you can create your own IRequestMapper which will be something
 between
 BookmarkableMapper and MountedMapper.


 On Wed, Apr 20, 2011 at 5:29 PM, Ismael Hasan 
 ismael.hasan.rom...@gmail.com
 wrote:
 Hello.

 I am facing the following problem when migrating from Wicket 1.4.16 to
 1.5 RC3. First, I'll explain what I want to accomplish, how I do that
 in 1.4.16 and the result obtained. Next, I'll explain how I try to do
 the same wich 1.5 RC3, and which are the results I get.

 1.- I want all of the pages in my web application to avoid caching, so
 they are loaded every time I use the back or reload buttons in the web
 application. To accomplish this, I use the following code in my
 BasePage class:
@Override
protected void configureResponse() {
super.configureResponse();
WebResponse response =
 getWebRequestCycle().getWebResponse();
response.setHeader(Cache-Control,
no-cache, max-age=0,must-revalidate,
 no-store);
}
 By doing this, every time I reload a page from a browser, and every
 time I use the back button on the browser, the page is fully reloaded:
 it's constructor in the Java class is called, and every item in the
 page is reloaded.

 2.- To accomplish the same thing in Wicket 1.5, I use following code
 in my BasePage class:
@Override
protected void configureResponse() {
super.configureResponse();
WebResponse response = (WebResponse)
 getRequestCycle().getResponse();
response.setHeader(Cache-Control,
no-cache, max-age=0,must-revalidate,
 no-store);
}
 The problem is that when I hit the back button or the reload button in
 the browser, the constructor of the page is not called, and so the
 page is not fully reloaded. If the back button is used, the
 applications throws  java.lang.ClassCastException:
 javax.swing.tree.DefaultMutableTreeNode cannot be cast to
 java.lang.String.I think this is motivated because the tree is
 created via Ajax, and since the constructor of the page

Re: IDE / Server Support

2011-03-25 Thread Peter Karich
 take a look at:

http://stackoverflow.com/questions/5373522/is-jrebel-ever-used-in-production-environments-what-can-it-reload-on-the-jvm

http://stackoverflow.com/questions/2844135/which-java-web-frameworks-provide-hot-reload

Regards,
Peter.

 Hi,

 How do you get fast deployment in development with large Wicket EJB
 applications?

 Wicket pages are ordinary class files that do not always seem to have
 special redeployment support like JSP files or HTML files.

 I have an EJB 3.1 app deployed on GlassFish 3.1. Web pages in the web
 directory deploy automatically in milliseconds, but whenever I save a
 Java class file, deploy on save deploys the whole application.

 This is not a big deal with hello world apps, but it hurts badly
 otherwise. As an example I tried the Wicket example application with
 hundreds of class files which takes more than half a minute to deploy
 on fast computers, and during that time, the IDE freezes.

 I thought that a decent servlet container should be able to detect
 single class file changes and hot-deploy them individually. But I
 might be wrong. The NetBeans folks think otherwise and refer me to the
 GlassFish server docs.

 I don't care so much about their view because what matters to me is
 the fact that - say a PHP developer - just saves his files and hits
 the reload button, and that is what I try to get, too. Otherwise I
 feel I am fighting an uphill battle.

 Any thoughts are appreciated.

 Bernard

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




-- 
http://jetwick.com open twitter search


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



Re: AutoCompleteTextField - Event onSelect?!

2011-01-13 Thread Peter Karich
 I've implemented this here:

https://github.com/karussell/Jetwick/tree/master/src/main/java/de/jetwick/ui/util

- adapted wicket-autocomplete.js + MyAutoComplete*.java (via sv paramter)

try this at jetwick.com type 'andro' and now a selection e.g. 'android'
should trigger a search ...


 If your text field is inside an form, you can add
 an AjaxFormComponentUpdatingBehavior to it.

 On Thu, Jan 13, 2011 at 8:38 AM, MattyDE ufer.mar...@gmail.com wrote:

 Hi,

 iam using AutoCompleteTextField the first time, and it works very well for
 me in basics.

 But iam a little disappointed that there is no Method to get recognized
 which Item a User have been chosen.

 I imageing something like the dropDown Box onChange.


 My task is it to change a bunch of ther textFields by the user choice of a
 Model from the AutoCompleter...

 any Ideas?


 Thanks a lot!
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-Event-onSelect-tp3215601p3215601.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





-- 
http://jetwick.com open twitter search


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



new session

2010-12-28 Thread Peter Karich
 Hi,

when is a new session created?
If I am overwriting newSession I can see that wicket will call this
method twice for a fresh browser:

Restart completed at Tue Dec 28 20:22:57 CET 2010 // jetty log
2010-12-28 20:23:02,575 [3107...@qtp-7885469-4] INFO  created new session!
2010-12-28 20:23:02,593 [23004...@qtp-7885469-3] INFO  created new session!
...

Did I do something wrong?

Kind regards,
Peter.

 @Override
public Session newSession(Request request, Response response) {
MySession session = new MySession(request);
getGuiceInjector().inject(session);
logger.info(created new session!);
return session;
}

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



Re: new session

2010-12-28 Thread Peter Karich
 forgot: this is done in one request.
Martin, is your answer still valid :-) ?

 Hi!

 First time you don't have cookie, second time maybe cookie created...

 **
 Martin

 2010/12/28 Peter Karich peat...@yahoo.de:
  Hi,

 when is a new session created?
 If I am overwriting newSession I can see that wicket will call this
 method twice for a fresh browser:

 Restart completed at Tue Dec 28 20:22:57 CET 2010 // jetty log
 2010-12-28 20:23:02,575 [3107...@qtp-7885469-4] INFO  created new session!
 2010-12-28 20:23:02,593 [23004...@qtp-7885469-3] INFO  created new session!
 ...

 Did I do something wrong?

 Kind regards,
 Peter.

  @Override
public Session newSession(Request request, Response response) {
MySession session = new MySession(request);
getGuiceInjector().inject(session);
logger.info(created new session!);
return session;
}


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



Re: Converting Wicket Application to fat client (Swing/WebStart)

2010-12-20 Thread Peter Karich
 Am 20.12.2010 19:36, schrieb Jeremy Thomerson:
 On Mon, Dec 20, 2010 at 10:45 AM, Frank Silbermann
 frank.silberm...@fedex.com wrote:
 I have a Wicket application at work that has been well-received by its 
 internal users.  Because I am not much of a web programmer, and because it 
 is for internal use only, I built a bunch of general-purpose panels and base 
 pages which I use to assemble the application-oriented pages using no 
 additional HTML.  Many of the general-purpose panels simply provide the HTML 
 for general purpose Wicket components (e.g. sets of radio-buttons and sets 
 of checkboxes) with a simplified API façade that provides only the 
 flexibility needed in my application.

 My application-oriented pages therefore emphasize the business logic, with 
 very little code whatsoever dealing with display logic.  Yes, the resulting 
 pages are ugly, but they are functional and reliable so my users don't care.

 Now I have a new requirement.  A group would like to use this application 
 with the proviso that no open-source software be used!  (They have a short 
 list of permitted exceptions containing standard stuff such as Struts.)  
 Since I chose Wicket so that I could use more-or-less a Swing style of 
 programming, I figured it would be easier to translate my application into a 
 fat-client application using Swing and deliver it via WebStart -- rather 
 than, say, re-implementing it in JSP or JFS. :-(
 Then they don't want to use this application.  They want a new
 application.  And the real problem is why do they say no open-source
 software?  What I would do in this case is counter with a budget
 proposal for the project.  Start off with implement web framework
 that works with this application from scratch since we can't use
 open source software == $8,428,748
 (http://www.ohloh.net/p/wicket#cocomo).  Then add the other pieces
 that you'll be replacing.


BTW: the JSF implementation myfaces and ... aehm the whole jdk is open
source ...


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



Re: Web search functionality

2010-12-09 Thread Peter Karich

 Check out the open source project jetwick where I am using Solr + Wicket:

https://github.com/karussell/Jetwick
(or at jetwick.com the video intro)

sql like is definitely not recommended for a large number of items.
Feel free to ask further questions ;-)

Regards,
Peter.


I want to add search functionality to my site (think of a classifieds
site, something like craigslist where users post items to sell).

Currently I am using mysql for storage, and nothing else. Is searching
directly at the database via queries the best way? It seems illogical
to perform a linear search at a large mysql table using a 'like'
statement. I'm sure there's a better way, anyone implemented a
successful (fast, memory-friendly) search feature in a web 2.0 site?
Thanks.

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





--
http://jetwick.com twitter search prototype


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



Re: Component wiring mess in 'HomePage'

2010-12-08 Thread Peter Karich

 Hi all,

sorry, maybe I didn't explain my problem very well. I am trying it again.

I am using exactly this stub-method approach for all my panels.

But in HomePage I am wiring all those panels together to use them.
I appended** an example, where the onTagClick method is overriden in 
HomePage.init

to use the doSearch method and lastQuery variable of HomePage.

The only possible solution (to avoid that code in HomePage) would be
to pass a reference into the TagCloudPanel but then it wouldn't be 
reuseable ...

hmmh, maybe I'll create a subclass of TagCloudPanel ...
hmmh, maybe the private method trick is better :-)

Regards,
Peter.

**
tagCloud = new TagCloudPanel(tagcloud) {

@Override
protected void onTagClick(String name) {
if (lastQuery != null) {
lastQuery.setQuery((lastQuery.getQuery() +   + name).trim());
doSearch(lastQuery, 0, true);
} else {
// never happens?
PageParameters pp = new PageParameters();
pp.add(q, name);
setResponsePage(HomePage.class, pp);
}
}

@Override
protected void onFindOriginClick(String tag) {
PageParameters pp = new PageParameters();
pp.add(findOrigin, tag);

doSearch(createQuery(pp), 0, true);
// this preserves parameters but cannot be context sensitive!
// setResponsePage(HomePage.class, pp);
}
};
add(tagCloud.setOutputMarkupId(true));



On Tue, Dec 7, 2010 at 4:08 AM, Peter Karichpeat...@yahoo.de  wrote:

regarding the panels: I'm using a lot of them. But for instantiation I need
to
specify what to do onClick so I could reuse the panel in a different context
somewhen later.
I mean, when the panelA detects a click this is forwarded to the onClick
method which is overwritten in Homepage to invoke a search.
But if I want to reuse that panelA in a different context maybe I want to
trigger a different onClick behaviour?

You can use this pattern of creating extension points:

class MyPanel extends Panel {
   MyPanel(id) {
 super(id);
 add(new LinkVoid(foo) {
   public void onClick() {
 onFooLinkClicked();
   }
 });
   }

   protected void onFooLinkClicked() { /* this method is designed to be
overridden */ }
}


class SomePage extends YourBasePage {
   SomePage() {
 add(new MyPanel(bar) {
   protected void onFooLinkClicked() {
 // put your page-specific logic here.
   }
 });
   }
}



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



Re: Component wiring mess in 'HomePage'

2010-12-08 Thread Peter Karich

 Am 08.12.2010 17:48, schrieb James Carman:

On Wed, Dec 8, 2010 at 11:41 AM, Jeremy Thomerson
jer...@wickettraining.com  wrote:

So, to make that shorter, use the listener approach suggested
further up in the thread.  Like:


Slight correction, it was the listenery approach. :)


yeah :-)

I don't want to stress the mailing list with such a minor problem,
but :-)

if I am using
FooPanel fp = new FooPanel(foo);
fp.addOnClickListener(new MyFooListener());

the MyFooListener needs to be implemented somewhere in HomePage, right?
Or do you mean that I will have a separate class for each listener 
passing in the necessary references ala:

fp.addOnClickListener(new MyFooListener(homePageRef));
? (to use homePageRef.doSearch within the listener)

Hmmh, then I would prefer the extension method:
FooPanel fp = new MyFooPanel(foo, homePageRef);

but I have a way to many panels. Maybe I will simply pass in the 
homePageRef everywhere
and if I really need a panel in another place I will use the extension 
method ...


Regards,
Peter.

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



Re: Component wiring mess in 'HomePage'

2010-12-07 Thread Peter Karich




 I always try to identify logical groups and delegate creation
 of those to  separat private methods. And use Panels for reusability.


Hans, the private method trick should do it although the HomePage is still 
lenghty.

regarding the panels: I'm using a lot of them. But for instantiation I need to
specify what to do onClick so I could reuse the panel in a different context 
somewhen later.
I mean, when the panelA detects a click this is forwarded to the onClick method 
which is overwritten in Homepage to invoke a search.
But if I want to reuse that panelA in a different context maybe I want to 
trigger a different onClick behaviour?



Create components out of some of the groups of components that
logically belong together?

James, What do you mean here?

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



Re: Component wiring mess in 'HomePage'

2010-12-07 Thread Peter Karich



Create components out of some of the groups of components that
logically belong together?

James, What do you mean here?


Basically...use Panels.  As for the propagation of the events, you
could try using a more listenery approach, rather than doing the
abstract onClick() method, especially since you seem to be forwarding
the onClick() call to the onClick() method on the page (you could have
the page implement PanelAListener perhaps?)


ah, ok. I'll think about how I could do this via listeners (some panels 
have multiple different methods)


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



Component wiring mess in 'HomePage'

2010-12-06 Thread Peter Karich

 Hi,

I have some components and I'm wiring them together directly within a 
300 lines init method in the HomePage class **
Now this method is 'a bit' lengthy and unreadable. How would you make it 
more maintainable?


Regards,
Peter.

**
https://github.com/karussell/Jetwick/blob/master/src/main/java/de/jetwick/ui/HomePage.java

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



Long term usage of twitter/oauth credentials with wicket

2010-12-04 Thread Peter Karich

 Hi,

do you know of any examples for wicket which uses twitter's oAuth?
In my app I can easily login and use the twitter api,
but I'm kind of stuck how to avoid that the user needs to login every 
time after the session expires.


Any other hints, links or best practices?

Kind regards,
Peter.

--
http://jetwick.com twitter search prototype


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



Re: Long term usage of twitter/oauth credentials with wicket

2010-12-04 Thread Peter Karich

 Igor,

there is token_secure. So storing it in clean text should be ok, right?
Or do I need to encrypt (or at leat base64ing) it?

Regards,
Peter.


store the token in a cookie and attempt to auto-reologin user based on it?

-igor

On Sat, Dec 4, 2010 at 11:51 AM, Peter Karichpeat...@yahoo.de  wrote:

  Hi,

do you know of any examples for wicket which uses twitter's oAuth?
In my app I can easily login and use the twitter api,
but I'm kind of stuck how to avoid that the user needs to login every time
after the session expires.

Any other hints, links or best practices?

Kind regards,
Peter.

--
http://jetwick.com twitter search prototype


-
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





--
http://jetwick.com twitter search prototype


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



Re: Long term usage of twitter/oauth credentials with wicket

2010-12-04 Thread Peter Karich

 Hi Igor!

thanks! I will try it out. (I also think token is url safe)

BTW: I meant, there is also 'token_secure', not only 'token' in 
twitter's oAuth (+ the app credentials).
So a hacker cannot easily guess the 'token' for the user and get a fake 
login via modifying its cookie.

like it would be the case if I would store the user name in the cookie only.

(But this method is not safe if you as a user are connected via an 
unsecured WLAN)


Regards,
Peter.


not sure, but i would think it would be ok. i think the token should
already be url safe, but once again - not sure.

-igor

On Sat, Dec 4, 2010 at 12:38 PM, Peter Karichpeat...@yahoo.de  wrote:

  Igor,

there is token_secure. So storing it in clean text should be ok, right?
Or do I need to encrypt (or at leat base64ing) it?

Regards,
Peter.


store the token in a cookie and attempt to auto-reologin user based on it?

-igor

On Sat, Dec 4, 2010 at 11:51 AM, Peter Karichpeat...@yahoo.dewrote:

  Hi,

do you know of any examples for wicket which uses twitter's oAuth?
In my app I can easily login and use the twitter api,
but I'm kind of stuck how to avoid that the user needs to login every
time
after the session expires.

Any other hints, links or best practices?

Kind regards,
Peter.



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



Re: Long term usage of twitter/oauth credentials with wicket

2010-12-04 Thread Peter Karich

 oh, but this would raise other questions :-)

e.g. how can I setup https with tomcat/wicket? Or do I need to setup 
this with apache only?


Regards,
Peter.


you can mark the cookie as secure so it will only be transferred over https.

-igor

On Sat, Dec 4, 2010 at 12:56 PM, Peter Karichpeat...@yahoo.de  wrote:

  Hi Igor!

thanks! I will try it out. (I also think token is url safe)

BTW: I meant, there is also 'token_secure', not only 'token' in twitter's
oAuth (+ the app credentials).
So a hacker cannot easily guess the 'token' for the user and get a fake
login via modifying its cookie.
like it would be the case if I would store the user name in the cookie only.

(But this method is not safe if you as a user are connected via an unsecured
WLAN)

Regards,
Peter.


not sure, but i would think it would be ok. i think the token should
already be url safe, but once again - not sure.

-igor

On Sat, Dec 4, 2010 at 12:38 PM, Peter Karichpeat...@yahoo.dewrote:

  Igor,

there is token_secure. So storing it in clean text should be ok, right?
Or do I need to encrypt (or at leat base64ing) it?

Regards,
Peter.


store the token in a cookie and attempt to auto-reologin user based on
it?

-igor

On Sat, Dec 4, 2010 at 11:51 AM, Peter Karichpeat...@yahoo.de
  wrote:

  Hi,

do you know of any examples for wicket which uses twitter's oAuth?
In my app I can easily login and use the twitter api,
but I'm kind of stuck how to avoid that the user needs to login every
time
after the session expires.

Any other hints, links or best practices?

Kind regards,
Peter.



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



Re: howto track translations

2010-12-03 Thread Peter Karich
 See differences (only) with the following snippet which assumes the 
correct/original properties in messages.properties ('englisch').
It will create a property file for the missing keys for 'de' (german) 
and shows which original keys are unused


  public static void main(String[] args) throws IOException {
new CheckI18N().start();
}


public void start() throws IOException {
Properties english = new Properties();

english.load(getClass().getResourceAsStream(messages.properties));


Properties de = new Properties();
de.load(getClass().getResourceAsStream(messages_de.properties));

// replace FastMap with LinkedHashMap
SetString deKeys = FastSet.newInstance();
MapString, String missingInDE = new TreeMap();
SetString unusedInDE = FastSet.newInstance();

for (EntryObject, Object entry : de.entrySet()) {
deKeys.add(entry.getKey().toString());
}

for (EntryObject, Object entry : english.entrySet()) {
if (!deKeys.contains(entry.getKey().toString()))
missingInDE.put(entry.getKey().toString(), 
entry.getValue().toString());

}

for (String deKey : deKeys) {
if (english.get(deKey) == null)
unusedInDE.add(deKey);
}

System.out.println(en: + english.size());

System.out.println(de: + deKeys.size());
System.out.println(missing in de: + missingInDE.size());
System.out.println(unused in de: + unusedInDE.size());

System.out.println(\n\n==\nmissing in de:\n);
outAsProperties(missingInDE);

System.out.println(\n\n==\nunused in de:\n);
for (String str : unusedInDE) {
System.out.println(str);
}
}

public void outAsProperties(MapString, String map) {
for (EntryString, String entry : map.entrySet()) {
System.out.println(entry.getKey() + = + entry.getValue());
}
}


in the process of expanding the number of languages my wicket
application is available in, I'm running into the question of tracking
properties files.
In particular, I want to be able to get some kind of feedback about
missing translations; mismatches between property files would be
sufficient.

How do you do this?  Is there a maven plugin that I've missed, or
perhaps a standalone tool?

cheers, Frank




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



wicket stuff progressbar

2010-11-24 Thread Peter Karich

 Hi,

I am playing with the progressbar* but wonder where I can grab the 
sources for 1.4?

this leads to an exception:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-progressbar/

Regards,
Peter.

*
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-progressbar

--
http://jetwick.com twitter search prototype


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



Jetwick Twitter Search now Open Source

2010-11-22 Thread Peter Karich

Jetwick is now available under the Apache 2 license:
http://www.pannous.info/2010/11/jetwick-is-now-open-source/

Regards,
Peter.


PS:
features http://www.pannous.info/products/jetwick-twitter-search/
installation https://github.com/karussell/Jetwick/wiki
for devs 
http://karussell.wordpress.com/2010/11/22/jetwick-twitter-search-is-now-free-software-wicket-and-solr-pearls-for-developers/



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



Re: JFreeChart with clickable imagemap

2010-10-07 Thread Peter Karich
Hi James!

 I checked jetwick and it looks cool. ;-)
   
hey, thanks ;-)

 Do you use JFreeChart to create those charts?
   

initially I did. But now only that tiny bar image is stolen from
jfreechart :-)

http://jetwick.com/img/bar-min.png

the rest is created via divs and css and a bit java 'magic'. settings
the height of a div is all:
Label bar = new Label(itemSpan);
bar.add(new AttributeAppender(style, new Model(height: + (int)
(zoomer * entry.count) + px),  ));

 I'm willing to try that option as well. Kindly blog about it!

Finally I did a small post here:

http://karussell.wordpress.com/2010/10/01/barchart-with-wicket-and-pure-html/

please comment if something is against wicket philosophy or if it
contains bugs etc

Regards,
Peter.


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



Re: JFreeChart with clickable imagemap

2010-10-04 Thread Peter Karich
thanks!

 Dear all,

 I've added a new wiki page JFreeChart with tooltip
 examplehttps://cwiki.apache.org/confluence/display/WICKET/JFreeChart+with+tooltip+example,
 which outlines the steps to follow to create JFreeChart based charts that
 can display tooltips.

 On Fri, Oct 1, 2010 at 3:05 PM, James james.eliye...@gmail.com wrote:

   
 Thanks Ernesto.
 I'll do the same.


 On Fri, Oct 1, 2010 at 2:24 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 
 James,

 why not add this bit to the wiki page you mentioned? So that others
 can avoid loosing the hours you lost;-)

 Cheers,

 Ernesto

 On Fri, Oct 1, 2010 at 8:18 AM, James james.eliye...@gmail.com wrote:
   
 Guys,

 Finally managed to display the tooltip generated by JFreeChart in the
 
 wicket
   
 page by following these
 instructions
 
 http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
   
 .
 Had only an example markup been given in that post, it would have saved
 
 lots
   
 of frustrating hours I spent. :-(

 For anyone looking forward for showing the tooltips in a chart generated
 
 by
   
 JFreeChart, here is the markup you might need.

 code
img wicket:id=chart usemap=#tooltip/img
 /code

 For the java part, use this
 code
 
 http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
   
 .

 Your output should look something like this..

 code
   img wicket:id=chart usemap=#tooltip src=blah blah/img
   map id=tooltip name=tooltip
area/
   /map
 /code


 NOTE:

  - You must use code img wicket:id=chart usemap=#tooltip/img
 /code and not code img wicket:id=chart usemap=#tooltip/
 
 /code
   
  - You must use the # symbol before the usemap id.
  - The image map related html markup is generated by the api provided by
 JFreeChart.



 On Fri, Oct 1, 2010 at 10:34 AM, James james.eliye...@gmail.com
 
 wrote:
   
 
 Hi Peter,

 Thanks for your prompt reply.
 I don't know how I missed this wonderful mailing list for this long..
   
 ;-(
   
 I have tried passing models to constructImageMap (wrapping the chart
   
 image
   
 object as a model) but somehow the map was not updated.

 I checked jetwick and it looks cool. ;-)
 Do you use JFreeChart to create those charts?
 I'm willing to try that option as well. Kindly blog about it!

 Thanks once again for taking your time to reply.


 On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich peat...@yahoo.de
   
 wrote:
   
   
 Hi James,

 In the constructImageMap you whill have to pass a model as well, but
 
 I'm
   
 not sure how :-(

 Another way would be to adapt constructImageMap to updateImageMap
 so that you can call it in ChartImage.createBufferedImage (or every
 
 time
   
 the model updates)

 BTW: For jetwick I used an html solution with div's to display bar
 
 charts.
   
 which is customizable by the designer (if any ;-)), readable by
 
 spiders
   
 etc
 and didn't need those imagemaps. Are you interested in this solution?
 
 I
   
 could blog about it.

 Regards,
 Peter (aka timetabling on twitter ;-)).

 
 Hi Guys,

 I followed the instructions in the wiki JFreeChart with clickable
 imagemap
   
 
 https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html
   
 to create a chart.
 I have a requirement whereby the chart has to be generated
   
 dynamically
   
 based
 
 on certain inputs.
 I managed to create the chart image by using LoadableDetachableModel
   
 but
   
 struggling to get the imagemap updated as the chart image changes.
 Kindly give your valuable suggestions.


   

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


 

 --
 Thanks  Regards,
 James

   


 --
 Thanks  Regards,
 James

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


   

 --
 Thanks  Regards,
 James
 


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



Re: JFreeChart with clickable imagemap

2010-09-30 Thread Peter Karich
Hi James,

In the constructImageMap you whill have to pass a model as well, but I'm
not sure how :-(

Another way would be to adapt constructImageMap to updateImageMap
so that you can call it in ChartImage.createBufferedImage (or every time
the model updates)

BTW: For jetwick I used an html solution with div's to display bar charts.
which is customizable by the designer (if any ;-)), readable by spiders etc
and didn't need those imagemaps. Are you interested in this solution? I
could blog about it.

Regards,
Peter (aka timetabling on twitter ;-)).

 Hi Guys,

 I followed the instructions in the wiki JFreeChart with clickable
 imagemaphttps://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html
 to create a chart.
 I have a requirement whereby the chart has to be generated dynamically based
 on certain inputs.
 I managed to create the chart image by using LoadableDetachableModel but
 struggling to get the imagemap updated as the chart image changes.
 Kindly give your valuable suggestions.

   


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



Re: Save Data as CSV File

2010-09-29 Thread Peter Karich
Hi,

this worked for me:

WebResource export = new WebResource() {

@Override
public IResourceStream getResourceStream() {
return new StringResourceStream(getTweetsAsString(), text/plain);
}

@Override
protected void setHeaders(WebResponse response) {
super.setHeaders(response);
response.setAttachmentHeader(tweets.csv);
}
};
export.setCacheable(false);
add(new ResourceLink(exportCsvLink, export));

Regards,
Peter.

 I have a data table and would like the user to be able to save the data
 locally as a csv file when they click a link or button.  The docs for
 DownloadLink state that it will generate a save as dialog which is
 exactly what I want, but, it appears to only work with a file that
 already exists.  I haven't been able to find any examples of how to use
 it, so I could be wrong about that.  I've seen some posts that talk
 about using a DynamicWebResource, but I can't find any complete examples
 on how to generate/download a file.

 What is the best way to download a file generated programmatically in
 Wicket?

 Thanks,Shelli

   

-- 
http://jetwick.com twitter search prototype


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



Re: chrome + wicket ajax + back button = problem?

2010-09-24 Thread Peter Karich
I had the same problem ...
 Take a look at
 http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/
   

isn't there a better fix? E.g. it seems to me that this 'hack' avoids
client-side js caching (or is this a wrong observation)?

Regards,
Peter.




-- 
http://jetwick.com twitter search prototype


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



Re: announcing Granite - a Wicket-Scala-DB4O web application stack

2010-09-23 Thread Peter Karich

 You could abstract the datastore in the stack using JDO/DataNucleus. It
 supports DB40. In fact as it also supports RDBMS you could easily create
 a datastore agnostic Wicket/Scala stack - that would be most awesome!
   

Just as a side note:
there is/was an mini example with warp persist which can handle
db4o+neodatis (and with some minor work also hibernate):

http://karussell.wordpress.com/2010/01/18/crud-with-wicket-guice-db4o-neodatis/

Regards,
Peter.


-- 
http://jetwick.com twitter search prototype


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



Re: Url parameters: removed onClick + wrong url encoding

2010-09-20 Thread Peter Karich
Martin,

thanks for the support in the tickets btw :-)

two minor migration questions (when using 1.5-M2.1)

1. When I mount my homepage via:
getRootRequestMapperAsCompound().add(new MountedMapper(twittersearch,
HomePage.class));
and I am querying webapp/?test I got a directory listing - is this
intended behaviour?

2. I am doing a lot of
String str = pageParameters.getString(q);
if(str != null  !str.isEmpty()) { // using str...
}

Now the method is replaced with get(q).toString() and when dealing
with optional parameters it now looks a lot more verbose:
StringValue sv = pageParameters.get(q);
if(sv != null) {
String str = sv.toString()
if(!str.isEmpty()) { // using str...
}
}
Can I avoid that?

Regards,
Peter.

 On Thu, Sep 16, 2010 at 9:11 PM, Peter Karich peat...@yahoo.de wrote:

   
 Thanks Martin for your time and help!

 The problem with M2.1 is that some functionality is missing/hidden:
 E.g. I need
 getWebRequestCycle().getWebRequest()
 to guess the user language and set some caching stuff to workaround an
 ajax+backbutton problem in 1.4.9.

 
 In components you can use org.apache.wicket.Component.getRequest()
 Otherwise: RequestCycle.get().getRequest() and WebRequest,
 ServletWebRequest, custom

   
 Is this the correct way to use MountedMapper
 getRootRequestMapperAsCompound().add(new MountedMapper(search,
 HomePage.class));
 ?

 
 Yes.

   
 But the blocker was guice, it seems to be broken (does not inject my
 Provider = NPE) when using the 1.4.9 approach:
 addComponentInstantiationListener(
new GuiceComponentInjector(this, Guice.createInjector(new
 DefaultModule(;

 
 See wicket-examples  Guice (
 http://wicketstuff.org/wicket/guice/wicket/bookmarkable/org.apache.wicket.examples.guice.HomePage
 )
 They work. Find the differences ;-)

   
 I found the migration guide but could not solve the problems above
 https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5

 
 If you find something to add there don't hesitate to press the Edit link
 at the top ;-)

   
 Regards,
 Peter.


 
 On Thu, Sep 16, 2010 at 4:05 PM, Peter Karich peat...@yahoo.de wrote:


   
 Hi Martin!


 
 The answer here is to use HybridUCS. It preserves the 'nice' url.


 
 Or use Wicket 1.5 (M2.1). There the URL handling is much easier.


   
 did you mean this one:

 http://svn.apache.org/repos/asf/wicket/branches/wicket-1.5-M2/


 
 Yes, see
 Artifacts:
 http://people.apache.org/~ivaynberg/wicket-1.5-M2.1/disthttp://people.apache.org/%7Eivaynberg/wicket-1.5-M2.1/dist
   
 http://people.apache.org/%7Eivaynberg/wicket-1.5-M2.1/dist
 
 Maven repo:
 http://people.apache.org/~ivaynberg/wicket-1.5-M2.1/m2-repohttp://people.apache.org/%7Eivaynberg/wicket-1.5-M2.1/m2-repo
   
 http://people.apache.org/%7Eivaynberg/wicket-1.5-M2.1/m2-repo
 

   
 are there any major problems with that version?


 
 Probably, it is not final yet. But I don't know of anything major.


   
 
 There the URL handling is much easier.

   
 What in detail is better with URL handling? It works better 'out of the
 box'?

 The UrlCodingStrategies are replaced with IReuqestHandlers which are
 
 much
 
 
 more easier to extend, read, write, ...
 For your case see MountedMapper.


   
 I'm not sure where is the problem here. I'll need to try it myself ...
 Please create a ticket in Jira with a quickstart. Maybe it is a bug.


   
 ok, I can reproduce it with 1.4.9. see:
 https://issues.apache.org/jira/browse/WICKET-3052

 Please let me know if you can reproduce it too or if I did something
 other wrong.


 
 Ok. Some of us will take a look.
 Thanks!


   
 Regards,
 Peter.

 

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


 
   


-- 
http://jetwick.com twitter search prototype


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



Re: Url parameters: removed onClick + wrong url encoding

2010-09-20 Thread Peter Karich
Hi Martin!

 Martin,

 thanks for the support in the tickets btw :-)

 
 We thank you for testing the framework and blogging about it! ;-)
   

;-)

 Interesting.
 How exactly looks the URL for such request?

E.g. try it with the quickstart at:
https://issues.apache.org/jira/browse/WICKET-3053

http://localhost:8080/jetwick/?test
(it seems that 'test' can anything)

Directory: /jetwick/
WEB-INF/  http://localhost:8080/jetwick/WEB-INF/  4096 bytes 
16.09.2010 22:18:08


luckily clicking the WEB-INF doesn't show its content and maybe this
issue is as well a jetty one.

 StringValue is a clever class ;-)
 It can handle null value for you.
 It has isNull(), isEmpty()

oh noo, that simple ... :-)

Regards,
Peter.


Url parameters: removed onClick + wrong url encoding

2010-09-16 Thread Peter Karich
Hi,

two questions:

1. If I do the following all url parameters will be replaced with
?wicket:interface=:6:1:::

e.g. in the main wicket application class I do:
mount(new MixedParamUrlCodingStrategy(search, HomePage.class, new
String[]{q}));

in HomePage.java i do without ajax:
add(new Link(nextPage) {
  public void onClick() {
 // update some components
  }});

How can I avoid that search?q=test which correctly appears after a
search [1], will be overwritten with search?wicket:interface=:6:1::: ?
I would like that the user can copy and paste the url to a friend and he
can use the search (of course a new session is created + some parameters
lost but the q parameter is ok). So why not:
search?wicket:interface=:6:1:::q=test


2. How can I use the HybridUrlCodingStrategy?
I am doing:
mount(new HybridUrlCodingStrategy(search, HomePage.class, true)); and
the problem is that searches containing hashes destroy the url or the
encoding does not work properly. So it writes the following url:

  search/q/#wicket.2
  instead of
  search/q/%23wicket.4

I searched through the code of that strategy but I think, that the
strategy works ok (it calls encode() when adding to url).
In the search form I am doing the appended code [1] and this works
correctly for other strategies.

Where could be my mistake? Wicket version: 1.4.9

Regards,
Peter.



[1]
Form form = new Form(searchform) {
   public void onSubmit() {
  PageParameters params = new PageParameters();
  if (query != null  !query.isEmpty())
   params.add(q, query);

  setResponsePage(HomePage.class, params);
   }};

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



Re: Url parameters: removed onClick + wrong url encoding

2010-09-16 Thread Peter Karich
Hi Martin!

 The answer here is to use HybridUCS. It preserves the 'nice' url.
 
 Or use Wicket 1.5 (M2.1). There the URL handling is much easier.
   

did you mean this one:

http://svn.apache.org/repos/asf/wicket/branches/wicket-1.5-M2/

are there any major problems with that version?

 There the URL handling is much easier.

What in detail is better with URL handling? It works better 'out of the
box'?

 I'm not sure where is the problem here. I'll need to try it myself ...
 Please create a ticket in Jira with a quickstart. Maybe it is a bug.
   

ok, I can reproduce it with 1.4.9. see:
https://issues.apache.org/jira/browse/WICKET-3052

Please let me know if you can reproduce it too or if I did something
other wrong.

Regards,
Peter.


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



Re: Url parameters: removed onClick + wrong url encoding

2010-09-16 Thread Peter Karich
Thanks Martin for your time and help!

The problem with M2.1 is that some functionality is missing/hidden:
E.g. I need
getWebRequestCycle().getWebRequest()
to guess the user language and set some caching stuff to workaround an
ajax+backbutton problem in 1.4.9.

Is this the correct way to use MountedMapper
getRootRequestMapperAsCompound().add(new MountedMapper(search,
HomePage.class));
?

But the blocker was guice, it seems to be broken (does not inject my
Provider = NPE) when using the 1.4.9 approach:
addComponentInstantiationListener(
new GuiceComponentInjector(this, Guice.createInjector(new
DefaultModule(;

I found the migration guide but could not solve the problems above
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5

Regards,
Peter.


 On Thu, Sep 16, 2010 at 4:05 PM, Peter Karich peat...@yahoo.de wrote:

   
 Hi Martin!

 
 The answer here is to use HybridUCS. It preserves the 'nice' url.

 
 Or use Wicket 1.5 (M2.1). There the URL handling is much easier.

   
 did you mean this one:

 http://svn.apache.org/repos/asf/wicket/branches/wicket-1.5-M2/

 
 Yes, see
 Artifacts:
 http://people.apache.org/~ivaynberg/wicket-1.5-M2.1/disthttp://people.apache.org/%7Eivaynberg/wicket-1.5-M2.1/dist
 Maven repo:
 http://people.apache.org/~ivaynberg/wicket-1.5-M2.1/m2-repohttp://people.apache.org/%7Eivaynberg/wicket-1.5-M2.1/m2-repo

   
 are there any major problems with that version?

 
 Probably, it is not final yet. But I don't know of anything major.

   
 
 There the URL handling is much easier.
   
 What in detail is better with URL handling? It works better 'out of the
 box'?

 The UrlCodingStrategies are replaced with IReuqestHandlers which are much
 
 more easier to extend, read, write, ...
 For your case see MountedMapper.

   
 I'm not sure where is the problem here. I'll need to try it myself ...
 Please create a ticket in Jira with a quickstart. Maybe it is a bug.

   
 ok, I can reproduce it with 1.4.9. see:
 https://issues.apache.org/jira/browse/WICKET-3052

 Please let me know if you can reproduce it too or if I did something
 other wrong.

 
 Ok. Some of us will take a look.
 Thanks!

   
 Regards,
 Peter.
 


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



Re: Url parameters: removed onClick + wrong url encoding

2010-09-16 Thread Peter Karich
Hi Martin!

 Thanks Martin for your time and help!

 The problem with M2.1 is that some functionality is missing/hidden:
 E.g. I need
 getWebRequestCycle().getWebRequest()
 to guess the user language and set some caching stuff to workaround an
 ajax+backbutton problem in 1.4.9.

 
 In components you can use org.apache.wicket.Component.getRequest()
 Otherwise: RequestCycle.get().getRequest() and WebRequest,
 ServletWebRequest, custom
ok, I will take a look at this.

 See wicket-examples  Guice (
 http://wicketstuff.org/wicket/guice/wicket/bookmarkable/org.apache.wicket.examples.guice.HomePage
 )
 They work. Find the differences ;-)
   

Hmmh, the example doesn't use modules, setters for injection or
providers ... I will digg into and raise another Jira issue if it's not
my fault ;-)

 I found the migration guide but could not solve the problems above
 https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5

 
 If you find something to add there don't hesitate to press the Edit link
 at the top ;-)

If I only could provide a solution :-)

Regards,
Peter.

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



Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi,

I would like to fire an ajax event every time the user changes the
selection of the choices
e.g. he switches from 'wiki' to 'wicket' with keys or mouse

Which function is necessary to fire such an event on the client side?
I never did sth. similar to this and tried (without success + a long
time) to customize wicket-autocomplete.js according to some hints [1] .
And how can I add a behaviour on the server side which listens to this
custom event? Any hints?

Regards,
Peter.

[1]
http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html
http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/
http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/

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



Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi Pieter,

thanks for your quick response! And sorry, I didn't mention that I am using
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField
from wicket extensions. Or did you have another autocomplete component
in mind that I am not aware of?

Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the
unwanted side effect that other values will be submitted too.
Then I tried with
autoCompleteField.add(new OnChangeAjaxBehavior() {
   @Override
   protected void onUpdate(AjaxRequestTarget target) {
// sout here
   });

But this will fire only every time I change the textfield value, not the
selection of the suggestions :-(

Regards,
Peter.

 add AjaxFormComponentUpdatingBehavior to your dropdownChoice.

 new AjaxFormComponentUpdatingBehavior(onchange) {
 @Override
 protected void onUpdate(AjaxRequestTarget target) {
 //do the needed stuff here...
 }
 })

 The onUpdate() will be triggered when the selection changes, however the
 behavor will be different if you do this with mous or keys (and even from
 browser to brower if I'm not mistaking)
 Anyhow, with FireFow it is a follows:

 with mouse: onUpdate(..) is fired from the moment you change the selection.
 with keys: onUpdate(..) is fired from the moment you change the selection
 AND the component loses focus (by pressing tab for example) or the user
 presses ENTER


 Hope this helps.


 Pieter

 On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote:

   
 Hi,

 I would like to fire an ajax event every time the user changes the
 selection of the choices
 e.g. he switches from 'wiki' to 'wicket' with keys or mouse

 Which function is necessary to fire such an event on the client side?
 I never did sth. similar to this and tried (without success + a long
 time) to customize wicket-autocomplete.js according to some hints [1] .
 And how can I add a behaviour on the server side which listens to this
 custom event? Any hints?

 Regards,
 Peter.

 [1]

 http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html

 http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/

 http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/

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


 

   


-- 
http://jetwick.com twitter search prototype


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



Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi Martin,

your instructions helped a lot! Now I can send an ajax request via * and
recieve the request via **

But the problem is that the javascript function 'doUpdateChoices' will
only update the choices-divs
and not all the targets that I added in the java method 'onSelectionChange'.

Do you know how to handle this?

(And - not so important - do you know the meaning of the parameters of
'Wicket.Ajax.Request' especially 'wicket-autocomplete|d'?)

Regards,
Peter.

*
function setSelected(newSelected) {
if (newSelected != selected) {
selected = newSelected;
selChSinceLastRender = true;
localThrottler.throttle(getMenuId(), throttleDelay,
sendSelectedValue);
}
}

function sendSelectedValue() {
showIndicator();   
var value = handleSelection(getSelectedValue());
Wicket.Log.info(Send ajax request! Selected value: + value);
var request = new
Wicket.Ajax.Request(callbackUrl+(callbackUrl.indexOf(?)-1 ?  :
?) + sv=+processValue(value),
doUpdateChoices, false, true, false, wicket-autocomplete|d);
request.get();
}


**
@Override
protected void respond(AjaxRequestTarget target) {
final RequestCycle requestCycle = RequestCycle.get();
String val = requestCycle.getRequest().getParameter(sv);
if (val != null)
onSelectionChange(target, val);
else {
val = requestCycle.getRequest().getParameter(q);
onRequest(val, requestCycle);
}
}


 Hi Peter,

 Looking at the code I think you'll need to touch wicket-autocomplete.js.
 Copy it to your project and override
 org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior#renderHead(IHeaderResponse)
 so that it loads your .js file.
 Then make
 org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField.newAutoCompleteBehavior(IAutoCompleteRendererT,
 AutoCompleteSettings) return your custom AutoCompleteBehavior.

 In the .js itself you'll need to touch function setSelected(newSelected)
 at line 212 (1.4-SNAPSHOT). Each time this function is called you'll have to
 make your Ajax call.

 Good luck!

 On Thu, Sep 9, 2010 at 1:07 PM, Peter Karich peat...@yahoo.de wrote:

   
 Hi Pieter,

 thanks for your quick response! And sorry, I didn't mention that I am using

 org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField
 from wicket extensions. Or did you have another autocomplete component
 in mind that I am not aware of?

 Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the
 unwanted side effect that other values will be submitted too.
 Then I tried with
 autoCompleteField.add(new OnChangeAjaxBehavior() {
@Override
   protected void onUpdate(AjaxRequestTarget target) {
 // sout here
   });

 But this will fire only every time I change the textfield value, not the
 selection of the suggestions :-(

 Regards,
 Peter.

 
 add AjaxFormComponentUpdatingBehavior to your dropdownChoice.

 new AjaxFormComponentUpdatingBehavior(onchange) {
 @Override
 protected void onUpdate(AjaxRequestTarget target) {
 //do the needed stuff here...
 }
 })

 The onUpdate() will be triggered when the selection changes, however the
 behavor will be different if you do this with mous or keys (and even from
 browser to brower if I'm not mistaking)
 Anyhow, with FireFow it is a follows:

 with mouse: onUpdate(..) is fired from the moment you change the
   
 selection.
 
 with keys: onUpdate(..) is fired from the moment you change the selection
 AND the component loses focus (by pressing tab for example) or the user
 presses ENTER


 Hope this helps.


 Pieter

 On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote:


   
 Hi,

 I would like to fire an ajax event every time the user changes the
 selection of the choices
 e.g. he switches from 'wiki' to 'wicket' with keys or mouse

 Which function is necessary to fire such an event on the client side?
 I never did sth. similar to this and tried (without success + a long
 time) to customize wicket-autocomplete.js according to some hints [1] .
 And how can I add a behaviour on the server side which listens to this
 custom event? Any hints?

 Regards,
 Peter.

 [1]


 
 http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html
 

 
 http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/
 

 
 http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 

   

 --
 http://jetwick.com twitter search prototype

Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi Martin, hi Pieter!

wow! This works now and I thought one has to write ajax assembler to
make it running ...
Thanks a lot!

Are the ajax functions documented anywhere?

Regards,
Peter.

 Hi Peter,

 Use wicketAjaxGet() instead of Wicket.Ajax.Request.get().
 The former uses the latter and knows how to process the xml response
 returned by AjaxRequestTarget.

 On Thu, Sep 9, 2010 at 5:54 PM, Peter Karich peat...@yahoo.de wrote:

   
 Hi Martin,

 your instructions helped a lot! Now I can send an ajax request via * and
 recieve the request via **

 But the problem is that the javascript function 'doUpdateChoices' will
 only update the choices-divs
 and not all the targets that I added in the java method
 'onSelectionChange'.

 Do you know how to handle this?

 (And - not so important - do you know the meaning of the parameters of
 'Wicket.Ajax.Request' especially 'wicket-autocomplete|d'?)

 Regards,
 Peter.

 *
 function setSelected(newSelected) {
if (newSelected != selected) {
selected = newSelected;
selChSinceLastRender = true;
localThrottler.throttle(getMenuId(), throttleDelay,
 sendSelectedValue);
}
 }

 function sendSelectedValue() {
showIndicator();
var value = handleSelection(getSelectedValue());
Wicket.Log.info(Send ajax request! Selected value: + value);
var request = new
 Wicket.Ajax.Request(callbackUrl+(callbackUrl.indexOf(?)-1 ?  :
 ?) + sv=+processValue(value),
doUpdateChoices, false, true, false, wicket-autocomplete|d);
request.get();
 }


 **
 @Override
 protected void respond(AjaxRequestTarget target) {
final RequestCycle requestCycle = RequestCycle.get();
String val = requestCycle.getRequest().getParameter(sv);
if (val != null)
onSelectionChange(target, val);
else {
val = requestCycle.getRequest().getParameter(q);
onRequest(val, requestCycle);
 }
 }


 
 Hi Peter,

 Looking at the code I think you'll need to touch wicket-autocomplete.js.
 Copy it to your project and override

   
 org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior#renderHead(IHeaderResponse)
 
 so that it loads your .js file.
 Then make

   
 org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField.newAutoCompleteBehavior(IAutoCompleteRendererT,
 
 AutoCompleteSettings) return your custom AutoCompleteBehavior.

 In the .js itself you'll need to touch function
   
 setSelected(newSelected)
 
 at line 212 (1.4-SNAPSHOT). Each time this function is called you'll have
   
 to
 
 make your Ajax call.

 Good luck!

 On Thu, Sep 9, 2010 at 1:07 PM, Peter Karich peat...@yahoo.de wrote:


   
 Hi Pieter,

 thanks for your quick response! And sorry, I didn't mention that I am
 
 using
 

 
 org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField
 
 from wicket extensions. Or did you have another autocomplete component
 in mind that I am not aware of?

 Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the
 unwanted side effect that other values will be submitted too.
 Then I tried with
 autoCompleteField.add(new OnChangeAjaxBehavior() {
@Override
   protected void onUpdate(AjaxRequestTarget target) {
 // sout here
   });

 But this will fire only every time I change the textfield value, not the
 selection of the suggestions :-(

 Regards,
 Peter.


 
 add AjaxFormComponentUpdatingBehavior to your dropdownChoice.

 new AjaxFormComponentUpdatingBehavior(onchange) {
 @Override
 protected void onUpdate(AjaxRequestTarget target) {
 //do the needed stuff here...
 }
 })

 The onUpdate() will be triggered when the selection changes, however
   
 the
 
 behavor will be different if you do this with mous or keys (and even
   
 from
 
 browser to brower if I'm not mistaking)
 Anyhow, with FireFow it is a follows:

 with mouse: onUpdate(..) is fired from the moment you change the

   
 selection.

 
 with keys: onUpdate(..) is fired from the moment you change the
   
 selection
 
 AND the component loses focus (by pressing tab for example) or the user
 presses ENTER


 Hope this helps.


 Pieter

 On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de
   
 wrote:
 


   
 Hi,

 I would like to fire an ajax event every time the user changes the
 selection of the choices
 e.g. he switches from 'wiki' to 'wicket' with keys or mouse

 Which function is necessary to fire such an event on the client side?
 I never did sth. similar to this and tried (without success + a long
 time) to customize wicket-autocomplete.js according to some hints [1]
 
 .
 
 And how can I add a behaviour on the server side which listens to this
 custom event

Re: How to add Images in wicket Navigator instead of ?

2010-02-15 Thread Peter Karich

For code see the resources here (the example with db4o):
http://karussell.wordpress.com/2010/01/18/crud-with-wicket-guice-db4o-neodatis/

Peter.

--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Re: Apache Click

2010-01-29 Thread Peter Karich

Hi,

for me the main disadvantage of click is that it uses velocity instead 
pure html.

Then click has probably less publicity/mailing support and less components.
An advantage could be that cayenne is supported as a default persistent 
solution.


Search for wicket vs click or sth. like (was useful for me).

 I think wicket with a good look css can beat them.

This is the great thing about wicket: just let the designer do the 
design their html ;-) and I will code (fast!).

No need for GSP, JSF, rhtml, JSP, velocity, xslt ...

Regards,
Peter.


Wow!

Vaadin looks really cool!
Could anyone here provide a good look css for the wicket? I think wicket
with a good look css can beat them.

Regards!
Jing

-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
Sent: Freitag, 29. Januar 2010 17:14
To: users@wicket.apache.org
Subject: Re: Apache Click

Hi!

I guess click comes with its own layout.. like Vaadin
http://demo.vaadin.com/sampler/

**
Martin

2010/1/29 Giovannipino_o...@yahoo.com:
   

Apache Click is very similar to Wicket:

http://incubator.apache.org/click/

What are the main differences and advantages?

regards
giovanni




 

-
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


   



--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Re: wicket bench in eclipse

2010-01-27 Thread Peter Karich

Why not using the default configuration of the wicket archetype
and let the htmls under main/java ? (configuration over convention ;-))

Then at least in IntelliJ and NetBeans the switch html--java works fine.

Regards,
Peter.


Agree with Huake Ingmar. The functionality doesn't overlap at all. My
main reason for wanting the plugin to work is to switch easily between
the html and the java code for the same component. In a maven project
this is particular a hassle because the java code is in packages under
/src/main/java and the html code is in packages under
/src/main/resources. I can't really find a quick way (preferable
single keystroke to flip between them). I also ideally want code
completion on the wicket ids but thats secondary.

regards,
Lionel



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



Re: wicket bench in eclipse

2010-01-25 Thread Peter Karich

Hi!


But it looks like this Eclipse plugin is not actively developed? Is it
time to buy an IDEA license where there seems to be a quite nice
toolset for Wicket?
   
I downloaded the open source version of IntelliJ and the wicket plugin 
seems to work.

There is also a wicket plugin for NetBeans, which is working.

But a pure maven project wihtout a plugin isn't that different.
Or am I missing an important feature of the eclipse plugin?

Regards,
Peter.

--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Re: Wicket+Guice

2010-01-20 Thread Peter Karich

Hi,

now I blogged about this stuff recently:
http://karussell.wordpress.com/2010/01/18/crud-with-wicket-guice-db4o-neodatis/

Comments and requests of reformulations are welcome ;-) !

Question 1. is fixed ... maybe someone could point me to a solution of 2.?

Regards,
Peter.


Hi,

Thanks to Jeremy Thomerson who pointed me to jweekend [1] which helped me
a lot to get started with a simple CRUD webapp based on wicket and 
guice (+db4o)

see [2] for a screenshot.

I have now the following problems:

1. If I select an Event (row of DataView) and want to remove it 
directly after the selection
I lost the database connnection. It seems to me that something with 
guice and

session management is not properly handled of my app.

2. E.g. if I select event1 from the list and want to create a new 
event2 based on
the properties of event1. event2 is shown correctly where the row of 
event1 is
now identical to the one of event2, although this is fixed after 
refreshing the page via F5.


Do you have a feeling which could be wrong here?
I would simply attach two failing test cases but I didn't get the 
tests working.

I try to figure this out now...

The maven project is here:
https://timefinder.svn.sourceforge.net/svnroot/timefinder/branches/timefinderwicket/ 



After mvn install (it should compile without any set up)
run mvn jetty:run and go to
http://localhost:8080/timefinderwicket/event


Regards,
Peter.

[1]
http://www.jweekend.com/dev/LegUp

[2]
http://peat_hal.users.sourceforge.net/wicket-guice.png





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



Wicket+Guice

2010-01-19 Thread Peter Karich

Hi,

Thanks to Jeremy Thomerson who pointed me to jweekend [1] which helped me
a lot to get started with a simple CRUD webapp based on wicket and guice 
(+db4o)

see [2] for a screenshot.

I have now the following problems:

1. If I select an Event (row of DataView) and want to remove it directly 
after selection
I lost the database connnection. It seems to me that something with 
guice and

session management is not properly handled of my app.

2. E.g. if I select event1 from the list and want to create a new event2 
based on
the properties of event1. event2 is shown correctly where the row of 
event1 is
now identical to the one of event2, although this is fixed after 
refreshing the page via F5.


Do you have a feeling which could be wrong here?
I would simply attach two failing test cases but I didn't get the tests 
working.

I try to figure this out now...

The maven project is here:
https://timefinder.svn.sourceforge.net/svnroot/timefinder/branches/timefinderwicket/

After mvn install (it should compile without any set up)
run mvn jetty:run and go to
http://localhost:8080/timefinderwicket/event


Regards,
Peter.

[1]
http://www.jweekend.com/dev/LegUp

[2]
http://peat_hal.users.sourceforge.net/wicket-guice.png

--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Re: Newbie Questions

2010-01-19 Thread Peter Karich

Hi Nino,

hmmh I studied the link a lot but I couldn't find a link or
a source snippet to see how this calendar view might be created.
I only see monthly views of the yui calendar. Do you mean this can be 
changed to a week-view?


Would you mind helping me again here?

Regards,
Peter.


Hi Peter

Theres should be something in regards to a calendar here:

http://mail-archives.apache.org/mod_mbox/wicket-users/200710.mbox/%3c47021d97.6010...@jayway.dk%3e

Im not sure what state it are in now, I used it for week view, with
filled days a special colour and clickable.

regards Nino

2010/1/15 Peter Karichpeat...@yahoo.de:
   

Dear fellow wicketers!

I am now new to wicket and would like to say: wow + thanks for this great
framework!
I never see such a good separation of view and code. and making a small
solr+wicket example working was really fun (like in good old desktop eras).

Now I have the following questions:

1. Is there a scheduling or calendar component like the one from the
tomahawk project  [1] ? I especially look for a week-view.

2. Which setup (e.g. IDE) do you use to reduce the time from code change
to site view?
I am using netbeans 6.8 and 7 seconds out of the box seems to be okay, but
is it possible to get it even faster with wicket? (preferable without
commercial solutions aka JRebel)

3. For the persistence layer I need a rather simple solution (odb?) e.g. for
CRUD.
I found a databinder project [2] and wicketrad [3], but they seems to be out
of date!?
Then I found Wicket-Iolite [4] and wicket-phonebook [5]. Can this be used as
a starting point or which *simple* persistent solutions do you use?

4. Is there a way to create a component without any html?

5. Is there a way to bind several components to *one* html file? I am
thinking of a template which I'll receive from the designer.
After this I only need to specify the wicket:ids within this html file
and my components will hook into it. Or is there another solution?

6. The usage of the Link class is a bit counter intuitive:
Link link = new Link(hrefId) { public void onClick() {..} };
link.add(new Label(titleId, new Model(myTitle) {...}));
why is there no such constructor for the easiest case like it is the case in
ExternalLink ala
new Link(hrefid, hrefModel, titleModel) ?

Regards,
Peter.

[1]
http://myfaces.apache.org/tomahawk-project/tomahawk/tagdoc/t_schedule.html

[2]
http://databinder.net/wicket/show/overview/

[3]
http://sites.google.com/site/wicketrad/

[4]
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite

[5]
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook

--
Free your timetabling!
http://timefinder.sourceforge.net/


 

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


   



--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Re: Calendar Component [was Newbie Questions]

2010-01-19 Thread Peter Karich

Hi Nino, hi Reinout!

hmm I have something here aswell:

http://wheresmyevent.com/search

if you click one of the little date icons it's month displayed in
days, is this not what you are looking for ?
   


Not really :-) I do not look for a datepicker ...  I thought more of a panel
where the dates of one week are listed in the 'normal timetable-fashion'.
Sth. like that what Reinout suggested in the top left screenshot.

Here is a desktop library which has this what I mean:
http://sourceforge.net/project/screenshots.php?group_id=157010ssid=62278

Regards,
Peter.

--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Re: Calendar Component

2010-01-19 Thread Peter Karich

Thanks a lot Nino!
Sth. like that! And MIT license. Great!

Regards,
Peter.


If you need something like that, I'd consider rolling an integration
towards this 
http://www.bloggingdeveloper.com/post/jQuery-Week-Calendar-An-Easy-to-Implement-Google-Calendar-like-jQuery-Calendar-Plugin.aspx
and if it's too complicated roll your own using panels and a mixture
of ajax etc.

I don't what features jeremys calendar have, but could be a very good
starting point.

2010/1/19 Peter Karichpeat...@yahoo.de:
   

Hi Nino, hi Reinout!
 

hmm I have something here aswell:

http://wheresmyevent.com/search

if you click one of the little date icons it's month displayed in
days, is this not what you are looking for ?

   

Not really :-) I do not look for a datepicker ...  I thought more of a panel
where the dates of one week are listed in the 'normal timetable-fashion'.
Sth. like that what Reinout suggested in the top left screenshot.

Here is a desktop library which has this what I mean:
http://sourceforge.net/project/screenshots.php?group_id=157010ssid=62278

Regards,
Peter.

--
Free your timetabling!
http://timefinder.sourceforge.net/


-
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


   



--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Re: Newbie Questions

2010-01-16 Thread Peter Karich

Dear Jeremy,

thanks for your prompt response!


WicketStuff - see http://www.texashuntfish.com/app/calendar to see an
example.  The WS code also has an example app.
   


I found this one:
http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-calendar/

Is this what you mean? I will take a look at the source to see how they 
did it ...




2. Which setup (e.g. IDE) do you use to reduce the time from code change
to site view?
I am using netbeans 6.8 and 7 seconds out of the box seems to be okay, but
is it possible to get it even faster with wicket? (preferable without
commercial solutions aka JRebel)

 

I use the Wicket quickstart (or you can now use jWeekend's LegUp archetypes)
and run the Start.java class to run an embedded Jetty container.  Run this
in debug mode in your IDE and you can debug your app easily, and changes to
classes and HTML files are picked up generally within a second (typically by
the time you can alt-tab to the browser and hit f5).
   


That sounds nice!
You point me in the correct direction. I couldn't get it working with 
this start class (jetty didn't auto restart if I changed sth).
But if I enabled compile on save in NetBeans and configured the jetty 
plugin as follows and it works. Nice!


plugin
groupIdorg.mortbay.jetty/groupId
artifactIdmaven-jetty-plugin/artifactId
version6.1.22/version
configuration
scanTargets
scanTargettarget/classes//scanTarget
/scanTargets
scanIntervalSeconds2/scanIntervalSeconds
/configuration
/plugin



3. For the persistence layer I need a rather simple solution (odb?) e.g.
for CRUD.
I found a databinder project [2] and wicketrad [3], but they seems to be
out of date!?
Then I found Wicket-Iolite [4] and wicket-phonebook [5]. Can this be used
as a starting point or which *simple* persistent solutions do you use

Simple quick start with a couple different configurations:
http://www.jweekend.com/dev/LegUp
   


Thanks!



4. Is there a way to create a component without any html

Sure.  See TextField or many others for examples of how to do so.
   


Ah, I will take a look at them!



5. Is there a way to bind several components to *one* html file? I am
thinking of a template which I'll receive from the designer.
After this I only need to specify the wicket:ids within this html file
and my components will hook into it. Or is there another solution?
 

Create a panel.  It can be placed in a page or other panels, etc, and can
contain multiple components and has its own HTML.
   


Hmmh, maybe I need an example here too :-)

I thought of the following scenario: I have a MainPanel which uses an 
embedded NavigatorPanel.
As a newbie I only know the way to bind the MainPanel to MainPanel.html 
and NavigatorPanel to NavigatorPanel.html
Now within the MainPanel.html there is a wicket:id which will be used 
for the NavigatorPanel to be injected. Sth. like

div wicket:id=nav_idinnerHtml/div

But all of the inner html is replaced, right? So I cannot write:

div wicket:id=nav_id
div wicket:id=customPanel/div
div class=navGo to SubMenu1/div
div class=navGo to SubMenu2/div
/div

because the inner html stuff is removed and instead the html of 
NavigatorPanel.html is used for the NavigatorPanel, or did I 
misunderstand this?
Can I tell wicket that the inner html instead of the html within 
NavigatorPanel.html should be used?




6. The usage of the Link class is a bit counter intuitive:
Link link = new Link(hrefId) { public void onClick() {..} };
link.add(new Label(titleId, new Model(myTitle) {...}));
why is there no such constructor for the easiest case like it is the case
in ExternalLink ala
new Link(hrefid, hrefModel, titleModel)

There are a bunch of examples on the list of how you can create a custom
link that outputs a model or plain string within its open and close tags.
Or look at ExternalLink as an example.  But links don't always have just a
string in them - many times they are around other components.
   


Ok. true. Thought it could be only a bit easier :-)

Regards,
Peter.

--
Free your timetabling!
http://timefinder.sourceforge.net/


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



Newbie Questions

2010-01-15 Thread Peter Karich

Dear fellow wicketers!

I am now new to wicket and would like to say: wow + thanks for this 
great framework!
I never see such a good separation of view and code. and making a small 
solr+wicket example working was really fun (like in good old desktop eras).


Now I have the following questions:

1. Is there a scheduling or calendar component like the one from the 
tomahawk project  [1] ? I especially look for a week-view.


2. Which setup (e.g. IDE) do you use to reduce the time from code 
change to site view?
I am using netbeans 6.8 and 7 seconds out of the box seems to be okay, 
but is it possible to get it even faster with wicket? (preferable 
without commercial solutions aka JRebel)


3. For the persistence layer I need a rather simple solution (odb?) e.g. 
for CRUD.
I found a databinder project [2] and wicketrad [3], but they seems to be 
out of date!?
Then I found Wicket-Iolite [4] and wicket-phonebook [5]. Can this be 
used as a starting point or which *simple* persistent solutions do you use?


4. Is there a way to create a component without any html?

5. Is there a way to bind several components to *one* html file? I am 
thinking of a template which I'll receive from the designer.

After this I only need to specify the wicket:ids within this html file
and my components will hook into it. Or is there another solution?

6. The usage of the Link class is a bit counter intuitive:
Link link = new Link(hrefId) { public void onClick() {..} };
link.add(new Label(titleId, new Model(myTitle) {...}));
why is there no such constructor for the easiest case like it is the 
case in ExternalLink ala

new Link(hrefid, hrefModel, titleModel) ?

Regards,
Peter.

[1]
http://myfaces.apache.org/tomahawk-project/tomahawk/tagdoc/t_schedule.html

[2]
http://databinder.net/wicket/show/overview/

[3]
http://sites.google.com/site/wicketrad/

[4]
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite

[5]
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook

--
Free your timetabling!
http://timefinder.sourceforge.net/



Phonebook example

2008-12-23 Thread Peter Karich
Hi,

I freshly checked out the phonebook example from svn.
But I have 2 problems.
1. I have to add the following dep:
dependency
groupIdorg.springframework/groupId
artifactIdspring/artifactId
version2.0.8/version
/dependency
Otherwise it wouldn't find some ibatis and ContextLoaderListener classes.
(BTW: if I only want hibernate how can I safely remove the ibatis deps?)

2. I cannot find the referenced class 
wicket.contrib.phonebook.web.HibernatePhonebookApplication
in subversion

Any hints?

Regards,
Peter.




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