Re: SSL

2008-03-11 Thread Tormod Øverlier

Do you have any idea as to why I'm always redirected to the start page when I
try to enter a SSL-enabled page, even though I'm following the description
for SSL on the Wicket Wiki?


Johan Compagner wrote:
> 
> 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.com
>> .
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-tp15975713p15998744.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: OpenId with Wicket

2008-03-11 Thread Igor Vaynberg
mount a bookmarkable page. get a url for it via urlfor(mypage.class)
use requestutils to translate the url into an absolute one. give that
to openid provider. make sure you have a constructor in that page that
takes PageParameters, use them to pull out posted values.

-igor


On Tue, Mar 11, 2008 at 9:28 PM, mpinner <[EMAIL PROTECTED]> wrote:
>
>  Couple Questions:
>
>  How do I setup a returnUrl to which an OpenId Provider would Post/Get?
>
>  For those not familiar with OpenId, I'll try to explain.  I need to redirect
>  my user to their OpenId Provider, which will post back to me that they are
>  who authenticated.  When I send this redirect I need to include a URL that
>  the provider can access.  Normally this would be some sort of servlet, but
>  I'm trying to be good and use Wicket for all my web interactions.
>
>  For those really interested, the Java lib I'm using is best documented here:
>  http://code.google.com/p/openid4java/wiki/QuickStart
>
>
>  Has anyone had any luck with OpenId and Wicket?
>
>  Thanks, I love what I've used of Wicket so far.  I look forward to learning
>  lots more.
>
>  Matt
>  --
>  View this message in context: 
> http://www.nabble.com/OpenId-with-Wicket-tp15997724p15997724.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: Simple question about alert string

2008-03-11 Thread tsuresh



tsuresh wrote:
> 
> Hello, I have a list of users, When I click on the userlink I need to
> display the name of user clicked (For example: If Bob,Hari and David are
> lists, If I click on Bob the output in pop up should be User selected
> :Bob.
> 
> The problem I am having is, when I click on Bob the out put is User
> selected:
> When I click on the next name the output is User selected: Bob. i.e. The
> first output comes in second click and second ouput comes in third click
> and so on. My code is as shown below: Where am I missing ? Please help.
> 
>  String username ="";
>   Link userLink = new Link("user") {
> 
> public void onClick() {
> User selectedUser = (User)
> getParent().getModelObject();
> username = selectedUser.getUsername();
>
> }
> };
> 
> userLink.add(new SimpleAttributeModifier("onclick",
> "return alert('User selected:" +username + "');"));
> 
> 
> thanks
> 


I solved it using modal window,but still couldnot do it in popup javascript.

-- 
View this message in context: 
http://www.nabble.com/Simple-question-about-alert-string-tp15950581p15998027.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]



OpenId with Wicket

2008-03-11 Thread mpinner

Couple Questions:

How do I setup a returnUrl to which an OpenId Provider would Post/Get?

For those not familiar with OpenId, I'll try to explain.  I need to redirect
my user to their OpenId Provider, which will post back to me that they are
who authenticated.  When I send this redirect I need to include a URL that
the provider can access.  Normally this would be some sort of servlet, but
I'm trying to be good and use Wicket for all my web interactions.  

For those really interested, the Java lib I'm using is best documented here:
http://code.google.com/p/openid4java/wiki/QuickStart


Has anyone had any luck with OpenId and Wicket?

Thanks, I love what I've used of Wicket so far.  I look forward to learning
lots more.

Matt   
-- 
View this message in context: 
http://www.nabble.com/OpenId-with-Wicket-tp15997724p15997724.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: Simple question about alert string

2008-03-11 Thread tsuresh

Hello, I have a list of users, When I click on the userlink I need to display
the name of user clicked (For example: If Bob,Hari and David are lists, If I
click on Bob the output in pop up should be User selected :Bob.

The problem I am having is, when I click on Bob the out put is User
selected:
When I click on the next name the output is User selected: Bob. i.e. The
first output comes in second click and second ouput comes in third click and
so on. My code is as shown below: Where am I missing ? Please help.

 String username ="";
  Link userLink = new Link("user") {

public void onClick() {
User selectedUser = (User)
getParent().getModelObject();
username = selectedUser.getUsername();
   
}
};

userLink.add(new SimpleAttributeModifier("onclick", "return
alert('User selected:" +username + "');"));


thanks
-- 
View this message in context: 
http://www.nabble.com/Simple-question-about-alert-string-tp15950581p15997606.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]



Accordion(wicket-stuff) and a YU DatePicket together don't work.

2008-03-11 Thread Fernando Wermus
I have developed some pages using the Nino Saturnino's accordion which is in
wicket-stuff. I got some erros in YU DatePicker when I added it to a
Accordion. The error, a javascript error is the following,

YAHOO.util.Event.purgeElement is not a function
http:///resources/org.apache.wicket.extensions.yui.YuiLib/calendar/calendar.js
Line 2983

For any ideas, this is my code,
...
List markupItems = new
ArrayList();
markupItems.add(new ResumenPartido(AccordionPanelItem.ITEM_ID,
inscripcion));
AccordionPanelItem itemResumenDelPartido = new
AccordionPanelItem("Resumen del partido " + inscripcion.getNombre(),
markupItems);
...


public class ResumenPartido extends Panel {
public ResumenPartido(String id, InscripcionPartido inscripcion) {
...
 add(crearFecha("cuando", inscripcion));
...
}
private DateTextField crearFecha(String id, InscripcionPartido
inscripcion) {
DateTextField fecha=new DateTextField(id,new
PropertyModel(inscripcion,"cuandoDate"));
fecha.add(new DatePicker(){
@Override
protected boolean enableMonthYearSelection() {
return true;
}
});
return fecha;
}
...}


-- 
Fernando Wermus.


Re: Converting tag names in a Panel

2008-03-11 Thread Matt Jensen


Oops, looks like Wicket might not be the culprit...

Matt Jensen wrote:


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



...into this:



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





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



Re: URL problem

2008-03-11 Thread Rick Shen

No one knows
-- 
View this message in context: 
http://www.nabble.com/URL-problem-tp15975716p15996264.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]



Converting tag names in a Panel

2008-03-11 Thread Matt Jensen


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



...into this:



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



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  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  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:
> > > >  > >  
> > > >  > >
> > > >  > >  This is how (part of) the generated HTML looks like:
> > > >  > >  
> > > >  > >  
> > > >  > >  
> > > >  > >   > > >  > >  _moz-userdefined=""> > > >  > >
> > >
> > > >  >
>
> >  
> > href="?wicket:interface=:4:tabs:browserTabbedPanel:panel:entitiesList:topToolbars:2:toolbar:headers:1:header:orderByLink::ILinkListener::"> > > >  > >  _moz-userdefined="">Person
> > > >  > >  ID
> > > >  > >  
> > > >  > >
> > > >  > >  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  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/
>


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



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]



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


RE: Dynamic Forms

2008-03-11 Thread Dan Kaplan
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]



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

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



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


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: 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() && ) {   <- 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() && ) {
> <-
> >  > 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: 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: 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: 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: 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: Explanation of Wicket session management

2008-03-11 Thread Rajiv Jivan
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() && ) {   <- 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() && ) {   <-
>  > 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: 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: 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: 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: 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
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]



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

2008-03-11 Thread Juliano Gaio

Thank you Igor.

- Original Message - 
From: "Igor Vaynberg" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, March 11, 2008 3:05 PM
Subject: Re: Palette labels



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]




--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 10/3/2008 
19:27






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



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: 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\wicket>mvn 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] org.apache.wicket:wicket-ve

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

2008-03-11 Thread James Carman
On 3/11/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> 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"
>  >  (Map  >  IRequestCycleSettings or IExceptionSettings?
>
>
> i think you should hold off on the patch until you have settled down
>  on how you want to do this

Well, that's what I'm trying to figure out.  How do you guys think
this should be done?  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)?
>
>
> 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.
>

Well, that patch lets us Spring folks configure our applications much
easier via Spring.  The Application's settings objects are settable,
so you could configure a DefaultRequestCycleSettings bean in Spring
and add in your global handlers there (then set it on your Application
bean).  It also  shouldn't break any existing code, because the API
doesn't change.

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

It was just a suggestion.  Perhaps we could start with the global
level and then allow customizing at some finer granularity later (if
needed).

-
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"
>  (Map  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]



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
>  Map?  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: 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]



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]



Fallback support for ModalWindow

2008-03-11 Thread Kaspar Fischer
I am using http://www.wicket-library.com/wicket-examples/ajax/modal-window 
 to
show a modal dialog holding a component. -- First of all, thanks to  
the author

of this extension! It's great, took me only 2 minutes to set it up!

One question I have is whether it is possible to make ModalWindow fall  
back
to an ordinary link to the page showing the modal window if JavaScript  
is

disabled. Does somebody know how to achieve this?

Thanks,
Kaspar

-
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
>  I am still curious though why required dependencies aren't included as part
>  of the project.

See the 100,000 other threads about this question :-)

Eelco

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



Re: wicket-datetime

2008-03-11 Thread Eelco Hillenius
>  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]



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]



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() && ) {   <-
> 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 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() && ) {   <- 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 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: 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: 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;

}


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



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


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 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: 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 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: 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: 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 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: 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() && ) {   <- 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 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 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 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 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 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: 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
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: 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
>


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() && ) {   <- 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: 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]



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


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



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


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


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


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



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











Sfid









  



--


MyComponentFeedBackPanel.html
-





 


  




Properties (Page1.properties)
-

altaPrepagoForm.sfid.Required=












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]



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: 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"
(Map

  1   2   >