Re: Whats the best way to prevent handle 404?

2010-11-23 Thread Martin Grigorov
On Tue, Nov 23, 2010 at 5:31 AM, Arjun Dhar dhar...@yahoo.com wrote: I think Q1) Q2) could have been answered by: http://apache-wicket.1842946.n4.nabble.com/How-to-catch-all-404s-Page-Not-Found-and-reroute-to-a-Page-or-strategy-td1862982.html You can write your own url coding strategy that

Re: Execute JavaScript automatically when loading a Page through XHTTPRequest

2010-11-23 Thread Poko Booth
Not sure about this but if you use jQuery, you could try adding a js in the head of the page which will have something like $(document).ready( function(){ //your javascript here } ); Regards, Poko On Nov 23, 2010, at 11:12, sonxurxo sonxu...@gmail.com wrote: Hi all,

Re: Execute JavaScript automatically when loading a Page through XHTTPRequest

2010-11-23 Thread jcgarciam
Wicket set a header value in the request set to wicket-ajax i believe that way, wicket is able to detect ajax request from regular request. On Tue, Nov 23, 2010 at 6:31 AM, Poko Booth [via Apache Wicket]

Re: Execute JavaScript automatically when loading a Page through XHTTPRequest

2010-11-23 Thread Ernesto Reinaldo Barreiro
What do you exactly mean by invoke the I invoke the Page URL through Javascript? Ernesto On Tue, Nov 23, 2010 at 10:12 AM, sonxurxo sonxu...@gmail.com wrote: Hi all, Is it possible to tell, from a Wicket Page, to execute some JavaScript automatically when a page loads through a JavaScript

close tag not found error in markup

2010-11-23 Thread andrea.castello
hello all, in the process og upgrading from Wicket 1.3.x to 1.4.x a lot of my markup model raise some exception. One that often occurr is this one: WicketMessage: close tag not found for tag: . Component: [MarkupContainer [Component id = toolbar]] I don't understand what that means, since it

Re: close tag not found error in markup

2010-11-23 Thread Matthias Keller
Hi Andrea The error is: WicketMessage: close tag not found for tag: . Component: [MarkupContainer [Component id = toolbar]] I can't see a wicket:id=toolbar in your posted code, so the problem appears to be somewhere else on that page including the posted panel. Try to find that toolbar -

Re: close tag not found error in markup

2010-11-23 Thread andrea.castello
Sorry, I didn't paste all the code :( Here is the correct one where the span with is toolbar appears wicket:panel caption class=tableCaption /caption thead class=rowH /thead tbody tr wicket:id=rows td wicket:id=cells [cell] /td /tr /tbody tfoot

Re: close tag not found error in markup

2010-11-23 Thread andrea.castello
I am very sorry, but it seems like a portion of the code I paste is being stripped when I post it. This is the code that's nested inside the thead tag span wicket:id = topToolbars span wicket:id = toolbar / span Hope it's readable now (all those whitespaces are not in the original

Determine if request are ajax?

2010-11-23 Thread nino martinez wael
Hi I have a page which are ajax enabled, on first rendering (non ajax) it should render some css. On subsequent renderings(ajax) it should only render if new css has been added. So I need to figure out if the the current request are a full non ajax refresh or ajax, so how's that done? I thought

Re: Determine if request are ajax?

2010-11-23 Thread Ernesto Reinaldo Barreiro
AFAIK AjaxRequestTarget.get() != null = AJAX request. Isn't it true? Ernesto On Tue, Nov 23, 2010 at 12:13 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I have a page which are ajax enabled, on first rendering (non ajax) it should render some css. On subsequent

Re: close tag not found error in markup

2010-11-23 Thread Andrea Del Bene
Hi Andrea, maybe have you just missed close tag for topToolbars component? In the last code snippet I see just one /span tag. I am very sorry, but it seems like a portion of the code I paste is being stripped when I post it. This is the code that's nested inside the thead tag span

Re: Determine if request are ajax?

2010-11-23 Thread Vitaly Tsaplin
AjaxUtils.isAjaxRequest () On Tue, Nov 23, 2010 at 2:13 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I have a page which are ajax enabled, on first rendering (non ajax) it should render some css. On subsequent renderings(ajax) it should only render if new css has been

Re: Determine if request are ajax?

2010-11-23 Thread Vitaly Tsaplin
Sorry, I was a part of my code :) RequestCycle.get ().getRequestTarget () instanceof AjaxRequestTarget On Tue, Nov 23, 2010 at 2:18 PM, Vitaly Tsaplin vitaly.tsap...@gmail.com wrote:    AjaxUtils.isAjaxRequest () On Tue, Nov 23, 2010 at 2:13 PM, nino martinez wael

Re: Determine if request are ajax?

2010-11-23 Thread nino martinez wael
no did not work, gave me a working ajaxrequesttarget.. 2010/11/23 Ernesto Reinaldo Barreiro reier...@gmail.com AFAIK AjaxRequestTarget.get() != null = AJAX request. Isn't it true? Ernesto On Tue, Nov 23, 2010 at 12:13 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I

Re: Determine if request are ajax?

2010-11-23 Thread nino martinez wael
Ahh will try it. 2010/11/23 Vitaly Tsaplin vitaly.tsap...@gmail.com Sorry, I was a part of my code :) RequestCycle.get ().getRequestTarget () instanceof AjaxRequestTarget On Tue, Nov 23, 2010 at 2:18 PM, Vitaly Tsaplin vitaly.tsap...@gmail.com wrote: AjaxUtils.isAjaxRequest () On

Re: Determine if request are ajax?

2010-11-23 Thread Ernesto Reinaldo Barreiro
Exactly what AjaxRequestTarget.get() does:-) public static AjaxRequestTarget get() { final RequestCycle requestCycle = RequestCycle.get(); if (requestCycle != null) { if (requestCycle.getRequestTarget() instanceof

Re: Determine if request are ajax?

2010-11-23 Thread nino martinez wael
Argh my bad.. I thought it would give an exception and not just null.. Thanks for the help. 2010/11/23 Ernesto Reinaldo Barreiro reier...@gmail.com Exactly what AjaxRequestTarget.get() does:-) public static AjaxRequestTarget get() { final RequestCycle requestCycle =

Re: Determine if request are ajax?

2010-11-23 Thread Major Péter
and in 1.5 you can use: ((WebRequest) RequestCycle.get().getRequest()).isAjax(); Regards, Peter 2010-11-23 12:36 keltezéssel, nino martinez wael írta: Argh my bad.. I thought it would give an exception and not just null.. Thanks for the help. 2010/11/23 Ernesto Reinaldo

replace embedded css via ajax

2010-11-23 Thread nino martinez wael
Hi Currently I draw some css this way: response.renderString(style type=\text/css\ + customCss + /style); But on every ajax request it appends the style to the header, I'd like to replace it instead.. Any ideas? Only thought I have are to put a label in the header and redraw that instead, but

Re: Determine if request are ajax?

2010-11-23 Thread nino martinez wael
right on the spot, thanks! 2010/11/23 Major Péter majorpe...@sch.bme.hu and in 1.5 you can use: ((WebRequest) RequestCycle.get().getRequest()).isAjax(); Regards, Peter 2010-11-23 12:36 keltezéssel, nino martinez wael írta: Argh my bad.. I thought it would give an exception and not just

Re: close tag not found error in markup

2010-11-23 Thread andrea.castello
Hi Andrea, thank you. In the original code the span tags are properly closed. Is it possible that in the 1.4.x versions nested span tags are not allowed (at least the ones with a wicket:id? Andrea Del Bene-2 wrote: Hi Andrea, maybe have you just missed close tag for topToolbars

error in heritance

2010-11-23 Thread Alis
Hello!i´m doing a call to the son class, and and show the error: WicketMessage: Base markup of inherited markup not found. Component class: com.consisint.frontend.pages.ThirdByRolPolicy Enable debug messages for org.apache.wicket.util.resource.Resource to get a list of all filenames tried.

FilterToolbar

2010-11-23 Thread alex shubert
Hello I wonder why FilterToolbar requires IFilterStateLocator? It already requres FilterForm which has method #getStateLocator and there no another constructor for 4.13. FilterForm can not be instantiated without locator for Exception in nested class. If you forget: public FilterToolbar(final

Re: error in heritance

2010-11-23 Thread alex shubert
replace wicket:extend with wicket:panel -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: error in heritance

2010-11-23 Thread alex shubert
Sorry, did'nt unfold your message. It looks like you forgot to insert wicket:child in parent markup. That tags mark the place where inherited component will be placed. I hope I didnt miss anything now. On 23 November 2010 15:55, alex shubert alex.shub...@gmail.com wrote: replace wicket:extend

Re: close tag not found error in markup

2010-11-23 Thread Andrea Del Bene
Is there any code inside toolbar? Is just an empty component? I am very sorry, but it seems like a portion of the code I paste is being stripped when I post it. This is the code that's nested inside the thead tag span wicket:id = topToolbars span wicket:id = toolbar / span

Re: error in heritance

2010-11-23 Thread Alis
Hello Alex, i´m using inheritance. See the cod. html of class extend Panel: ?xml version=1.0 encoding=UTF-8? html xmlns:wicket=http://www.w3.org/1999/XSL/Transform; head /head body wicket:panel div wicket:id=wmcwicket:child AQUI VA EL CHILD/wicket:child/div div

Re: error in heritance

2010-11-23 Thread alex shubert
That day is too long for me. What about html files names? May be typo or incorrect place? Or maybe you build script does not move html to the same packet as corresponding java classes is? - To unsubscribe, e-mail:

multilevel markup inheritance

2010-11-23 Thread Juraj Petko
Hello, i am starting to explorer this beautifull framework and want to make a big use of markup inheritance. What i can't do is to make a page3, which markup inherits from page2 and at the same time page2 markup inherits from page1. Am i doing something wrong, or there is no support for this?

Re: multilevel markup inheritance

2010-11-23 Thread Matthias Keller
Hi juraj Absolutely no problem, wicket can handle that just easily. Let's assume you've got a BasePage (containing for example the HTML header and the body tag), a LayoutPage (containing the main layout) and a specific page (Page1): BasePage.html : html head.../head body wicket:childThis

Re: multilevel markup inheritance

2010-11-23 Thread James Carman
Page/markup inheritance is supported. Do you have code that isn't working? On Tue, Nov 23, 2010 at 8:31 AM, Juraj Petko juraj.pe...@gmail.com wrote: Hello,  i am starting to explorer this beautifull framework and want to make a big use of markup inheritance. What i can't do is to make a

Re: multilevel markup inheritance

2010-11-23 Thread Andrea Del Bene
No problem, it should work fine. Page inheritance is just like standard class inheritance Hello, i am starting to explorer this beautifull framework and want to make a big use of markup inheritance. What i can't do is to make a page3, which markup inherits from page2 and at the same time page2

Re: multilevel markup inheritance

2010-11-23 Thread Juraj Petko
oki, now its working fine also multilevel, thx Hi juraj Absolutely no problem, wicket can handle that just easily. Let's assume you've got a BasePage (containing for example the HTML header and the body tag), a LayoutPage (containing the main layout) and a specific page (Page1):

Re: error in heritance

2010-11-23 Thread Alis
Alex, the class Base extend Panel (ThirdByRolMain) and the class Sub extend Base (ThirdByRolPolicy). The two class is in package com.consisint.frontend.pages. And the html in C:\programs\FrontEnd\FrontEnd\WebContent\views . Help me please, error: WicketMessage: Base markup of inherited

Re: error in heritance

2010-11-23 Thread Alis
I´m use wicket 1.4.6! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055471.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe,

Re: error in heritance

2010-11-23 Thread alex shubert
Look, you have java classes in path like com\consisint\frontend\pages and corresponding HTML in \FrontEnd\FrontEnd\WebContent\views You have to have HTML files in the same folder where you compilled classes are. Something like $ls com\consisint\frontend\pages ThirdByRolMain.class

Re: Log last error on error page

2010-11-23 Thread Martin Grigorov
The easiest I can think of is to override org.apache.wicket.RequestCycle.onRuntimeException(Page, RuntimeException) and return your own page which will show the error On Tue, Nov 23, 2010 at 2:43 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is there a way to log the last error

Re: error in heritance

2010-11-23 Thread alex shubert
take a look In all the Wicket examples, you have to put all files in the same package directory. This means putting the markup files and the java files next to one another. (c) http://wicket.apache.org/learn/examples/markupinheritance.html -- Best regards Alex

RE: Log last error on error page

2010-11-23 Thread Brown, Berlin [GCG-PFS]
Another question, how do I throw the default error page? So with that request, log the exception: public final class MyRequestCycle extends WebRequestCycle { public WebRequestCycle(final WebApplication application, final WebRequest request, final Response response) {

Re: error in heritance

2010-11-23 Thread Alis
I done the class to change the location: public class ConfigHtmlPath extends ResourceStreamLocator { /** * Constructor class */ public ConfigHtmlPath() { } /** * Find the html resource in the dir especified * @param clazz class to localize *

Re: Log last error on error page

2010-11-23 Thread Martin Grigorov
On Tue, Nov 23, 2010 at 3:18 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Another question, how do I throw the default error page? what does it mean to throw a page ? So with that request, log the exception: public final class MyRequestCycle extends WebRequestCycle {

RE: Log last error on error page

2010-11-23 Thread Brown, Berlin [GCG-PFS]
Is there an instance of the Default Internal Error page or should I return null in te onRuntimeException method? ... return new MyExceptionPage(e); Replace with return new org.apache.wicket.page.InternalErrorPage(e); -Original Message- From: Martin Grigorov

Re: close tag not found error in markup

2010-11-23 Thread Matthias Keller
Hi Andrea Make sure you remove that whitespace in span - that should be span and the same for / span - /span. Valid HTML must not contain whitespace there. Matt On 2010-11-23 11:35, andrea.castello wrote: I am very sorry, but it seems like a portion of the code I paste is being stripped

Re: Log last error on error page

2010-11-23 Thread Martijn Dashorst
On Tue, Nov 23, 2010 at 3:18 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Another question, how do I throw the default error page? You cause an error and press the print button. You walk to your printer and get the printout. Now you have two options: 1. cram it together into a

Re: Log last error on error page

2010-11-23 Thread Martin Grigorov
just return null and the default logic will be applied depending on your IExceptionSettings On Tue, Nov 23, 2010 at 3:31 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is there an instance of the Default Internal Error page or should I return null in te onRuntimeException

Re: error in heritance

2010-11-23 Thread James Carman
It sounds like you're just getting started with Wicket. Why are you rocking the boat already? Just put the markup where it belongs and don't try messing with putting it elsewhere until you truly understand what you're doing. On Tue, Nov 23, 2010 at 9:26 AM, Alis ajcalve...@yahoo.es wrote:   I

Re: error in heritance

2010-11-23 Thread Alis
James, please help me. Thank you! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055573.html Sent from the Users forum mailing list archive at Nabble.com. - To

Re: error in heritance

2010-11-23 Thread James Carman
Create a quickstart and put it somewhere where we can get to it. Then, someone will be able to help you easier. On Tue, Nov 23, 2010 at 9:50 AM, Alis ajcalve...@yahoo.es wrote:  James, please help me.  Thank you! -- View this message in context:

opening ModalWindow on page load

2010-11-23 Thread Ernesto Reinaldo Barreiro
Hi, In one of the application we working at right now we have the requirement that the user should fill in some extra information before he/she is allowed to work with some pages. We wanted to do this with a modal window blocking the page till this information is provided. So, the requirement is:

Re: opening ModalWindow on page load

2010-11-23 Thread Martin Grigorov
Wiki page is OK for now. 1) it is easy to create if needed 2) I don't remember such request in the mailing lists for the last 2 years, so it is not something everyone needs My 2c. On Tue, Nov 23, 2010 at 4:16 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi, In one of the

Re: close tag not found error in markup

2010-11-23 Thread andrea.castello
Matt, thank you, but original code has no whitespaces. To add, more the html markup worked perfectly in my app with Wicket 1.3.6 while all seems to break when I upgrade to Wicket 1.4.13 -- View this message in context:

Re: replace embedded css via ajax

2010-11-23 Thread Igor Vaynberg
generate it in a dynamic resource instead of putting it directly into the page or add a bit of metadata to the page marking that you have contributed this -igor On Tue, Nov 23, 2010 at 3:41 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi Currently I draw some css this way:

Re: opening ModalWindow on page load

2010-11-23 Thread Major Péter
Hi, A colleague of mine wanted to do the same just last week. He ended up dropping modal window, and the problem was solved in a different way, so there are use-cases for this functionality. (ours was: popping a modal window for user to accept/decline a pre-defined profile image on first

Link to stockquote example not found on wicket website

2010-11-23 Thread Joe Porcheddu
The following link on the Wicket examples page gives a 404 Error: http://wicket.apache.org/learn/examples/stockquote.html http://wicket.apache.org/learn/examples/

WicketRuntimeException: component not found on page

2010-11-23 Thread Alec Swan
Hello, We upgraded our app to use Wicket 1.4.13. After that we started getting sporadic WicketRuntimeExceptions about components not being found on a some pages. We made changes to some, but not all pages, which exhibit this behavior. Has anyone else noticed this with 1.4.14? Any ideas on how to

Simple Download from StringResourceStream cause NPE wicket 1.5M3 (possible bug??)

2010-11-23 Thread jcgarciam
Hi Folks, Probably im doing it wrong, but please bear with me, currently i'm trying to do a very simple download operation in wicket 1.5M3, but it fails with a NPE in (ResourceStreamResource.java line 72), because it seems is always expecting that any IResourceStream implementation set the

Re: Simple Download from StringResourceStream cause NPE wicket 1.5M3 (possible bug??)

2010-11-23 Thread Martin Grigorov
Looks like a bug. I think StringResourceStream has to initialize its lastModifiedTime in the constructor to Time.now(). I'll create a ticket and fix it. On Tue, Nov 23, 2010 at 8:05 PM, jcgarciam jcgarc...@gmail.com wrote: Hi Folks, Probably im doing it wrong, but please bear with me,

Re: Simple Download from StringResourceStream cause NPE wicket 1.5M3 (possible bug??)

2010-11-23 Thread Martin Grigorov
Done. r1038292 On Tue, Nov 23, 2010 at 8:20 PM, Martin Grigorov mgrigo...@apache.orgwrote: Looks like a bug. I think StringResourceStream has to initialize its lastModifiedTime in the constructor to Time.now(). I'll create a ticket and fix it. On Tue, Nov 23, 2010 at 8:05 PM, jcgarciam

Re: Simple Download from StringResourceStream cause NPE wicket 1.5M3 (possible bug??)

2010-11-23 Thread jcgarciam
Hi Martin, I explored the object hierarchy, and it seems *StringBufferResourceStream *may suffer from the same problem, if its constructed and no append or prepend method is called on it (which is a weird scenario of course). Thanks! On Tue, Nov 23, 2010 at 4:27 PM, Martin Grigorov-4 [via

Re: Simple Download from StringResourceStream cause NPE wicket 1.5M3 (possible bug??)

2010-11-23 Thread Martin Grigorov
Covered by the fix ;-) All classes extending org.apache.wicket.util.resource.AbstractStringResourceStream will have it initialized for free. On Tue, Nov 23, 2010 at 8:37 PM, jcgarciam jcgarc...@gmail.com wrote: Hi Martin, I explored the object hierarchy, and it seems

Re: Simple Download from StringResourceStream cause NPE wicket 1.5M3 (possible bug??)

2010-11-23 Thread jcgarciam
Great, exactly what i had in mind :) Thanks. On Tue, Nov 23, 2010 at 4:42 PM, Martin Grigorov-4 [via Apache Wicket] ml-node+3056108-1056044911-65...@n4.nabble.comml-node%2b3056108-1056044911-65...@n4.nabble.com wrote: Covered by the fix ;-) All classes extending

assertNOTContains ?

2010-11-23 Thread Arnaud Garcia
Hello, With WicketTester how do check that a word is not present in the page... tester.assertContains(toto); // check is the word toto is in the page... I would like: tester.assertNotContains(toto); = To be sure, that I don't have this word on my page... thanks arnaud

Re: assertNOTContains ?

2010-11-23 Thread Martin Makundi
AssertContais is just a regexp so you can put negative also. http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word ** Martin 2010/11/23 Arnaud Garcia arn...@imagemed-87.com: Hello, With WicketTester how do check that a word is not present in the

Layers on gmap2

2010-11-23 Thread javax
Hi! Can I add openstreet layer on top of gmap2 map? Something like I do in javascript: var map; var geodan = new google.maps.LatLng(31.777622647101833,35.231376640319844); var osmMapType = new google.maps.ImageMapType({ getTileUrl: function(coord, zoom) { return

modal window IE8 parent page scrolbar

2010-11-23 Thread fachhoch
when I open a modal window in firefox and chrome the parent page vertical scrollbar is disabled but in IE 8 it is not, is there any fix for to disable parent page scrollbar in IE ? -- View this message in context:

Re: UploadProgressBar on nested forms

2010-11-23 Thread Alec Swan
Hello, Thank you for promptly fixing the problem with the upload progress bar in nested forms. I applied the fix by merging SVN changes into 1.4.13 branch and rebuilding the JAR files. I verified that the original problem was fixed with the patched jars. However, here is a new problem. If I have

Re: WicketRuntimeException: component not found on page

2010-11-23 Thread Alec Swan
I noticed that all component not found on page exceptions were thrown for AjaxEditableLabel and AjaxLink components located inside of a DataView. It seems like other people had a component not found on page problem inside of DataView components:

Re: UploadProgressBar on nested forms

2010-11-23 Thread Igor Vaynberg
file another issue with a new quickstart. -igor On Tue, Nov 23, 2010 at 8:45 PM, Alec Swan alecs...@gmail.com wrote: Hello, Thank you for promptly fixing the problem with the upload progress bar in nested forms. I applied the fix by merging SVN changes into 1.4.13 branch and rebuilding the

Re: WicketRuntimeException: component not found on page

2010-11-23 Thread Igor Vaynberg
start by creating a quickstart that reproduces it so we can better understand it -igor On Tue, Nov 23, 2010 at 9:38 PM, Alec Swan alecs...@gmail.com wrote: I noticed that all component not found on page exceptions were thrown for AjaxEditableLabel and AjaxLink components located inside of a

Re: opening ModalWindow on page load

2010-11-23 Thread Ernesto Reinaldo Barreiro
Martin, Yes you are right the requests/e-mails I have seen are older that two years. But I'm not sure this is not a feature everyone needs: maybe when people have such a need they look at ModalWindow and then realize it can't do the job and then turn to use other solution (e.g. jquery Dialog

Re: opening ModalWindow on page load

2010-11-23 Thread Ernesto Reinaldo Barreiro
Peter, p.s.: Ernesto, thanks for sharing your code! Glad to be of some help:-) Regards, Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

SV: Wicket 1.4.x: Repainting Page via Ajax

2010-11-23 Thread Wilhelmsen Tor Iver
Attach a web markup container to the body tag. Override isTransparentResolver and return true. This gets you a component that you can add to the ajax request target to repaint the entire body. Thanks, I added a wrapping div for it (since WicketPortlet strips out the body tag) and it

AjaxLink overridden by SimpleAttributeModifier(onclick)

2010-11-23 Thread smallufo
If I want to add a simple 'onclick warning' to an AjaxLink , the ajax's behavior will be overridden by : ajaxLink.add( new SimpleAttributeModifier(onclick, return confirm('sure ?');)); How to avoid this ?