Re: How to serve different layouts for different screen resolutions and devices?

2009-01-16 Thread Artur W.
Kent Larsson-3 wrote: Hi, My subject sums up my question. I'm about to create a new web system and it will be accessed by clients using normal web browsers and mobile devices. The normal browsers have varying screen resolutions with the lowest still at 800x600. When it comes to the

pretty url resource, problem with colons

2008-11-05 Thread Artur W.
Hi! I want to integrate FusionCharts with Wicket. I implement IResourceListener the feed the chart but this library reject urls which contain colons. I know I can use some Filter that translate the address but maybe there is some easier, wicket way to do it. I need to translate

Re: pretty url resource, problem with colons

2008-11-05 Thread Artur W.
One more thing. The resource returns dynamic xml and it depends on the form that was submitted by the user. So AFAIK I cannot use mountSharedResource which works for the whole application. Am I right? Artur -- View this message in context:

WicketTester.assertErrorMessages - encoding problem

2008-11-01 Thread Artur W.
Hi! My test failed becouse Wicket returns FeedbackMessages in different encoding (?) than the expected messages. Example: tester.assertErrorMessages(new String[] { Pole 'domena' musi zawierać od 3 do 32 znaków. }; gives: junit.framework.AssertionFailedError: expect (1): Pole 'domena' musi

Re: WicketTester.assertErrorMessages - encoding problem

2008-11-01 Thread Artur W.
The problem is in tester.assertErrorMessages at: msgs.add(iterator.next().toString()); The .toString() returns string with iso-8859-1 encoding. The workaround is to create your own assertErrorMessages like this: ListSerializable actualMessages =

Re: WicketTester.assertErrorMessages - encoding problem

2008-11-01 Thread Artur W.
Hi Martin! Martin Makundi wrote: Have you tried in your WicketApplication.init to set encoding: getMarkupSettings().setDefaultMarkupEncoding(WebPageConstants.ISO_8859_1); I tried both of this: tester.getApplication().getMarkupSettings().setDefaultMarkupEncoding(ISO-8859-1);

Re: Migration to 1.4 - generic headache

2008-10-29 Thread Artur W.
Hi Igor, igor.vaynberg wrote: yes it sucks. i agree. personally i prefer code written against wicket 1.3. even in 1.3 i hardly had to cast anything and even with those casts i do not remember getting any class cast exceptions. It is nice to know that somebody thinks similar to me :)

Migration to 1.4 - generic headache

2008-10-28 Thread Artur W.
Hi Guys, In the weekend I tried to migrate our application to wicket 1.4. I was very happy to use generics with wicket but now I frustrated. I love Wicket and I know it is nobody fault (it java fault! :)) but the generics sucks. Our application is quite big, more than one thousand classes and

RE: Migration to 1.4 - generic headache

2008-10-28 Thread Artur W.
Hi Stefan! Stefan Lindner wrote: Use a Void Link (LinkVoid) or create your own Link wrapper class Class MyLink extends LinkVoid I know I can create a wrapper but it is a ugly was to solve my problem :/ The Void think is a good idea but it doesn't work everywhere. For example this

AbstractBehavior problem after comonent re-render

2008-10-11 Thread Artur W.
Hi! I added simple simple behavior: public class XDateField extends DateTextField { public XDateField(String id, IModel model) { super(id, model, -MM-dd); add(new AbstractBehavior() { @Override public void onRendered(Component component) {

Re: AbstractBehavior problem after comonent re-render

2008-10-11 Thread Artur W.
Ok, I fixed it. I needed to remove it if it was rerendered again with ajax: private class ChangeDateBehavior extends AbstractBehavior { private Component component; private int days; public ChangeDateBehavior(int days) {

AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

2008-10-01 Thread Artur W.
Hi! I have a RefreshingView. To each item I add AjaxSelfUpdatingTimerBehavior item.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)) { @Override protected void onPostProcessTarget(AjaxRequestTarget target) { System.out.println(called);

Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

2008-10-01 Thread Artur W.
Hi! Nino.Martinez wrote: Hmm why not put it on the refreshingview or even the page.. Instead of the cells? Unless it's extremly important the cells are processed at different times I cant see any reason why to have it on individual cells. And it will only clutter your js calls putting

BookmarkablePageLink in ModalWindow, a bug?

2008-09-11 Thread Artur W.
Hi, I create a bookmarkablePageLink and add it to the page: new BookmarkablePageLink(link, ProductPage.class, new PageParameters(0= + product.getId())); It generates correct url: http://127.0.0.1:8080/myapp/admin/product/2446/ But when I add the same bookmarkablePageLink to a ModalWinow it

Re: [announce] Wicket in Action e-book has been published!

2008-08-14 Thread Artur W.
Congratulations! The book is great and was very helpful for us. We ported our huge ERP application from JSF to Wicket. Artur -- View this message in context: http://www.nabble.com/-announce--Wicket-in-Action-e-book-has-been-published%21-tp18971645p18976514.html Sent from the Wicket - User

Re: LoadableDetachableModel - should I call deatch() manually?

2008-07-09 Thread Artur W.
Hi! Timo Rantalaiho wrote: @Override public void onDetach() { positionToDisplay.detach(); super.onDetach(); } ... } Thanks for your help! It fixed my problem. Artur -- View this message in context:

LoadableDetachableModel - should I call deatch() manually?

2008-07-08 Thread Artur W.
Hi, When I create LoadableDetachableModel the onDeatch() and deatch() methods are never called. The load method is only called once. Becouse of it I get LazyInitializationException from Hibernate. Should I call deatch() manually or is there something wrong with my LoadableDetachableModel?

Re: Strange Error - ModalWindow from ModalWindow - error when closing

2008-06-25 Thread Artur W.
More info: - Error appears only once in a session - When it appears it never happen again in the same session - Only appear when the pageMapName was not set for the second ModalWindow I thought that setPageMapName is not a mandatory, isn't it? Artur -- View this message in context:

Re: Gzipping of pages (HTML output, not only resources)

2008-05-03 Thread Artur W.
Hi Stefan, Stefan Simik wrote: I looked at the uploads, but cannot find out, what exactly is the problematic part with closing streams. I find one stream-closing code in FileUpload - #closeStreams() method. This method closes all possibly opened InputStream-s for uploaded file. Here,

Re: Gzipping of pages (HTML output, not only resources)

2008-04-27 Thread Artur W.
Stefan Simik wrote: /Maybenbsp;itnbsp;cannbsp;worknbsp;fornbsp;yournbsp;applicationsnbsp;withoutnbsp;anynbsp;problemsnbsp;too. Thanks for you response. This filter works most of the time for me. The only problem is when I want to upload a file. I use UploadWebRequest and

Re: Gzipping of pages (HTML output, not only resources)

2008-04-25 Thread Artur W.
Nino.Martinez wrote: At our wug CPH yesterday we talked about something similar (ajax), I think theres no direct way currently. However you can setup a filter which does that. http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html This filter doesn't work with Wicket because

Logging every request into db

2008-04-17 Thread Artur W.
Hi! I need to log every request (session id, ip address, user id, url, response time etc) into db. The code is simply: RequestCycle requestCycle = RequestCycle.get(); HttpServletRequest servletRequest = ((WebRequest)requestCycle.getRequest()).getHttpServletRequest();

Re: Logging every request into db

2008-04-17 Thread Artur W.
Gerolf Seitz wrote: you could do that in your own WebRequestCycle subclass in the onBeginRequest method. Thanks, This was exactly what I was looking for! Artur -- View this message in context: http://www.nabble.com/Logging-every-request-into-db-tp16740900p16743061.html Sent from the

Re: Removing the jsessionid for SEO

2008-04-03 Thread Artur W.
Hi! igor.vaynberg wrote: also by doing what you have done users with cookies disabled wont be able to use your site... In my opinion session id is a problem. Google index the same page again and again. About the users without cookies we can do like this: static class

using PropertyModel in abstract class

2008-03-27 Thread Artur W.
Hi! When I use PropertyModel like this: public abstract class Parent extends WebPage { private int field; public Parent() { Form form = new Form(form); add(form); form.add(new TextField(field, new PropertyModel(this, field))); } public int getField() {

Re: using PropertyModel in abstract class

2008-03-27 Thread Artur W.
Sorry, it was my bug.. PropertyModel works great! :) Artur -- View this message in context: http://www.nabble.com/using-PropertyModel-in-abstract-class-tp16323331p16323342.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: Pass form input from modal window back to the caller page

2008-01-18 Thread Artur W.
Hi! Something like this should work: chooserWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { yourTextField.setModelObject( chooserPanel.getYourValue() );

Re: Javadoc?

2008-01-11 Thread Artur W.
Ayodeji Aladejebi wrote: The javadoc does not come with the wicket 1.3 bundle. Where can the javadoc for all the wicket1.3 builds be found? You can generate it from the source: mvn javadoc:javadoc Artur -- View this message in context:

Stream resource on setWindowClosedCallback

2008-01-08 Thread Artur W.
Hi! I have a form inside a ModalWindow. When user submit the form I want to close to window and stream pdf. I tried: setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) {

Re: OutOfMemoryError: Java heap space - AppendingStringBuffer

2007-12-30 Thread Artur W.
Uwe Schäfer wrote: Hi Artur, I suppose it isn´t the AppendingStringBuffer that is causing your problem. Did you attach a profiler? http://YourKit.com is just one example of a good, easy to setuprun profiler. I did like you said. I turns out that my refreshView consume so much memory

OutOfMemoryError: Java heap space - AppendingStringBuffer

2007-12-28 Thread Artur W.
Hello Everybody! I just got OutOfMemoryError in our production application (wicket 1.3rc2). Any ideas what was the reason? Artur java.lang.OutOfMemoryError: Java heap space at org.apache.wicket.util.string.AppendingStringBuffer.expandCapacity(AppendingStringBuffer.java:158) at

Re: OutOfMemoryError: Java heap space - AppendingStringBuffer

2007-12-28 Thread Artur W.
Uwe Schäfer wrote: I suppose it isn´t the AppendingStringBuffer that is causing your problem. Did you attach a profiler? http://YourKit.com is just one example of a good, easy to setuprun profiler. I didn't. It happened in our production server and only once. But this kind of errors

Re: OutOfMemoryError: Java heap space - AppendingStringBuffer

2007-12-28 Thread Artur W.
Mr Mean wrote: Did you try starting your app container with extra memory, by default java does not allocate that much, a common webapp is likely to run out of memory with the default settings. I start tomcat with: -Xms512M -Xmx768M Should I consider something else?

Re: getPage() throws IllegalStateException: No Page found for component

2007-12-26 Thread Artur W.
Antoine Angénieux wrote: May be you should try making your panel abstract and override an abstract method as an anonymous inner class of your page, instead of all your ifs ? Antoine, Thanks for you reply. Your idea is good but it will not work in my case. I have a abstract page to

Re: Components questions

2007-12-23 Thread Artur W.
neo anderson wrote: Thanks your reply. I still have one question. If I want to achieve the effect as following html code in Wicket. What should I do? Thank you very much. table !-- beg -- tr td rowspan=4date/td You could try org.apache.wicket.behavior.AttributeAppender.

Re: AjaxEditableLabel not saving

2007-12-21 Thread Artur W.
Johan Compagner wrote: did somebody made a jira issue for this with a small test case then? so that we do fix this for the final I did. https://issues.apache.org/jira/browse/WICKET-1239 Artur -- View this message in context:

Re: AjaxEditableLabel not saving

2007-12-19 Thread Artur W.
Azarias Tomás wrote: Hi, I am this exception when editing an AjaxEditableLabel : java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 at I had the same

Re: AjaxEditableLabel not saving

2007-12-19 Thread Artur W.
Eelco Hillenius wrote: I had the same problem after migration from rc1 to rc2 :( Not sure what changed, but did you upgrade both wicket and wicket-stuff to rc2? Yes, I upgraded everything to rc2. wicket-extensions too. Artur -- View this message in context:

Re: AjaxEditableLabel not saving

2007-12-19 Thread Artur W.
igor.vaynberg wrote: and what about rc3? I didn't try it yet. The diffrence is in method newEditor. In RC1 it is: protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model) { TextField editor = new TextField(componentId,

Re: How to refresh component many times in one ajax request

2007-12-18 Thread Artur W.
Alex Objelean wrote: I think that the better approach would be to enable/disable the behavior, instead of adding it. Is there a convenience method to do this? There is no enable/disable method in the AjaxSelfUpdatingTimerBehavior. Thanks, Artur -- View this message in context:

Re: Gzip filter and resource problem

2007-12-01 Thread Artur W.
Hi! Matej Knopp-2 wrote: Yes. Your filter should check if the resource is already compressed. Wicket compress javascripts and css files already. Your filter probably compresses it again. You are right! But how can I check it? I thought that better idea than compress it be myself is to

Re: Gzip filter and resource problem

2007-12-01 Thread Artur W.
Matej Knopp-2 wrote: Check the response headers. Sorry for the stupid question but how can i do that? There is no getHeader method in the HttpServletResponse. Thanks, Artur -- View this message in context:

Gzip filter and resource problem

2007-11-30 Thread Artur W.
Hi! I added Gzip Filter because my pages are really huge ;) I don't know if it is a firefox or Wicket (1.3rc1) bug but the resources are compressed and firefox don't uncompressed it. The problem is for example with:

Component autorefresh with Ajax

2007-10-25 Thread Artur W.
Hi! I have complex dependencies between components on my page. e.g. when user clicks on a button coupe of other components change. Now I refresh them with AjaxRequestTarget and a lots of conditions. Is it possible that Wicket automatically adds dirty component to the

hot redeploy of java classes

2007-10-05 Thread Artur W.
Hi! I know that Wicket in development mode does hot redeploy of html templates. Is it possible to configure it to does a hot redeploy of java classes too? It would boost the development time!! Thanks, Artur -- View this message in context:

Re: hot redeploy of java classes

2007-10-05 Thread Artur W.
Gwyn wrote: On Friday, October 5, 2007, 9:18:22 AM, Artur [EMAIL PROTECTED] wrote: I know that Wicket in development mode does hot redeploy of html templates. Is it possible to configure it to does a hot redeploy of java classes too? It would boost the development time!! AFAIK

Re: Wicket menu with submenu dialog window

2007-10-02 Thread Artur W.
lizz wrote: Has anyone made a menu (with menu items and submenus) in wicket? I would like a menu that looks more or less like the Swing JMenu. I use AdxMenu: http://www.aplus.co.yu/adxmenudev/adxmenu-v4-flyout-drop-down-menu/ It fits very well with Wicket. Artur -- View this message

Global variables

2007-09-24 Thread Artur W.
Hi! Where should I put global variables that are not related to the user but to the application. In JSP I've used servletContext.setAttribute How to do this in Wicket? Thanks, Artur -- View this message in context: http://www.nabble.com/Global-variables-tf4509527.html#a12860998 Sent from

No cursor in Modal Window in FF

2007-09-11 Thread Artur W.
Hi! There is no cursor in input fields in Modal Window. I use Wicket wicket-1.3.0-beta3 and ff 2.0.0.6 Thanks for help, Artur -- View this message in context: http://www.nabble.com/No-cursor-in-Modal-Window-in-FF-tf4421726.html#a12612071 Sent from the Wicket - User mailing list archive at

NS_ERROR_NOT_AVAILABLE in FF 2.0.0.6

2007-09-09 Thread Artur W.
Hi! I have a modal window. In this window there is a form and recount button. When user enters incorrect data and hit recount I want to refresh the form and feedback panel inside it. I added ValidatingBehavior to the recount button like this: AjaxFormValidatingBehavior behavior

Re: NS_ERROR_NOT_AVAILABLE in FF 2.0.0.6

2007-09-09 Thread Artur W.
When I removed AjaxFormValidatingBehavior and add onError directly to the button it works ok both in ie and ff: IndicatingAjaxButton recount = new IndicatingAjaxButton(recount, form) { protected void onSubmit(AjaxRequestTarget target, Form form) {

Re: Can Panel replace itself ?

2007-08-24 Thread Artur W.
igor.vaynberg wrote: does it do that in all browsers? also call view.setreuseitems(true); I've checked it with ff2 and ie7. Also with Wicket1.3beta2 and beta3. I've set view.setreuseitems(true); The problem is that the wicket generate span tags for panels after body tag and before the

Re: Can Panel replace itself ?

2007-08-23 Thread Artur W.
Eelco Hillenius wrote: do: TestPanel newOne = new TestPanel(TestPanel.this.getId(), another param); TestPanel.this.replaceWith(newOne); target.addComponent(newOne); I didn't know about replaceWith method. It works great! Thanks a lot!!! Artur -- View

ModalWindo problem

2007-08-22 Thread Artur W.
Hi, When I click on link that should open Modal Window nothing happend. In Debug console I see there is an error: INFO: focus set on notesLink16 INFO: INFO: Initiating Ajax GET request on ../?wicket:interface=:1:orders:88490:orderRow:notesLink::IBehaviorListener:0:1random=0.32370293915212345

Re: ModalWindow problem

2007-08-22 Thread Artur W.
Sam Hough wrote: Do you have an element with id content111? No, I don't have. I don't know where it comes from. My code looks like this: ModalWindow modal = new ModalWindow(orderNotes); add(modal); modal.setContent(new ModalPanel(modal.getContentId())); modal.setTitle(This is modal

Re: ModalWindow problem

2007-08-22 Thread Artur W.
Sam Hough wrote: Did you copy the: result.setOutputMarkupId(true); bit? I think the Ajax callback uses this to find elements. Normally blows up at render time if not set. I don't have result label. I just want to open modal window. I don't need to return any results. Artur --

urls and localization

2007-08-16 Thread Artur W.
Hi! I want to mount the same page with different url. eg: protected void init() { super.init(); mountBookmarkablePage(/catalog.html, Catalog.class); mountBookmarkablePage(/catalogue.html, Catalog.class); mountBookmarkablePage(/katalog.html, Catalog.class);