Re: Lazy load exception wicket and hibernate

2008-03-30 Thread Igor Vaynberg
On Sat, Mar 29, 2008 at 8:04 PM, James Carman
[EMAIL PROTECTED] wrote:
  So, I think you just have it backwards.  The
  OpenEntityManagerInViewFilter should be mapped before the
  WicketFilter.

i dont know if my english is broken or what, but i believe that is
exactly what ive been saying all along...

-igor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaScript w/ Flash Player - Need guidance on to generate session-relative url's

2008-03-30 Thread jpswain

I appreciate your reply.  The problem I'm having is that I really need a way
to have a component that basically adds this JavaScript as a link:
lt;a href=javascript:playFile('linktofilehere.mp3')gt;Play [1]lt;/agt;
(The anythinghere.mp3 part would be dynamically generated depending on what 
I absolutely need it to end with the file extension because it seems like
this player I'm using requires that or it ignores the file.  I would prefer
session-relative urls, basically I mean having something that would be where
I above have linktofilehere.mp3 replaced with 
http://localhost:8080/pagetwo.5?wkt:i=:5:fileTestLink::IResourceListener::;
+ .mp3
if that would work...

Partly, I want to be able to maximize control, so it will require people to
be on the site to play the files, etc.

Thanks!


Mr Mean wrote:
 
 wicket urls contain page /component id's and versions that are
 generated based on the session (id counters etc), if that is what you
 mean by session relative urls.
 Your javascript will probably have a hard time figuring out which
 sound to play if you use those urls as mapping, it might work if you
 trigger using onclick, i don't know which is used.
 Mounting bookkmarkable pages / resources will ease the mapping as you
 said. So i am a bit confused as to what else you need.
 
 If you use Link's or ResourceLink's you can simply override onclick to
 increment your counter / do logging. Or am i missing something?
 
 Maurice
 

-- 
View this message in context: 
http://www.nabble.com/JavaScript-w--Flash-Player---Need-guidance-on-to-generate-session-relative-url%27s-tp16366136p16379383.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page-dependent timeout values for session

2008-03-30 Thread Per Newgro
Hi Nino
 Hmm that could break the flow is my guess(as it would force the url back
 to whatever was set in the iframe attribute), i'd actually say that it
 were whatever was contained withing the iframe responsability to use
 keepalives...
Sorry, but i couldn't see the conclusion here. Do you mean it's not possible 
to achieve my goal in general or only by using the timer?

Cheers
Per

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaScript w/ Flash Player - Need guidance on to generate session-relative url's

2008-03-30 Thread Maurice Marrink
You could use a WebMarkupContainer with a an attributemodifier to
generate the href part:
add(new WebMarkupContainer(link).add(new
SimpleAttributeModifier(href,javascript:playFile(.)));
and in your html a wicket:id=linkfoo/a

The downside of that is that you won't be able to update a server side
counter or log the click serverside easilly.

You could also use an AjaxLink with an AjaxCallDecorator to append
your playFile javascript. eventhough ajaxlink works on the onclick
attribute and sets the href to # the effect should be the same and you
can listen for the clicks server side in the onclick of the ajaxlink.

Maurice

On Sun, Mar 30, 2008 at 9:54 AM, jpswain [EMAIL PROTECTED] wrote:

  I appreciate your reply.  The problem I'm having is that I really need a way
  to have a component that basically adds this JavaScript as a link:
  lt;a href=javascript:playFile('linktofilehere.mp3')gt;Play [1]lt;/agt;
  (The anythinghere.mp3 part would be dynamically generated depending on what
  I absolutely need it to end with the file extension because it seems like
  this player I'm using requires that or it ignores the file.  I would prefer
  session-relative urls, basically I mean having something that would be where
  I above have linktofilehere.mp3 replaced with
  http://localhost:8080/pagetwo.5?wkt:i=:5:fileTestLink::IResourceListener::;
  + .mp3
  if that would work...

  Partly, I want to be able to maximize control, so it will require people to
  be on the site to play the files, etc.

  Thanks!



  Mr Mean wrote:
  
   wicket urls contain page /component id's and versions that are
   generated based on the session (id counters etc), if that is what you
   mean by session relative urls.
   Your javascript will probably have a hard time figuring out which
   sound to play if you use those urls as mapping, it might work if you
   trigger using onclick, i don't know which is used.
   Mounting bookkmarkable pages / resources will ease the mapping as you
   said. So i am a bit confused as to what else you need.
  
   If you use Link's or ResourceLink's you can simply override onclick to
   increment your counter / do logging. Or am i missing something?
  
   Maurice
  

  --
  View this message in context: 
 http://www.nabble.com/JavaScript-w--Flash-Player---Need-guidance-on-to-generate-session-relative-url%27s-tp16366136p16379383.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fileupload?

2008-03-30 Thread Johan Compagner
The problem is that it could be pretty big and then it isnt kept in
memory but streamed to disk. Then you also can do that by getting the
stream and stream it to your wanted location.

Maybe wicket could see it was connected to a byt[] and then autoi
dump, but i dont know if that is a good default.

On 3/29/08, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:


 Matthew Young wrote:
  I suddenly are a bit stomped why you have todo so much when it comes to
  uploading files (and yes I am aware that it is only a few more lines of
  code)..
 
 
  What is todo so much? You need to tell people what it is exactly, like
 put
  up some code?  Otherwise no one can tell exactly what you are doing.
 
 
 Well, I thought it were self explaining...
  Anyway, isn't fileupoad just as simple as textfield?
 
  upload = new FileUploadField(upload);
  form.add(upload);
 
 
 Well, I suppose adding is, but in order to get it to actually do
 something you need to do this aswell, in the onsubmit part of your form:

 | final FileUpload upload = fileUploadField.getFileUpload();

 And this is where it breaks normal procedure.. You could argue that
 whats wicket supposed todo with the file? But since I am giving a
 compoundModel that has a field taking a bytearray wicket could place the
 content in the property...
 |
  On Sat, Mar 29, 2008 at 4:53 AM, Nino Saturnino Martinez Vazquez Wael 
  [EMAIL PROTECTED] wrote:
 
 
  As I am getting very used to the wicket way,  using compound models with
  my form fields labels an so on.
 
  I suddenly are a bit stomped why you have todo so much when it comes to
  uploading files (and yes I am aware that it is only a few more lines of
  code).. I think the fileupload field should work just as text field etc..
 
  But as with other stuff I get puzzled by there are probably a very good
  reason why it dosent?
 
  --
  -Wicket for love
 
  Nino Martinez Wael
  Java Specialist @ Jayway DK
  http://www.jayway.dk
  +45 2936 7684
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



A component that the markup is button

2008-03-30 Thread Eyal Golan
Hello all,
The Button in wicket expects the html markup input 
I want to create, if there is none, a component for the button ... markup.

My aim is to get a markup like the following:

button id=dinamiButton style=background:transparent;
border-style:none; cursor:pointer;
table width=100% border=0 cellspacing=0 cellpadding=0
  tr
td valign=middle class=butLnbsp;/td

td align=center valign=middle nowrap=nowrap
class=butMButton Text/td
td valign=middle class=butRnbsp;/td
  /tr
/table

So, how do I start?
How do I create my own new Wicket component?
I would love to contribute it as StyledButton or something :)

Thanks

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: Lazy load exception wicket and hibernate

2008-03-30 Thread lars vonk
Sorry, my bad. I made a typo earlier what may have caused the confusion:



 On Sat, Mar 29, 2008 at 7:15 AM, lars vonk [EMAIL PROTECTED] wrote:

IIRC you should put the OpenEntityManagerInViewFilter definition in the
 filter-mapping after the WicketFilter otherwise the WicketFilter will come
 first.


I of course meant *before the WicketFilter*, because like I stated later on
in the mail that it's the definition of the *filter-mapping* element that
depicts the order of execution. So we are all on the same page here :-).


Lars


On Sun, Mar 30, 2008 at 8:17 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 On Sat, Mar 29, 2008 at 8:04 PM, James Carman
 [EMAIL PROTECTED] wrote:
   So, I think you just have it backwards.  The
   OpenEntityManagerInViewFilter should be mapped before the
   WicketFilter.

 i dont know if my english is broken or what, but i believe that is
 exactly what ive been saying all along...

 -igor

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Lazy load exception wicket and hibernate

2008-03-30 Thread James Carman
On Sun, Mar 30, 2008 at 6:01 AM, lars vonk [EMAIL PROTECTED] wrote:
 IIRC you should put the OpenEntityManagerInViewFilter definition in the
   filter-mapping after the WicketFilter otherwise the WicketFilter will come
   first.


  I of course meant *before the WicketFilter*, because like I stated later on
  in the mail that it's the definition of the *filter-mapping* element that
  depicts the order of execution. So we are all on the same page here :-).

Yes, that's what I was originally questioning.  I figured it was a
typo, but I wanted to make sure, because I always thought it was the
other way around.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fileupload?

2008-03-30 Thread Nino Saturnino Martinez Vazquez Wael

I admit, the word stomped is probably a bit exaggerated.

But in my case the backing model is actually a JPA class, so if wicket 
picked it up by default, tad it would be written directly to db..


Johan Compagner wrote:

The problem is that it could be pretty big and then it isnt kept in
memory but streamed to disk. Then you also can do that by getting the
stream and stream it to your wanted location.

Maybe wicket could see it was connected to a byt[] and then autoi
dump, but i dont know if that is a good default.
  
Yeah this was what I were thinking.. I see what you mean about it being 
default etc, but that would be up to the users responsibility(to do this 
or maybe override the filedupload class's method) as with alot of other 
stuff with wicket..


WDYT?



On 3/29/08, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Matthew Young wrote:


I suddenly are a bit stomped why you have todo so much when it comes to
uploading files (and yes I am aware that it is only a few more lines of
code)..



What is todo so much? You need to tell people what it is exactly, like
  

put


up some code?  Otherwise no one can tell exactly what you are doing.


  

Well, I thought it were self explaining...


Anyway, isn't fileupoad just as simple as textfield?

upload = new FileUploadField(upload);
form.add(upload);


  

Well, I suppose adding is, but in order to get it to actually do
something you need to do this aswell, in the onsubmit part of your form:

| final FileUpload upload = fileUploadField.getFileUpload();

And this is where it breaks normal procedure.. You could argue that
whats wicket supposed todo with the file? But since I am giving a
compoundModel that has a field taking a bytearray wicket could place the
content in the property...
|


On Sat, Mar 29, 2008 at 4:53 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:


  

As I am getting very used to the wicket way,  using compound models with
my form fields labels an so on.

I suddenly are a bit stomped why you have todo so much when it comes to
uploading files (and yes I am aware that it is only a few more lines of
code).. I think the fileupload field should work just as text field etc..

But as with other stuff I get puzzled by there are probably a very good
reason why it dosent?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Modal Window problem with IE

2008-03-30 Thread tstausbe

Hi,

I tried the Modal Page example in the Wicket examples

http://wicketstuff.org/wicket13/ajax/modal-window.1

with IE. When I pressed Show modal dialog with a page and in the 
modal window press either OK or Cancel the result is not shown on the
main page and there is no possibility to press any link. 
Only after reloading the page you could see the result (OK or Cancel) on
the main page. 

Using Firefox everthing works as expected and the result is shown directly
after closing the modal window.

Is there a workaround for IE users, that the result is shown directly and
the links are not blocked after returning from a modal page?

Thanks in advance 
Thomas 


-- 
View this message in context: 
http://www.nabble.com/Modal-Window-problem-with-IE-tp16380817p16380817.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



changing html

2008-03-30 Thread Eyal Golan
Hi,
I am using behaviors for beforeRender and onRender to add html markups.
private void init() {
add(HeaderContributor.forCss(MyButton.class, MyButton.css));
add(new AbstractBehavior() {
private static final long serialVersionUID = 1L;

@Override
public void beforeRender(Component component) {
component.getResponse().write(Consts.getBeforeRender());

}

@Override
public void onRendered(Component component) {
component.getResponse().write(Consts.getOnRenedered());
}
});
}

in order to get:
span class=buttoninput type=submit name=foo value=yout text
//span

This works great!

BUT,
sometimes, when the button should be disabled, I want to have this instead
in the markup:
del class=buttonspanyout text/span/del

The problem is that when constructing the button, I don't know the enable
status.
I set button.setEnabled only after creating it.

Is there a way to change the markup when someone sets to enable-false?

Thanks

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: A component that the markup is button

2008-03-30 Thread Igor Vaynberg
also, the restriction should not be there...you should be able to
attach Button to [button type=submit] without problems...

-igor


On Sun, Mar 30, 2008 at 10:01 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 do you want this button to submit the form?

  -igor




  On Sun, Mar 30, 2008 at 2:56 AM, Eyal Golan [EMAIL PROTECTED] wrote:
   Hello all,
The Button in wicket expects the html markup input 
I want to create, if there is none, a component for the button ... 
 markup.
  
My aim is to get a markup like the following:
  
button id=dinamiButton style=background:transparent;
border-style:none; cursor:pointer;
table width=100% border=0 cellspacing=0 cellpadding=0
 tr
   td valign=middle class=butLnbsp;/td
  
   td align=center valign=middle nowrap=nowrap
class=butMButton Text/td
   td valign=middle class=butRnbsp;/td
 /tr
/table
  
So, how do I start?
How do I create my own new Wicket component?
I would love to contribute it as StyledButton or something :)
  
Thanks
  
--
Eyal Golan
[EMAIL PROTECTED]
  
Visit: http://jvdrums.sourceforge.net/
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does Wicket support WML?

2008-03-30 Thread Jeremy Levy
I don't see why it couldn't, WML is XML based so you could create your own
components.  You should check out the page on the Wiki for wicket and mobile
devices.  Do you have a strict requirement that it needs to be WML or just
for mobile devices?
http://cwiki.apache.org/WICKET/mobile-devices.html

Jeremy

On Sun, Mar 30, 2008 at 2:21 AM, nlif [EMAIL PROTECTED] wrote:


 Hi,

 Does Wicket support WML? I could not find any reference to that in the
 documentation.
 What would be required for using Wicket to generate WML pages? Does it
 require me to write my own Wicket components?

 Thanks,
 Naaman
 --
 View this message in context:
 http://www.nabble.com/Does-Wicket-support-WML--tp16378982p16378982.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: A component that the markup is button

2008-03-30 Thread Eyal Golan
For your first question - yes
I found out that ImageButton must have input as tag.

As for my problem, I found a nicer solution that using CSS I can manipulate
the image.
(I will put here the link tomorrow when I'll be back at work).

As for my original question, I would still love a kick start of how to make
a (almost totally) new component.

Thanks for all the help

On Sun, Mar 30, 2008 at 8:02 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 also, the restriction should not be there...you should be able to
 attach Button to [button type=submit] without problems...

 -igor


 On Sun, Mar 30, 2008 at 10:01 AM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
  do you want this button to submit the form?
 
   -igor
 
 
 
 
   On Sun, Mar 30, 2008 at 2:56 AM, Eyal Golan [EMAIL PROTECTED] wrote:
Hello all,
 The Button in wicket expects the html markup input 
 I want to create, if there is none, a component for the button ...
 markup.
   
 My aim is to get a markup like the following:
   
 button id=dinamiButton style=background:transparent;
 border-style:none; cursor:pointer;
 table width=100% border=0 cellspacing=0 cellpadding=0
  tr
td valign=middle class=butLnbsp;/td
   
td align=center valign=middle nowrap=nowrap
 class=butMButton Text/td
td valign=middle class=butRnbsp;/td
  /tr
 /table
   
 So, how do I start?
 How do I create my own new Wicket component?
 I would love to contribute it as StyledButton or something :)
   
 Thanks
   
 --
 Eyal Golan
 [EMAIL PROTECTED]
   
 Visit: http://jvdrums.sourceforge.net/
   
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: Page-dependent timeout values for session

2008-03-30 Thread Per Newgro
Hi Nino Saturnino Martinez Vazquez Wael:
 It depends. If it's okay to go to the url you specify in the iframe on
 repainting, it will work. If whatever happens in the iframe is part of a
 flow, it could break it (but it depends on a lot of things) like how
 does the other application handle sessions etc.

 If the application which are within were using keepalives/ajaxtimers etc
 it would not cause timeouts in the first place..
I only have one application, thats why i would like to assign timeout value by 
page. 
The part in the IFRAME represents a preselection for a hotel booking service 
(normal stuff like adults, nights, checkin day selection etc.). The selection 
is validated and set to valid values using ajax. 
The preselection-page contains a button which onsubmit opens another window 
with the booking page. So i would like to set the timeout value for 
preselection un-limited and for bookingpage to 10 minutes.

Btw what are keepalives - are they wicket parts - never heared of it?

Thanks for your help
Per



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Matthew Young
I have a link like this:

a wicket:id=linkimg src=face.png//a

When link.isEnable() == false, I need to add style attribute to the img
tag.  Is it possible to do this without turning the img into a child
component of the link?


Re: Page-dependent timeout values for session

2008-03-30 Thread Igor Vaynberg
the way sessions timeout is a duration of time in which there are no
requests. so if you add a bit of javascript (ajax) that makes a server
side call every 5 minutes, the session will never timeout as long as
the webpage is open in the browser, because the server sees a request
come in every 5 minutes.

-gor


On Sun, Mar 30, 2008 at 11:17 AM, Per Newgro [EMAIL PROTECTED] wrote:
 Hi Nino Saturnino Martinez Vazquez Wael:

  It depends. If it's okay to go to the url you specify in the iframe on
   repainting, it will work. If whatever happens in the iframe is part of a
   flow, it could break it (but it depends on a lot of things) like how
   does the other application handle sessions etc.
  
   If the application which are within were using keepalives/ajaxtimers etc
   it would not cause timeouts in the first place..
  I only have one application, thats why i would like to assign timeout value 
 by
  page.
  The part in the IFRAME represents a preselection for a hotel booking service
  (normal stuff like adults, nights, checkin day selection etc.). The selection
  is validated and set to valid values using ajax.
  The preselection-page contains a button which onsubmit opens another window
  with the booking page. So i would like to set the timeout value for
  preselection un-limited and for bookingpage to 10 minutes.

  Btw what are keepalives - are they wicket parts - never heared of it?

  Thanks for your help


 Per



  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Igor Vaynberg
new image(...) {
  oncomponenttag(tag) {
  if (link.isenabled()==false) { tag.put(class,foo); }
  }
}

-igor


On Sun, Mar 30, 2008 at 11:27 AM, Matthew Young [EMAIL PROTECTED] wrote:
 I have a link like this:

  a wicket:id=linkimg src=face.png//a

  When link.isEnable() == false, I need to add style attribute to the img
  tag.  Is it possible to do this without turning the img into a child
  component of the link?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Matthew Young
I forgot to mention: the link is created by other people's code.  I can't
change the template: I can't put wicket:id in the img tag.

new image(...) {
 oncomponenttag(tag) {
 if (link.isenabled()==false) { tag.put(class,foo); }

So how would this work?

new Image(there-is-not-wicket-id-to-use...

Anyway, I was hoping I can do:

link.add(new AbstractBehavior() {

  onComponentTag(Component c, Component tag) {
use 'c' or 'tag' to get img
put attr into img
  }
);

On Sun, Mar 30, 2008 at 11:31 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 new image(...) {
  oncomponenttag(tag) {
  if (link.isenabled()==false) { tag.put(class,foo); }
  }
 }

 -igor


 On Sun, Mar 30, 2008 at 11:27 AM, Matthew Young [EMAIL PROTECTED] wrote:
  I have a link like this:
 
   a wicket:id=linkimg src=face.png//a
 
   When link.isEnable() == false, I need to add style attribute to the
 img
   tag.  Is it possible to do this without turning the img into a child
   component of the link?
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Resources relative to application context

2008-03-30 Thread Zheng, Xiahong
How does wicket find such resource, e.g. as follows?

   link href=style/my.css type=text/css rel=stylesheet /

I found this only works if I mount my pages with

   mount(/pages, PackageName.forClass(Home.class));

Otherwise, I need to specify absolute URL. This is fine. However, the
subsequent problem I ran into is wicket failed to load resources after a
form submit which is probably caused by the resulting URL not being
mounted. So my question is,

How do I mount the resulting URL after a form submit or other event? Is
HybridUrlCodingStrategy designed for this purpose?


Thanks,
Xiaohong

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page-dependent timeout values for session

2008-03-30 Thread Per Newgro
Thanks Igor for your reply.

Only for check if i'm right - the preselectionpage gets a javascript which 
makes a call to server so that session is always uptodate. When the 
bookingpage is displayed (click on button in preselection) the server-side 
call will not be done. So its timing out.

I will give this a try. But i'm in doubt that it will work as i expect it, 
because (afaik) the session is created only once for the application - or am 
i wrong here? But if so the session assigned to booking page is updated to 
when the preselection page makes the server side call.

Thanks
Per

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to do h3a

2008-03-30 Thread reikje

On the Java side, which Components can you use if you have HTML nested like
this:

h3
.. Text 
/h3

For the h3 if I use a Label, I cannot add a Link as child because it is not
a MarkupContainer.
-- 
View this message in context: 
http://www.nabble.com/How-to-do-%3Ch3%3E%3Ca%3E-tp16386001p16386001.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to do h3a

2008-03-30 Thread Piller Sébastien
It may be a WebMarkupContainer. Or nothing at all (having a component on 
the java side is possible, but not required)



reikje a écrit :

On the Java side, which Components can you use if you have HTML nested like
this:

h3
.. Text 
/h3


For the h3 if I use a Label, I cannot add a Link as child because it is not
a MarkupContainer.
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does Wicket support WML?

2008-03-30 Thread Martijn Dashorst
I think Jonathan's new job is going to use Wicket for WML. There has
been some talk of developing it in the open or contributing it. But no
assurances in that regard. At least it will take while to be included
as our next release is generics only - it will only be considered in
the release after that...

Martijn

On 3/30/08, Jeremy Levy [EMAIL PROTECTED] wrote:
 I don't see why it couldn't, WML is XML based so you could create your own
  components.  You should check out the page on the Wiki for wicket and mobile
  devices.  Do you have a strict requirement that it needs to be WML or just
  for mobile devices?
  http://cwiki.apache.org/WICKET/mobile-devices.html


  Jeremy


  On Sun, Mar 30, 2008 at 2:21 AM, nlif [EMAIL PROTECTED] wrote:

  
   Hi,
  
   Does Wicket support WML? I could not find any reference to that in the
   documentation.
   What would be required for using Wicket to generate WML pages? Does it
   require me to write my own Wicket components?
  
   Thanks,
   Naaman
   --
   View this message in context:
   http://www.nabble.com/Does-Wicket-support-WML--tp16378982p16378982.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  



-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ListView only ListItem markup with setRenderBodyOnly

2008-03-30 Thread reikje

Let's say I have a ListView with this markup:

lt;span wicket:id=links
lt;span wicket:id=delimitergt;|lt;/spangt;
lt;a href=# wicket:id=linkgt;
  lt;span wicket:id=linkTextgt;[[Linktext]]lt;/spangt;
 lt;/agt;
lt;/spangt;

and this Java Code:

ListView paragraphs = new ListView(links, contentsToDisplay)
{
protected void populateItem(ListItem item)
{
Content content = (Content) item.getModelObject();

 Label delimiter = new Label(delimiter,  | );
 delimiter.setVisible(item.getIndex()  0);
 item.add(delimiter);

 Link contentLink = getContentLink(link, content.getId());
 Label linkText = new Label(linkText, content.getTitle());
 linkText.setRenderBodyOnly(true);

 contentLink.add(linkText);
 item.add(contentLink)
}
};
paragraphs.setRenderBodyOnly(true);
add(paragraphs);

Even though I use setRenderBodyOnly on the ListView I still get the  for
each list item that is rendered. Is it possible to create a ListView so that
only the Markup of the ListItems is rendered? 

-- 
View this message in context: 
http://www.nabble.com/ListView-only-ListItem-markup-with-setRenderBodyOnly-tp16386233p16386233.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView only ListItem markup with setRenderBodyOnly

2008-03-30 Thread Martijn Dashorst
Use item.setRenderBodyOnly(true) instead

Martijn

On 3/30/08, reikje [EMAIL PROTECTED] wrote:

  Let's say I have a ListView with this markup:

  lt;span wicket:id=links
 lt;span wicket:id=delimitergt;|lt;/spangt;
 lt;a href=# wicket:id=linkgt;
   lt;span wicket:id=linkTextgt;[[Linktext]]lt;/spangt;
  lt;/agt;
  lt;/spangt;

  and this Java Code:

  ListView paragraphs = new ListView(links, contentsToDisplay)
  {
 protected void populateItem(ListItem item)
 {
 Content content = (Content) item.getModelObject();

  Label delimiter = new Label(delimiter,  | );
  delimiter.setVisible(item.getIndex()  0);
  item.add(delimiter);

  Link contentLink = getContentLink(link, content.getId());
  Label linkText = new Label(linkText, content.getTitle());
  linkText.setRenderBodyOnly(true);

  contentLink.add(linkText);
  item.add(contentLink)
 }
  };
  paragraphs.setRenderBodyOnly(true);
  add(paragraphs);

  Even though I use setRenderBodyOnly on the ListView I still get the  for
  each list item that is rendered. Is it possible to create a ListView so that
  only the Markup of the ListItems is rendered?


  --
  View this message in context: 
 http://www.nabble.com/ListView-only-ListItem-markup-with-setRenderBodyOnly-tp16386233p16386233.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to do h3a

2008-03-30 Thread reikje

Good idea, you mean something like this:

lt;h3gt;
   lt;a href=.. wicket:id=gt;Textlt;/agt;
lt;/h3gt;

That works I guess, thx



Pills wrote:
 
 It may be a WebMarkupContainer. Or nothing at all (having a component on 
 the java side is possible, but not required)
 
 
 reikje a écrit :
 On the Java side, which Components can you use if you have HTML nested
 like
 this:

 h3
 .. Text 
 /h3

 For the h3 if I use a Label, I cannot add a Link as child because it is
 not
 a MarkupContainer.
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-do-%3Ch3%3E%3Ca%3E-tp16386001p16386264.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Igor Vaynberg
well, you have to have the reference to that link somehow to know if
its enabled or disabled..

-igor


On Sun, Mar 30, 2008 at 11:44 AM, Matthew Young [EMAIL PROTECTED] wrote:
 I forgot to mention: the link is created by other people's code.  I can't
  change the template: I can't put wicket:id in the img tag.


  new image(...) {
   oncomponenttag(tag) {
   if (link.isenabled()==false) { tag.put(class,foo); }

  So how would this work?

  new Image(there-is-not-wicket-id-to-use...

  Anyway, I was hoping I can do:

  link.add(new AbstractBehavior() {

   onComponentTag(Component c, Component tag) {
 use 'c' or 'tag' to get img
 put attr into img
   }
  );

  On Sun, Mar 30, 2008 at 11:31 AM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:



   new image(...) {
oncomponenttag(tag) {
if (link.isenabled()==false) { tag.put(class,foo); }
}
   }
  
   -igor
  
  
   On Sun, Mar 30, 2008 at 11:27 AM, Matthew Young [EMAIL PROTECTED] wrote:
I have a link like this:
   
 a wicket:id=linkimg src=face.png//a
   
 When link.isEnable() == false, I need to add style attribute to the
   img
 tag.  Is it possible to do this without turning the img into a child
 component of the link?
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Resources relative to application context

2008-03-30 Thread Igor Vaynberg
see source of ContextImage for details

-igor


On Sun, Mar 30, 2008 at 11:50 AM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
 How does wicket find such resource, e.g. as follows?

link href=style/my.css type=text/css rel=stylesheet /

  I found this only works if I mount my pages with

mount(/pages, PackageName.forClass(Home.class));

  Otherwise, I need to specify absolute URL. This is fine. However, the
  subsequent problem I ran into is wicket failed to load resources after a
  form submit which is probably caused by the resulting URL not being
  mounted. So my question is,

  How do I mount the resulting URL after a form submit or other event? Is
  HybridUrlCodingStrategy designed for this purpose?


  Thanks,
  Xiaohong

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to add a custom form in Wicket wizard (org.apache.wicket.extensions.wizard.Wizard)

2008-03-30 Thread Jirka Hradil

Hello,

I would like to write a custom form in wicket wizard.  The documentation
suggested me that overriding the newForm method is what I'm searching for
but I have no idea how I can do it. Could you give me an example please? My
objective is to share a same form among wizard, detail and edit pages in an
application.

Thanks for you reply,

Jirka Hradil
-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-custom-form-in-Wicket-wizard-%28org.apache.wicket.extensions.wizard.Wizard%29-tp16388069p16388069.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to add a custom form in Wicket wizard (org.apache.wicket.extensions.wizard.Wizard)

2008-03-30 Thread Igor Vaynberg
simply embed your own form into the wizard step panel. wicket supports
nested forms it will deal with it properly.

-igor

On Sun, Mar 30, 2008 at 2:55 PM, Jirka Hradil [EMAIL PROTECTED] wrote:

  Hello,

  I would like to write a custom form in wicket wizard.  The documentation
  suggested me that overriding the newForm method is what I'm searching for
  but I have no idea how I can do it. Could you give me an example please? My
  objective is to share a same form among wizard, detail and edit pages in an
  application.

  Thanks for you reply,

  Jirka Hradil
  --
  View this message in context: 
 http://www.nabble.com/How-to-add-a-custom-form-in-Wicket-wizard-%28org.apache.wicket.extensions.wizard.Wizard%29-tp16388070p16388070.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: changing html

2008-03-30 Thread Maurice Marrink
You could overwrite onComponentTag on your component and change the
element type there based on enabled status. just make sure to call
super first. Note that this tick might not work for some components as
they require a certain html tag but i think button will be fine.

Maurice

On Sun, Mar 30, 2008 at 4:59 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 Hi,
  I am using behaviors for beforeRender and onRender to add html markups.
 private void init() {
 add(HeaderContributor.forCss(MyButton.class, MyButton.css));
 add(new AbstractBehavior() {
 private static final long serialVersionUID = 1L;

 @Override
 public void beforeRender(Component component) {
 component.getResponse().write(Consts.getBeforeRender());

 }

 @Override
 public void onRendered(Component component) {
 component.getResponse().write(Consts.getOnRenedered());
 }
 });
 }

  in order to get:
  span class=buttoninput type=submit name=foo value=yout text
  //span

  This works great!

  BUT,
  sometimes, when the button should be disabled, I want to have this instead
  in the markup:
  del class=buttonspanyout text/span/del

  The problem is that when constructing the button, I don't know the enable
  status.
  I set button.setEnabled only after creating it.

  Is there a way to change the markup when someone sets to enable-false?

  Thanks

  --
  Eyal Golan
  [EMAIL PROTECTED]

  Visit: http://jvdrums.sourceforge.net/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Maurice Marrink
Yeah but still even if he has the link and overwrites oncomponenttag
on that component, he has to get the content of the link tag
(everything between a and /a) and be able to manipulate it. As far
as i know this is not possible from within wicket. The most likely
candidate getXmlTag() is private and even if that was not the case you
would have to resort to String manipulation because it does not have a
getChild(s) method.

But you might be able to do the same with some javascript. Just add a
header contributor which adds some javascript that will fetch the
first img childelement of the link and manipulate it any way you want.

Maurice

On Sun, Mar 30, 2008 at 9:48 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 well, you have to have the reference to that link somehow to know if
  its enabled or disabled..

  -igor




  On Sun, Mar 30, 2008 at 11:44 AM, Matthew Young [EMAIL PROTECTED] wrote:
   I forgot to mention: the link is created by other people's code.  I can't
change the template: I can't put wicket:id in the img tag.
  
  
new image(...) {
 oncomponenttag(tag) {
 if (link.isenabled()==false) { tag.put(class,foo); }
  
So how would this work?
  
new Image(there-is-not-wicket-id-to-use...
  
Anyway, I was hoping I can do:
  
link.add(new AbstractBehavior() {
  
 onComponentTag(Component c, Component tag) {
   use 'c' or 'tag' to get img
   put attr into img
 }
);
  
On Sun, Mar 30, 2008 at 11:31 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:
  
  
  
 new image(...) {
  oncomponenttag(tag) {
  if (link.isenabled()==false) { tag.put(class,foo); }
  }
 }

 -igor


 On Sun, Mar 30, 2008 at 11:27 AM, Matthew Young [EMAIL PROTECTED] 
 wrote:
  I have a link like this:
 
   a wicket:id=linkimg src=face.png//a
 
   When link.isEnable() == false, I need to add style attribute to the
 img
   tag.  Is it possible to do this without turning the img into a 
 child
   component of the link?
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


  

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Igor Vaynberg
well, if you dont want img to be a child component use a label to
output the entire markup, and change that based on whether or not the
link is enabled.

-igor


On Sun, Mar 30, 2008 at 3:18 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
 Yeah but still even if he has the link and overwrites oncomponenttag
  on that component, he has to get the content of the link tag
  (everything between a and /a) and be able to manipulate it. As far
  as i know this is not possible from within wicket. The most likely
  candidate getXmlTag() is private and even if that was not the case you
  would have to resort to String manipulation because it does not have a
  getChild(s) method.

  But you might be able to do the same with some javascript. Just add a
  header contributor which adds some javascript that will fetch the
  first img childelement of the link and manipulate it any way you want.

  Maurice



  On Sun, Mar 30, 2008 at 9:48 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
   well, you have to have the reference to that link somehow to know if
its enabled or disabled..
  
-igor
  
  
  
  
On Sun, Mar 30, 2008 at 11:44 AM, Matthew Young [EMAIL PROTECTED] wrote:
 I forgot to mention: the link is created by other people's code.  I 
 can't
  change the template: I can't put wicket:id in the img tag.


  new image(...) {
   oncomponenttag(tag) {
   if (link.isenabled()==false) { tag.put(class,foo); }

  So how would this work?

  new Image(there-is-not-wicket-id-to-use...

  Anyway, I was hoping I can do:

  link.add(new AbstractBehavior() {

   onComponentTag(Component c, Component tag) {
 use 'c' or 'tag' to get img
 put attr into img
   }
  );

  On Sun, Mar 30, 2008 at 11:31 AM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:



   new image(...) {
oncomponenttag(tag) {
if (link.isenabled()==false) { tag.put(class,foo); }
}
   }
  
   -igor
  
  
   On Sun, Mar 30, 2008 at 11:27 AM, Matthew Young [EMAIL PROTECTED] 
 wrote:
I have a link like this:
   
 a wicket:id=linkimg src=face.png//a
   
 When link.isEnable() == false, I need to add style attribute to 
 the
   img
 tag.  Is it possible to do this without turning the img into a 
 child
 component of the link?
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  

  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Best method of testing borders

2008-03-30 Thread Ned Collyer

Hi,

I want to unit test some component behaviors I've created.
Is there a nice way of doing this without having to stub out dummy pages?

The only example I can find is
http://svn.apache.org/repos/asf/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/behavior/AttributeAppenderTest.java

but its a pretty basic test.

I'd like to test the values of a tag based on some activity, but would
rather not have dummy page classes kicking around.

Rgds

Ned
-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16389412.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread Ned Collyer

Oops - i stuffed up the title.  Should be testing behaviors
-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16389616.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread Igor Vaynberg
you really need just one dummy page to test all behaviors...

-igor

On Sun, Mar 30, 2008 at 5:14 PM, Ned Collyer [EMAIL PROTECTED] wrote:

  Oops - i stuffed up the title.  Should be testing behaviors
  --
  View this message in context: 
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16389616.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread Ned Collyer

What I've done is.. but feels like it could be nicer. (but this is alright
really :))

public void testMyBehavior() {
//create form component to have behaviour placed around it.
FormComponent component = new TextField(testId, new
Model(testFieldValue));
component.error(An error);

XmlTag xmlTag = new XmlTag();
xmlTag.setName(test);

ComponentTag tag = new ComponentTag(xmlTag);
MyBehavior behavior = new MyBehavior();
behavior.onComponentTag(component, tag);

assert(tag.someproperty stuff to test).
}

The thing that was confusing me thus far, was wicketTester.startComponent.

Seems like I'm better off not using it.
-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16389744.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread igor . vaynberg
If you are testing something non trivial you will most likely need the
entire environment setup ( requestcycle, session, etc )

That is what start component does I believe.

-igor




On 3/30/08, Ned Collyer [EMAIL PROTECTED] wrote:

 What I've done is.. but feels like it could be nicer. (but this is alright
 really :))

 public void testMyBehavior() {
 //create form component to have behaviour placed around it.
 FormComponent component = new TextField(testId, new
 Model(testFieldValue));
 component.error(An error);

 XmlTag xmlTag = new XmlTag();
 xmlTag.setName(test);

 ComponentTag tag = new ComponentTag(xmlTag);
 MyBehavior behavior = new MyBehavior();
 behavior.onComponentTag(component, tag);

 assert(tag.someproperty stuff to test).
 }

 The thing that was confusing me thus far, was wicketTester.startComponent.

 Seems like I'm better off not using it.
 --
 View this message in context:
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16389744.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Resources relative to application context

2008-03-30 Thread Zheng, Xiahong
Thanks Igor. But my resource in this case is style sheet not image. Does
that mean I need to write a similar component to accomplish that? 

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 30, 2008 3:48 PM
To: users@wicket.apache.org
Subject: Re: Resources relative to application context

see source of ContextImage for details

-igor


On Sun, Mar 30, 2008 at 11:50 AM, Zheng, Xiahong [EMAIL PROTECTED]
wrote:
 How does wicket find such resource, e.g. as follows?

link href=style/my.css type=text/css rel=stylesheet /

  I found this only works if I mount my pages with

mount(/pages, PackageName.forClass(Home.class));

  Otherwise, I need to specify absolute URL. This is fine. However, the
  subsequent problem I ran into is wicket failed to load resources
after a
  form submit which is probably caused by the resulting URL not being
  mounted. So my question is,

  How do I mount the resulting URL after a form submit or other event?
Is
  HybridUrlCodingStrategy designed for this purpose?


  Thanks,
  Xiaohong

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



continueToOriginalDestination resolves to wrong URL

2008-03-30 Thread Zheng, Xiahong
Scenario,

1) request http://myapp/pages/watchlist 
2) throws throw new
RestartResponseAtInterceptPageException(Login.class);
3) Use sign in
4) user redirected to http://pages/watchlist note: path /myapp is
dropped

Any idea?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-30 Thread Enrique Rodriguez
On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young [EMAIL PROTECTED] wrote:
  ...
  I don't want to hard code
  /resources/com.mycompany.component.MyComponent/open.png in the template
  and just have img src=open.png .../.  Is there someway to work out the
  prefix /resources/com.mycompany.component.MyComponent/ and fix up src
  attribute in code?

If you are in a Component you can call Component#urlFor().

If not in a Component, you can call:

RequestCycle.get()#urlFor();

You can use the form that takes a ResourceReference for the image.

HTH,

Enrique

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-30 Thread igor . vaynberg
Use wicket:link tags around the image

-igor

On 3/30/08, Enrique Rodriguez [EMAIL PROTECTED] wrote:
 On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young [EMAIL PROTECTED] wrote:
  ...
  I don't want to hard code
  /resources/com.mycompany.component.MyComponent/open.png in the template
  and just have img src=open.png .../. Is there someway to work out
 the
  prefix /resources/com.mycompany.component.MyComponent/ and fix up src
  attribute in code?

 If you are in a Component you can call Component#urlFor().

 If not in a Component, you can call:

 RequestCycle.get()#urlFor();

 You can use the form that takes a ResourceReference for the image.

 HTH,

 Enrique

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-30 Thread Matthew Young
So I did this:

html xmlns:wicket
body
  wicket:panel
wicket:linkimg wicket:id=open src=open.png//wicket:link
  /wicket:panel
/body
/html

the src attr doesn't change, it stays as open.png and not change to
/resources/com.mycompany.component.MyComponent/open.png

On Sun, Mar 30, 2008 at 8:37 PM, [EMAIL PROTECTED] wrote:

 Use wicket:link tags around the image

 -igor

 On 3/30/08, Enrique Rodriguez [EMAIL PROTECTED] wrote:
  On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young [EMAIL PROTECTED]
 wrote:
   ...
   I don't want to hard code
   /resources/com.mycompany.component.MyComponent/open.png in the
 template
   and just have img src=open.png .../. Is there someway to work out
  the
   prefix /resources/com.mycompany.component.MyComponent/ and fix up
 src
   attribute in code?
 
  If you are in a Component you can call Component#urlFor().
 
  If not in a Component, you can call:
 
  RequestCycle.get()#urlFor();
 
  You can use the form that takes a ResourceReference for the image.
 
  HTH,
 
  Enrique
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-30 Thread Igor Vaynberg
thats because you have a wicket:id there. wicket:link doesnt touch
components afaik

-igor


On Sun, Mar 30, 2008 at 8:57 PM, Matthew Young [EMAIL PROTECTED] wrote:
 So I did this:


  html xmlns:wicket
  body
   wicket:panel
 wicket:linkimg wicket:id=open src=open.png//wicket:link
   /wicket:panel
  /body
  /html

  the src attr doesn't change, it stays as open.png and not change to

 /resources/com.mycompany.component.MyComponent/open.png



 On Sun, Mar 30, 2008 at 8:37 PM, [EMAIL PROTECTED] wrote:

   Use wicket:link tags around the image
  
   -igor
  
   On 3/30/08, Enrique Rodriguez [EMAIL PROTECTED] wrote:
On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young [EMAIL PROTECTED]
   wrote:
 ...
 I don't want to hard code
 /resources/com.mycompany.component.MyComponent/open.png in the
   template
 and just have img src=open.png .../. Is there someway to work out
the
 prefix /resources/com.mycompany.component.MyComponent/ and fix up
   src
 attribute in code?
   
If you are in a Component you can call Component#urlFor().
   
If not in a Component, you can call:
   
RequestCycle.get()#urlFor();
   
You can use the form that takes a ResourceReference for the image.
   
HTH,
   
Enrique
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-30 Thread Matthew Young
wicket:link doesnt touch components afaik

:(  I need it to be a component.  My code is basically this:

add(new WebMarkupContainer(img));

Can I do something like this:

add(new WebMarkupContainer(img) {

@Override protected void onComponentTag(final ComponentTag tag)
{
super.onComponentTag(tag);
tag.put(src, GIVE-ME-YOU-LOCATION-PLEASE + tag.getString(src));
}

});

where GIVE-ME-YOU-LOCATION-PLEASE is some method to get
/resources/com.mycompany.component.MyComponent/?

On Sun, Mar 30, 2008 at 9:05 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 thats because you have a wicket:id there. wicket:link doesnt touch
 components afaik

 -igor


 On Sun, Mar 30, 2008 at 8:57 PM, Matthew Young [EMAIL PROTECTED] wrote:
  So I did this:
 
 
   html xmlns:wicket
   body
wicket:panel
  wicket:linkimg wicket:id=open src=open.png//wicket:link
/wicket:panel
   /body
   /html
 
   the src attr doesn't change, it stays as open.png and not change to
 
  /resources/com.mycompany.component.MyComponent/open.png
 
 
 
  On Sun, Mar 30, 2008 at 8:37 PM, [EMAIL PROTECTED] wrote:
 
Use wicket:link tags around the image
   
-igor
   
On 3/30/08, Enrique Rodriguez [EMAIL PROTECTED] wrote:
 On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young [EMAIL PROTECTED]
wrote:
  ...
  I don't want to hard code
  /resources/com.mycompany.component.MyComponent/open.png in the
template
  and just have img src=open.png .../. Is there someway to work
 out
 the
  prefix /resources/com.mycompany.component.MyComponent/ and fix
 up
src
  attribute in code?

 If you are in a Component you can call Component#urlFor().

 If not in a Component, you can call:

 RequestCycle.get()#urlFor();

 You can use the form that takes a ResourceReference for the image.

 HTH,

 Enrique


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-30 Thread Igor Vaynberg
urlfor(new ResourceReference(MyComponent.class, image.png));

-igor


On Sun, Mar 30, 2008 at 9:28 PM, Matthew Young [EMAIL PROTECTED] wrote:
 wicket:link doesnt touch components afaik

  :(  I need it to be a component.  My code is basically this:

 add(new WebMarkupContainer(img));

  Can I do something like this:

  add(new WebMarkupContainer(img) {

  @Override protected void onComponentTag(final ComponentTag tag)
 {
 super.onComponentTag(tag);
 tag.put(src, GIVE-ME-YOU-LOCATION-PLEASE + tag.getString(src));
 }

  });

  where GIVE-ME-YOU-LOCATION-PLEASE is some method to get
  /resources/com.mycompany.component.MyComponent/?

  On Sun, Mar 30, 2008 at 9:05 PM, Igor Vaynberg [EMAIL PROTECTED]


 wrote:

   thats because you have a wicket:id there. wicket:link doesnt touch
   components afaik
  
   -igor
  
  
   On Sun, Mar 30, 2008 at 8:57 PM, Matthew Young [EMAIL PROTECTED] wrote:
So I did this:
   
   
 html xmlns:wicket
 body
  wicket:panel
wicket:linkimg wicket:id=open src=open.png//wicket:link
  /wicket:panel
 /body
 /html
   
 the src attr doesn't change, it stays as open.png and not change to
   
/resources/com.mycompany.component.MyComponent/open.png
   
   
   
On Sun, Mar 30, 2008 at 8:37 PM, [EMAIL PROTECTED] wrote:
   
  Use wicket:link tags around the image
 
  -igor
 
  On 3/30/08, Enrique Rodriguez [EMAIL PROTECTED] wrote:
   On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young [EMAIL PROTECTED]
  wrote:
...
I don't want to hard code
/resources/com.mycompany.component.MyComponent/open.png in the
  template
and just have img src=open.png .../. Is there someway to work
   out
   the
prefix /resources/com.mycompany.component.MyComponent/ and fix
   up
  src
attribute in code?
  
   If you are in a Component you can call Component#urlFor().
  
   If not in a Component, you can call:
  
   RequestCycle.get()#urlFor();
  
   You can use the form that takes a ResourceReference for the image.
  
   HTH,
  
   Enrique
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Intention of PropertyModel in 1.3

2008-03-30 Thread David Leangen

I didn't happen to see a reply to this thread, and the stack trace is
still driving me bananas, so I submitted a patch. :-)

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


Thanks, as always, Wicket committers. :-)




On Thu, 2008-03-13 at 12:45 +0900, David Leangen wrote:
 This used to work in 1.2.6, but now 1.3.1 complains that 
 there is no setter for this class.
 
hmm, this should still work. mind filing a jira bug with 
a quickstart?
 
   You're right, it does still work. The thing is that during the algorithm
   when the properties of the bean are being tested the entire exception
   stack is being printed out.
  
   This is a bit confusing because it can lead the developer to think that
   an error occurred.
  
  
   I propose to log information instead of printing out the entire
   exception stack. If you agree to this, I don't mind submitting a patch.
 
  What level is this reported to?
  Its not error right?
 
 
 Current, DEBUG.
 
 Still, though, I think a logging message would be better than polluting 
 output with the entire stack trace...
 
 
 Cheers,
 Dave
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread Ned Collyer

Do you have an example of how we would go about this?

igor.vaynberg wrote:
 
 you really need just one dummy page to test all behaviors...
 -igor
 
-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16391872.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Intention of PropertyModel in 1.3

2008-03-30 Thread Igor Vaynberg
patch applied. always report a jira issue, that way things dont get
forgotten, and as you can see submitting a patch helps too :)

-igor


On Sun, Mar 30, 2008 at 9:36 PM, David Leangen [EMAIL PROTECTED] wrote:

  I didn't happen to see a reply to this thread, and the stack trace is
  still driving me bananas, so I submitted a patch. :-)

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


  Thanks, as always, Wicket committers. :-)






  On Thu, 2008-03-13 at 12:45 +0900, David Leangen wrote:
   This used to work in 1.2.6, but now 1.3.1 complains that
   there is no setter for this class.
  
  hmm, this should still work. mind filing a jira bug with
  a quickstart?
  
 You're right, it does still work. The thing is that during the 
 algorithm
 when the properties of the bean are being tested the entire exception
 stack is being printed out.

 This is a bit confusing because it can lead the developer to think that
 an error occurred.


 I propose to log information instead of printing out the entire
 exception stack. If you agree to this, I don't mind submitting a patch.
  
What level is this reported to?
Its not error right?
  
  
   Current, DEBUG.
  
   Still, though, I think a logging message would be better than polluting 
 output with the entire stack trace...
  
  
   Cheers,
   Dave
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread Igor Vaynberg
class behaviortestpage extends webpage {
  public behaviortestpage(IBehavior subject) {
add(new webmarkupcontainer(container).add(subject));
  }
}

behaviortestpage.html
div wicket:id=container/div

-igor


On Sun, Mar 30, 2008 at 9:45 PM, Ned Collyer [EMAIL PROTECTED] wrote:

  Do you have an example of how we would go about this?


  igor.vaynberg wrote:
  
   you really need just one dummy page to test all behaviors...
   -igor
  
  --
  View this message in context: 
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16391872.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread Ned Collyer

That's great.

However, I'm having strange behavior when I send an instance of a page to
the tester.  I'll start ripping out bits of my application class and see if
thats effecting it,

Failing
  //start and render the test page
  tester.startPage(new HomePage());
  //assert rendered page class
  tester.assertRenderedPage(HomePage.class);


While this works
  tester.startPage(HomePage.class)
  tester.assertRenderedPage(HomePage.class);


The stacktrace I get is as follows

INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IActivePageBehaviorListener, method=public
abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
ERROR - RequestCycle   - For input string: testPage
java.lang.NumberFormatException: For input string: testPage
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at
org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressor.getComponentAndInterfaceForUID(UrlCompressor.java:122)
at
org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebRequestProcessor.resolveListenerInterfaceTarget(UrlCompressingWebRequestProcessor.java:79)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:387)
at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:375)
at
org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:248)
at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:233)
at
com.mine.page.HomePageUnitTest.testRenderHomePage(HomePageUnitTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at
org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at 
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at
com.intellij.rt.junit4.Junit4TestMethodAdapter.run(Junit4TestMethodAdapter.java:49)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at
com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:65)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at
com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)





igor.vaynberg wrote:
 
 class behaviortestpage extends webpage {
   public behaviortestpage(IBehavior subject) {
 add(new webmarkupcontainer(container).add(subject));
   }
 }
 
 behaviortestpage.html
 div wicket:id=container/div
 
 -igor
 

-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p1639.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best method of testing behaviors.

2008-03-30 Thread Igor Vaynberg
weird, we use that construct all over the place. eg see FormSubmitTest

-igor


On Sun, Mar 30, 2008 at 10:31 PM, Ned Collyer [EMAIL PROTECTED] wrote:

  That's great.

  However, I'm having strange behavior when I send an instance of a page to
  the tester.  I'll start ripping out bits of my application class and see if
  thats effecting it,

  Failing
   //start and render the test page
   tester.startPage(new HomePage());
   //assert rendered page class
   tester.assertRenderedPage(HomePage.class);


  While this works
   tester.startPage(HomePage.class)
   tester.assertRenderedPage(HomePage.class);


  The stacktrace I get is as follows

  INFO  - RequestListenerInterface   - registered listener interface
  [RequestListenerInterface name=IActivePageBehaviorListener, method=public
  abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
  ERROR - RequestCycle   - For input string: testPage
  java.lang.NumberFormatException: For input string: testPage
 at
  java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
 at java.lang.Integer.parseInt(Integer.java:447)
 at java.lang.Integer.parseInt(Integer.java:497)
 at
  
 org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressor.getComponentAndInterfaceForUID(UrlCompressor.java:122)
 at
  
 org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebRequestProcessor.resolveListenerInterfaceTarget(UrlCompressingWebRequestProcessor.java:79)
 at
  
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461)
 at
  
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
  
 org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:387)
 at
  
 org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:375)
 at
  
 org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:248)
 at
  
 org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:233)
 at
  com.mine.page.HomePageUnitTest.testRenderHomePage(HomePageUnitTest.java:21)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
  
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
 at
  org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
 at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
 at
  
 org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
 at 
 org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
 at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
 at
  
 org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
 at
  
 org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
 at
  org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
 at
  org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
 at 
 org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
 at
  org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
 at
  
 com.intellij.rt.junit4.Junit4TestMethodAdapter.run(Junit4TestMethodAdapter.java:49)
 at junit.textui.TestRunner.doRun(TestRunner.java:116)
 at
  com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:65)
 at junit.textui.TestRunner.doRun(TestRunner.java:109)
 at
  
 com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24)
 at
  
 com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
 at 
 com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)






  igor.vaynberg wrote:
  
   class behaviortestpage extends webpage {
 public behaviortestpage(IBehavior subject) {
   add(new webmarkupcontainer(container).add(subject));
 }
   }
  
   behaviortestpage.html
   div wicket:id=container/div
  
   -igor
  

  --
  View this message in context: 
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p1639.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


 

Re: Best method of testing behaviors.

2008-03-30 Thread Ned Collyer

I'll check it.

Something to note is, I do not have testPage string inside my code at all.

Near as I can tell the problem is stemmed from DummyHomePage.java


igor.vaynberg wrote:
 
 weird, we use that construct all over the place. eg see FormSubmitTest
 
 -igor
 

-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16392347.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Best Wicket Books or Tutorials

2008-03-30 Thread Gareth Segree
Which framework should I invest in JSF/Struts 2/Spring MVC/Wicket for someone 
moving from jsp?

If Wicket then
I'm looking for good tutorials on wicket or books.
How does Enjoying Web Development with Wicket stackup?
What's the best wicket book available?

The same for the other framework

Re: Best Wicket Books or Tutorials

2008-03-30 Thread Robby O'Connor
Wicket in action :) you're gonna get a biased answer here ;)...

Gareth Segree wrote:
 Which framework should I invest in JSF/Struts 2/Spring MVC/Wicket for someone 
 moving from jsp?
 
 If Wicket then
 I'm looking for good tutorials on wicket or books.
 How does Enjoying Web Development with Wicket stackup?
 What's the best wicket book available?
 
 The same for the other framework


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]