RequestUtils.toAbsolutePath() bug ?

2008-03-11 Thread smallufo
It seems RequestUtils.toAbsolutePath() has a bug regarding to UTF-8 encoded
page parameter :

I have a bookmarkable page  , which takes a UTF-8 encoded parameter place
:

private PageParameters pps;
pps.put(place, URLEncoder.encode(place , UTF-8));

In this Page , I have a TextField that prints the URL for this page (for
users to copy) :
String url = RequestUtils.toAbsolutePath();
TextField resultUrl;
resultUrl = new TextField(resultUrl);
resultUrl.setModel(new Model( url ));
resultUrl.setEscapeModelStrings(false);
resultUrl.setOutputMarkupId(true);
add(resultUrl);


For example , 台北市 (meaning Chinese word : Taipei ) is encoded correctly
to :
place/%25E5%258F%25B0%25E5%258C%2597%25E5%25B8%2582
And it is correctly shown in the browser URL bar.

But incorrect in the textfield :
place/%E5%8F%B0%E5%8C%97%E5%B8%82

Is it a bug ? If not , how to solve it ?


Panels

2008-03-11 Thread vsubedar

Hello ,
   I have a GlobalPage which has a tree. 
   Tree is on left hand side of a frame.And On click of the nodes in the
tree it renders ListingScreen which are panels on right hand side of screen.

User can edit the records by clicking on the listing screen, which takes
them to another panel. 

Now Iam not able to redirect to the previous panel ie the ListingScreenPanel
after user has saved/edited the content.

Regards
Vijay Subedar
-- 
View this message in context: 
http://www.nabble.com/Panels-tp15975662p15975662.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: cd app example

2008-03-11 Thread Maurice Marrink
Ok, thanks for the info.
Eelco congratulations to you and your wife. Now get back to your honeymoon ;)

Maurice

On Tue, Mar 11, 2008 at 5:08 AM, Eelco Hillenius
[EMAIL PROTECTED] wrote:
 Yeah, it was discontinued after a bunch of discussions about choices
  made in the supporting libs (wicket-extensions-data etc).

  Eelco




  On Mon, Mar 10, 2008 at 4:53 PM, Johan Compagner [EMAIL PROTECTED] wrote:
   i dont think that project is updated or maintained to 1.3
  
  
  
  
  
On Mon, Mar 10, 2008 at 11:46 PM, Maurice Marrink [EMAIL PROTECTED] 
 wrote:
  
 On http://www.wicket-library.com/ there is a cdapp example.
 I am interested in the source code for this example. I found some
 source in the wicket-stuff svn (1.2 branch), does anybody now if there
 is a 1.3 source somewhere?

 Maurice

 -
 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: Default Focus Behavior?

2008-03-11 Thread Martijn Dashorst
We have this discussion with each major release of Wicket, and each
time there are 100 ways to skin the cat. We want not only to minimize
the surface area, but also the number of requests to alter the
behavior of existing functionality. If we implement method X, then
sure enough someone comes along and wants method Y because that is his
usecase, then someone wants method Z etc. In this case there won't be
a convergence to a single usecase.

Martijn

On 3/11/08, James Carman [EMAIL PROTECTED] wrote:
 On 3/10/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
   i dont think something like this should go into core. it seems pretty
clear from this thread that there are very many ways to do this and
each project will use their own. what you have proposed seems trivial
to construct, so for projects that want to use it its a nobrainer. i
think things that go into core should at least satisfy the majority of
common usecases or be at least of moderate complexity. if we start
putting every trivial thing like this into core we will end up with a
huge surface area - at which point you have to start thinking of the
find/build tradeoff - is it easier to find something that does what i
want in core or simply roll my own which will only take fifteen
minutes...


 Okay, suit yourself, but I was actually quite surprised that this
  wasn't included in the core.  This seems like a common enough
  requirement that a certain field in a form should receive the focus
  when the page loads.

  p.s. I might change the name to FocusOnLoadBehavior, though.  That
  seems more descriptive.


  -
  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.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Multipart-form with nested ajaxform throws exception in 1.3.1

2008-03-11 Thread Michael Sparer

I have a multipart-enabled form, inside this form there is a nested form with
ajaxsubmitbehavior. to submit the nested form I'm using an AjaxButton (as
the normal button doesn't submit the form via ajax - contrary to its
behaviour if not used as nested form)

all releases including 1.3.0 supported the submitting of the innerform and
sent all of the nested form's fields to the server and came back in a neat
ajax response.
In 1.3.1 however the Exception java.lang.IllegalStateException:
ServletRequest does not contain multipart content gets thrown. That
indicates that the surrounding multipart form was submitted instead of just
the nested form (and as multipart and ajax aren't close friends the
exception gets thrown)

isn't that supposed to work or is it, again, a hidden feature I was using?
:-)

regards, 
Michael

-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Multipart-form-with-nested-ajaxform-throws-exception-in-1.3.1-tp15975693p15975693.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Strange thing in Application constructor

2008-03-11 Thread Maurice Marrink
  I've tried setting statelessHint to true in my login page's constructor (and
  in the same constructor printing out the result of isStateless(), seeing
  that it returns true), but still I can see my app's session object created
  and stored in HttpSession (I've tried also with a completely empty login
  page, same result). Am I doing something wrong now?

Are you talking about test behavior or real life app behavior?

Maurice

On Tue, Mar 11, 2008 at 10:20 AM, Roberto Fasciolo
[EMAIL PROTECTED] wrote:

  I finally found some time for getting back to this...

  The tests are modeled on real user behaviours, so they are not invalidating
  the session because the user has never logged in (we have failing test
  scenarios for login, registration, forget password and so on).

  I've tried setting statelessHint to true in my login page's constructor (and
  in the same constructor printing out the result of isStateless(), seeing
  that it returns true), but still I can see my app's session object created
  and stored in HttpSession (I've tried also with a completely empty login
  page, same result). Am I doing something wrong now?

  -Roberto




  igor.vaynberg wrote:
  
   no, its not like that. yes, wicket will create a new session object,
   but if the page is stateless that session object is never actually
   saved into httpsession...
  
   you have 20 session active after your tests...do your test cases
   always cleanup/invalidate the session? if not then servlet container
   will keep the session around until it times out...
  
   -igor
  
   On Mon, Mar 3, 2008 at 9:29 AM, Roberto Fasciolo
   [EMAIL PROTECTED] wrote:
  
I think Session has also the responsibility of verifying if a component
   can
be instantiated.
  
But anyway, I'm asking all these questions because I'm hunting a memory
   leak
in my application and I've found that after running a 120+ tests
   selenium
test suite I've 20+ sessions still in memory retained by Jetty (e.g.
   active
sessions in the web container) and I'm wondering if that's a problem or
   not.
I've understood now that I have no way to control that, everytime a user
opens a page in a wicket app a new Session is created just for checking
   if
that user can instantiate components, regardless of wether the page is
stateless or stateful and also if the user has never signed in the site.
   Is
it like that?
  
-Roberto
  
  
  
igor.vaynberg wrote:

 session represents a user's session, while application represents the
 application that users access.

 -igor

  
--
View this message in context:
   
 http://www.nabble.com/Strange-thing-in-Application-constructor-tp15786017p15808987.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]
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/Strange-thing-in-Application-constructor-tp15786017p15975715.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: Strange thing in Application constructor

2008-03-11 Thread Roberto Fasciolo

I finally found some time for getting back to this...

The tests are modeled on real user behaviours, so they are not invalidating
the session because the user has never logged in (we have failing test
scenarios for login, registration, forget password and so on).

I've tried setting statelessHint to true in my login page's constructor (and
in the same constructor printing out the result of isStateless(), seeing
that it returns true), but still I can see my app's session object created
and stored in HttpSession (I've tried also with a completely empty login
page, same result). Am I doing something wrong now?

-Roberto


igor.vaynberg wrote:
 
 no, its not like that. yes, wicket will create a new session object,
 but if the page is stateless that session object is never actually
 saved into httpsession...
 
 you have 20 session active after your tests...do your test cases
 always cleanup/invalidate the session? if not then servlet container
 will keep the session around until it times out...
 
 -igor
 
 On Mon, Mar 3, 2008 at 9:29 AM, Roberto Fasciolo
 [EMAIL PROTECTED] wrote:

  I think Session has also the responsibility of verifying if a component
 can
  be instantiated.

  But anyway, I'm asking all these questions because I'm hunting a memory
 leak
  in my application and I've found that after running a 120+ tests
 selenium
  test suite I've 20+ sessions still in memory retained by Jetty (e.g.
 active
  sessions in the web container) and I'm wondering if that's a problem or
 not.
  I've understood now that I have no way to control that, everytime a user
  opens a page in a wicket app a new Session is created just for checking
 if
  that user can instantiate components, regardless of wether the page is
  stateless or stateful and also if the user has never signed in the site.
 Is
  it like that?

  -Roberto



  igor.vaynberg wrote:
  
   session represents a user's session, while application represents the
   application that users access.
  
   -igor
  

  --
  View this message in context:
 http://www.nabble.com/Strange-thing-in-Application-constructor-tp15786017p15808987.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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Strange-thing-in-Application-constructor-tp15786017p15975715.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: styling thead in DataTable

2008-03-11 Thread Eyal Golan
Thanks Christian,
As Igor suggested, I did use a CSS (at the beginning I didn't find the style
attribute I needed).
I'll keep in mind the onComponentTag() as well.

As I mentioned before, my problem was solved, but when I have time, I'll try
to find the thead of a DataTable issue.

Thanks guys

On Tue, Mar 11, 2008 at 3:45 AM, Christian Alejandro Marquez Grabia 
[EMAIL PROTECTED] wrote:

 You can change tag attributes by overriding the onComponentTag() method,
 at
 least that is what I do when modifying any class or other attribute. (you
 should get the attribute from the tag parameter, and then set it there as
 well)

 I'm not sure where you should add that for the thead builder, but if you
 find it, then you'll get it done. You may also use IBehaviours, like
 SimpleAttributeModifier.

 Or as Igor well said, use your own markup (you could see the default
 markup
 inside the jar, and simply add the attribute you want)

 Rgds,
 Christian

 On 3/10/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
  there shouldnt be anything you cannot do through css that you can do
  through adding things to markup
 
  that said you can always subclass datatable and provide your own markup
 
 
  -igor
 
 
  On Mon, Mar 10, 2008 at 3:31 PM, Eyal Golan [EMAIL PROTECTED] wrote:
   well, I can and this is what I actually did.
I found out that I can use in style, the attribute: *text-align*
that has solved me the problem.
  
But my (more general) question is: what if there is an attribute that
  can't
be set in style? as what I understand, it can't be set in a CSS (if
 I'm
mistaken, please tell me how it's done).
  
How can I add attributes to thead of a DataTable?
Hope I'm clear enough.
  
Eyal
On Mon, Mar 10, 2008 at 7:17 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
  
wrote:
  
  
  
 can you not use css?

 -igor


 On Mon, Mar 10, 2008 at 6:17 AM, Eyal Golan [EMAIL PROTECTED]
  wrote:
  Hey all,
   I am having an issue that seems to be simple, but still, no
  success.
 
   I have a normal DataTable.
   I add to it the toptoolbars manually:
   HeadersToolbar thead = new HeadersToolbar(entityDataTable,
   entitiesProvider);
   entityDataTable.addTopToolbar(thead);
   This is how it looks in the HTML:
   table wicket:id=entitiesList class=browserTable
 
   This is how (part of) the generated HTML looks like:
   table class=browserTable wicket:id=entitiesList
   thead
   tr class=headers
   th wicket:id=header class=wicket_orderUpwicket:border
   _moz-userdefined=a wicket:id=orderByLink class=
 
 

  
 href=?wicket:interface=:4:tabs:browserTabbedPanel:panel:entitiesList:topToolbars:2:toolbar:headers:1:header:orderByLink::ILinkListener::wicket:body
   _moz-userdefined=span wicket:id=labelPerson
   ID/span/wicket:body/a/wicket:border
   /th
 
   I want a simple thing: I want to align the header labels to the
  left.
   The problem(s):
   - style doesn't have an attribute of align. Only vertical-align.
   - I tried to add to the HeadersToolbar an AttributeModifier:
   thead.add(new AttributeModifier(align, true, new
  Model(left)));
 
   Nothing seems working.
   I am using Firebug and the label thead keeps with no
 attribute.
 
   Can anyone help?
 
   Thank a lot
 
 
   --
   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/
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




-- 
Eyal Golan
[EMAIL PROTECTED]

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


Re: Global Exception Handling...

2008-03-11 Thread James Carman
On 3/11/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
The request cycle is easy enough to access anywhere, RequestCycle.get() 
 right?


 im not a big fan of using threadlocals everywhere personally...we
  guarantee certain ones, but they make unit testing, etc, a pita. i
  would prefer passing the instance in.

I'm not a big fan either.  Adding a parameter isn't a bad idea, then.

   If a user needs more advanced search capability, I guess
they could do it themselves.  Maybe the search algorithm could be put
in the RequestCycle class' onRuntimeException() method itself.  Then,
all you'd have to do is override Application.newRequestCycle() and
RequestCycle.onRuntimeException() to plug in your own advanced handler
search capability.  I think this sort of feature is a common enough
need that it could be built in, but that's just my opinion.


 ok. this is making more sense. so we would change Page
  onRuntimeException(RT e) to ExceptionHandler onRuntimeException(RT e),
  and the default resolution algorithm will be what most people agree on
  as the best default. on the other hand, you can just override
  requestcycle.onruntimeexception(rt e) {
   map 
 handlers=beanfactoryutils.beansoftypeincludingancestors(applicationcontext,exceptionhandler.class);
   for (excpetionhandler handler:handlers.values()) {
if (handler.matches(e)) { return e.getPage(e); break; }
   }
   return super.onruntimeexception(e);
  }


The change I was suggesting wouldn't break any existing code (unless
someone implemented IRequestCycleSettings).  The signature of
RequestCycle.onRuntimeException() wouldn't change:

public Page onRuntimeException( Page page, RuntimeException e )
{
IRuntimeExceptionHandler handler = findBestExceptionHandler(e.getClass());
if(handler != null)
{
return handler.onRuntimeException(this, e);
}
return null;
}

protected IRuntimeExceptionHandler findBestExceptionHandler(Class
exceptionClass)
{
while(exceptionClass != null  !exceptionClass.equals(Exception.class))
{
 IRuntimeExceptionHandler handler =
getApplication().getRequestCycleSettings().getRuntimeExceptionHandler(exceptionClass);
if(handler != null)
{
return handler;
}
exceptionClass = exceptionClass.getSuperclass();
}
return null;
}

This way, if the user wants to override the search algorithm, they can
override the findBestExceptionHandler() method.  And, if they haven't
registered any handlers, then this method does exactly what it used to
do (nothing).  Whatever the default algorithm would be of course is up
for debate.  This is just simple example (and off the top of my head,
so if it really doesn't work as is, then sorry).


 our api surface area is already pretty large, makes the framework
  harder to learn. so we try to keep it as small as possible, that is
  not to say we do not implement new ideas/features.


Trust me, I know (about the hard to learn part)!  I signed up to do a
talk on Wicket to our local Java users group (anyone in the
Cincinnati, OH area is free to join us next Monday) and it has now
turned into two talks: Introduction to Wicket and Advanced Wicket (May
2008)!

 i believe most, all that i have worked on, wicket application have
  their own custom subclass of webrequestcycle, so a factory wouldnt
  really benefit anyone if it's only purpose is to make installing a
  generic subclass easier. what you can do is create your own subclass
  of webrequestcycle that has handler registration, that way users can
  subclass yours instead of webrequestcycle and get the handler
  functionality. you can, for example, store registered handlers in
  application metadata facility.

Okay, so it's common to do your own request cycle implementation.  I
didn't realize that.  In Tapestry, RequestCycle wasn't something you
monkeyed around with much.

So, you're saying that I would store my exception handler registry
as metadata entries on the Application class?  I would maybe store my
MapClass,IRuntimeExceptionHandler?  What would the MetaDataKey be?

I just don't want to force users to subclass a custom WebApplication
class.  I'd rather have the IRuntimeRequestHandlers registered with
IRequestCycleSettings (or the IExceptionSettings, maybe?).

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



How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Hi again folks! Thanks for replying me to my first question, it wordked!
If you don't remember, I asked about how to show feedback messages
associated only with a field, so I can show a message next to a input
field.

 

The next step is that I'm trying to change the default behaviour in
order to put a simple html image tag instead of the default
ullimessage1/lilimessage2/li/ul

 

The html code that I'm getting at this moment is this:

 

td wicket:id=errorsSfidwicket:panel
  ul wicket:id=feedbackul
li wicket:id=messages class=feedbackPanelERROR
  span wicket:id=message class=feedbackPanelERRORlt;img
src=quot;image.jpgquot; /gt;/span
/li
  /ul
/wicket:panel
 
The thing is that I'm putting the image tag as a property, but I don't
know how to change this, in order to show only the image tag?
 
Any kind soul knows how to solve this? Your help would be very
appreciated :D. Thanks in advance.
 
 
Daniel Alonso

 



SSL

2008-03-11 Thread Tormod Øverlier

I'm trying to use SSL on certain pages in my application by using the
description for Wicket 1.3 in the wiki. However, when I access a page with
SSL, I'm always redirected to the start page. I see that the respond-method
in my WebRequestCycleProcessor is called 3 times. The first time, it calls
webReponse.reponse() with a SSL enabled url, but without the
?wicket:interface stuff behind. The second and third time, it sets the url
to a non-SSL url pointing to the start page.

I have set the render strategy according to the description in the wiki.

1. Any suggestions to my specific problem?
2. Are there any plans to include a more direct support for SSL in future
versions of Wicket?

Thanks. Tormod.
-- 
View this message in context: http://www.nabble.com/SSL-tp15975713p15975713.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: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 We have this discussion with each major release of Wicket, and each
  time there are 100 ways to skin the cat. We want not only to minimize
  the surface area, but also the number of requests to alter the
  behavior of existing functionality. If we implement method X, then
  sure enough someone comes along and wants method Y because that is his
  usecase, then someone wants method Z etc. In this case there won't be
  a convergence to a single usecase.


Ok, if someone wants to use that code example I posted, then they can
find it in the archives.  Or, I guess we could put that out there as a
wiki tip?

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



Re: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Vit Rozkovec

Hallo,
apparently you want to have a look at
setEscapeModelStrings()
and
setRenderBodyOnly()
methods of the Label.

Vitek

Alonso Sanchez, Daniel wrote:

Hi again folks! Thanks for replying me to my first question, it wordked!
If you don't remember, I asked about how to show feedback messages
associated only with a field, so I can show a message next to a input
field.

 


The next step is that I'm trying to change the default behaviour in
order to put a simple html image tag instead of the default
ullimessage1/lilimessage2/li/ul

 


The html code that I'm getting at this moment is this:

 


td wicket:id=errorsSfidwicket:panel
  ul wicket:id=feedbackul
li wicket:id=messages class=feedbackPanelERROR
  span wicket:id=message class=feedbackPanelERRORlt;img
src=quot;image.jpgquot; /gt;/span
/li
  /ul
/wicket:panel
 
The thing is that I'm putting the image tag as a property, but I don't

know how to change this, in order to show only the image tag?
 
Any kind soul knows how to solve this? Your help would be very

appreciated :D. Thanks in advance.
 
 
Daniel Alonso


 



  



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



Re: Default Focus Behavior?

2008-03-11 Thread Martijn Dashorst
I suggest wiki.

Thanks,

Martijn

On 3/11/08, James Carman [EMAIL PROTECTED] wrote:
 On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
   We have this discussion with each major release of Wicket, and each
time there are 100 ways to skin the cat. We want not only to minimize
the surface area, but also the number of requests to alter the
behavior of existing functionality. If we implement method X, then
sure enough someone comes along and wants method Y because that is his
usecase, then someone wants method Z etc. In this case there won't be
a convergence to a single usecase.
  


 Ok, if someone wants to use that code example I posted, then they can
  find it in the archives.  Or, I guess we could put that out there as a
  wiki tip?


  -
  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.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Re: FeedbackMessages per field

2008-03-11 Thread Daniel Alonso

Thank you so mucho for your help. It works very well :D
-- 
View this message in context: 
http://www.nabble.com/FeedbackMessages-per-field-tp15950642p15975736.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: Global Exception Handling...

2008-03-11 Thread James Carman
On 3/11/08, James Carman [EMAIL PROTECTED] wrote:
 The change I was suggesting wouldn't break any existing code (unless
  someone implemented IRequestCycleSettings).  The signature of
  RequestCycle.onRuntimeException() wouldn't change:


  public Page onRuntimeException( Page page, RuntimeException e )

 {
 IRuntimeExceptionHandler handler = findBestExceptionHandler(e.getClass());
 if(handler != null)
 {
 return handler.onRuntimeException(this, e);
 }
 return null;
  }

  protected IRuntimeExceptionHandler findBestExceptionHandler(Class
  exceptionClass)
  {
 while(exceptionClass != null  !exceptionClass.equals(Exception.class))
 {
  IRuntimeExceptionHandler handler =
  
 getApplication().getRequestCycleSettings().getRuntimeExceptionHandler(exceptionClass);
 if(handler != null)
 {
 return handler;
 }
 exceptionClass = exceptionClass.getSuperclass();
 }
 return null;
  }

  This way, if the user wants to override the search algorithm, they can
  override the findBestExceptionHandler() method.  And, if they haven't
  registered any handlers, then this method does exactly what it used to
  do (nothing).  Whatever the default algorithm would be of course is up
  for debate.  This is just simple example (and off the top of my head,
  so if it really doesn't work as is, then sorry).



By the way, I can create a patch for this stuff if you like.  I guess
the decision needs to be made about where the registry
(MapClass,IRuntimeExceptionHandler) needs to go.  Does it belong in
IRequestCycleSettings or IExceptionSettings?  And, do you want me to
apply it to my already existing code which splits up Settings into
multiple default implementations (which you guys said we should hold
off on for 1.4.x)?

Perhaps there could be logic in there that checks to see if the
requested Page object which caused the RuntimeException implements
IRuntimeExceptionHandler also.  That way, an individual page could
override the global behavior if they wish.  Just a thought.

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



Addin javascript directly inside the body tag

2008-03-11 Thread Filip Pas
Hi,

I'm faced with the following problem.
I have an base page in which I use to set the domain and to set the title
information.
I also use the modal window to display the pages in.
Now the problem is that the title of the modalwindow doesn't correspond to
the title
of the page. In the modalwindow code there is a method called updateTitle
which can be used to
update the title of the modal window with the content of the title element.
I wanna add it to my base class so all pages automatically get the needed
behavior.
What I've tried is attaching a behavior to the page but the problem is that
the oncomponentag method
isn't called. The beforerender is called before the title attribute rendered
and any output I would write appears before the html tag (effectively
invalidating my page). The after render renders any content after the html
tag closed which is also not what I want. Putting the code in the
responseheader is a possibility but i would prefer if I could add some
javascript that's excecuted just after the body tag opens.

Also I want to be sure that my component hierarchy of the page doesn't
change because of this.
So I don't want to add an empty label in the body and attach the behavior to
that.
I also don't want to create some custom body container and mess with the
component hierarchy.
Isn't there some hook that can be implemented/overridden somewhere to do
this?

Thanks in advance!!


RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel

Hi again! Firstly, thanks a lot Vitek for your help. I have been testing
a couple of things related with your response, and only the
setEscapeModelStrings has solve a part of the solution.

Through Google I have seen a solution for extend ComponentFeedbackPanel
and write my own html code, but it doesn't work too.

At this moment I have this situation:

Part of the Page1.class


MyComponentFeedbackPanel panelErrorSfid=null;
TextField sfid = new TextField(sfid);
sfid.setRequired(true);  
sfid.add(StringValidator.maximumLength(15));
sfid.setLabel(new Model(sfid));
sfid.setEscapeModelStrings(true);
sfid.setRenderBodyOnly(false);
  add(sfid);
  panelErrorSfid=new MyComponentFeedbackPanel(errorsSfid,
sfid);
  add(panelErrorSfid);

-


MyComponentFeedbackPanel
-

public class MyComponentFeedbackPanel extends ComponentFeedbackPanel {
 /**
 * 
 */
private static final long serialVersionUID = 1L;

public MyComponentFeedbackPanel(String id,Component componente)
{
super(id,componente);
}
}


HTML'S

Page1.html


wicket:extend
span wicket:id=feedback/span

form wicket:id=altaPrepagoForm
div id=contacts
div class=contact
table
tr
td
Sfid
/td
td
input wicket:id=sfid type=text/
/td
td wicket:id=errorsSfid
/td
/tr
/table
/div
  /div
/form
/wicket:extend

--


MyComponentFeedBackPanel.html
-

wicket:panel
div wicket:id=feedbackul
div wicket:id =messages
p wicket:id=message /
 
/div
/div
  
/wicket:panel



Properties (Page1.properties)
-

altaPrepagoForm.sfid.Required=img src=pepe.jpg /












Sorry for the code :D. The thing is that I want to delete (if could be
possible), the extra divs associated to feedbackul and messages, and use
wicket:id=message to show an image, but I don't know how to do it. 

My goal is to show an image icon next to each erroneous input field :D

Thanks in advance, an sorry for my English




Hallo,
apparently you want to have a look at
setEscapeModelStrings()
and
setRenderBodyOnly()
methods of the Label.

Vitek

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



Re: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 I suggest wiki.


Done:

http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component

I'm happy now.  My work (no matter how trivial) may help someone
someday! :)  I don't have time to do so now, but I might add in some
examples on how to do focus on errors, etc.

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



Re: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Gerolf Seitz

 My goal is to show an image icon next to each erroneous input field :D


see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf


Re: Default Focus Behavior?

2008-03-11 Thread Martijn Dashorst
Another option would be (if there is enough interest) to add it to
wicketstuff minis.

Martijn

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

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



Re: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Gerolf Seitz
 The things is that if there is an error, a red * is showed, not the
 image file I want... what things am I doing wrong?


subclass FormComponentFeedbackIndicator and provide your own markup:

MyFCFI.java:
class MyFCFI extends FormComponentFeedbackIndicator {
  ...
}

MyFcFI.html:
wicket:panelimg src=error.png//wicket:panel

  Gerolf



 Thanks again to everybody



 -Mensaje original-
 De: Gerolf Seitz [mailto:[EMAIL PROTECTED]
 Enviado el: martes, 11 de marzo de 2008 12:10
 Para: users@wicket.apache.org
 Asunto: Re: How can i Customize the style of Feedback Messages ?

 
  My goal is to show an image icon next to each erroneous input field :D
 

 see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf

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




RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Fantastic! Sorry for disturbing :P Thanks again 

-Mensaje original-
De: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:39
Para: users@wicket.apache.org
Asunto: Re: How can i Customize the style of Feedback Messages ?

 The things is that if there is an error, a red * is showed, not the
 image file I want... what things am I doing wrong?


subclass FormComponentFeedbackIndicator and provide your own markup:

MyFCFI.java:
class MyFCFI extends FormComponentFeedbackIndicator {
  ...
}

MyFcFI.html:
wicket:panelimg src=error.png//wicket:panel

  Gerolf



 Thanks again to everybody



 -Mensaje original-
 De: Gerolf Seitz [mailto:[EMAIL PROTECTED]
 Enviado el: martes, 11 de marzo de 2008 12:10
 Para: users@wicket.apache.org
 Asunto: Re: How can i Customize the style of Feedback Messages ?

 
  My goal is to show an image icon next to each erroneous input field
:D
 

 see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf

 -
 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 can i Customize the style of Feedback Messages ?

2008-03-11 Thread Gerolf Seitz
you're welcome.

  Gerolf

On Tue, Mar 11, 2008 at 12:44 PM, Alonso Sanchez, Daniel 
[EMAIL PROTECTED] wrote:

 Fantastic! Sorry for disturbing :P Thanks again

 -Mensaje original-
 De: Gerolf Seitz [mailto:[EMAIL PROTECTED]
 Enviado el: martes, 11 de marzo de 2008 12:39
 Para: users@wicket.apache.org
 Asunto: Re: How can i Customize the style of Feedback Messages ?

  The things is that if there is an error, a red * is showed, not the
  image file I want... what things am I doing wrong?
 

 subclass FormComponentFeedbackIndicator and provide your own markup:

 MyFCFI.java:
 class MyFCFI extends FormComponentFeedbackIndicator {
  ...
 }

 MyFcFI.html:
 wicket:panelimg src=error.png//wicket:panel

  Gerolf


 
  Thanks again to everybody
 
 
 
  -Mensaje original-
  De: Gerolf Seitz [mailto:[EMAIL PROTECTED]
  Enviado el: martes, 11 de marzo de 2008 12:10
  Para: users@wicket.apache.org
  Asunto: Re: How can i Customize the style of Feedback Messages ?
 
  
   My goal is to show an image icon next to each erroneous input field
 :D
  
 
  see FormComponentFeedbackBorder or FormComponentFeedbackIndicator
 
   Gerolf
 
  -
  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: Strange thing in Application constructor

2008-03-11 Thread Johan Compagner
because maurice has a patch!

On Tue, Mar 11, 2008 at 11:02 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

   I've tried setting statelessHint to true in my login page's constructor
 (and
   in the same constructor printing out the result of isStateless(),
 seeing
   that it returns true), but still I can see my app's session object
 created
   and stored in HttpSession (I've tried also with a completely empty
 login
   page, same result). Am I doing something wrong now?

 Are you talking about test behavior or real life app behavior?

 Maurice

 On Tue, Mar 11, 2008 at 10:20 AM, Roberto Fasciolo
  [EMAIL PROTECTED] wrote:
 
   I finally found some time for getting back to this...
 
   The tests are modeled on real user behaviours, so they are not
 invalidating
   the session because the user has never logged in (we have failing test
   scenarios for login, registration, forget password and so on).
 
   I've tried setting statelessHint to true in my login page's constructor
 (and
   in the same constructor printing out the result of isStateless(),
 seeing
   that it returns true), but still I can see my app's session object
 created
   and stored in HttpSession (I've tried also with a completely empty
 login
   page, same result). Am I doing something wrong now?
 
   -Roberto
 
 
 
 
   igor.vaynberg wrote:
   
no, its not like that. yes, wicket will create a new session object,
but if the page is stateless that session object is never actually
saved into httpsession...
   
you have 20 session active after your tests...do your test cases
always cleanup/invalidate the session? if not then servlet container
will keep the session around until it times out...
   
-igor
   
On Mon, Mar 3, 2008 at 9:29 AM, Roberto Fasciolo
[EMAIL PROTECTED] wrote:
   
 I think Session has also the responsibility of verifying if a
 component
can
 be instantiated.
   
 But anyway, I'm asking all these questions because I'm hunting a
 memory
leak
 in my application and I've found that after running a 120+ tests
selenium
 test suite I've 20+ sessions still in memory retained by Jetty (e.g
 .
active
 sessions in the web container) and I'm wondering if that's a
 problem or
not.
 I've understood now that I have no way to control that, everytime a
 user
 opens a page in a wicket app a new Session is created just for
 checking
if
 that user can instantiate components, regardless of wether the page
 is
 stateless or stateful and also if the user has never signed in the
 site.
Is
 it like that?
   
 -Roberto
   
   
   
 igor.vaynberg wrote:
 
  session represents a user's session, while application represents
 the
  application that users access.
 
  -igor
 
   
 --
 View this message in context:
   
 http://www.nabble.com/Strange-thing-in-Application-constructor-tp15786017p15808987.html
   
   
Sent from the Wicket - User mailing list archive at 
  Nabble.comhttp://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]
   
   
   
 
   --
   View this message in context:
 http://www.nabble.com/Strange-thing-in-Application-constructor-tp15786017p15975715.html
 
 
  Sent from the Wicket - User mailing list archive at 
  Nabble.comhttp://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: Default Focus Behavior?

2008-03-11 Thread Johan Compagner
i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point
and i guess that is WebPage.focusComponent()
or maybe Form (but you could have 2)
By the way we have focus support in ajax mode... see AjaxRequestTarget

johan



On Tue, Mar 11, 2008 at 12:41 PM, James Carman [EMAIL PROTECTED]
wrote:

 On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
  Another option would be (if there is enough interest) to add it to
   wicketstuff minis.
 

 Yeah, I thought about that.  And, I may try to put that in there.
 Perhaps there could be a few focus behaviors in there?  Perhaps even a
 FocusBehaviors class with static helper methods:

 public FocusBehaviors
 {
  public static void focusOnLoad(FormComponent fc);
  public static void focusFirstError(Form form);
 }

 Something like that.

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




RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Thanks a lot Gerolf. Great suggestions.

I have been looking some docs, and nabble forum... but (again) I've got
a problem.


Finally my webpage class looks like this (just the important part :D ):

TextField sfid = new TextField(sfid);
 sfid.setRequired(true); 
 sfid.add(StringValidator.maximumLength(15));
 sfid.setLabel(new Model(sfid));
 sfid.setEscapeModelStrings(true);
 sfid.setRenderBodyOnly(false);
 panelErrorSfid=new
FormComponentFeedbackIndicator(errorsSfid);
 panelErrorSfid.setIndicatorFor(sfid);
 add(sfid);  
 add(panelErrorSfid);


And the html code...

input wicket:id=sfid type=text/span wicket:id=errorsSfidimg
src=error.png/span

The things is that if there is an error, a red * is showed, not the
image file I want... what things am I doing wrong?

Thanks again to everybody



-Mensaje original-
De: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:10
Para: users@wicket.apache.org
Asunto: Re: How can i Customize the style of Feedback Messages ?


 My goal is to show an image icon next to each erroneous input field :D


see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf

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



Re: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Another option would be (if there is enough interest) to add it to
  wicketstuff minis.


Yeah, I thought about that.  And, I may try to put that in there.
Perhaps there could be a few focus behaviors in there?  Perhaps even a
FocusBehaviors class with static helper methods:

public FocusBehaviors
{
  public static void focusOnLoad(FormComponent fc);
  public static void focusFirstError(Form form);
}

Something like that.

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



IntelliJ WicketForge issue: NPE when trying to use New Wicket Page to create both Java and markup

2008-03-11 Thread Kevin Murphy
This is not a high-priority issue, but it seems that it should be pretty 
trivial for the maintainer to fix.


What steps will reproduce the problem?

1. Add New Wicket Page to Project View Popup Menu via Customizations
2. Right-click on a folder containing Wicket source files, and choose
New/New Wicket Page
3. Check Create associated markup file
4. Click OK
5. NPE error

What is the expected output? What do you see instead?

The Java file is created.  The HTML file is not.

What version of the product are you using? On what operating system?

WicketForge 0.3.1 with IntelliJ IDEA 7.0.3


Regards,
Kevin


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



Re: Default Focus Behavior?

2008-03-11 Thread Sebastiaan van Erk

Sebastiaan van Erk wrote:

Johan Compagner wrote:

i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point


I agree.


and i guess that is WebPage.focusComponent()


I agree on that one too.


or maybe Form (but you could have 2)


Exactly, so not a good idea. The page should determine which form gets 
focus.



By the way we have focus support in ajax mode... see AjaxRequestTarget

johan


It would still be useful to have some strategies for selecting the 
component to focus lying around, so you can plug them in, e.g., first 
blank field, first error, etc. These strategies could then work on a 
form. If you have multiple forms on a page, you'll have to make up your 
own strategy to choose which form you focus, but you can still use the 
provided strategies once you've chosen that.


Regards,
Sebastiaan


Thinking about it some more, you probably want to delegate the *choice* 
of which form field is focused to the form which is selected for focus. 
That is, page decides which form to focus, form decides which field to 
focus. That way you can encapsulate complicated focusing behavior in the 
components themselves instead of having to put it the page. A good 
default behavior for a page could be to ask the first form in the 
component hierarchy which field to focus. Another good default is to 
focus nothing.


Regards,
Sebastiaan




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Default Focus Behavior?

2008-03-11 Thread Sebastiaan van Erk

Johan Compagner wrote:

i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point


I agree.


and i guess that is WebPage.focusComponent()


I agree on that one too.


or maybe Form (but you could have 2)


Exactly, so not a good idea. The page should determine which form gets 
focus.



By the way we have focus support in ajax mode... see AjaxRequestTarget

johan


It would still be useful to have some strategies for selecting the 
component to focus lying around, so you can plug them in, e.g., first 
blank field, first error, etc. These strategies could then work on a 
form. If you have multiple forms on a page, you'll have to make up your 
own strategy to choose which form you focus, but you can still use the 
provided strategies once you've chosen that.


Regards,
Sebastiaan





On Tue, Mar 11, 2008 at 12:41 PM, James Carman [EMAIL PROTECTED]
wrote:


On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:

Another option would be (if there is enough interest) to add it to
 wicketstuff minis.


Yeah, I thought about that.  And, I may try to put that in there.
Perhaps there could be a few focus behaviors in there?  Perhaps even a
FocusBehaviors class with static helper methods:

public FocusBehaviors
{
 public static void focusOnLoad(FormComponent fc);
 public static void focusFirstError(Form form);
}

Something like that.

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






smime.p7s
Description: S/MIME Cryptographic Signature


Re: RequestUtils.toAbsolutePath() bug ?

2008-03-11 Thread Martijn Dashorst
Add a jira issue please.

Martijn

On 3/11/08, smallufo [EMAIL PROTECTED] wrote:
 It seems RequestUtils.toAbsolutePath() has a bug regarding to UTF-8 encoded
  page parameter :

  I have a bookmarkable page  , which takes a UTF-8 encoded parameter place
  :

  private PageParameters pps;
  pps.put(place, URLEncoder.encode(place , UTF-8));

  In this Page , I have a TextField that prints the URL for this page (for
  users to copy) :
  String url = RequestUtils.toAbsolutePath();
 TextField resultUrl;
 resultUrl = new TextField(resultUrl);
 resultUrl.setModel(new Model( url ));
 resultUrl.setEscapeModelStrings(false);
 resultUrl.setOutputMarkupId(true);
 add(resultUrl);


  For example , 台北市 (meaning Chinese word : Taipei ) is encoded correctly
  to :
  place/%25E5%258F%25B0%25E5%258C%2597%25E5%25B8%2582
  And it is correctly shown in the browser URL bar.

  But incorrect in the textfield :
  place/%E5%8F%B0%E5%8C%97%E5%B8%82

  Is it a bug ? If not , how to solve it ?



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


Disable ajaxbutton until process is done

2008-03-11 Thread Mathias P.W Nilsson

Hi!

I have IndicatingAjaxButton that overloads the onSubmit. When user clicks
everything works great but I need to disable the button immediately after
the user has click the button so that it can't happen twice. I've tried with
this.setEnabled(false); target.addComponent(this); in the onSubmit but it
happens to late. 

How can I disable the input type button?
-- 
View this message in context: 
http://www.nabble.com/Disable-ajaxbutton-until-process-is-done-tp15976490p15976490.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: AjaxFallbackDefaultDataTable and DropDownChoice

2008-03-11 Thread jnorris

Thanks Martijn! 

Adding the ddc to a panel worked.

Jim


Martijn Dashorst wrote:
 
 Instead of directly adding the DDC to the column, add a panel or
 fragment containing the DDC.
 
 Martijn
 
 On 3/10/08, jnorris [EMAIL PROTECTED] wrote:

  Hi All,

  I have implemented an AjaxFallbackDefaultDataTable and would like to put
 a
  DropDownChoice in one of the columns to list values.  For example in a
 table
  of users a roles column would show the roles assigned to the user as a
  dropdown list.  I haven't been able to find any examples of doing this. 
 If
  anyone has already done something like this or has any suggestions on
 how to
  do it, I'd appreciate the help.  I tried to extend AbstractColumn but
  couldn't get it to work due to cellItem.add( ddc ) throwing an exception
  (Component cell must be applied to a tag of type 'select', not '' ).

  Thanks,
  Jim



  --
  View this message in context:
 http://www.nabble.com/AjaxFallbackDefaultDataTable-and-DropDownChoice-tp15950744p15950744.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.1 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable-and-DropDownChoice-tp15950744p15976495.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: Disable ajaxbutton until process is done

2008-03-11 Thread Gerolf Seitz
override getAjaxCallDecorator (or something like this) and return a new
IAjaxCallDecorator which appends javascript like this.disabled=true in
decorateScript() and maybe activates the button with js returned in
decorateSuccessScript() and/or decorateFailureScript.

  Gerolf

On Tue, Mar 11, 2008 at 1:53 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 Hi!

 I have IndicatingAjaxButton that overloads the onSubmit. When user clicks
 everything works great but I need to disable the button immediately after
 the user has click the button so that it can't happen twice. I've tried
 with
 this.setEnabled(false); target.addComponent(this); in the onSubmit but it
 happens to late.

 How can I disable the input type button?
 --
 View this message in context:
 http://www.nabble.com/Disable-ajaxbutton-until-process-is-done-tp15976490p15976490.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: Double submit problem

2008-03-11 Thread hillj2

That would require me to either implement markup inheritance or to place the
hidden field in the markup of all my extended forms, wouldn't it?  I was
hoping to make all my form instances as ignorant of the base class as
possible, but I guess if I have to implement one of these solutions, it's
better than having it not work at all.

I assume the input variable is the value of the hidden field?

Also, if the validation fails, can I still send the user to a custom error
page instead of just putting an error message in the feedback panel?  Sorry,
I haven't dealt much with validators.  I usually just validate form data
manually in onSubmit.

I'll start working with this solution and see what I can come up with. 
OnUnload isn't working our for me so far.  Partly because I can't attach the
event to the page with the way my code is currently set up.

Thanks for the suggestion.

Joel
-- 
View this message in context: 
http://www.nabble.com/Double-submit-problem-tp15957979p15976496.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: IntelliJ WicketForge issue: NPE when trying to use New Wicket Page to create both Java and markup

2008-03-11 Thread Nick Heudecker
I'll dig into it today.  Thanks for the report.

On Tue, Mar 11, 2008 at 6:40 AM, Kevin Murphy [EMAIL PROTECTED]
wrote:

 This is not a high-priority issue, but it seems that it should be pretty
 trivial for the maintainer to fix.

 What steps will reproduce the problem?

 1. Add New Wicket Page to Project View Popup Menu via Customizations
 2. Right-click on a folder containing Wicket source files, and choose
 New/New Wicket Page
 3. Check Create associated markup file
 4. Click OK
 5. NPE error

 What is the expected output? What do you see instead?

 The Java file is created.  The HTML file is not.

 What version of the product are you using? On what operating system?

 WicketForge 0.3.1 with IntelliJ IDEA 7.0.3


 Regards,
 Kevin


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




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
 i still think that behaviors to control focus is a bit wrong
  focus should have 1 entry point
  and i guess that is WebPage.focusComponent()
  or maybe Form (but you could have 2)
  By the way we have focus support in ajax mode... see AjaxRequestTarget

So, who calls WebPage.focusComponent()?

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



RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Sorry again... just only one thing more (I promise this is the last).
Taking your advice as starting point... is there any way to add the
feedback message produced by the error to the image alt attribute?

Thanks again for all your help.

-Mensaje original-
De: Alonso Sanchez, Daniel [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:45
Para: users@wicket.apache.org
Asunto: RE: How can i Customize the style of Feedback Messages ?

Fantastic! Sorry for disturbing :P Thanks again 

-Mensaje original-
De: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:39
Para: users@wicket.apache.org
Asunto: Re: How can i Customize the style of Feedback Messages ?

 The things is that if there is an error, a red * is showed, not the
 image file I want... what things am I doing wrong?


subclass FormComponentFeedbackIndicator and provide your own markup:

MyFCFI.java:
class MyFCFI extends FormComponentFeedbackIndicator {
  ...
}

MyFcFI.html:
wicket:panelimg src=error.png//wicket:panel

  Gerolf



 Thanks again to everybody



 -Mensaje original-
 De: Gerolf Seitz [mailto:[EMAIL PROTECTED]
 Enviado el: martes, 11 de marzo de 2008 12:10
 Para: users@wicket.apache.org
 Asunto: Re: How can i Customize the style of Feedback Messages ?

 
  My goal is to show an image icon next to each erroneous input field
:D
 

 see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf

 -
 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: Double submit problem

2008-03-11 Thread richardwilko

Inside your onSubmit method do this

if(!submitted)
{
//normal submit code

submitted = true;
}

and have boolean submitted = false; in your class

that way no matter how many times someone clicks submit the submit code
should only run once

Thats one way anyway




hillj2 wrote:
 
 That would require me to either implement markup inheritance or to place
 the hidden field in the markup of all my extended forms, wouldn't it?  I
 was hoping to make all my form instances as ignorant of the base class as
 possible, but I guess if I have to implement one of these solutions, it's
 better than having it not work at all.
 
 I assume the input variable is the value of the hidden field?
 
 Also, if the validation fails, can I still send the user to a custom error
 page instead of just putting an error message in the feedback panel? 
 Sorry, I haven't dealt much with validators.  I usually just validate form
 data manually in onSubmit.
 
 I'll start working with this solution and see what I can come up with. 
 OnUnload isn't working our for me so far.  Partly because I can't attach
 the event to the page with the way my code is currently set up.
 
 Thanks for the suggestion.
 
 Joel
 

-- 
View this message in context: 
http://www.nabble.com/Double-submit-problem-tp15957979p15976516.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: Default Focus Behavior?

2008-03-11 Thread Johan Compagner
you do

WebPage.focusComponent(textField)

johan

On Tue, Mar 11, 2008 at 2:30 PM, James Carman [EMAIL PROTECTED]
wrote:

 On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
  i still think that behaviors to control focus is a bit wrong
   focus should have 1 entry point
   and i guess that is WebPage.focusComponent()
   or maybe Form (but you could have 2)
   By the way we have focus support in ajax mode... see AjaxRequestTarget

 So, who calls WebPage.focusComponent()?

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




Re: SSL

2008-03-11 Thread Johan Compagner
wicket doesn't redirect to a full url
wicket only uses relative onces so if you type

https://server/

then that first part https://server will not be changed by wicket



On Tue, Mar 11, 2008 at 10:15 AM, Tormod Øverlier [EMAIL PROTECTED]
wrote:


 I'm trying to use SSL on certain pages in my application by using the
 description for Wicket 1.3 in the wiki. However, when I access a page with
 SSL, I'm always redirected to the start page. I see that the
 respond-method
 in my WebRequestCycleProcessor is called 3 times. The first time, it calls
 webReponse.reponse() with a SSL enabled url, but without the
 ?wicket:interface stuff behind. The second and third time, it sets the
 url
 to a non-SSL url pointing to the start page.

 I have set the render strategy according to the description in the wiki.

 1. Any suggestions to my specific problem?
 2. Are there any plans to include a more direct support for SSL in future
 versions of Wicket?

 Thanks. Tormod.
 --
 View this message in context:
 http://www.nabble.com/SSL-tp15975713p15975713.html
 Sent from the Wicket - User mailing list archive at 
 Nabble.comhttp://nabble.com/
 .


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




Re: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
 you do

  WebPage.focusComponent(textField)

I mean, in what class?  Your page class?  In a component class?  I'm
just trying to understand what the difference is between doing
WebPage.focusComponent(textField) or textField.add(new
FocuOnLoadBehavior())?  If it's the same code that would be calling
either one, it's just a matter of *how* it's being set up.  It's not a
matter of responsibility going to the correct place.

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



Explanation of Wicket session management

2008-03-11 Thread Rajiv Jivan
I am having a tough time understanding how sessions are
created/managed specifically related to the calls

public RequestCycle newRequestCycle(Request request, Response response)

and

public Session newSession(Request request, Response response)

I am creating a new session by overriding the method newSession and
doing something like

public Session newSession(Request request, Response response) {
   ..
   Session session = new Session(request);
   return session;
}

This works fine. On subsequent calls, newSession isn't called as a
session is already in place. This is working as expected.

What isn't working is the call
to Session.exists(), this is always returning false when its invoked
in the method newRequestCycle which I override.

public RequestCycle newRequestCycle(Request request, Response response) {
if(Session.exists()  certain condiition is met) {   - The
method Session.exists() is always returning false
 Session  mySession = Session.get();
 mySession.invalidateNow();
}
}
}

Can someone explain why Session.exists() always returns false, and if
the session truly doesn't exist why newSession isn't called after the
first invocation

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



Re: RequestUtils.toAbsolutePath() bug ?

2008-03-11 Thread smallufo
Thank you.
I've create an issue WICKET-1413
https://issues.apache.org/jira/browse/WICKET-1413


在 2008/3/11,Martijn Dashorst [EMAIL PROTECTED] 撰寫:

 Add a jira issue please.

 Martijn


 On 3/11/08, smallufo [EMAIL PROTECTED] wrote:
  It seems RequestUtils.toAbsolutePath() has a bug regarding to UTF-8
 encoded
   page parameter :
 
   I have a bookmarkable page  , which takes a UTF-8 encoded parameter
 place
   :
 
   private PageParameters pps;
   pps.put(place, URLEncoder.encode(place , UTF-8));
 
   In this Page , I have a TextField that prints the URL for this page
 (for
   users to copy) :
   String url = RequestUtils.toAbsolutePath();
  TextField resultUrl;
  resultUrl = new TextField(resultUrl);
  resultUrl.setModel(new Model( url ));
  resultUrl.setEscapeModelStrings(false);
  resultUrl.setOutputMarkupId(true);
  add(resultUrl);
 
 
   For example , 台北市 (meaning Chinese word : Taipei ) is encoded
 correctly
   to :
   place/%25E5%258F%25B0%25E5%258C%2597%25E5%25B8%2582
   And it is correctly shown in the browser URL bar.
 
   But incorrect in the textfield :
   place/%E5%8F%B0%E5%8C%97%E5%B8%82
 
   Is it a bug ? If not , how to solve it ?
 



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



Re: Default Focus Behavior?

2008-03-11 Thread Johan Compagner
MyPage()
{
 textField1.add(new FocuOnLoadBehavior());
 textField2.add(new FocuOnLoadBehavior());
 textField3.add(new FocuOnLoadBehavior());
}

which fields gets the focus?
On Tue, Mar 11, 2008 at 2:49 PM, James Carman [EMAIL PROTECTED]
wrote:

 On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
  you do
 
   WebPage.focusComponent(textField)

 I mean, in what class?  Your page class?  In a component class?  I'm
 just trying to understand what the difference is between doing
 WebPage.focusComponent(textField) or textField.add(new
 FocuOnLoadBehavior())?  If it's the same code that would be calling
 either one, it's just a matter of *how* it's being set up.  It's not a
 matter of responsibility going to the correct place.

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




Re: Default Focus Behavior?

2008-03-11 Thread Johan Compagner
and a behavior is really the wrong thing
Because who says if you render the page again that it has to again set the
focus on that one?

 MyPage()
{
 textField1.add(new FocuOnLoadBehavior());
 textField2.add(new FocuOnLoadBehavior());
 textField3.add(new FocuOnLoadBehavior());
 Form form = new Form()
{
  onSubmit()
{
   // validate fails on textfield4 so transfer focus to that one like
this:??
textField4.add(new FocuOnLoadBehavior());
}
}

what happens now?


On Tue, Mar 11, 2008 at 3:12 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 MyPage()
 {
  textField1.add(new FocuOnLoadBehavior());
  textField2.add(new FocuOnLoadBehavior());
  textField3.add(new FocuOnLoadBehavior());
 }

 which fields gets the focus?
   On Tue, Mar 11, 2008 at 2:49 PM, James Carman 
 [EMAIL PROTECTED] wrote:

  On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
   you do
  
WebPage.focusComponent(textField)
 
  I mean, in what class?  Your page class?  In a component class?  I'm
  just trying to understand what the difference is between doing
  WebPage.focusComponent(textField) or textField.add(new
  FocuOnLoadBehavior())?  If it's the same code that would be calling
  either one, it's just a matter of *how* it's being set up.  It's not a
  matter of responsibility going to the correct place.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: Default Focus Behavior?

2008-03-11 Thread Johan Compagner
that still wouldn't help adding 3 of them at once



On Tue, Mar 11, 2008 at 3:17 PM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 the behavior would have to be temporary.

 On Tue, Mar 11, 2008 at 3:14 PM, Johan Compagner [EMAIL PROTECTED]
  wrote:

  and a behavior is really the wrong thing
  Because who says if you render the page again that it has to again set
 the
  focus on that one?
 
   MyPage()
  {
   textField1.add(new FocuOnLoadBehavior());
   textField2.add(new FocuOnLoadBehavior());
   textField3.add(new FocuOnLoadBehavior());
   Form form = new Form()
  {
   onSubmit()
  {
// validate fails on textfield4 so transfer focus to that one like
  this:??
 textField4.add(new FocuOnLoadBehavior());
  }
  }
 
  what happens now?
 
 
  On Tue, Mar 11, 2008 at 3:12 PM, Johan Compagner [EMAIL PROTECTED]
  wrote:
 
   MyPage()
   {
textField1.add(new FocuOnLoadBehavior());
textField2.add(new FocuOnLoadBehavior());
textField3.add(new FocuOnLoadBehavior());
   }
  
   which fields gets the focus?
 On Tue, Mar 11, 2008 at 2:49 PM, James Carman 
   [EMAIL PROTECTED] wrote:
  
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
 you do

  WebPage.focusComponent(textField)
   
I mean, in what class?  Your page class?  In a component class?  I'm
just trying to understand what the difference is between doing
WebPage.focusComponent(textField) or textField.add(new
FocuOnLoadBehavior())?  If it's the same code that would be calling
either one, it's just a matter of *how* it's being set up.  It's not
 a
matter of responsibility going to the correct place.
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 


th


Re: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Gerolf Seitz [EMAIL PROTECTED] wrote:
 the behavior would have to be temporary.

Yes, the behaviors stay with the component.  I guess that would screw
this up! :)

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



Re: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
 that still wouldn't help adding 3 of them at once


Well, adding three of them like this would just be stupid. :)  It
wouldn't really break anything.  The last one that gets rendered would
probably get the focus, since it would be the last one to contribute
its head contribution.

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



Re: Default Focus Behavior?

2008-03-11 Thread Johan Compagner
yes so it is not the last one you ask to have focus on
Very confusing for an average user

thats why there should be a single point just like
AjaxRequestTarget.focusComponent() works.

johan



On Tue, Mar 11, 2008 at 3:24 PM, James Carman [EMAIL PROTECTED]
wrote:

 On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
  that still wouldn't help adding 3 of them at once
 

 Well, adding three of them like this would just be stupid. :)  It
 wouldn't really break anything.  The last one that gets rendered would
 probably get the focus, since it would be the last one to contribute
 its head contribution.

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




Re: Default Focus Behavior?

2008-03-11 Thread Gerolf Seitz
the behavior would have to be temporary.

On Tue, Mar 11, 2008 at 3:14 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 and a behavior is really the wrong thing
 Because who says if you render the page again that it has to again set the
 focus on that one?

  MyPage()
 {
  textField1.add(new FocuOnLoadBehavior());
  textField2.add(new FocuOnLoadBehavior());
  textField3.add(new FocuOnLoadBehavior());
  Form form = new Form()
 {
  onSubmit()
 {
   // validate fails on textfield4 so transfer focus to that one like
 this:??
textField4.add(new FocuOnLoadBehavior());
 }
 }

 what happens now?


 On Tue, Mar 11, 2008 at 3:12 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:

  MyPage()
  {
   textField1.add(new FocuOnLoadBehavior());
   textField2.add(new FocuOnLoadBehavior());
   textField3.add(new FocuOnLoadBehavior());
  }
 
  which fields gets the focus?
On Tue, Mar 11, 2008 at 2:49 PM, James Carman 
  [EMAIL PROTECTED] wrote:
 
   On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
you do
   
 WebPage.focusComponent(textField)
  
   I mean, in what class?  Your page class?  In a component class?  I'm
   just trying to understand what the difference is between doing
   WebPage.focusComponent(textField) or textField.add(new
   FocuOnLoadBehavior())?  If it's the same code that would be calling
   either one, it's just a matter of *how* it's being set up.  It's not a
   matter of responsibility going to the correct place.
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 



Re: Explanation of Wicket session management

2008-03-11 Thread Martijn Dashorst
Did you read the javadoc for Session#exists() ?

http://wicket.sourceforge.net/apidocs/wicket/Session.html#exists()

Checks if the Session threadlocal is set in this thread

So not if the session was created or not.

Martijn


On 3/11/08, Rajiv Jivan [EMAIL PROTECTED] wrote:
 I am having a tough time understanding how sessions are
  created/managed specifically related to the calls

  public RequestCycle newRequestCycle(Request request, Response response)

  and

  public Session newSession(Request request, Response response)

  I am creating a new session by overriding the method newSession and
  doing something like

  public Session newSession(Request request, Response response) {
..
Session session = new Session(request);
return session;
  }

  This works fine. On subsequent calls, newSession isn't called as a
  session is already in place. This is working as expected.

  What isn't working is the call
  to Session.exists(), this is always returning false when its invoked
  in the method newRequestCycle which I override.

  public RequestCycle newRequestCycle(Request request, Response response) {
 if(Session.exists()  certain condiition is met) {   - The
  method Session.exists() is always returning false
  Session  mySession = Session.get();
  mySession.invalidateNow();
 }
  }
  }

  Can someone explain why Session.exists() always returns false, and if
  the session truly doesn't exist why newSession isn't called after the
  first invocation

  -
  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.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Re: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
 yes so it is not the last one you ask to have focus on
  Very confusing for an average user

  thats why there should be a single point just like
  AjaxRequestTarget.focusComponent() works.

Ok, you've sold me.  So, is this something that belongs in core?
Shouldn't the core have facilities for managing component focus?  The
Ajax folks shouldn't be the only ones who get this luxury. :)  Perhaps
an IFocusManager interface?  Would that go on the IRequestCycle (since
you can only focus one component per request) or on the Page?

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



Re: Get libs without installing Maven?

2008-03-11 Thread bob2

After reading this and other similar posts I'm still confused about how to
determine what exactly I need.  I am a new user and do not easily have
access to the internet.  I do not have/use Maven.  The jars listed below
came with the wicket 1.3.1 download in the lib dir.  I thought I'd be set
from there.  But at runtime using Tomcat 6 with an extremely simple page
everything blew up (no class def found errors, etc).  In the 1.3.1 download
I saw an examples.war that contained a bunch of other libs.  I pulled them
out 1 by 1 till I got my app to work/run.

Seems that these were required to get no errors:
commons-collections-3.2.jar
commons-lang-2.1.jar
log4j-1.2.13.jar
slf4j-simple-1.4.2.jar (if i tried different versions of slf4j I got errors,
1.3.0 to be exact)
slf4j-api-1.4.2.jar (if i tried different versions of slf4j I got errors,
1.3.0 to be exact)
velocity-1.4.jar
velocity-dep-1.4.jar

If any of these were missing I got errors.  If there is a single zip file
download for the Wicket framework then why doesn't it include the bare
minimum libraries to make it run.  Or at least a readme stating what is
required.


Thomas Singer-4 wrote:
 
 The binary distribution seems not to contain the dependent jars, but
 just 
 the own wicket jars. Here is the list of the lib directory:
 
 wicket-1.3.0-beta4.jar
 wicket-auth-roles-1.3.0-beta4.jar
 wicket-datetime-1.3.0-beta4.jar
 wicket-extensions-1.3.0-beta4.jar
 wicket-guice-1.3.0-beta4.jar
 wicket-ioc-1.3.0-beta4.jar
 wicket-jmx-1.3.0-beta4.jar
 wicket-objectsizeof-agent-1.3.0-beta4.jar
 wicket-spring-1.3.0-beta4.jar
 wicket-spring-annot-1.3.0-beta4.jar
 wicket-velocity-1.3.0-beta4.jar
 wicket-examples-1.3.0-beta4.war
 
 Tom
 
 
 Frank Bille wrote:
 There is always the standard distribution, which contains binaries and
 sources.
 
 http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4
 
 Frank
 
 On 10/25/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I'm currently trying to update from 1.4beta2 to 1.4beta4 by changing the
 revision of our project's wicket-external
 (http://svn.apache.org/repos/asf/wicket/trunk/jdk-1.4/wicket/src/main/java
 ).
 Unfortunately it does not build any more because it seems to require a
 new
 library.

 Where can I download the currently required jar files? I don't want to
 install maven for such a trivial task, because we don't need it for
 other
 stuff.

 --
 Thanks,
 Tom

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

-- 
View this message in context: 
http://www.nabble.com/Get-libs-without-installing-Maven--tp13403139p15976649.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: Default Focus Behavior?

2008-03-11 Thread Gerolf Seitz
how about boolean WebPage#isAutoFocusEnabled and the possibility
to provide several IFocusStrategy instances with different priority?
this would allow to eg only set the focus on the first formcomponent of the
first form if no other formcomponent has an error...

On Tue, Mar 11, 2008 at 3:36 PM, James Carman [EMAIL PROTECTED]
wrote:

 On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
  yes so it is not the last one you ask to have focus on
   Very confusing for an average user
 
   thats why there should be a single point just like
   AjaxRequestTarget.focusComponent() works.

 Ok, you've sold me.  So, is this something that belongs in core?
 Shouldn't the core have facilities for managing component focus?  The
 Ajax folks shouldn't be the only ones who get this luxury. :)  Perhaps
 an IFocusManager interface?  Would that go on the IRequestCycle (since
 you can only focus one component per request) or on the Page?

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




Re: Default Focus Behavior?

2008-03-11 Thread Johan Compagner
hmm the request cycle would be quite awful its not really there for that
kind of state
The problem is that the AjaxRequestTarget is in normal rendering something
like PageRequestTarget.

The problem is you cant really through it on a Page because the page can
maybe not be accessed
(if you have a panel that wants to try to set the focus on its first
component)

So then we are back at the that the only place where it could be on is the
RequestCycle yes.

johan



On Tue, Mar 11, 2008 at 3:36 PM, James Carman [EMAIL PROTECTED]
wrote:

 On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
  yes so it is not the last one you ask to have focus on
   Very confusing for an average user
 
   thats why there should be a single point just like
   AjaxRequestTarget.focusComponent() works.

 Ok, you've sold me.  So, is this something that belongs in core?
 Shouldn't the core have facilities for managing component focus?  The
 Ajax folks shouldn't be the only ones who get this luxury. :)  Perhaps
 an IFocusManager interface?  Would that go on the IRequestCycle (since
 you can only focus one component per request) or on the Page?

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




Re: Get libs without installing Maven?

2008-03-11 Thread bob2

Another note:

If I did what some posters suggested, such as remove
wicket-velocity-1.3.1.jar, I'd get errors on startup stating failure to
initialize velocity.


bob2 wrote:
 
 After reading this and other similar posts I'm still confused about how to
 determine what exactly I need.  I am a new user and do not easily have
 access to the internet.  I do not have/use Maven.  The jars listed below
 came with the wicket 1.3.1 download in the lib dir.  I thought I'd be set
 from there.  But at runtime using Tomcat 6 with an extremely simple page
 everything blew up (no class def found errors, etc).  In the 1.3.1
 download I saw an examples.war that contained a bunch of other libs.  I
 pulled them out 1 by 1 till I got my app to work/run.
 
 Seems that these were required to get no errors:
 commons-collections-3.2.jar
 commons-lang-2.1.jar
 log4j-1.2.13.jar
 slf4j-simple-1.4.2.jar (if i tried different versions of slf4j I got
 errors, 1.3.0 to be exact)
 slf4j-api-1.4.2.jar (if i tried different versions of slf4j I got errors,
 1.3.0 to be exact)
 velocity-1.4.jar
 velocity-dep-1.4.jar
 
 If any of these were missing I got errors.  If there is a single zip file
 download for the Wicket framework then why doesn't it include the bare
 minimum libraries to make it run.  Or at least a readme stating what is
 required.
 
 
 Thomas Singer-4 wrote:
 
 The binary distribution seems not to contain the dependent jars, but
 just 
 the own wicket jars. Here is the list of the lib directory:
 
 wicket-1.3.0-beta4.jar
 wicket-auth-roles-1.3.0-beta4.jar
 wicket-datetime-1.3.0-beta4.jar
 wicket-extensions-1.3.0-beta4.jar
 wicket-guice-1.3.0-beta4.jar
 wicket-ioc-1.3.0-beta4.jar
 wicket-jmx-1.3.0-beta4.jar
 wicket-objectsizeof-agent-1.3.0-beta4.jar
 wicket-spring-1.3.0-beta4.jar
 wicket-spring-annot-1.3.0-beta4.jar
 wicket-velocity-1.3.0-beta4.jar
 wicket-examples-1.3.0-beta4.war
 
 Tom
 
 
 Frank Bille wrote:
 There is always the standard distribution, which contains binaries and
 sources.
 
 http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4
 
 Frank
 
 On 10/25/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I'm currently trying to update from 1.4beta2 to 1.4beta4 by changing
 the
 revision of our project's wicket-external
 (http://svn.apache.org/repos/asf/wicket/trunk/jdk-1.4/wicket/src/main/java
 ).
 Unfortunately it does not build any more because it seems to require a
 new
 library.

 Where can I download the currently required jar files? I don't want to
 install maven for such a trivial task, because we don't need it for
 other
 stuff.

 --
 Thanks,
 Tom

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

-- 
View this message in context: 
http://www.nabble.com/Get-libs-without-installing-Maven--tp13403139p15976654.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: Default Focus Behavior?

2008-03-11 Thread James Carman
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
 hmm the request cycle would be quite awful its not really there for that
  kind of state
  The problem is that the AjaxRequestTarget is in normal rendering something
  like PageRequestTarget.

  The problem is you cant really through it on a Page because the page can
  maybe not be accessed
  (if you have a panel that wants to try to set the focus on its first
  component)

  So then we are back at the that the only place where it could be on is the
  RequestCycle yes.

Yeah, I didn't like RequestCycle at first either, but it seems like
the only place for it if you want to abstract it so that ajax and
non-ajax requests alike could access the IFocusManager.

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



Re: DropDownChoice getting value into the model

2008-03-11 Thread rmattler

I don't have time to work on this right now, have real work to do.  But I now
believe I understand my problem.  The Vendor bean needs to have the field
'state' be the class of State not String.  Now I just need to figure out how
to do that with Hibernate.

I did buy your book.  It is excellent everybody should buy one or two.  How
is that for a plug?

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-getting-value-into-the-model-tp15905486p1597.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: Default Focus Behavior?

2008-03-11 Thread Sebastiaan van Erk

Gerolf Seitz wrote:

how about boolean WebPage#isAutoFocusEnabled and the possibility
to provide several IFocusStrategy instances with different priority?
this would allow to eg only set the focus on the first formcomponent of the
first form if no other formcomponent has an error...


I like something like this idea, though I don't really see the need for 
the isAutoFocusEnabled?


If you have an IFocusStrategy with a method getFocusComponent() which 
returns the component that should get the focus, then null could mean 
none (i.e., no autofocus), and anything else could mean focus that 
component. You could just have 1 single IFocusStrategy on a page, and if 
you want to chain them just make a ChainingFocusStrategy (i.e., one of 
them returns null, then go to the next).


What I would also like is if components can have their own 
IFocusStrategy, so that you can use these to compose your focus strategy 
for the page. This way complex components can manage their own focus 
strategy and you don't break encapsulation.


This all amounts to a setFocusStrategy on Component, with the one in the 
page ultimately choosing the component which gets the focus.


Just some thoughts...

Regards,
Sebastiaan




On Tue, Mar 11, 2008 at 3:36 PM, James Carman [EMAIL PROTECTED]
wrote:


On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:

yes so it is not the last one you ask to have focus on
 Very confusing for an average user

 thats why there should be a single point just like
 AjaxRequestTarget.focusComponent() works.

Ok, you've sold me.  So, is this something that belongs in core?
Shouldn't the core have facilities for managing component focus?  The
Ajax folks shouldn't be the only ones who get this luxury. :)  Perhaps
an IFocusManager interface?  Would that go on the IRequestCycle (since
you can only focus one component per request) or on the Page?

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






smime.p7s
Description: S/MIME Cryptographic Signature


Lazy load exception wicket and hibernate

2008-03-11 Thread Mathias P.W Nilsson

Hi!

I'm using wicket with hibernate and spring. In my web.xml I have
OpenEntityManagerInViewFilter. But when trying to add a dataview to my
wicket page I get the org.hibernate.LazyInitializationException: could not
initialize proxy - the owning Session was closed. Anyone?
-- 
View this message in context: 
http://www.nabble.com/Lazy-load-exception-wicket-and-hibernate-tp15976668p15976668.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: Lazy load exception wicket and hibernate

2008-03-11 Thread James Carman
On 3/11/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

  Hi!

  I'm using wicket with hibernate and spring. In my web.xml I have
  OpenEntityManagerInViewFilter. But when trying to add a dataview to my
  wicket page I get the org.hibernate.LazyInitializationException: could not
  initialize proxy - the owning Session was closed. Anyone?

Are you using a detachable model or is the entity being stored with
the page (serialized)?

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



Re: Double submit problem

2008-03-11 Thread rmattler

You could do it with javascript.  Disable the button and change the button
label.

function saveForm(btn) {
eForm = document.forms[0];
btn.disabled=true;
btn.value='Please wait...';
eForm.submit();
return;

}

input type=button onclick=saveForm(this); setIsDocBeingSubmitted(true);
name=submitButtonName value=Save /
-- 
View this message in context: 
http://www.nabble.com/Double-submit-problem-tp15957979p15976673.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: Get libs without installing Maven?

2008-03-11 Thread Eelco Hillenius
On Tue, Mar 11, 2008 at 7:41 AM, bob2 [EMAIL PROTECTED] wrote:

  After reading this and other similar posts I'm still confused about how to
  determine what exactly I need.  I am a new user and do not easily have
  access to the internet.  I do not have/use Maven.  The jars listed below
  came with the wicket 1.3.1 download in the lib dir.  I thought I'd be set
  from there.  But at runtime using Tomcat 6 with an extremely simple page
  everything blew up (no class def found errors, etc).  In the 1.3.1 download
  I saw an examples.war that contained a bunch of other libs.  I pulled them
  out 1 by 1 till I got my app to work/run.

  Seems that these were required to get no errors:
  commons-collections-3.2.jar
  commons-lang-2.1.jar

 log4j-1.2.13.jar
  slf4j-simple-1.4.2.jar (if i tried different versions of slf4j I got errors,
  1.3.0 to be exact)
  slf4j-api-1.4.2.jar (if i tried different versions of slf4j I got errors,
  1.3.0 to be exact)
  velocity-1.4.jar
  velocity-dep-1.4.jar

  If any of these were missing I got errors.  If there is a single zip file
  download for the Wicket framework then why doesn't it include the bare
  minimum libraries to make it run.  Or at least a readme stating what is
  required.

That's definitively more than the required minimum for Wicket. Look at
the dependencies your example app has and look at any libs you pulled
in with it.

Eelco

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



Re: Get libs without installing Maven?

2008-03-11 Thread Eelco Hillenius
On Tue, Mar 11, 2008 at 7:45 AM, bob2 [EMAIL PROTECTED] wrote:

  Another note:

  If I did what some posters suggested, such as remove
  wicket-velocity-1.3.1.jar, I'd get errors on startup stating failure to
  initialize velocity.

How can you get velocity errors if you're not using velocity or
wicket-velocity anymore?

Eelco

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



Re: Explanation of Wicket session management

2008-03-11 Thread Rajiv Jivan
Yes I did. I was assuming that once newSession is called, on
subsequent calls, the session will be set on a thread local variable.
If that is not the case, what would be the right way to check if a
session has been created.

On Tue, Mar 11, 2008 at 10:32 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 Did you read the javadoc for Session#exists() ?

  http://wicket.sourceforge.net/apidocs/wicket/Session.html#exists()

  Checks if the Session threadlocal is set in this thread

  So not if the session was created or not.

  Martijn




  On 3/11/08, Rajiv Jivan [EMAIL PROTECTED] wrote:
   I am having a tough time understanding how sessions are
created/managed specifically related to the calls
  
public RequestCycle newRequestCycle(Request request, Response response)
  
and
  
public Session newSession(Request request, Response response)
  
I am creating a new session by overriding the method newSession and
doing something like
  
public Session newSession(Request request, Response response) {
  ..
  Session session = new Session(request);
  return session;
}
  
This works fine. On subsequent calls, newSession isn't called as a
session is already in place. This is working as expected.
  
What isn't working is the call
to Session.exists(), this is always returning false when its invoked
in the method newRequestCycle which I override.
  
public RequestCycle newRequestCycle(Request request, Response response) {
   if(Session.exists()  certain condiition is met) {   - The
method Session.exists() is always returning false
Session  mySession = Session.get();
mySession.invalidateNow();
   }
}
}
  
Can someone explain why Session.exists() always returns false, and if
the session truly doesn't exist why newSession isn't called after the
first invocation
  
-
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.1 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

  -
  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: Explanation of Wicket session management

2008-03-11 Thread Johan Compagner
RequestCycle is first made and the the Session is being resolved.
Because the session creation code needs the request cycle first.
So thats why your code doesn't work

that test that you want should be done in Requestcycle.onBeginRequest

On Tue, Mar 11, 2008 at 4:47 PM, Rajiv Jivan [EMAIL PROTECTED] wrote:

 Yes I did. I was assuming that once newSession is called, on
 subsequent calls, the session will be set on a thread local variable.
 If that is not the case, what would be the right way to check if a
 session has been created.

 On Tue, Mar 11, 2008 at 10:32 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
  Did you read the javadoc for Session#exists() ?
 
   http://wicket.sourceforge.net/apidocs/wicket/Session.html#exists()
 
   Checks if the Session threadlocal is set in this thread
 
   So not if the session was created or not.
 
   Martijn
 
 
 
 
   On 3/11/08, Rajiv Jivan [EMAIL PROTECTED] wrote:
I am having a tough time understanding how sessions are
 created/managed specifically related to the calls
   
 public RequestCycle newRequestCycle(Request request, Response
 response)
   
 and
   
 public Session newSession(Request request, Response response)
   
 I am creating a new session by overriding the method newSession and
 doing something like
   
 public Session newSession(Request request, Response response) {
   ..
   Session session = new Session(request);
   return session;
 }
   
 This works fine. On subsequent calls, newSession isn't called as a
 session is already in place. This is working as expected.
   
 What isn't working is the call
 to Session.exists(), this is always returning false when its invoked
 in the method newRequestCycle which I override.
   
 public RequestCycle newRequestCycle(Request request, Response
 response) {
if(Session.exists()  certain condiition is met) {   -
 The
 method Session.exists() is always returning false
 Session  mySession = Session.get();
 mySession.invalidateNow();
}
 }
 }
   
 Can someone explain why Session.exists() always returns false, and
 if
 the session truly doesn't exist why newSession isn't called after
 the
 first invocation
   
   
  -
 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.1 is released
   Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
 
   -
   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: Get libs without installing Maven?

2008-03-11 Thread bob2

I am now aware that I did make a mistake and that most of those jars were
only required because I included all of the wicket--1.3.1.jar's in the
lib folder.  Removing all the ones that I was not using only required me to
keep the slf4j jars and a log4j jar.

I am still curious though why required dependencies aren't included as part
of the project.


bob2 wrote:
 
 Another note:
 
 If I did what some posters suggested, such as remove
 wicket-velocity-1.3.1.jar, I'd get errors on startup stating failure to
 initialize velocity.
 
 
 bob2 wrote:
 
 After reading this and other similar posts I'm still confused about how
 to determine what exactly I need.  I am a new user and do not easily have
 access to the internet.  I do not have/use Maven.  The jars listed below
 came with the wicket 1.3.1 download in the lib dir.  I thought I'd be set
 from there.  But at runtime using Tomcat 6 with an extremely simple page
 everything blew up (no class def found errors, etc).  In the 1.3.1
 download I saw an examples.war that contained a bunch of other libs.  I
 pulled them out 1 by 1 till I got my app to work/run.
 
 Seems that these were required to get no errors:
 commons-collections-3.2.jar
 commons-lang-2.1.jar
 log4j-1.2.13.jar
 slf4j-simple-1.4.2.jar (if i tried different versions of slf4j I got
 errors, 1.3.0 to be exact)
 slf4j-api-1.4.2.jar (if i tried different versions of slf4j I got errors,
 1.3.0 to be exact)
 velocity-1.4.jar
 velocity-dep-1.4.jar
 
 If any of these were missing I got errors.  If there is a single zip file
 download for the Wicket framework then why doesn't it include the bare
 minimum libraries to make it run.  Or at least a readme stating what is
 required.
 
 
 Thomas Singer-4 wrote:
 
 The binary distribution seems not to contain the dependent jars, but
 just 
 the own wicket jars. Here is the list of the lib directory:
 
 wicket-1.3.0-beta4.jar
 wicket-auth-roles-1.3.0-beta4.jar
 wicket-datetime-1.3.0-beta4.jar
 wicket-extensions-1.3.0-beta4.jar
 wicket-guice-1.3.0-beta4.jar
 wicket-ioc-1.3.0-beta4.jar
 wicket-jmx-1.3.0-beta4.jar
 wicket-objectsizeof-agent-1.3.0-beta4.jar
 wicket-spring-1.3.0-beta4.jar
 wicket-spring-annot-1.3.0-beta4.jar
 wicket-velocity-1.3.0-beta4.jar
 wicket-examples-1.3.0-beta4.war
 
 Tom
 
 
 Frank Bille wrote:
 There is always the standard distribution, which contains binaries and
 sources.
 
 http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4
 
 Frank
 
 On 10/25/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I'm currently trying to update from 1.4beta2 to 1.4beta4 by changing
 the
 revision of our project's wicket-external
 (http://svn.apache.org/repos/asf/wicket/trunk/jdk-1.4/wicket/src/main/java
 ).
 Unfortunately it does not build any more because it seems to require a
 new
 library.

 Where can I download the currently required jar files? I don't want to
 install maven for such a trivial task, because we don't need it for
 other
 stuff.

 --
 Thanks,
 Tom

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

-- 
View this message in context: 
http://www.nabble.com/Get-libs-without-installing-Maven--tp13403139p15977370.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]



Is there an ajax WizardButton to use in a wizard inside a ModalWindow?

2008-03-11 Thread AshleyAbraham

Hi everyone, 
I am using a Wizard inside a ModalWindow and I am trying to close the
ModalWindow when the CancelButton or FinishButton is clicked. When one of
those button's are clicked nothing happens, and I've found out that I need
to use either AjaxButton or AjaxLink to make it work. Is there an
AjaxWizardButton available to use in Wicket? basically I am looking for
AjaxCancelButton and AjaxFinishButton.

I have created my own...but I didn't want to redo something which is
available already. Please advice if there is an easy to do what I am trying
to do?

here is what I have

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.extensions.wizard.IWizard;
import org.apache.wicket.extensions.wizard.IWizardModel;
import org.apache.wicket.extensions.wizard.WizardButton;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.ResourceModel;

public abstract class AjaxWizardButton extends AjaxButton {

private static final long serialVersionUID = 1L;
private final IWizard wizard;

public AjaxWizardButton(String id, IWizard wizard, final Form form,
String labelResourceKey){
super(id, form);
this.setLabel(new ResourceModel(labelResourceKey));
this.wizard = wizard;
}

public AjaxWizardButton(String id, IWizard wizard, String
labelResourceKey)
{
this(id, wizard, null, labelResourceKey);
}

protected final IWizard getWizard()
{
return wizard;
}

protected final IWizardModel getWizardModel()
{
return getWizard().getWizardModel();
}
   
protected final void onSubmit(AjaxRequestTarget target, Form form){
onClick(target, form);
}

protected abstract void onClick(AjaxRequestTarget target, Form form);
}

Thanks
Ashley
-- 
View this message in context: 
http://www.nabble.com/Is-there-an-ajax-WizardButton-to-use-in-a-wizard-inside-a-ModalWindow--tp15978434p15978434.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: wicket-datetime

2008-03-11 Thread Hoover, William
It looks like the datetime component has major issues of its own that make it 
virtually unusable (https://issues.apache.org/jira/browse/WICKET-1412). 

-Original Message-
From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2008 12:13 PM
To: users@wicket.apache.org
Subject: Re: wicket-datetime


  I'd potentially like to use this component, but its putting a ridiculous
  amount of markup into the script section in the head.  Including a copy of
  the license...

Licenses are only included/ not filtered out when Wicket runs in
development mode.

  Also, if I add 2 date pickers it puts all the JS in the head... twice!!
  (including the license), .. how can I get it to reuse the same javascript.

No, not all. Just the JS that is used for initializing an instance.
The shared JS from YUI is only included once for all instances.

  Is this library intended for demo only?

Of course not.

We'll have to look closely at where we can optimize the per-instance
initialization code. It looks like it has grown too much after several
localization additions.

Eelco

-
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: Global Exception Handling...

2008-03-11 Thread Igor Vaynberg
On Tue, Mar 11, 2008 at 3:30 AM, James Carman
[EMAIL PROTECTED] wrote:
  Okay, so it's common to do your own request cycle implementation.  I
  didn't realize that.  In Tapestry, RequestCycle wasn't something you
  monkeyed around with much.

yep, its pretty common.

  So, you're saying that I would store my exception handler registry
  as metadata entries on the Application class?  I would maybe store my
  MapClass,IRuntimeExceptionHandler?  What would the MetaDataKey be?

you would create your own, preferrably inner private, subclass of
MetaDataKey and use that. that way no body but you can access those
entries.

  I just don't want to force users to subclass a custom WebApplication
  class.

thus my suggestion of using metadata

 I'd rather have the IRuntimeRequestHandlers registered with
  IRequestCycleSettings (or the IExceptionSettings, maybe?).

well, another thing here is that there are two ways of setting this
up. one way is to push handlers into the request cycle, another way is
to have request cycle lookup the handlers from some registry. if i
were using spring, as i assume you are, i would create a registry bean
for the handlers that would live in spring context and collect all the
beans. the request cycle would then simply lookup this registry bean
and iterate over registered handlers.

this is kinda why we try not to put things like this into core.
implementations vary a lot based on how your architecture is setup and
forcing one particular way makes code for others inelegant...

-igor

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



Re: Global Exception Handling...

2008-03-11 Thread Igor Vaynberg
On Tue, Mar 11, 2008 at 3:51 AM, James Carman
[EMAIL PROTECTED] wrote:
  By the way, I can create a patch for this stuff if you like.  I guess
  the decision needs to be made about where the registry
  (MapClass,IRuntimeExceptionHandler) needs to go.  Does it belong in
  IRequestCycleSettings or IExceptionSettings?

i think you should hold off on the patch until you have settled down
on how you want to do this

 And, do you want me to
  apply it to my already existing code which splits up Settings into
  multiple default implementations (which you guys said we should hold
  off on for 1.4.x)?

we havent decided if we are going to apply that patch or not, just
that we cant even start thinking about it until 1.4. i would say its
safer to create a patch off standard trunk.

  Perhaps there could be logic in there that checks to see if the
  requested Page object which caused the RuntimeException implements
  IRuntimeExceptionHandler also.  That way, an individual page could
  override the global behavior if they wish.  Just a thought.

that might make sense. but you have to realize that Page is a pretty
coarse scope for something like this. a lot of applications consist of
few pages that only act as containers for panels that are swapped in
and out, so i can have an application that is made up of one page and
everything else is madeup of panels that i swap in and out in that
main container page...

-igor

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



Palette labels

2008-03-11 Thread Juliano Gaio
Hi All,

I would like to internationalize these palette labels (Available and 
Selected), How can I do that?

I'm using wicket version 1.2.

Thank you.

Juliano.

Re: Get libs without installing Maven?

2008-03-11 Thread Igor Vaynberg
indeed. and latest versions of maven have quiet a nice new toy

C:\dev\src\wicketmvn dependency:tree
[INFO] 
[INFO] Building Wicket
[INFO]task-segment: [dependency:tree]
[INFO] 
[INFO] [dependency:tree]
[INFO] org.apache.wicket:wicket:jar:1.3-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:provided
[INFO] +- javax.servlet:servlet-api:jar:2.3:provided
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:test
[INFO] |  \- log4j:log4j:jar:1.2.13:test
[INFO] +- org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO] +- javax.portlet:portlet-api:jar:1.0:provided
[INFO] \- org.apache.portals.bridges:portals-bridges-common:jar:1.0.3:provided
[INFO] 
[INFO] Building Wicket Extensions
[INFO]task-segment: [dependency:tree]
[INFO] 
[INFO] [dependency:tree]
[INFO] org.apache.wicket:wicket-extensions:jar:1.3-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:provided
[INFO] +- javax.servlet:servlet-api:jar:2.3:provided
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:test
[INFO] |  \- log4j:log4j:jar:1.2.13:test
[INFO] +- org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO] +- org.apache.wicket:wicket:jar:1.3-SNAPSHOT:compile
[INFO] +- org.apache.wicket:wicket:jar:tests:1.3-SNAPSHOT:test
[INFO] \- commons-collections:commons-collections:jar:3.2:compile
[INFO] 
[INFO] Building Wicket IoC common code
[INFO]task-segment: [dependency:tree]
[INFO] 
[INFO] [dependency:tree]
[INFO] org.apache.wicket:wicket-ioc:jar:1.3-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:provided
[INFO] +- javax.servlet:servlet-api:jar:2.3:provided
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:test
[INFO] |  \- log4j:log4j:jar:1.2.13:test
[INFO] +- org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO] +- org.apache.wicket:wicket:jar:1.3-SNAPSHOT:compile
[INFO] +- cglib:cglib-nodep:jar:2.1_3:compile
[INFO] \- easymock:easymock:jar:1.2_Java1.3:provided
[INFO] 
[INFO] Building Wicket Spring Integration
[INFO]task-segment: [dependency:tree]
[INFO] 
[INFO] [dependency:tree]
[INFO] org.apache.wicket:wicket-spring:jar:1.3-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:provided
[INFO] +- javax.servlet:servlet-api:jar:2.3:provided
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:test
[INFO] |  \- log4j:log4j:jar:1.2.13:test
[INFO] +- org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO] +- org.apache.wicket:wicket:jar:1.3-SNAPSHOT:compile
[INFO] +- org.apache.wicket:wicket-ioc:jar:1.3-SNAPSHOT:compile
[INFO] |  \- cglib:cglib-nodep:jar:2.1_3:compile
[INFO] +- org.springframework:spring:jar:2.0:compile
[INFO] |  \- commons-logging:commons-logging:jar:1.1:compile
[INFO] \- easymock:easymock:jar:1.2_Java1.3:provided
[INFO] 
[INFO] Building Wicket Quickstart
[INFO]task-segment: [dependency:tree]
[INFO] 
[INFO] [dependency:tree]
[INFO] org.apache.wicket:wicket-quickstart:war:1.3-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:provided
[INFO] +- javax.servlet:servlet-api:jar:2.3:provided
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:compile
[INFO] |  \- log4j:log4j:jar:1.2.13:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO] +- org.apache.wicket:wicket:jar:1.3-SNAPSHOT:compile
[INFO] +- org.apache.wicket:wicket-extensions:jar:1.3-SNAPSHOT:compile
[INFO] |  \- commons-collections:commons-collections:jar:3.2:compile
[INFO] +- org.mortbay.jetty:jetty:jar:6.1.5:provided
[INFO] |  \- org.mortbay.jetty:servlet-api-2.5:jar:6.1.5:provided
[INFO] \- org.mortbay.jetty:jetty-util:jar:6.1.5:provided
[INFO] 
[INFO] Building Wicket Date/Time
[INFO]task-segment: [dependency:tree]
[INFO] 
[INFO] [dependency:tree]
[INFO] org.apache.wicket:wicket-datetime:jar:1.3-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:provided
[INFO] +- javax.servlet:servlet-api:jar:2.3:provided
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:test
[INFO] |  \- log4j:log4j:jar:1.2.13:test
[INFO] +- org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO] +- org.apache.wicket:wicket:jar:1.3-SNAPSHOT:compile
[INFO] \- joda-time:joda-time:jar:1.4:compile
[INFO] 
[INFO] Building Wicket Velocity
[INFO]task-segment: [dependency:tree]
[INFO] 
[INFO] [dependency:tree]
[INFO] 

Re: Palette labels

2008-03-11 Thread Igor Vaynberg
subclass it and provide a .properties file for the subclass

-igor


On Tue, Mar 11, 2008 at 10:59 AM, Juliano Gaio [EMAIL PROTECTED] wrote:
 Hi All,

  I would like to internationalize these palette labels (Available and 
 Selected), How can I do that?

  I'm using wicket version 1.2.

  Thank you.

  Juliano.

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



Re: Disable ajaxbutton until process is done

2008-03-11 Thread Mathias P.W Nilsson

OK! I'm a newbie so could please enhance this a little?
-- 
View this message in context: 
http://www.nabble.com/Disable-ajaxbutton-until-process-is-done-tp15976490p15982628.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]



Prevent Ajax from expiring

2008-03-11 Thread Cristi Manole
Hello,

I'm experiencing a strange behavior from regular ajax components (those
included in wicket like, for example, the tree component) : on a page
containing one (or more) such components and using it, after some time it
will stop working, meaning it will not do anything (for example clicking on
the + in a ajax tree component stops doing anything).

Is this because the page expires in the background so to speak? How can I
set a longer expiration period or disable it all together?

I'm deploying to Tomcat and I tested it in IE and FF.

Tks,
Cristi


Re: Prevent Ajax from expiring

2008-03-11 Thread Igor Vaynberg
session time out is controlled in web.xml

-igor


On Tue, Mar 11, 2008 at 11:21 AM, Cristi Manole [EMAIL PROTECTED] wrote:
 Hello,

  I'm experiencing a strange behavior from regular ajax components (those
  included in wicket like, for example, the tree component) : on a page
  containing one (or more) such components and using it, after some time it
  will stop working, meaning it will not do anything (for example clicking on
  the + in a ajax tree component stops doing anything).

  Is this because the page expires in the background so to speak? How can I
  set a longer expiration period or disable it all together?

  I'm deploying to Tomcat and I tested it in IE and FF.

  Tks,
  Cristi


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



Re: Prevent Ajax from expiring

2008-03-11 Thread Cristi Manole
it expired way earlier than that.. .that's why i figured it was something
inside wicket...

any ideas?

Cristi

On Tue, Mar 11, 2008 at 8:39 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 session time out is controlled in web.xml

 -igor


 On Tue, Mar 11, 2008 at 11:21 AM, Cristi Manole [EMAIL PROTECTED]
 wrote:
  Hello,
 
   I'm experiencing a strange behavior from regular ajax components (those
   included in wicket like, for example, the tree component) : on a page
   containing one (or more) such components and using it, after some time
 it
   will stop working, meaning it will not do anything (for example
 clicking on
   the + in a ajax tree component stops doing anything).
 
   Is this because the page expires in the background so to speak? How
 can I
   set a longer expiration period or disable it all together?
 
   I'm deploying to Tomcat and I tested it in IE and FF.
 
   Tks,
   Cristi
 

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




Re: Prevent Ajax from expiring

2008-03-11 Thread Igor Vaynberg
On Tue, Mar 11, 2008 at 11:49 AM, Cristi Manole [EMAIL PROTECTED] wrote:
 it expired way earlier than that.. .that's why i figured it was something
  inside wicket...

  any ideas?

not without a reproduceable usecase

-igor


  Cristi

  On Tue, Mar 11, 2008 at 8:39 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:



   session time out is controlled in web.xml
  
   -igor
  
  
   On Tue, Mar 11, 2008 at 11:21 AM, Cristi Manole [EMAIL PROTECTED]
   wrote:
Hello,
   
 I'm experiencing a strange behavior from regular ajax components (those
 included in wicket like, for example, the tree component) : on a page
 containing one (or more) such components and using it, after some time
   it
 will stop working, meaning it will not do anything (for example
   clicking on
 the + in a ajax tree component stops doing anything).
   
 Is this because the page expires in the background so to speak? How
   can I
 set a longer expiration period or disable it all together?
   
 I'm deploying to Tomcat and I tested it in IE and FF.
   
 Tks,
 Cristi
   
  
   -
   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: wicket-datetime

2008-03-11 Thread Eelco Hillenius
On Tue, Mar 11, 2008 at 9:58 AM, Hoover, William [EMAIL PROTECTED] wrote:
 It looks like the datetime component has major issues of its own that make it 
 virtually unusable (https://issues.apache.org/jira/browse/WICKET-1412).

We've been using this component for quite a while (eating our own dog
food as usual) without too much trouble. See comments on that issue.
Patches to get rid of the rough edges are welcome, but calling it
virtually unusable goes a bit to far imo.

Eelco

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



Re: Is there an ajax WizardButton to use in a wizard inside a ModalWindow?

2008-03-11 Thread AshleyAbraham



AshleyAbraham wrote:
 
 Hi everyone, 
 I am using a Wizard inside a ModalWindow and I am trying to close the
 ModalWindow when the CancelButton or FinishButton is clicked. When one of
 those button's are clicked nothing happens, and I've found out that I need
 to use either AjaxButton or AjaxLink to make it work. Is there an
 AjaxWizardButton available to use in Wicket? basically I am looking for
 AjaxCancelButton and AjaxFinishButton.
 
 I have created my own AjaxCancelButton and AjaxFinishButton...but I didn't
 want to redo something which is available already. Please advice if there
 is an easy to do what I am trying to do?
 
 here is what I have for the AjaxWizardButton
 
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.extensions.wizard.IWizard;
 import org.apache.wicket.extensions.wizard.IWizardModel;
 import org.apache.wicket.extensions.wizard.WizardButton;
 import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
 
 public abstract class AjaxWizardButton extends AjaxButton {
 
   private static final long serialVersionUID = 1L;
 private final IWizard wizard;
 
 public AjaxWizardButton(String id, IWizard wizard, final Form form,
 String labelResourceKey){
 super(id, form);
 this.setLabel(new ResourceModel(labelResourceKey));
 this.wizard = wizard;
 }
 
 public AjaxWizardButton(String id, IWizard wizard, String
 labelResourceKey)
 {
 this(id, wizard, null, labelResourceKey);
 }
 
 protected final IWizard getWizard()
 {
 return wizard;
 }
 
 protected final IWizardModel getWizardModel()
 {
 return getWizard().getWizardModel();
 }

 protected final void onSubmit(AjaxRequestTarget target, Form form){
   onClick(target, form);
 }
 
 protected abstract void onClick(AjaxRequestTarget target, Form form);
 }
 
 Thanks
 Ashley
 

Just to clarify: I have created three classes, the parent class is the
AjaxWizardButton similar to Wicket's WizardButton and the two child classes
are AjaxCancelButton and AjaxFinishButton similar to Wicket's CancelButton
and FinishButton.

-- 
View this message in context: 
http://www.nabble.com/Is-there-an-ajax-WizardButton-to-use-in-a-wizard-inside-a-ModalWindow--tp15978434p15987313.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: Lazy load exception wicket and hibernate

2008-03-11 Thread Mathias P.W Nilsson

Not exactly sure what you mean here since this is my first time trying wicket
and hibernate, spring.

I have spring annoted daos that I use ex. myDao().getList(); returns a list
that has lazy object references.
When I try to evoke a method on the lazy object I get the exception. I have
solved i right now with DTO but it seam total meaningless to have dto when
all my entities can be used in the wicket page.


-- 
View this message in context: 
http://www.nabble.com/Lazy-load-exception-wicket-and-hibernate-tp15976668p15988359.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: Lazy load exception wicket and hibernate

2008-03-11 Thread James Carman
Show us some code, please.  How are you setting things up?

On 3/11/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

  Not exactly sure what you mean here since this is my first time trying wicket
  and hibernate, spring.

  I have spring annoted daos that I use myDao().getList(); returns a list that
  has lazy object references.
  When I try to evoke a method on the lazy object i get the exception. I have
  solved i right now with DTO but it seam total meaningless to have dto when
  all my entities can be used in the wicket page.



  --
  View this message in context: 
 http://www.nabble.com/Lazy-load-exception-wicket-and-hibernate-tp15976668p15988359.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: wicket-datetime

2008-03-11 Thread Nino Saturnino Martinez Vazquez Wael
There was sometrouble with safari 2, but wicket got patched and that 
fixed it.


Alex Jacoby wrote:
Side note: the demo doesn't seem to be working in Safari (3.0.4).  
Clicking the calendar icon doesn't do anything.  I don't see any JS 
errors in the console.


Anyone else seen this?

Alex

On Mar 6, 2008, at 1:20 AM, Igor Vaynberg wrote:


it seems to be working just fine here

http://wicketstuff.org/wicket13/dates/


-igor



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




--
-Wicket for love
-Jme for fun

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]



Re: Disable ajaxbutton until process is done

2008-03-11 Thread Mathias P.W Nilsson

Thanks! I got it to work now. Is it really a good idé to access html like
this in javacode? 

@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new IAjaxCallDecorator()
{
private static final long 
serialVersionUID = 1L;
public CharSequence 
decorateScript(CharSequence script)
{
return 
document.getElementById('create').disabled=true;+script;
}
public CharSequence 
decorateOnFailureScript(CharSequence script)
{
return 
script+document.getElementById('create').disabled=false;;
}
public CharSequence 
decorateOnSuccessScript(CharSequence script)
{
return 
script+document.getElementById('create').disabled=false;;
}
};
}
-- 
View this message in context: 
http://www.nabble.com/Disable-ajaxbutton-until-process-is-done-tp15976490p15988543.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: Explanation of Wicket session management

2008-03-11 Thread Johan Compagner
Yes that is true,
Session is lazy created in Session.get() so only after the first time that
is called Session.exists() works.

I guess Session.exists() doesnt really make much sense
On Tue, Mar 11, 2008 at 8:29 PM, Rajiv Jivan [EMAIL PROTECTED] wrote:

 I have updated the code based on Johan's suggestion. Still no luck.


 public Session newSession(Request request, Response response) {
  ..
  Session session = new Session(request);
  return session;
 }


 public RequestCycle newRequestCycle(Request request, Response response) {
   return new WebRequestCycle(this, request, response) {
   if(Session.exists()  certain condiition is met) {   - The
 method Session.exists() still returns false
Session  mySession = Session.get();
mySession.invalidateNow();
   }

   };
  }


 On Tue, Mar 11, 2008 at 12:02 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:
  RequestCycle is first made and the the Session is being resolved.
   Because the session creation code needs the request cycle first.
   So thats why your code doesn't work
 
   that test that you want should be done in Requestcycle.onBeginRequest
 
 
 
   On Tue, Mar 11, 2008 at 4:47 PM, Rajiv Jivan [EMAIL PROTECTED]
 wrote:
 
Yes I did. I was assuming that once newSession is called, on
subsequent calls, the session will be set on a thread local variable.
If that is not the case, what would be the right way to check if a
session has been created.
   
On Tue, Mar 11, 2008 at 10:32 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 Did you read the javadoc for Session#exists() ?

  http://wicket.sourceforge.net/apidocs/wicket/Session.html#exists()

  Checks if the Session threadlocal is set in this thread

  So not if the session was created or not.

  Martijn




  On 3/11/08, Rajiv Jivan [EMAIL PROTECTED] wrote:
   I am having a tough time understanding how sessions are
created/managed specifically related to the calls
  
public RequestCycle newRequestCycle(Request request, Response
response)
  
and
  
public Session newSession(Request request, Response response)
  
I am creating a new session by overriding the method newSession
 and
doing something like
  
public Session newSession(Request request, Response response) {
  ..
  Session session = new Session(request);
  return session;
}
  
This works fine. On subsequent calls, newSession isn't called
 as a
session is already in place. This is working as expected.
  
What isn't working is the call
to Session.exists(), this is always returning false when its
 invoked
in the method newRequestCycle which I override.
  
public RequestCycle newRequestCycle(Request request, Response
response) {
   if(Session.exists()  certain condiition is met) {
 -
The
method Session.exists() is always returning false
Session  mySession = Session.get();
mySession.invalidateNow();
   }
}
}
  
Can someone explain why Session.exists() always returns false,
 and
if
the session truly doesn't exist why newSession isn't called
 after
the
first invocation
  
  
   
  -
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.1 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1


  -
  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: link onClick add panel

2008-03-11 Thread taygolf

Thought I would post back my solution to this problem in case anyone else
needed to do this one day.

I found that I could use the wicket call urlFor to solve my problem.

So I can get the url for the page I want to link to in javascript and then
simply pass that url to the javascript and set it in my link. here is my
code.

PageParameters parameters = new PageParameters();
parameters.put(targetId, targetId);
String url = urlFor(MyPage.class, parameters).toString();
form.add(new AttributeModifier(onsubmit, true, new Model(return
MyJSFunction('+url+';

This works prefect for what I am wanting to do.

Thanks

T



taygolf wrote:
 
 I have a problem and I have thought of 2 ways to get it done but I can not
 make either work nor am I sure which one is the best.
 
 I want the user to be able to add as many customers as they want.
 
 So I have thought of 2 ways to do this.
 
 1) I have a link that when clicked creates a popup with all the necessary
 form fields that need to be filled out to create a customer. When the the
 page is submitted I want the information to be stored on the parent page
 in a table. I also want the customer name to be a link so they can edit
 the customer if need be.
 
 I have the popup working and collecting all the data but the only way I
 see to get it to put the data on the parent page is with javascript and I
 can not seem to get the customer name to be a wicket link. so I guess the
 problem with this method is how can I get javascript to create a new
 wicket link on the fly or how can I populate the parent page from the
 onSubmit of the form on the popup page.
 
 2) I have a link and when that link is clicked it opens a panel with all
 the necessary fields that need to be filled out. For some reason I can not
 get the link to add the panel to the parent page so I am stuck there.
 
 I would prefer option one because I think it looks cleaner. How can I fix
 these issues? am I thinking in the right direction for what I want to do?
 If not what do I need to be looking at?
 
 Thanks
 
 T
 

-- 
View this message in context: 
http://www.nabble.com/link-onClick-add-panel-tp15860001p15988558.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: Disable ajaxbutton until process is done

2008-03-11 Thread Gerolf Seitz
instead of referencing the id 'create' hardcoded, rather use getMarkupId().

  Gerolf

On Tue, Mar 11, 2008 at 9:11 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 Thanks! I got it to work now. Is it really a good idé to access html like
 this in javacode?

 @Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new IAjaxCallDecorator()
{
private static final long
 serialVersionUID = 1L;
public CharSequence
 decorateScript(CharSequence script)
{
return 
 document.getElementById('create').disabled=true;+script;
}
public CharSequence
 decorateOnFailureScript(CharSequence script)
{
return script+
 document.getElementById('create').disabled=false;;
}
public CharSequence
 decorateOnSuccessScript(CharSequence script)
{
return script+
 document.getElementById('create').disabled=false;;
}
};
}
 --
 View this message in context:
 http://www.nabble.com/Disable-ajaxbutton-until-process-is-done-tp15976490p15988543.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]




Dynamic Forms

2008-03-11 Thread Dan Kaplan
I have a form with a text field on it.  Somewhere on the form there is also
a + symbol.  When you click on it, a new text field appears.  I know that
this has been asked a bunch of times, but I can only find emails where
people say, This has been asked a bunch of times when I search the mailing
list.  Also, most say that a ListView and panels are involved but they don't
go into detail.  Can anyone elaborate on how to do this?

 

Thanks



Re: Double submit problem

2008-03-11 Thread hillj2

In my original message, I said I wanted to avoid a javascript solution.  It
doesn't lend itself to reuability, e.g. if I have multiple submit buttons or
specialized submit buttons.  A more cumbersome solution, in my opinion.


rmattler wrote:
 
 You could do it with javascript.  Disable the button and change the button
 label.
 
 function saveForm(btn) {
   eForm = document.forms[0];
   btn.disabled=true;
   btn.value='Please wait...';
   eForm.submit();
   return;
   
 }
 
 input type=button onclick=saveForm(this);
 setIsDocBeingSubmitted(true); name=submitButtonName value=Save /
 

-- 
View this message in context: 
http://www.nabble.com/Double-submit-problem-tp15957979p15988774.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: Double submit problem

2008-03-11 Thread hillj2

This was pretty much the original solution I linked.  The problem comes when
you don't call setResponsePage() and go right back to the page (e.g. if some
custom form validation fails).  It can no longer be submitted, because the
boolean is stuck in a true state.

-- 
View this message in context: 
http://www.nabble.com/Double-submit-problem-tp15957979p15988777.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: Dynamic Forms

2008-03-11 Thread Gerolf Seitz
see Button#setDefaultFormProcessing(boolean), which skips the form
processing.

  Gerolf

On Tue, Mar 11, 2008 at 10:09 PM, Dan Kaplan [EMAIL PROTECTED]
wrote:

 I found this:
 http://cwiki.apache.org/WICKET/forms-with-dynamic-elements.html

 Problem with it, for me, is that it fails to mention adding new fields via
 javascript.  As long as I add text fields in the same pattern as the list
 would add it, will it accept the input?  I'm concerned that the add button
 will trigger validation.  In my case (and probably most cases), the page
 does not have to be valid to add a new text field.

 -Original Message-
 From: Dan Kaplan [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 11, 2008 1:34 PM
 To: users@wicket.apache.org
 Subject: Dynamic Forms

 I have a form with a text field on it.  Somewhere on the form there is
 also
 a + symbol.  When you click on it, a new text field appears.  I know that
 this has been asked a bunch of times, but I can only find emails where
 people say, This has been asked a bunch of times when I search the
 mailing
 list.  Also, most say that a ListView and panels are involved but they
 don't
 go into detail.  Can anyone elaborate on how to do this?



 Thanks



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




Improvements to Wicketstuff Suckerfish Dropdowns

2008-03-11 Thread JulianS

I have checked in the following minor improvements:

- Changed references to Link to AbstractLink to make the implementation more
general
- Added a down or right arrow icon if there are children
- Upgraded to Wicket 1.3.1

See
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-suckerfish
and 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-suckerfish-examples.

Julian

-- 
View this message in context: 
http://www.nabble.com/Suckerfish-Dropdowns-contributed-to-Wicketstuff-tp14408947p15984613.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: Disable ajaxbutton until process is done

2008-03-11 Thread Mathias P.W Nilsson

Thanks =)

Works great!
-- 
View this message in context: 
http://www.nabble.com/Disable-ajaxbutton-until-process-is-done-tp15976490p15993390.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: wicket-datetime

2008-03-11 Thread Alex Jacoby

Odd... Just tested again and it's working now.

Pretty sure I wasn't hallucinating before but if no one else notices  
the problem I'll chalk it up to gremlins in my computer.


I was using Safari 3 on leopard, btw.

Alex

On Mar 11, 2008, at 4:00 PM, Nino Saturnino Martinez Vazquez Wael wrote:

There was sometrouble with safari 2, but wicket got patched and that  
fixed it.


Alex Jacoby wrote:
Side note: the demo doesn't seem to be working in Safari (3.0.4).   
Clicking the calendar icon doesn't do anything.  I don't see any JS  
errors in the console.


Anyone else seen this?

Alex

On Mar 6, 2008, at 1:20 AM, Igor Vaynberg wrote:


it seems to be working just fine here

http://wicketstuff.org/wicket13/dates/


-igor



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




--
-Wicket for love
-Jme for fun

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]



Improvements to Wicketstuff Suckerfish Dropdowns

2008-03-11 Thread JulianS

I have checked in the following minor improvements:

- Changed references to Link to AbstractLink to make the implementation more
general
- Added a down or right arrow icon if there are children
- Upgraded to Wicket 1.3.1

See
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-suckerfish
and 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-suckerfish-examples.

Julian

-- 
View this message in context: 
http://www.nabble.com/Suckerfish-Dropdowns-contributed-to-Wicketstuff-tp14408947p15993683.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: styling thead in DataTable

2008-03-11 Thread Christian Alejandro Marquez Grabia
Martin,

Yes...you would have to set a wicket:id for the thead to add attributes
dynamically. This is easily done by setting markup to a subclass of
datatable, and using the same structure used in the wicket-extensions jar.

Cheers,
Christian

On 3/11/08, Eyal Golan [EMAIL PROTECTED] wrote:

 Thanks Christian,
 As Igor suggested, I did use a CSS (at the beginning I didn't find the
 style
 attribute I needed).
 I'll keep in mind the onComponentTag() as well.

 As I mentioned before, my problem was solved, but when I have time, I'll
 try
 to find the thead of a DataTable issue.

 Thanks guys


 On Tue, Mar 11, 2008 at 3:45 AM, Christian Alejandro Marquez Grabia 
 [EMAIL PROTECTED] wrote:

  You can change tag attributes by overriding the onComponentTag() method,
  at
  least that is what I do when modifying any class or other attribute.
 (you
  should get the attribute from the tag parameter, and then set it there
 as
  well)
 
  I'm not sure where you should add that for the thead builder, but if you
  find it, then you'll get it done. You may also use IBehaviours, like
  SimpleAttributeModifier.
 
  Or as Igor well said, use your own markup (you could see the default
  markup
  inside the jar, and simply add the attribute you want)
 
  Rgds,
  Christian
 
  On 3/10/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
   there shouldnt be anything you cannot do through css that you can do
   through adding things to markup
  
   that said you can always subclass datatable and provide your own
 markup
  
  
   -igor
  
  
   On Mon, Mar 10, 2008 at 3:31 PM, Eyal Golan [EMAIL PROTECTED]
 wrote:
well, I can and this is what I actually did.
 I found out that I can use in style, the attribute: *text-align*
 that has solved me the problem.
   
 But my (more general) question is: what if there is an attribute
 that
   can't
 be set in style? as what I understand, it can't be set in a CSS (if
  I'm
 mistaken, please tell me how it's done).
   
 How can I add attributes to thead of a DataTable?
 Hope I'm clear enough.
   
 Eyal
 On Mon, Mar 10, 2008 at 7:17 PM, Igor Vaynberg 
  [EMAIL PROTECTED]
   
 wrote:
   
   
   
  can you not use css?
 
  -igor
 
 
  On Mon, Mar 10, 2008 at 6:17 AM, Eyal Golan [EMAIL PROTECTED]
   wrote:
   Hey all,
I am having an issue that seems to be simple, but still, no
   success.
  
I have a normal DataTable.
I add to it the toptoolbars manually:
HeadersToolbar thead = new HeadersToolbar(entityDataTable,
entitiesProvider);
entityDataTable.addTopToolbar(thead);
This is how it looks in the HTML:
table wicket:id=entitiesList class=browserTable
  
This is how (part of) the generated HTML looks like:
table class=browserTable wicket:id=entitiesList
thead
tr class=headers
th wicket:id=header class=wicket_orderUpwicket:border
_moz-userdefined=a wicket:id=orderByLink class=
  
  
 

   
  href=?wicket:interface=:4:tabs:browserTabbedPanel:panel:entitiesList:topToolbars:2:toolbar:headers:1:header:orderByLink::ILinkListener::wicket:body
_moz-userdefined=span wicket:id=labelPerson
ID/span/wicket:body/a/wicket:border
/th
  
I want a simple thing: I want to align the header labels to
 the
   left.
The problem(s):
- style doesn't have an attribute of align. Only
 vertical-align.
- I tried to add to the HeadersToolbar an AttributeModifier:
thead.add(new AttributeModifier(align, true, new
   Model(left)));
  
Nothing seems working.
I am using Firebug and the label thead keeps with no
  attribute.
  
Can anyone help?
  
Thank a lot
  
  
--
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/
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 




 --

 Eyal Golan
 [EMAIL PROTECTED]

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



Converting tag names in a Panel

2008-03-11 Thread Matt Jensen


Hopefully this is an easy one.  Why does Wicket convert this:

fb:tab-item wicket:id=tabsList/

...into this:

fb:tab_item .../

...and how do I make it stop doing that?  The key part here is the 
conversion of fb:tab-item into fb:tab_item.


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



  1   2   >