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 works with regex.




 However the link provided by the replier is not working   :(
 Somewhere I saw the use of RegEx in mount Paths but I cant seem to find it.

 Regarding Q3) I think http://blog.jteam.nl/2010/02/24/wicket-root-mounts/
 looks promising,along with a recent thread (Virtual contexts):

 http://apache-wicket.1842946.n4.nabble.com/how-to-have-one-app-at-multiple-root-contexts-td3054122.html
 ..but thats all 1.5

1.5 is quite stable these days. Give it a try.
There are rumors the next release will be a candidate (RC).


 Anyway, if anyone got a ready made ref to answers for Q1)  Q2) would
 appreciate it.

 thanks
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Whats-the-best-way-to-prevent-handle-404-tp3053827p3054830.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: 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,
 
 Is it possible to tell, from a Wicket Page, to execute some JavaScript
 automatically when a page loads through a JavaScript XHTTPRequest? I'm using
 AbstractBehavior with renderHead(), and it works when the Page is invoked
 from another Wicket component (through Link, etc), but not when I invoke the
 Page URL through Javascript, even when the HTML returned contains the
 script tags in the header, it does not execute it. 
 
 Any ideas? TIA
 -- 
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055042.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

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



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] 
ml-node+3055066-291766867-65...@n4.nabble.comml-node%2b3055066-291766867-65...@n4.nabble.com
 wrote:

 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 [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3055066i=0
 wrote:

 
  Hi all,
 
  Is it possible to tell, from a Wicket Page, to execute some JavaScript
  automatically when a page loads through a JavaScript XHTTPRequest? I'm
 using
  AbstractBehavior with renderHead(), and it works when the Page is invoked

  from another Wicket component (through Link, etc), but not when I invoke
 the
  Page URL through Javascript, even when the HTML returned contains the
  script tags in the header, it does not execute it.
 
  Any ideas? TIA
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055042.htmlhttp://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055042.html?by-user=t
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3055066i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3055066i=2
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3055066i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3055066i=4



 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055066.html

 To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055072.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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 XHTTPRequest? I'm using
 AbstractBehavior with renderHead(), and it works when the Page is invoked
 from another Wicket component (through Link, etc), but not when I invoke the
 Page URL through Javascript, even when the HTML returned contains the
 script tags in the header, it does not execute it.

 Any ideas? TIA
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055042.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



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 all worked fine before I
upgraded Wicket version.
Every tag is properly closed, so I suppose this error hides another one.

Here's my markup:

wicket:panel
caption class=tableCaption

/caption
thead class=rowH
  

  
/thead
tbody
  tr wicket:id=rows
td wicket:id=cells
  [cell]
/td
  /tr
/tbody
tfoot
  

  
/tfoot
/wicket:panel

Can you suggest me what can be wrong?
Thanks,

Andrea
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/close-tag-not-found-error-in-markup-tp3055117p3055117.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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 - there appears to be the problem

Matt



smime.p7s
Description: S/MIME Cryptographic Signature


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
  

  
/tfoot
/wicket:panel

Thanks again, Andrea

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/close-tag-not-found-error-in-markup-tp3055117p3055144.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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 code,
just a trick to make it readable..)

A. 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/close-tag-not-found-error-in-markup-tp3055117p3055158.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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 that calling
AjaxRequestTarget.get would give an indication or maybe the request or the
requestcycle.. But havent found a way yet.

regards Nino


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 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 that calling
 AjaxRequestTarget.get would give an indication or maybe the request or the
 requestcycle.. But havent found a way yet.

 regards Nino


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



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 wicket:id = topToolbars
   span wicket:id = toolbar  / span


Hope it's readable now (all those whitespaces are not in the original code,
just a trick to make it readable..)

A.
   



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



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 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 that calling
 AjaxRequestTarget.get would give an indication or maybe the request or the
 requestcycle.. But havent found a way yet.

 regards Nino


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



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
 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 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 that calling
 AjaxRequestTarget.get would give an indication or maybe the request or the
 requestcycle.. But havent found a way yet.

 regards Nino



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



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 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 that calling
  AjaxRequestTarget.get would give an indication or maybe the request or
 the
  requestcycle.. But havent found a way yet.
 
  regards Nino
 

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




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 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 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 that calling
  AjaxRequestTarget.get would give an indication or maybe the request or
 the
  requestcycle.. But havent found a way yet.
 
  regards Nino
 
 

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




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 
AjaxRequestTarget)
{
return 
(AjaxRequestTarget)requestCycle.getRequestTarget();
}
}
return null;
}

Ernesto

On Tue, Nov 23, 2010 at 12:19 PM, Vitaly Tsaplin
vitaly.tsap...@gmail.com wrote:
   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
 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 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 that calling
 AjaxRequestTarget.get would give an indication or maybe the request or the
 requestcycle.. But havent found a way yet.

 regards Nino



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



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



Re: 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 = RequestCycle.get();
if (requestCycle != null)
{
if (requestCycle.getRequestTarget() instanceof
 AjaxRequestTarget)
{
return
 (AjaxRequestTarget)requestCycle.getRequestTarget();
}
}
return null;
}

 Ernesto

 On Tue, Nov 23, 2010 at 12:19 PM, Vitaly Tsaplin
 vitaly.tsap...@gmail.com wrote:
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
  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 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 that calling
  AjaxRequestTarget.get would give an indication or maybe the request or
 the
  requestcycle.. But havent found a way yet.
 
  regards Nino
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




Re: 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 Barreiroreier...@gmail.com


Exactly what AjaxRequestTarget.get() does:-)

public static AjaxRequestTarget get()
{
final RequestCycle requestCycle = RequestCycle.get();
if (requestCycle != null)
{
if (requestCycle.getRequestTarget() instanceof
AjaxRequestTarget)
{
return
(AjaxRequestTarget)requestCycle.getRequestTarget();
}
}
return null;
}

Ernesto

On Tue, Nov 23, 2010 at 12:19 PM, Vitaly Tsaplin
vitaly.tsap...@gmail.com  wrote:

   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
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 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 that calling
AjaxRequestTarget.get would give an indication or maybe the request or

the

requestcycle.. But havent found a way yet.

regards Nino


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



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 it does not seem like the wicket way..

regards Nino


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 null..
 Thanks for the help.

 2010/11/23 Ernesto Reinaldo Barreiroreier...@gmail.com

  Exactly what AjaxRequestTarget.get() does:-)

 public static AjaxRequestTarget get()
{
final RequestCycle requestCycle = RequestCycle.get();
if (requestCycle != null)
{
if (requestCycle.getRequestTarget() instanceof
 AjaxRequestTarget)
{
return
 (AjaxRequestTarget)requestCycle.getRequestTarget();
}
}
return null;
}

 Ernesto

 On Tue, Nov 23, 2010 at 12:19 PM, Vitaly Tsaplin
 vitaly.tsap...@gmail.com  wrote:

   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
 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 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 that calling
 AjaxRequestTarget.get would give an indication or maybe the request or

 the

 requestcycle.. But havent found a way yet.

 regards Nino


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




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 component? In the 
 last code snippet I see just one  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 wicket:id = topToolbars
span wicket:id = toolbar  / span


 Hope it's readable now (all those whitespaces are not in the original
 code,
 just a trick to make it readable..)

 A.

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

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/close-tag-not-found-error-in-markup-tp3055117p3055290.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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.

Root cause:

org.apache.wicket.markup.MarkupNotFoundException: 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.
at
org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:98)
at
org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:63)
at
org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)


 The classes is:

  public  class  ThirdByRolMain extends Panel {
protected WebMarkupContainer wmc;
protected Form formThird;
protected   Object object;
protected  DataViewThirdModel dataView;   // data table
protected  SortableThirdProvider thirdProvider;   // data model
protected  ListString partAdds = new ArrayListString();
protected  Label numberRowLabel;
protected  FeedbackPanel feedback;
public ThirdByRolMain(final String id,final Object object,final String
idClass, final Role role,final boolean isClient,final Policy pol){


super(id);
 System.out.println(id padree=  + id);
wmc = new WebMarkupContainer( wmc ) {
@Override
public boolean isTransparentResolver()
{
return true;
}};

add(wmc);
   // formThird= new Form(form);

this.object=object;
WebMarkupContainer containerDetailSearch = new
WebMarkupContainer(detailSearch);
containerDetailSearch.setOutputMarkupId(true);
add(containerDetailSearch);
}

?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 /wicket:child/div
div wicket:id=detailSearch/div
/wicket:panel
/body
/html




public class ThirdByRolPolicy extends ThirdByRolMain{

private ConfirmationAnswer  isSure;
private ModalDialog dataBasicModalDialog,modalDialogSecurity;
private boolean isEmpty=true;
private ValueMap properties = new ValueMap();
private String idThirdOld=;

public ThirdByRolPolicy(final String id,final Object object,final String
idClass, final Role role,final boolean isClient,final Policy pol){

super(id, object,idClass,role, isClient, pol);
Form formThird = new Form(thirdForm);
wmc.add(formThird);

}

}


?xml version=1.0 encoding=UTF-8?
html xmlns:wicket=http://www.w3.org/1999/XSL/Transform;
wicket:extend
form wicket:id=thirdForm/form
 /wicket:extend
/html



 Help me please, thank you!

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055355.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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 DataTable? table, final FilterForm form,
final IFilterStateLocator stateLocator)

So, what is the profit in this? Why can't we just have Locator from the form?

--
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
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
 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: 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


Hope it's readable now (all those whitespaces are not in the original
code,
just a trick to make it readable..)

A.

   


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



 
   



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



Re: 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 wicket:id=detailSearch/div
/wicket:panel
/body
/html



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055406.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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?
thanks, juraj


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



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 will be replaced by LayoutPage/wicket:child
/body
/html

LayoutPage.html :
wicket:extend
  ..layout stuff..
wicket:childThis will be replaced by Page1/wicket:child
  .. more layout stuff ..
/wicket:extend

Page1.html :
wicket:extend
  .. Page1 stuff ..
/wicket:extend

Matt

On 2010-11-23 14:31, Juraj Petko 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 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?
thanks, juraj 





smime.p7s
Description: S/MIME Cryptographic Signature


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 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?
 thanks, juraj


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



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



Re: 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 markup inherits
from page1. Am i doing something wrong, or there is no support for this?
thanks, juraj


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






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



Re: 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):


BasePage.html :
html
head.../head
body
wicket:childThis will be replaced by LayoutPage/wicket:child
/body
/html

LayoutPage.html :
wicket:extend
  ..layout stuff..
wicket:childThis will be replaced by Page1/wicket:child
  .. more layout stuff ..
/wicket:extend

Page1.html :
wicket:extend
  .. Page1 stuff ..
/wicket:extend

Matt

On 2010-11-23 14:31, Juraj Petko 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 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?
thanks, juraj 






-
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 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 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.

Root cause:

org.apache.wicket.markup.MarkupNotFoundException: 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.
at
org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:98)
at
org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:63)
?


 Thank you Alex!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055467.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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, 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
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
ThirdByRolMain.html
ThirdByRolPolicy.class
ThirdByRolPolicy.html
Do ot and run you code again.

 The two class is in package  com.consisint.frontend.pages.

  And the html in C:\programs\FrontEnd\FrontEnd\WebContent\views .

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



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 when you reach an error page.

 I am using my own error page but also want to log the last stack trace
 or exception message that created the error.
 getApplicationSettings().setInternalErrorPage(ErrorPage.class);


 Berlin Brown




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

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



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) {
super(application, request, response);
}

/**
 * {...@inheritdoc}
 */
@Override
protected final Page onRuntimeException(final Page cause, final
RuntimeException e) {

// And then catch the exception
LOG.error(e);
return new MyExceptionPage(e);
}
} 

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Tuesday, November 23, 2010 9:05 AM
To: users@wicket.apache.org
Subject: Re: Log last error on error page

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 when you reach an error page.

 I am using my own error page but also want to log the last stack trace

 or exception message that created the error.
 getApplicationSettings().setInternalErrorPage(ErrorPage.class);


 Berlin Brown




-
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 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
 * @param path path where the class is
 * @return  the new resource stream
 */
public IResourceStream locate(Class? clazz, String path)
{
String location;
String extension = path.substring(path.lastIndexOf('.') + 1);
String simpleFileName = Strings.lastPathComponent(clazz.getName(),
'.');
location = /views/ + simpleFileName + . + extension;
URL url;
try
{
// try to load the resource from the web context
url =
WebApplication.get().getServletContext().getResource(location);
if (url != null)
{
return new UrlResourceStream(url);
}
}
catch (MalformedURLException e)
{
throw new WicketRuntimeException(e);
}
// resource not found; fall back on class loading
return super.locate(clazz, path);
}
}


 Thank you by reply! :) 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055527.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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 {
public WebRequestCycle(final WebApplication application, final
 WebRequest request, final Response response) {
super(application, request, response);
}

/**
 * {...@inheritdoc}
 */
@Override
protected final Page onRuntimeException(final Page cause, final
 RuntimeException e) {

// And then catch the exception
LOG.error(e);
return new MyExceptionPage(e);
 }
 }

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, November 23, 2010 9:05 AM
 To: users@wicket.apache.org
 Subject: Re: Log last error on error page

 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 when you reach an error page.
 
  I am using my own error page but also want to log the last stack trace

  or exception message that created the error.
  getApplicationSettings().setInternalErrorPage(ErrorPage.class);
 
 
  Berlin Brown
 
 


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




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 [mailto:mgrigo...@apache.org] 
Sent: Tuesday, November 23, 2010 9:28 AM
To: users@wicket.apache.org
Subject: Re: Log last error on error page

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 {
public WebRequestCycle(final WebApplication application, final 
 WebRequest request, final Response response) {
super(application, request, response);
}

/**
 * {...@inheritdoc}
 */
@Override
protected final Page onRuntimeException(final Page cause, final

 RuntimeException e) {

// And then catch the exception
LOG.error(e);
return new MyExceptionPage(e);
 }
 }

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, November 23, 2010 9:05 AM
 To: users@wicket.apache.org
 Subject: Re: Log last error on error page

 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 when you reach an error page.
 
  I am using my own error page but also want to log the last stack 
  trace

  or exception message that created the error.
  getApplicationSettings().setInternalErrorPage(ErrorPage.class);
 
 
  Berlin Brown
 
 


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




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



Re: 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 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 code,
just a trick to make it readable..)

A.





smime.p7s
Description: S/MIME Cryptographic Signature


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 little ball
2. find a blue-print for a paper airplane and fold it according to the
instructions

Go to a nice spot (preferably high) and throw the paper object you
created from the error page in the previous step.

It is a really fun exercise, and I encourage anyone to do this at
least once a month. Note that this is not just limited to the default
Wicket error page (although those can be really fun), but you can do
this also for bug reports or email messages. Just make sure you don't
throw around confidential information.

Martijn

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



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 method?
 ...
 return new MyExceptionPage(e);

 Replace with

  return new org.apache.wicket.page.InternalErrorPage(e);

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, November 23, 2010 9:28 AM
 To: users@wicket.apache.org
 Subject: Re: Log last error on error page

 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 {
 public WebRequestCycle(final WebApplication application, final
  WebRequest request, final Response response) {
 super(application, request, response);
 }
 
 /**
  * {...@inheritdoc}
  */
 @Override
 protected final Page onRuntimeException(final Page cause, final

  RuntimeException e) {
 
 // And then catch the exception
 LOG.error(e);
 return new MyExceptionPage(e);
  }
  }
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Tuesday, November 23, 2010 9:05 AM
  To: users@wicket.apache.org
  Subject: Re: Log last error on error page
 
  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 when you reach an error page.
  
   I am using my own error page but also want to log the last stack
   trace
 
   or exception message that created the error.
   getApplicationSettings().setInternalErrorPage(ErrorPage.class);
  
  
   Berlin Brown
  
  
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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




Re: 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 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
     * @param path path where the class is
     * @return  the new resource stream
     */
    public IResourceStream locate(Class? clazz, String path)
    {
        String location;
        String extension = path.substring(path.lastIndexOf('.') + 1);
        String simpleFileName = Strings.lastPathComponent(clazz.getName(),
 '.');
        location = /views/ + simpleFileName + . + extension;
        URL url;
        try
        {
            // try to load the resource from the web context
            url =
 WebApplication.get().getServletContext().getResource(location);
            if (url != null)
            {
                return new UrlResourceStream(url);
            }
        }
        catch (MalformedURLException e)
        {
            throw new WicketRuntimeException(e);
        }
        // resource not found; fall back on class loading
        return super.locate(clazz, path);
    }
 }


  Thank you by reply! :)
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055527.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



-
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 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 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 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: 
 http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055573.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



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:

-Modal window should be opened immediately after a page is load.

After a bit of messing around/googling we came up with this class, who
seems to be doing the job:-)

public class OpenOnLoadModalWindow extends ModalWindow implements
IHeaderContributor {

private static final long serialVersionUID = 1L;

/**
 * @param id
 */
public OpenOnLoadModalWindow(String id) {
super(id);
}

/**
 * @param id
 * @param model
 */
public OpenOnLoadModalWindow(String id, IModel? model) {
super(id, model);
}

/**
 * Adds the JavaScript to initially open modal window.
 */
public void renderHead(IHeaderResponse response)
{
response.renderOnDomReadyJavascript(getWindowOpenJavascript());
}

/*
 * (non-Javadoc)
 * @see 
org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#makeContentVisible()
 */
@Override
protected boolean makeContentVisible()
{
return true;
}
}

Would this class, or one derived form this one, or a better solution
if one is known:), be included on the framework. Or this is just a
topic for wiki page?

Regards,

Ernesto

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



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 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:

 -Modal window should be opened immediately after a page is load.

 After a bit of messing around/googling we came up with this class, who
 seems to be doing the job:-)

 public class OpenOnLoadModalWindow extends ModalWindow implements
 IHeaderContributor {

private static final long serialVersionUID = 1L;

/**
 * @param id
 */
public OpenOnLoadModalWindow(String id) {
super(id);
}

/**
 * @param id
 * @param model
 */
public OpenOnLoadModalWindow(String id, IModel? model) {
super(id, model);
}

/**
 * Adds the JavaScript to initially open modal window.
 */
public void renderHead(IHeaderResponse response)
{

  response.renderOnDomReadyJavascript(getWindowOpenJavascript());
}

/*
 * (non-Javadoc)
 * @see
 org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#makeContentVisible()
 */
@Override
protected boolean makeContentVisible()
{
return true;
}
 }

 Would this class, or one derived form this one, or a better solution
 if one is known:), be included on the framework. Or this is just a
 topic for wiki page?

 Regards,

 Ernesto

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




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: 
http://apache-wicket.1842946.n4.nabble.com/close-tag-not-found-error-in-markup-tp3055117p3055695.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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:

 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 it does not seem like the wicket way..

 regards Nino


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



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 visit/until choice made.)


p.s.: Ernesto, thanks for sharing your code!

Regards,
Peter

2010-11-23 16:24 keltezéssel, Martin Grigorov írta:

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 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:

-Modal window should be opened immediately after a page is load.

After a bit of messing around/googling we came up with this class, who
seems to be doing the job:-)

public class OpenOnLoadModalWindow extends ModalWindow implements
IHeaderContributor {

private static final long serialVersionUID = 1L;

/**
 * @param id
 */
public OpenOnLoadModalWindow(String id) {
super(id);
}

/**
 * @param id
 * @param model
 */
public OpenOnLoadModalWindow(String id, IModel?  model) {
super(id, model);
}

/**
 * Adds the JavaScript to initially open modal window.
 */
public void renderHead(IHeaderResponse response)
{

  response.renderOnDomReadyJavascript(getWindowOpenJavascript());
}

/*
 * (non-Javadoc)
 * @see
org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#makeContentVisible()
 */
@Override
protected boolean makeContentVisible()
{
return true;
}
}

Would this class, or one derived form this one, or a better solution
if one is known:), be included on the framework. Or this is just a
topic for wiki page?

Regards,

Ernesto


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



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
troubleshoot this intermittent behavior?

Here is an example:

microSitePanel:mainMenuContentPanel:secondMenuItem:1:secondMenuItemLink not
found on page
com.galecsy.lrm.web.wicket.offer.OfferManagementPage[id = 1], listener
interface =
[RequestListenerInterface name=IBehaviorListener, method=public abstract
void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:26

Thanks


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 lastModifiedTime 
in the underlying stream before calling dataNeedsToBeWritten which
StringResourceStream doesn't do it ( i need to explicitly set it to make it
work ) .

@Override
protected ResourceResponse newResourceResponse(Attributes attributes)
{
ResourceResponse data = new ResourceResponse();
(72)-  data.setLastModified(stream.lastModifiedTime().toDate());


My code using [StringResourceStream]
code
final StringBuilder content = new StringBuilder(Hello,world);
add(new LinkVoid(downloadDoc) {
@Override
public void onClick() {
StringResourceStream stream = new
StringResourceStream(content.toString(),html/csv);
getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceStreamRequestHandler(stream)
.setFileName(demo.csv)
.setContentDisposition(ContentDisposition.ATTACHMENT));
}
});
/code

Calling [stream.setLastModified(Time.now());] right before scheduling the
request handler make the download to works, but it seems that probably im
doing something wrong (not supposed to a download on this way) or does it
sounds like a bug in [ResourceStreamResource.java]? 

Thanks,

Attached is a quickstart
http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z
DownloadStreamBug.7z 


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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, 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 lastModifiedTime
 in the underlying stream before calling dataNeedsToBeWritten which
 StringResourceStream doesn't do it ( i need to explicitly set it to make it
 work ) .

 @Override
protected ResourceResponse newResourceResponse(Attributes
 attributes)
{
ResourceResponse data = new ResourceResponse();
 (72)-  data.setLastModified(stream.lastModifiedTime().toDate());


 My code using [StringResourceStream]
 code
final StringBuilder content = new StringBuilder(Hello,world);
add(new LinkVoid(downloadDoc) {
@Override
public void onClick() {
StringResourceStream stream = new
 StringResourceStream(content.toString(),html/csv);

  getRequestCycle().scheduleRequestHandlerAfterCurrent(new
 ResourceStreamRequestHandler(stream)
.setFileName(demo.csv)

  .setContentDisposition(ContentDisposition.ATTACHMENT));
}
});
 /code

 Calling [stream.setLastModified(Time.now());] right before scheduling the
 request handler make the download to works, but it seems that probably im
 doing something wrong (not supposed to a download on this way) or does it
 sounds like a bug in [ResourceStreamResource.java]?

 Thanks,

 Attached is a quickstart

 http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z
 DownloadStreamBug.7z


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: 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 jcgarc...@gmail.com wrote:


 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 lastModifiedTime
 in the underlying stream before calling dataNeedsToBeWritten which
 StringResourceStream doesn't do it ( i need to explicitly set it to make
 it
 work ) .

 @Override
protected ResourceResponse newResourceResponse(Attributes
 attributes)
{
ResourceResponse data = new ResourceResponse();
 (72)-  data.setLastModified(stream.lastModifiedTime().toDate());


 My code using [StringResourceStream]
 code
final StringBuilder content = new StringBuilder(Hello,world);
add(new LinkVoid(downloadDoc) {
@Override
public void onClick() {
StringResourceStream stream = new
 StringResourceStream(content.toString(),html/csv);

  getRequestCycle().scheduleRequestHandlerAfterCurrent(new
 ResourceStreamRequestHandler(stream)
.setFileName(demo.csv)

  .setContentDisposition(ContentDisposition.ATTACHMENT));
}
});
 /code

 Calling [stream.setLastModified(Time.now());] right before scheduling the
 request handler make the download to works, but it seems that probably im
 doing something wrong (not supposed to a download on this way) or does it
 sounds like a bug in [ResourceStreamResource.java]?

 Thanks,

 Attached is a quickstart

 http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z
 DownloadStreamBug.7z


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





Re: 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 Apache Wicket] 
ml-node+3056080-692802461-65...@n4.nabble.comml-node%2b3056080-692802461-65...@n4.nabble.com
 wrote:

 Done.
 r1038292

 On Tue, Nov 23, 2010 at 8:20 PM, Martin Grigorov [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3056080i=0wrote:


  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 [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3056080i=1
 wrote:
 
 
  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
 lastModifiedTime
  in the underlying stream before calling dataNeedsToBeWritten which
  StringResourceStream doesn't do it ( i need to explicitly set it to make

  it
  work ) .
 
  @Override
 protected ResourceResponse newResourceResponse(Attributes
  attributes)
 {
 ResourceResponse data = new ResourceResponse();
  (72)-  data.setLastModified(stream.lastModifiedTime().toDate());
 
 
  My code using [StringResourceStream]
  code
 final StringBuilder content = new StringBuilder(Hello,world);
 add(new LinkVoid(downloadDoc) {
 @Override
 public void onClick() {
 StringResourceStream stream = new
  StringResourceStream(content.toString(),html/csv);
 
   getRequestCycle().scheduleRequestHandlerAfterCurrent(new
  ResourceStreamRequestHandler(stream)
 .setFileName(demo.csv)
 
   .setContentDisposition(ContentDisposition.ATTACHMENT));
 }
 });
  /code
 
  Calling [stream.setLastModified(Time.now());] right before scheduling
 the
  request handler make the download to works, but it seems that probably
 im
  doing something wrong (not supposed to a download on this way) or does
 it
  sounds like a bug in [ResourceStreamResource.java]?
 
  Thanks,
 
  Attached is a quickstart
 
 
 http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7zhttp://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z?by-user=t
  DownloadStreamBug.7z
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.htmlhttp://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html?by-user=t
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3056080i=2
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3056080i=3
 
 
 


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056080.html

 To unsubscribe from Simple Download from StringResourceStream cause NPE
 wicket 1.5M3 (possible bug??), click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3056036code=amNnYXJjaWFtQGdtYWlsLmNvbXwzMDU2MDM2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056096.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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 *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 Apache Wicket] 
 ml-node+3056080-692802461-65...@n4.nabble.comml-node%2b3056080-692802461-65...@n4.nabble.com
 ml-node%2b3056080-692802461-65...@n4.nabble.comml-node%252b3056080-692802461-65...@n4.nabble.com
 
  wrote:

  Done.
  r1038292
 
  On Tue, Nov 23, 2010 at 8:20 PM, Martin Grigorov [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3056080i=0wrote:
 
 
   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 [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3056080i=1
  wrote:
  
  
   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
  lastModifiedTime
   in the underlying stream before calling dataNeedsToBeWritten which
   StringResourceStream doesn't do it ( i need to explicitly set it to
 make
 
   it
   work ) .
  
   @Override
  protected ResourceResponse newResourceResponse(Attributes
   attributes)
  {
  ResourceResponse data = new ResourceResponse();
   (72)-  data.setLastModified(stream.lastModifiedTime().toDate());
  
  
   My code using [StringResourceStream]
   code
  final StringBuilder content = new StringBuilder(Hello,world);
  add(new LinkVoid(downloadDoc) {
  @Override
  public void onClick() {
  StringResourceStream stream = new
   StringResourceStream(content.toString(),html/csv);
  
getRequestCycle().scheduleRequestHandlerAfterCurrent(new
   ResourceStreamRequestHandler(stream)
  .setFileName(demo.csv)
  
.setContentDisposition(ContentDisposition.ATTACHMENT));
  }
  });
   /code
  
   Calling [stream.setLastModified(Time.now());] right before scheduling
  the
   request handler make the download to works, but it seems that probably
  im
   doing something wrong (not supposed to a download on this way) or does
  it
   sounds like a bug in [ResourceStreamResource.java]?
  
   Thanks,
  
   Attached is a quickstart
  
  
 
 http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z
 
 http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z?by-user=t
 
   DownloadStreamBug.7z
  
  
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html
 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html?by-user=t
 
   Sent from the Users forum mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3056080i=2
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3056080i=3
  
  
  
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056080.html
 
  To unsubscribe from Simple Download from StringResourceStream cause NPE
  wicket 1.5M3 (possible bug??), click here
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3056036code=amNnYXJjaWFtQGdtYWlsLmNvbXwzMDU2MDM2fDEyNTYxMzc3ODY=
 .
 
 



 --
 Sincerely,
 JC (http://www.linkedin.com/in/jcgarciam)
 Work smarter, not harder!.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056096.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: 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 org.apache.wicket.util.resource.AbstractStringResourceStream will

 have it initialized for free.

 On Tue, Nov 23, 2010 at 8:37 PM, jcgarciam [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3056108i=0
 wrote:

 
  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 Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3056108i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3056108i=2
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3056108i=3[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3056108i=4
  
   wrote:
 
   Done.
   r1038292
  
   On Tue, Nov 23, 2010 at 8:20 PM, Martin Grigorov [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3056080i=0wrote:
  
  
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 [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3056080i=1
   wrote:
   
   
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
   lastModifiedTime
in the underlying stream before calling dataNeedsToBeWritten which
StringResourceStream doesn't do it ( i need to explicitly set it to
  make
  
it
work ) .
   
@Override
   protected ResourceResponse newResourceResponse(Attributes
attributes)
   {
   ResourceResponse data = new ResourceResponse();
(72)-  data.setLastModified(stream.lastModifiedTime().toDate());
   
   
My code using [StringResourceStream]
code
   final StringBuilder content = new
 StringBuilder(Hello,world);
   add(new LinkVoid(downloadDoc) {
   @Override
   public void onClick() {
   StringResourceStream stream = new
StringResourceStream(content.toString(),html/csv);
   
 getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceStreamRequestHandler(stream)
   .setFileName(demo.csv)
   
 .setContentDisposition(ContentDisposition.ATTACHMENT));
   }
   });
/code
   
Calling [stream.setLastModified(Time.now());] right before
 scheduling
   the
request handler make the download to works, but it seems that
 probably
   im
doing something wrong (not supposed to a download on this way) or
 does
   it
sounds like a bug in [ResourceStreamResource.java]?
   
Thanks,
   
Attached is a quickstart
   
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7zhttp://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z?by-user=t
  
 
 http://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z?by-user=thttp://apache-wicket.1842946.n4.nabble.com/file/n3056036/DownloadStreamBug.7z?by-user=tby-user=t

  
DownloadStreamBug.7z
   
   
--
View this message in context:
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.htmlhttp://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html?by-user=t
  
 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/Simple-Download-from-StringResourceStream-cause-NPE-wicket-1-5M3-possible-bug-tp3056036p3056036.html?by-user=tby-user=t

  
Sent from the Users forum mailing list archive at Nabble.com.
   
   
 -
To unsubscribe, e-mail: [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3056080i=2
For additional commands, e-mail: [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3056080i=3
   
   
   
  
  
   --
View message @
  
 
 

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 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


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



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 http://tile.openstreetmap.org/; +
zoom + / + coord.x + / + coord.y + .png;
},
tileSize: new google.maps.Size(256, 256),
isPng: true,
alt: OpenStreetMap layer,
name: OpenStreetMap,
maxZoom: 19
});
function initializeMap() {
var mapOptions = {
  zoom: 16,
  center: geodan,
  mapTypeId: 'OSM',
  mapTypeControlOptions: {
  mapTypeIds: ['OSM', google.maps.MapTypeId.ROADMAP],
  style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
  }
};
map = new
google.maps.Map(document.getElementById(map_canvas),mapOptions);
map.mapTypes.set('OSM',osmMapType);
map.setMapTypeId('OSM');


}
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Layers-on-gmap2-tp3056261p3056261.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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: 
http://apache-wicket.1842946.n4.nabble.com/modal-window-IE8-parent-page-scrolbar-tp3056439p3056439.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 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 two upload forms, then upload
initiated in the first form shows progress bar in the second form. So, if
the second form happens to be hidden (setVisible(false)), then the upload
progress bar does not show up at all.

Should I file another JIRA issue, add to the existing 3181 issue or change
my code?

Thanks


On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com wrote:

 I opened JIRA issue 3181:
 https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
 file with complete source to reproduce the issue and instructions on
 how to run it (I am sure you didn't need them).

 Please let me know if you can think of any other solutions for
 displaying a modal window from nested upload form.

 Thanks,

 Alec

 On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  not sure yet :) but a quickstart will give me a playground to explore
  the options.
 
  -igor
 
  On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com wrote:
  I can file a bug, but I am curious how you are planning to fix this?
 
  I tried passing the OUTER form to UploadProgressBar, i.e.
  nestedForm.add(new UploadProgressBar(progress, outerForm)), but that
  caused the following error to be logged in Firebug:
 
  Wicket.WUPB.get(def.statusid) is null
  [Break on this error] Wicket.WUPB.get(def.statusid).innerHTML='Upload
  starting...';
  progressbar.js (line 41
 
  While I am filing a bug and waiting for a fix, are there any
  suggestions on how to show a modal window during files upload
  initiated from a nested form?
 
  Thanks
 
  On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  sounds like a bug. open a jira ticket, attach a quickstart.
 
  -igor
 
  On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
 wrote:
  Hello,
 
  I have a page which contains a form around a table. Each row in the
  table contains a nested form which allows user to upload a file for
  the row. I added an UploadProgressBar to the upload form in each row.
  However, the upload progress bars are never shown.
 
  I understand that Wicket replaces a nested form with div and adds
  onsubmit event handler to display UploadProgressBar. However, since
  the form was replaced with div onsubmit handler never fires.
 
  How can I display a progress bar or at least a modal window during a
  file upload from a nested form?
 
  Thanks!
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: 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:
http://www.mail-archive.com/users@wicket.apache.org/msg08636.html
http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-td1892913.html#a2229885

A workaround in JIRA 923 recommends turn off browser caching to solve
component not found on page problem when using the Back button.
However, in my case the Back button is not used, instead the DataView
is refreshed using Ajax.

Could anybody provide any suggestions on how to fix this problem?

Thanks

On Tue, Nov 23, 2010 at 10:58 AM, Alec Swan alecs...@gmail.com wrote:

 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 
 troubleshoot this intermittent behavior?

 Here is an example:

 microSitePanel:mainMenuContentPanel:secondMenuItem:1:secondMenuItemLink not 
 found on page
 com.galecsy.lrm.web.wicket.offer.OfferManagementPage[id = 1], listener 
 interface =
 [RequestListenerInterface name=IBehaviorListener, method=public abstract void
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
     at
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:26

 Thanks

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



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 JAR files.

 I verified that the original problem was fixed with the patched jars.
 However, here is a new problem. If I have two upload forms, then upload
 initiated in the first form shows progress bar in the second form. So, if
 the second form happens to be hidden (setVisible(false)), then the upload
 progress bar does not show up at all.

 Should I file another JIRA issue, add to the existing 3181 issue or change
 my code?

 Thanks


 On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com wrote:

 I opened JIRA issue 3181:
 https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
 file with complete source to reproduce the issue and instructions on
 how to run it (I am sure you didn't need them).

 Please let me know if you can think of any other solutions for
 displaying a modal window from nested upload form.

 Thanks,

 Alec

 On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  not sure yet :) but a quickstart will give me a playground to explore
  the options.
 
  -igor
 
  On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com wrote:
  I can file a bug, but I am curious how you are planning to fix this?
 
  I tried passing the OUTER form to UploadProgressBar, i.e.
  nestedForm.add(new UploadProgressBar(progress, outerForm)), but that
  caused the following error to be logged in Firebug:
 
  Wicket.WUPB.get(def.statusid) is null
  [Break on this error] Wicket.WUPB.get(def.statusid).innerHTML='Upload
  starting...';
  progressbar.js (line 41
 
  While I am filing a bug and waiting for a fix, are there any
  suggestions on how to show a modal window during files upload
  initiated from a nested form?
 
  Thanks
 
  On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  sounds like a bug. open a jira ticket, attach a quickstart.
 
  -igor
 
  On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
 wrote:
  Hello,
 
  I have a page which contains a form around a table. Each row in the
  table contains a nested form which allows user to upload a file for
  the row. I added an UploadProgressBar to the upload form in each row.
  However, the upload progress bars are never shown.
 
  I understand that Wicket replaces a nested form with div and adds
  onsubmit event handler to display UploadProgressBar. However, since
  the form was replaced with div onsubmit handler never fires.
 
  How can I display a progress bar or at least a modal window during a
  file upload from a nested form?
 
  Thanks!
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



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



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 DataView.

 It seems like other people had a component not found on page problem
 inside of DataView components:
 http://www.mail-archive.com/users@wicket.apache.org/msg08636.html
 http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-td1892913.html#a2229885

 A workaround in JIRA 923 recommends turn off browser caching to solve
 component not found on page problem when using the Back button.
 However, in my case the Back button is not used, instead the DataView
 is refreshed using Ajax.

 Could anybody provide any suggestions on how to fix this problem?

 Thanks

 On Tue, Nov 23, 2010 at 10:58 AM, Alec Swan alecs...@gmail.com wrote:

 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 
 troubleshoot this intermittent behavior?

 Here is an example:

 microSitePanel:mainMenuContentPanel:secondMenuItem:1:secondMenuItemLink not 
 found on page
 com.galecsy.lrm.web.wicket.offer.OfferManagementPage[id = 1], listener 
 interface =
 [RequestListenerInterface name=IBehaviorListener, method=public abstract void
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
     at
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:26

 Thanks

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



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



Re: 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 which have an autoOpen property). In my case jquery Dialog was
not a good solution, so, I went into trying to fix modal window to do
the Job:-)

I will add a wiki page then.

Regards,

Ernesto


On Tue, Nov 23, 2010 at 4:24 PM, Martin Grigorov mgrigo...@apache.org wrote:
 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 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:

 -Modal window should be opened immediately after a page is load.

 After a bit of messing around/googling we came up with this class, who
 seems to be doing the job:-)

 public class OpenOnLoadModalWindow extends ModalWindow implements
 IHeaderContributor {

        private static final long serialVersionUID = 1L;

        /**
         * @param id
         */
        public OpenOnLoadModalWindow(String id) {
                super(id);
        }

        /**
         * @param id
         * @param model
         */
        public OpenOnLoadModalWindow(String id, IModel? model) {
                super(id, model);
        }

        /**
         * Adds the JavaScript to initially open modal window.
         */
        public void renderHead(IHeaderResponse response)
        {

  response.renderOnDomReadyJavascript(getWindowOpenJavascript());
        }

        /*
         * (non-Javadoc)
         * @see
 org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#makeContentVisible()
         */
       �...@override
        protected boolean makeContentVisible()
        {
                return true;
        }
 }

 Would this class, or one derived form this one, or a better solution
 if one is known:), be included on the framework. Or this is just a
 topic for wiki page?

 Regards,

 Ernesto

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




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



Re: 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 seemingly did the trick regarding having something to repaint 
(except I started to get maybe unrelated errors that I could not modify the 
component tree after rendering had started, as if it wasn't in the action 
phase).

However, we still need to do the refactoring into Panels instead because of the 
use of setResponsePage(). Or can I reliably do something like create the Page, 
set it in the Pagemap and then tell the AjaxRequestTarget to render that page's 
wrapping component instead?

- Tor Iver

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



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 ?