Re: How to serve different layouts for different screen resolutions and devices?
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 mobile devices and their web browsers the screen resolutions may be even smaller. I think this might help: http://www.nabble.com/Screen-resolution-and-diffrent-markup-files-to13872387.html#a13872387 Best regards, Artur -- View this message in context: http://www.nabble.com/How-to-serve-different-layouts-for-different-screen-resolutions-and-devices--tp21497358p21500335.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
pretty url resource, problem with colons
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 wicket:interface/:28:t::IResourceListener::/ into something like this wicket_interface/_28_t__IResourceListener__/ I do not want to change the coding strategy for the whole application, just for this one resource. Thanks, Artur -- View this message in context: http://www.nabble.com/pretty-url-resource%2C-problem-with-colons-tp20337880p20337880.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pretty url resource, problem with colons
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: http://www.nabble.com/pretty-url-resource%2C-problem-with-colons-tp20337880p20338036.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WicketTester.assertErrorMessages - encoding problem
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 zawierać od 3 do 32 znaków. but was (1): Pole 'domena' musi zawieraÄ od 3 do 32 znaków. I compile my tests with javac with encoding set to UTF-8. I don't know how are feedback messages encoded or if it is some other problem when comparing error msgs in the test. Thanks in advance, Artur -- View this message in context: http://www.nabble.com/WicketTester.assertErrorMessages---encoding-problem-tp20280074p20280074.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketTester.assertErrorMessages - encoding problem
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 = tester.getMessages(FeedbackMessage.ERROR); ListSerializable msgs = new ArrayListSerializable(); for (IteratorSerializable iterator = actualMessages.iterator(); iterator.hasNext();) { msgs.add( new String(iterator.next().toString().getBytes(ISO-8859-1), UTF-8) ); } WicketTesterHelper.assertEquals(Arrays.asList(expectedErrorMessages), msgs); What do you think about fixing the tester code as above? Maybe this is a good idea because AFAIK Wicket works in UTF-8 but default. Thanks, Artur -- View this message in context: http://www.nabble.com/WicketTester.assertErrorMessages---encoding-problem-tp20280074p20280466.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketTester.assertErrorMessages - encoding problem
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); tester.getApplication().getMarkupSettings().setDefaultMarkupEncoding(UTF-8); but it didn't help. Best regards, Artur -- View this message in context: http://www.nabble.com/WicketTester.assertErrorMessages---encoding-problem-tp20280074p20280503.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Migration to 1.4 - generic headache
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 :) The generics in Wicket looks nice on examples. But in bigger application (we have aprox. 500k loc) it is a mess. Especially when we use lots of forms, models, adapters and so on. We must write more code than in 1.3 and we do not get any reward for it ;) I'm thinking now whether cancel migration and stay with wicket 1.3 or add this all voids and questions marks (thanks Stefan!) and get used to it. How long do you want to support (bug fixing, adding small improvements to 1.3) and when do you plan do release 1.5 :) Thanks in advance for your advices. Artur -- View this message in context: http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20222475.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Migration to 1.4 - generic headache
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 after adding generics the code looks awful and it is unreadable. I could live with that but especially frustrating are more than 4.000 warnings that I have now. Most of them I cannot fix. For example the warnings apply to the components that don't have models but I have to add them a type. What type? Any? Example: add(new Link(link) { //warning here @Override public void onClick() { //do something here } }); I have a warning here because I didn't set a type of Link. But it doesn't have any model. I know I can add @SuppressWarnings(unchecked) but I don't want to do that in more than 4000 places in my code. If I do than I will loose all the warnign event that I would to have or could save me in the future. So a question is there any way to workaround about this warnings problem? I don't want to stay with wicket 1.3 because I realize that it will be abandon in a year or something. Thanks in advance, Artur -- View this message in context: http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20205449.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Migration to 1.4 - generic headache
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 doesn't compile: new AjaxButton(cancelButton) { @Override protected void onSubmit(AjaxRequestTarget target, Formlt;Voidgt; form) { modal.close(target); } } Artur -- View this message in context: http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20205654.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AbstractBehavior problem after comonent re-render
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) { Response response = component.getResponse(); response.write(\nlt;a href=\#\ onclick=\changeDate(' + component.getMarkupId() + ', -1)\gt;(DEC)lt;/agt;); } }); add(new DatePicker()); } } It is rendering ok. But when the component is re-rendered via ajax (target.addComponent(dateTextField)) my behavior is re-added. After each re-render my link looks like this: [component] (DEC)(DEC)(DEC)(DEC)... [calendarIcon] How to fix it? Thanks in advance, Artur -- View this message in context: http://www.nabble.com/AbstractBehavior-problem-after-comonent-re-render-tp19932224p19932224.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AbstractBehavior problem after comonent re-render
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) { this.days = days; } public void renderHead(IHeaderResponse response) { if (AjaxRequestTarget.get() != null) { final String javascript = var e = Wicket.$(' + getMarkupId() + '); if (e != null typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);; response.renderJavascript(javascript, null); } } @Override public void onRendered(Component component) { Response response = component.getResponse(); response.write(\nlt;a id=\ + getMarkupId() + \href=\#\ onclick=\changeDate(' + component.getMarkupId() + ', + Integer.toString(days) + )\gt;lt;lt;/agt;); } @Override public void bind(Component component) { this.component = component; } public String getMarkupId() { return component.getMarkupId() + --cd; } } Artur -- View this message in context: http://www.nabble.com/AbstractBehavior-problem-after-comonent-re-render-tp19932224p19933012.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?
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); } In the RefreshingView I have 6 items. What is strange the method onPostProcessTarget is called only for 1-4 of them. Is is completely random. But it is never called for all of the items. I cannot figure out why? Is is some limitation in Browser or in AjaxSelfUpdatingTimerBehavior? I use Wicket 1.4M3, and FF3.03 and IE7. Thanks, Artur -- View this message in context: http://www.nabble.com/AjaxSelfUpdatingTimerBehavior---how-many-of-them-I-can-add-to-one-page--tp19757365p19757365.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?
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 extra stress on server and client. Every cell has a different refresh time. The cells show the pictures from different internet's cameras. Do you know about any limitation when using AjaxSelfUpdatingTimerBehavior? Thanks in advance, Artur -- View this message in context: http://www.nabble.com/AjaxSelfUpdatingTimerBehavior---how-many-of-them-I-can-add-to-one-page--tp19757365p19758676.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
BookmarkablePageLink in ModalWindow, a bug?
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 generates (incorect?) url: http://127.0.0.1:8080/myapp/admin/product/2446/wicket:pageMapName/modal-dialog-pagemap/ When I click on this link, a than submit a form on the ModalWindow it gives a error (because the pageMap was cleared when opening the BookmarbablePage??) I use Wicket 1.3.4. Thanks in advance, Artur -- View this message in context: http://www.nabble.com/BookmarkablePageLink-in-ModalWindow%2C-a-bug--tp19430177p19430177.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [announce] Wicket in Action e-book has been published!
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 mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LoadableDetachableModel - should I call deatch() manually?
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: http://www.nabble.com/LoadableDetachableModel---should-I-call-deatch%28%29-manually--tp18335895p18365767.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LoadableDetachableModel - should I call deatch() manually?
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? Here is a code. public class ClientLoadableDetachableModel extends LoadableDetachableModel { private Long clientId; public ClientLoadableDetachableModel(Long clientId) { super(); this.clientId = clientId; } @Override protected Object load() { return Locator.getClientService().findClientById(clientId); } public Client getClient() { return (Client) super.getObject(); } public Long getClientId() { return clientId; } } Thanks for help, Artur -- View this message in context: http://www.nabble.com/LoadableDetachableModel---should-I-call-deatch%28%29-manually--tp18335895p18335895.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange Error - ModalWindow from ModalWindow - error when closing
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: http://www.nabble.com/Strange-Error---ModalWindow-from-ModalWindow---error-when-closing-tp18109667p18110239.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Gzipping of pages (HTML output, not only resources)
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, I don't see any problem in gzipping HTML responses. Could you please more elaborate on this - where the problem occurs ? I would like to make the HTML gzipping a bullet-proof solution ;) I checked it more carefully. It goes like this: 1. When I call setResponsePage(Page page) Wicket checks it in PageRequestTarget.respond(RequestCycle requestCycle) 2. If there is, it calls requestCycle.redirectTo(page) 3. In redirectTo Wicket creates BufferedHttpServletResponse. 4. BufferedHttpServletResponse in method writeTo on line 553 close the stream: final OutputStream out = servletResponse.getOutputStream(); out.write(byteBuffer); out.close(); 5. GZIPFilter calls wrappedResponse.finishResponse() which try to close the stream again and throws Exception: public void close() throws IOException { if (closed) { throw new IOException(This output stream has already been closed); } [...] } So the problem is in BufferedHttpServletResponse. I don't know if it is necessary? Thanks, Artur -- View this message in context: http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p17035947.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Gzipping of pages (HTML output, not only resources)
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 UploadProgressBar. AFAIK FileUpload closes the stream and because of it the filter throws exception. Artur -- View this message in context: http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16921105.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Gzipping of pages (HTML output, not only resources)
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 wicket very often close the stream and you get the: if (closed) { throw new IOException( Cannot write to a closed output stream); } I asked about the same here: https://issues.apache.org/jira/browse/WICKET-1240 Artur -- View this message in context: http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16894703.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logging every request into db
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(); AdminSession adminSession = (AdminSession) requestCycle.getSession(); log.info(adminSession.getId() + + servletRequest.getRemoteAddr() + + adminSession.getWorkerId() + + servletRequest.getRequestURL() + + (System.currentTimeMillis() - requestCycle.getStartTime())); But I don't know where to put it. I tried to add it the the WicketFilter: public class MyWicketFilter extends WicketFilter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { super.doFilter(request, response, chain); RequestCycle requestCycle = RequestCycle.get(); // logging goes here } } But RequestCycle.get() returns null. I will appreciate any suggestions. Thanks, Artur -- View this message in context: http://www.nabble.com/Logging-every-request-into-db-tp16740900p16740900.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging every request into db
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 Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing the jsessionid for SEO
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 Unbuffered extends WebResponse { private static final String[] botAgents = { onetszukaj, googlebot, appie, architext, jeeves, bjaaland, ferret, gulliver, harvest, htdig, linkwalker, lycos_, moget, muscatferret, myweb, nomad, scooter, yahoo!\\sslurp\\schina, slurp, weblayers, antibot, bruinbot, digout4u, echo!, ia_archiver, jennybot, mercator, netcraft, msnbot, petersnews, unlost_web_crawler, voila, webbase, webcollage, cfetch, zyborg, wisenutbot, robot, crawl, spider }; /* and so on... */ public Unbuffered(final HttpServletResponse res) { super(res); } @Override public CharSequence encodeURL(final CharSequence url) { return isAgent() ? url : super.encodeURL(url); } private static boolean isAgent() { String agent = ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getHeader(User-Agent); for(String bot : botAgents) { if (agent.toLowerCase().indexOf(bot) != -1) { return true; } } return false; } } I didn't test this code but I do similar thing in my old application in Spring and it works. Take care, Artur -- View this message in context: http://www.nabble.com/Removing-the-jsessionid-for-SEO-tp16464534p16467396.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using PropertyModel in abstract class
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() { return field;} public void setField(int field) { this.field = field; }; [some other stuff...] } public class Child extends Parent { [some other stuff...] } I've got error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.domain.Child expression: filed at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1551) at org.apache.wicket.Component.getModelObjectAsString(Component.java:1573) at org.apache.wicket.markup.html.form.FormComponent.getModelValue(FormComponent.java:1267) at org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:780) at org.apache.wicket.markup.html.form.TextField.onComponentTag(TextField.java:100) Is is a bug? I use wicket 1.3.2 Thanks for help, Artur -- View this message in context: http://www.nabble.com/using-PropertyModel-in-abstract-class-tp16323331p16323331.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using PropertyModel in abstract class
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. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass form input from modal window back to the caller page
Hi! Something like this should work: chooserWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { yourTextField.setModelObject( chooserPanel.getYourValue() ); target.addComponent(yourTextField); } }); Artur -- View this message in context: http://www.nabble.com/Pass-form-input-from-modal-window-back-to-the-caller-page-tp14944556p14952950.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javadoc?
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: http://www.nabble.com/Javadoc--tp14751479p14751719.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stream resource on setWindowClosedCallback
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) { RequestCycle.get().setRequestTarget(new IRequestTarget() { public void detach(RequestCycle requestCycle) { } public void respond(RequestCycle requestCycle) { MyPpdf pdf; try { pdf = new MyPpdf(); WebResponse webResponse = (WebResponse) requestCycle.getResponse(); webResponse.setAttachmentHeader(pdf_ + System.currentTimeMillis() + .pdf); webResponse.setContentType(application/pdf); pdf.genPdf().writeTo(webResponse.getOutputStream()); } catch (Exception e) { e.printStackTrace(); } } }); } }); but it doesn't work. I tried this too: setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { try { ResourceStreamRequestTarget pdfTarget = new ResourceStreamRequestTarget(new FileResourceStream(new File(MyPdfFile.pdf))); RequestCycle.get().setRequestTarget(pdfTarget); } catch (Exception e) { e.printStackTrace(); } } }); In both cases I've got an error in Firefox console: Error: not well-formed Source File: http://127.0.0.1:8080/myapp/wickete/page Line: 1, Column: 9 Source Code: %PDF-1.4^ Thanks for help in advance, Artur -- View this message in context: http://www.nabble.com/Stream-resource-on-setWindowClosedCallback-tp14706092p14706092.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError: Java heap space - AppendingStringBuffer
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 but it still don't know if it is correct for the wicket app or not? Ok, so I have a RefreshingView. This repeater contains about 300 rows. Every row contains about 20 ajax components (AjaxLinks, AjaxButtons, AjaxEditableLabels, ModalsWindows). Components have references to each other because clicking on one can change state of another (using AjaxRequestTarget). With every change, especially when opening ModalWindow, free memory drops approx. 20MB. (org.apache.wicket.protocol.http.pagestore.DiskPageStore retained size is about 27MB just after few clicks). When I force gc used memory drops to 50MB which is the same value as the application starts. So I think this is a prove that I don't hold references to unused objects :) So my question is. Am i doing something wrong or it is normal for wicket to consume so much memory when using so many ajax components on one page? Thanks in advance Artur -- View this message in context: http://www.nabble.com/OutOfMemoryError%3A-Java-heap-space---AppendingStringBuffer-tp14525029p14548202.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError: Java heap space - AppendingStringBuffer
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 org.apache.wicket.util.string.AppendingStringBuffer.append(AppendingStringBuffer.java:376) at org.apache.wicket.util.string.AppendingStringBuffer.append(AppendingStringBuffer.java:344) at org.apache.wicket.protocol.http.BufferedWebResponse.write(BufferedWebResponse.java:113) at org.apache.wicket.markup.ComponentTag.writeOutput(ComponentTag.java:661) at org.apache.wicket.Component.renderComponentTag(Component.java:3768) at org.apache.wicket.Component.renderComponent(Component.java:2410)at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2256) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1407) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:631) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112) at org.apache.wicket.Component.renderComponent(Component.java:2419) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2256) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1407) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1344) at org.apache.wicket.Component.renderComponent(Component.java:2419) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2256) at org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractRepeater.java:119) at org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepeater.java:100) at org.apache.wicket.Component.render(Component.java:2256) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1407) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1344) at org.apache.wicket.Component.renderComponent(Component.java:2419) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2256) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:222) -- View this message in context: http://www.nabble.com/OutOfMemoryError%3A-Java-heap-space---AppendingStringBuffer-tp14525029p14525029.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError: Java heap space - AppendingStringBuffer
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 makes me worry so I wanted to ask about it. Artur -- View this message in context: http://www.nabble.com/OutOfMemoryError%3A-Java-heap-space---AppendingStringBuffer-tp14525029p14526513.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError: Java heap space - AppendingStringBuffer
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? Runtime.getRuntime().freeMemory() returns 165MB. Thanks in advance. Artur -- View this message in context: http://www.nabble.com/OutOfMemoryError%3A-Java-heap-space---AppendingStringBuffer-tp14525029p14527774.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getPage() throws IllegalStateException: No Page found for component
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 which I add my Panel (menu). All of the other pages extends this abstract page so I don't create/add this panel to them. Best regards, Artur -- View this message in context: http://www.nabble.com/getPage%28%29-throws-IllegalStateException%3A-No-Page-found-for-component-tp14496019p14510157.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Components questions
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. Artur -- View this message in context: http://www.nabble.com/Components-questions-tp14470326p14485150.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
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: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14455821.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
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 problem after migration from rc1 to rc2 :( Artur -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14421788.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
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: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14422978.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
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, model); editor.setOutputMarkupId(true); editor.setVisible(false); editor.add(new EditorAjaxBehavior()); return editor; } In RC2: protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model) { TextField editor = new TextField(componentId, model) { private static final long serialVersionUID = 1L; protected void onModelChanged() { super.onModelChanged(); AjaxEditableLabel.this.onModelChanged(); } protected void onModelChanging() { super.onModelChanging(); AjaxEditableLabel.this.onModelChanging(); //here is error - java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 } }; editor.setOutputMarkupId(true); editor.setVisible(false); editor.add(new EditorAjaxBehavior()); return editor; } Should I open issue? Artur -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14423831.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to refresh component many times in one ajax request
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: http://www.nabble.com/How-to-refresh-component-many-times-in-one-ajax-request-tp14374053p14391636.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Gzip filter and resource problem
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 force wicket to compress everything not only resources? Is is possible? Thanks, Artur -- View this message in context: http://www.nabble.com/Gzip-filter-and-resource-problem-tf4914410.html#a14104145 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Gzip filter and resource problem
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: http://www.nabble.com/Gzip-filter-and-resource-problem-tf4914410.html#a14109779 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Gzip filter and resource problem
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: resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.js The pages are decompressed correctly! Any ideas? Thanks, Artur -- View this message in context: http://www.nabble.com/Gzip-filter-and-resource-problem-tf4914410.html#a14067683 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Component autorefresh with Ajax
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 AjaxRequestTarget.addComponent(...)? Thanks for help, Artur -- View this message in context: http://www.nabble.com/Component-autorefresh-with-Ajax-tf4691652.html#a13409367 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hot redeploy of java classes
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: http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13055319 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hot redeploy of java classes
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 Wicket you some cutom class loarder so I thought that As far as I'm aware, that's a function of the servlet container that you're using. The Wicket code loads the templates, but the servlet container loads the Wicket code! AFAIK Wicket you some custom class loader so I thought that it can re-load the class if needed aside from servlet container. What do you think about it? -- View this message in context: http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13057227 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket menu with submenu dialog window
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 in context: http://www.nabble.com/Wicket-menu-with-submenu-%22dialog-window%22-tf4543964.html#a12994070 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Global variables
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 the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No cursor in Modal Window in FF
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 Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NS_ERROR_NOT_AVAILABLE in FF 2.0.0.6
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 = new AjaxFormValidatingBehavior(form, onclick) { protected void onError(AjaxRequestTarget target) { target.addComponent(form); } }; recount.add(behavior); It works in IE 7 but in FF 2.0.0.6 I've got an error: INFO: Initiating Ajax POST request on ?wicket:interface=modal-dialog-pagemap:7:shortageForm:recount::IBehaviorListener:2:wicket:ignoreIfNotActive=truerandom=0.22862486812671723 INFO: Invoking pre-call handler(s)... ERROR: Exception evaluating AJAX status: [Exception... Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status] nsresult: 0x80040111 (NS_ERROR_NOT_AVAILABLE) location: JS frame :: http://localhost:8080/manage/resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js :: anonymous :: line 755 data: no] ERROR: Received Ajax response with code: unavailable INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... I use Wicket 1.3-beta3. Thanks, Artur -- View this message in context: http://www.nabble.com/NS_ERROR_NOT_AVAILABLE-in-FF-2.0.0.6-tf4408389.html#a12576739 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NS_ERROR_NOT_AVAILABLE in FF 2.0.0.6
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) { [...] } protected void onError(AjaxRequestTarget target, Form form) { target.addComponent(form); } }; Artur -- View this message in context: http://www.nabble.com/NS_ERROR_NOT_AVAILABLE-in-FF-2.0.0.6-tf4408389.html#a12576933 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can Panel replace itself ?
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 table tag. So replacing is proper, but the tags location is incorrect: lt;bodygt; lt;span id=panel5gt; lt;/spangt;lt;span id=panel7gt; lt;/spangt;lt;span id=panel9gt; lt;/spangt;lt;span id=panel11gt; lt;/spangt;lt;tablegt; lt;tbodygt;lt;trgt; lt;tdgt;lt;a id=link6 onclick=var wcall=wicketAjaxGet('?wicket:interface=:4:list:0:panel:link::IBehaviorListener:0:', function() { }.bind(this), function() { }.bind(this));return !wcall; href=#gt;lt;spangt;clicklt;/spangt;lt;/agt;lt;/tdgt; lt;tdgt;lt;spangt;ONElt;/spangt;lt;/tdgt; lt;tdgt;lt;spangt;onelt;/spangt;lt;/tdgt; lt;/trgt;... Full generated html file: http://sunet.pl/testpage.html Full generated html file after one click: http://sunet.pl/testpage-after-one-click.html Is it a but or am I doing something wrong? Artur -- View this message in context: http://www.nabble.com/Can-Panel-replace-itself---tf4318533.html#a12307236 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can Panel replace itself ?
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 this message in context: http://www.nabble.com/Can-Panel-replace-itself---tf4318533.html#a12297058 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ModalWindo problem
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 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (2000 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script script type=text/javascript src=../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript src=../resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.js/script link rel=stylesheet type=text/css href=../resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css / /head]]/header-contributioncomponent id=orderNotes15 ![CDATA[ divTEST/div ]]/componentevaluate![CDATA[var element = document.getElementById(content111); var settings = new Object(); settings.minWidth=200; settings.minHeight=200; settings.className=w_blue; settings.width=600; settings.height=400; settings.resizable=true; settings.element = element; settings.cookieId=modal-2; settings.title=This is modal window with panel content.; settings.mask=semi-transparent; settings.onClose = function() { var wcall=wicketAjaxGet('../?wicket:interface=:1:orders:88490:orderRow:orderNotes::IBehaviorListener:1:1', function() { }.bind(this), function() { }.bind(this)); }; settings.onCloseButton = function() { var wcall=wicketAjaxGet('../?wicket:interface=:1:orders:88490:orderRow:orderNotes::IBehaviorListener:0:1', function() { }.bind(this), function() { }.bind(this));return !wcall;}; Wicket.Window.create(settings).show(); ]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... ERROR: Exception evaluating javascript: Either src or element must be set. ^ INFO: Response processed successfully. INFO: Invoking post-call handler(s)... INFO: Calling focus on notesLink16 INFO: focus set on I think I did everything like in the examples. I use wicket 1.3beta3. Artur -- View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12273834 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ModalWindow problem
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 window with panel content.); modal.setCookieName(modal-2); AjaxLink link; add(link = new AjaxLink(notesLink) { public void onClick(AjaxRequestTarget target) { modal.show(target); } }); Artur -- View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274189 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ModalWindow problem
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 -- View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274574 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
urls and localization
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); } And it works great. I can access Catalog page with this three urls. What I want to do is that: add(new BookmarkablePageLink(link, Catalog.class)); renders # wicket:message key=catalog/ depends on user's locale. If user has FR locale output should be: /catalogue.html catalogue and so on. How can I achieve this? Thanks, Artur -- View this message in context: http://www.nabble.com/urls-and-localization-tf4278995.html#a12179363 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]