AbortException

2010-02-06 Thread Douglas Ferguson
I may be using this wrong, but my understanding was that if I wanted to 
redirect a user and hault execution of the current page I could do the 
following:

setResponsePage(LinkPartners.class);
throw new AbortException();

However, there seems to be situations where the AbortException actually bubbles 
back up to the user.
What would cause the redirect not to work and the AbortException to make it to 
the screen?

D/


Re: Wicket best practice

2010-02-06 Thread Vineet Manohar
Thanks. Is one approach better than the other?

Vineet

On Sat, Feb 6, 2010 at 5:00 PM, Andrew Lombardi wrote:

> There are 2 main ways to create a link with Wicket:
>
> 1. Use autolinking.  wrap your link in  tags in the HTML and
> take note of package structure, so if in same package HomePage.html would go
> in href, and if its in a package called admin, you'd have
> admin/AdminHomePage.html, etc.
>
> 2. Use one of the Link objects, which requires a wicket:id attached to
> "usually an anchor tag" in the HTML.  So you'll have to have Java code and
> HTML code that match id's
>
> -andrew
>
> On Feb 6, 2010, at 1:27 PM, Vineet Manohar wrote:
>
> > Thanks. I will look at the maven archetype.
> >
> > More than just pages, I am looking at links, forms, inputs etc. For
> example,
> > to create a link I am either use  in the HTML, or I can use
> > Wicket link component model, what's the difference and which one should I
> > use?
> >
> > Btw, my goal is to automatically generate a working Wicket app with full
> > database integration using JPA and security integration as well. The Seam
> > code generation project that I did was a success, you can write a spec
> like
> > this one:
> >
> http://code.google.com/p/clickframes-seam-issuetracker-demo/source/browse/trunk/src/main/clickframes/appspec.xml
> >
> > and instantly get a working app like this:
> > live demo link:
> > http://demo.clickframes.org/tracker
> >
> > Of course you can add/remove pages from the app by changing the appspec
> xml.
> >
> > I am trying to replicate the same thing for Wicket, hoping to get some
> help
> > from user community!
> >
> > On Sat, Feb 6, 2010 at 4:09 PM, Riyad Kalla  wrote:
> >
> >> Vineet, very cool stuff you are wooing on. As for best practices with
> >> regard
> >> to layout, there is actually a Maven Wicket archetype that would
> probably
> >> answer those questions well. From what I remember its pretty straight
> >> forward maven web layout. And yes, HTML and Java source are in same main
> >> packages together.
> >>
> >> On Feb 6, 2010 1:33 PM, "Vineet Manohar" 
> wrote:
> >>
> >> Hi,
> >>
> >> I am trying to write a code generator (using Clickframes code generation
> >> framework) which would generate a fully working Wicket project directly
> >> from
> >> the Spec. Is there a document which describes the best practice for
> >> folder/package structure in a wicket project.
> >>
> >> To write the code generator, the only thing I need to know is the Wicket
> >> project structure that I should be created. For example:
> >> 1) should html files be colocated in src/main/java/com/mypackage/ along
> >> with
> >> Java files (as in the helloworld example) or in src/main/webapp.
> >> 2) should there be one html file per page (I am assuming yes)
> >> ... and other such questions related to folder structure
> >>
> >> I am the lead developer of open source code generation framework
> >> Clickframes
> >> (http://www.clickframes.org) and have written a similar code generator
> for
> >> JSF/Seam which instantly gives you a working app directly from the spec
> >> which the developer can then customize. I think a similar approach for
> >> Wicket would be very helpful to Wicket users who are trying to start a
> >> brand
> >> new project.
> >>
> >> Here's what I have so far.
> >> http://code.google.com/p/clickframes-wicket-plugin/
> >>
> >> I am a Wicket novice, so any help or direction is appreciated.
> >>
> >> Thanks,
> >>
> >> Vineet Manohar
> >> http://www.vineetmanohar.com
> >>
>
>
> To our success!
>
> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>
> ANDREW LOMBARDI | and...@mysticcoders.com
> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
> ofc: 714-816-4488
> fax: 714-782-6024
> cell: 714-697-8046
> linked-in: http://www.linkedin.com/in/andrewlombardi
> twitter: http://www.twitter.com/kinabalu
>
> Eco-Tip: Printing e-mails is usually a waste.
>
> 
> This message is for the named person's use only. You must not, directly or
> indirectly, use,
>  disclose, distribute, print, or copy any part of this message if you are
> not the intended recipient.
> 
>
>


Re: How to write a testcase for CheckGroupSelector.

2010-02-06 Thread Kent Tong


vermas wrote:
> 
> How to write a testcase for CheckGroupSelector.
> 

Try http://wicketpagetest.sourceforge.net/ which supports execution of
Javascript in the tests.


-
--
Kent Tong
Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net)
Books on CXF, Axis2, Wicket, JSF (http://agileskills2.org)
-- 
View this message in context: 
http://old.nabble.com/How-to-write-a-testcase-for-CheckGroupSelector.-tp27473254p27485560.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket best practice

2010-02-06 Thread Andrew Lombardi
There are 2 main ways to create a link with Wicket:

1. Use autolinking.  wrap your link in  tags in the HTML and take 
note of package structure, so if in same package HomePage.html would go in 
href, and if its in a package called admin, you'd have 
admin/AdminHomePage.html, etc.

2. Use one of the Link objects, which requires a wicket:id attached to "usually 
an anchor tag" in the HTML.  So you'll have to have Java code and HTML code 
that match id's

-andrew

On Feb 6, 2010, at 1:27 PM, Vineet Manohar wrote:

> Thanks. I will look at the maven archetype.
> 
> More than just pages, I am looking at links, forms, inputs etc. For example,
> to create a link I am either use  in the HTML, or I can use
> Wicket link component model, what's the difference and which one should I
> use?
> 
> Btw, my goal is to automatically generate a working Wicket app with full
> database integration using JPA and security integration as well. The Seam
> code generation project that I did was a success, you can write a spec like
> this one:
> http://code.google.com/p/clickframes-seam-issuetracker-demo/source/browse/trunk/src/main/clickframes/appspec.xml
> 
> and instantly get a working app like this:
> live demo link:
> http://demo.clickframes.org/tracker
> 
> Of course you can add/remove pages from the app by changing the appspec xml.
> 
> I am trying to replicate the same thing for Wicket, hoping to get some help
> from user community!
> 
> On Sat, Feb 6, 2010 at 4:09 PM, Riyad Kalla  wrote:
> 
>> Vineet, very cool stuff you are wooing on. As for best practices with
>> regard
>> to layout, there is actually a Maven Wicket archetype that would probably
>> answer those questions well. From what I remember its pretty straight
>> forward maven web layout. And yes, HTML and Java source are in same main
>> packages together.
>> 
>> On Feb 6, 2010 1:33 PM, "Vineet Manohar"  wrote:
>> 
>> Hi,
>> 
>> I am trying to write a code generator (using Clickframes code generation
>> framework) which would generate a fully working Wicket project directly
>> from
>> the Spec. Is there a document which describes the best practice for
>> folder/package structure in a wicket project.
>> 
>> To write the code generator, the only thing I need to know is the Wicket
>> project structure that I should be created. For example:
>> 1) should html files be colocated in src/main/java/com/mypackage/ along
>> with
>> Java files (as in the helloworld example) or in src/main/webapp.
>> 2) should there be one html file per page (I am assuming yes)
>> ... and other such questions related to folder structure
>> 
>> I am the lead developer of open source code generation framework
>> Clickframes
>> (http://www.clickframes.org) and have written a similar code generator for
>> JSF/Seam which instantly gives you a working app directly from the spec
>> which the developer can then customize. I think a similar approach for
>> Wicket would be very helpful to Wicket users who are trying to start a
>> brand
>> new project.
>> 
>> Here's what I have so far.
>> http://code.google.com/p/clickframes-wicket-plugin/
>> 
>> I am a Wicket novice, so any help or direction is appreciated.
>> 
>> Thanks,
>> 
>> Vineet Manohar
>> http://www.vineetmanohar.com
>> 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.




Re: Wicket best practice

2010-02-06 Thread Vineet Manohar
Thanks. I will look at the maven archetype.

More than just pages, I am looking at links, forms, inputs etc. For example,
to create a link I am either use  in the HTML, or I can use
Wicket link component model, what's the difference and which one should I
use?

Btw, my goal is to automatically generate a working Wicket app with full
database integration using JPA and security integration as well. The Seam
code generation project that I did was a success, you can write a spec like
this one:
http://code.google.com/p/clickframes-seam-issuetracker-demo/source/browse/trunk/src/main/clickframes/appspec.xml

and instantly get a working app like this:
live demo link:
http://demo.clickframes.org/tracker

Of course you can add/remove pages from the app by changing the appspec xml.

I am trying to replicate the same thing for Wicket, hoping to get some help
from user community!

On Sat, Feb 6, 2010 at 4:09 PM, Riyad Kalla  wrote:

> Vineet, very cool stuff you are wooing on. As for best practices with
> regard
> to layout, there is actually a Maven Wicket archetype that would probably
> answer those questions well. From what I remember its pretty straight
> forward maven web layout. And yes, HTML and Java source are in same main
> packages together.
>
> On Feb 6, 2010 1:33 PM, "Vineet Manohar"  wrote:
>
> Hi,
>
> I am trying to write a code generator (using Clickframes code generation
> framework) which would generate a fully working Wicket project directly
> from
> the Spec. Is there a document which describes the best practice for
> folder/package structure in a wicket project.
>
> To write the code generator, the only thing I need to know is the Wicket
> project structure that I should be created. For example:
> 1) should html files be colocated in src/main/java/com/mypackage/ along
> with
> Java files (as in the helloworld example) or in src/main/webapp.
> 2) should there be one html file per page (I am assuming yes)
> ... and other such questions related to folder structure
>
> I am the lead developer of open source code generation framework
> Clickframes
> (http://www.clickframes.org) and have written a similar code generator for
> JSF/Seam which instantly gives you a working app directly from the spec
> which the developer can then customize. I think a similar approach for
> Wicket would be very helpful to Wicket users who are trying to start a
> brand
> new project.
>
> Here's what I have so far.
> http://code.google.com/p/clickframes-wicket-plugin/
>
> I am a Wicket novice, so any help or direction is appreciated.
>
> Thanks,
>
> Vineet Manohar
> http://www.vineetmanohar.com
>


Re: Wicket best practice

2010-02-06 Thread Riyad Kalla
Vineet, very cool stuff you are wooing on. As for best practices with regard
to layout, there is actually a Maven Wicket archetype that would probably
answer those questions well. From what I remember its pretty straight
forward maven web layout. And yes, HTML and Java source are in same main
packages together.

On Feb 6, 2010 1:33 PM, "Vineet Manohar"  wrote:

Hi,

I am trying to write a code generator (using Clickframes code generation
framework) which would generate a fully working Wicket project directly from
the Spec. Is there a document which describes the best practice for
folder/package structure in a wicket project.

To write the code generator, the only thing I need to know is the Wicket
project structure that I should be created. For example:
1) should html files be colocated in src/main/java/com/mypackage/ along with
Java files (as in the helloworld example) or in src/main/webapp.
2) should there be one html file per page (I am assuming yes)
... and other such questions related to folder structure

I am the lead developer of open source code generation framework Clickframes
(http://www.clickframes.org) and have written a similar code generator for
JSF/Seam which instantly gives you a working app directly from the spec
which the developer can then customize. I think a similar approach for
Wicket would be very helpful to Wicket users who are trying to start a brand
new project.

Here's what I have so far.
http://code.google.com/p/clickframes-wicket-plugin/

I am a Wicket novice, so any help or direction is appreciated.

Thanks,

Vineet Manohar
http://www.vineetmanohar.com


Wicket best practice

2010-02-06 Thread Vineet Manohar
Hi,

I am trying to write a code generator (using Clickframes code generation
framework) which would generate a fully working Wicket project directly from
the Spec. Is there a document which describes the best practice for
folder/package structure in a wicket project.

To write the code generator, the only thing I need to know is the Wicket
project structure that I should be created. For example:
1) should html files be colocated in src/main/java/com/mypackage/ along with
Java files (as in the helloworld example) or in src/main/webapp.
2) should there be one html file per page (I am assuming yes)
... and other such questions related to folder structure

I am the lead developer of open source code generation framework Clickframes
(http://www.clickframes.org) and have written a similar code generator for
JSF/Seam which instantly gives you a working app directly from the spec
which the developer can then customize. I think a similar approach for
Wicket would be very helpful to Wicket users who are trying to start a brand
new project.

Here's what I have so far.
http://code.google.com/p/clickframes-wicket-plugin/

I am a Wicket novice, so any help or direction is appreciated.

Thanks,

Vineet Manohar
http://www.vineetmanohar.com


AbstractAjaxTimerBehavior#onTimer() doesn't work in deployment mode

2010-02-06 Thread Andreas Lüdtke
Hi,

I'm using wicket 1.4.6 and saw that the onTimer method of an
AbstractAjaxTimerBehavior object isn't called, when I switch vom development
mode to deployment mode. This happens also with wicket 1.4.5.

Is there something I need to do to get it working in deployment mode?

In addition, after calling AbstractAjaxTimerBehavior.stop() the onTimer
method is still called (of course only in development mode). ;-) 

If someone finds the time to fix this, I would be glad if this person could
implement a restart() method to start the timer after it has been stopped.

Andreas


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



Re: Ajax editable image @L

2010-02-06 Thread Alec Swan
Juan's approach works, but I found myself reimplementing some of
AxajEditableLabel event-handling code.

So, I tried another approach where I create a panel with two fragments
"pictureFragment" and "uploadFragment". I then add an
AxajEditableLabel to the panel which would ideally override
newLabel(..) to return PictureFragment and override newEditor(..) to
return UploadFragment.

However, the problem is that the return types of these two methods are
not compatible with the Fragment class.

Is it possible to swap an image with an upload form using
AxajEditableLabel and Fragments?

Thanks,

Alec

On Fri, Jan 8, 2010 at 8:39 PM, Juan Carlos Garcia M.
 wrote:
>
> There isn't such component in wicket to achieve that, but it should be fairly
> easy to build i.e:
>
> 1-Having a Panel with the FileUpload that you want
> 2-Having a Panel with the image tag   that you want
> 3-Having a WebMarkup Container that act as a placeHolder for either 1 or 2
> at a given time.
>
> on you onClick behavior of the image panel you could call something like
> [ImagePanel.this.replaceWith(referenceOfFileUploadPanel)]
>
> To just Swap between panels, take a look at this
> http://pawelzubkiewicz.blogspot.com/2009/06/wicket-swapping-replacing-fragments.html
> example
>
> Hope you get the Idea
>
>
>
> alecswan1 wrote:
>>
>> I am using Wicket to implement an image component which behaves
>> similarly to AjaxEditableLabel.
>>
>> When the component is rendered it should look like a regular image
>>  .. . When the user clicks on the image, it should display
>> a file upload component which will allow the user to replace the
>> image.
>>
>> What is the easiest way to implement this behavior? Is there a
>> component that already does this? If not, which Wicket class should I
>> extend?
>>
>> Thanks,
>>
>> Alec
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Ajax-editable-image-%40L-tp27084451p27085401.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Bug with setResponsePage and PageParameters for wicket 1.4.6?

2010-02-06 Thread Alex Objelean

I think it is a know bug (http://issues.apache.org/jira/browse/WICKET-2717)
and was is already fixed in trunk. Hopefully there will be a 1.4.7 release
very soon.

Alex Objelean


fatefree wrote:
> 
> I noticed something strange, I have a search panel on all pages that
> contains a single form like so:
> 
>   final Form searchForm = new
> StatelessForm("searchForm", model) {
>   @Override
>   protected void onSubmit() {
>   String query = getModelObject().getQuery();
>   setResponsePage(SearchResultsPage.class, new 
> PageParameters(
>   SearchResultsPage.PARAM_QUERY + 
> "=" + query));
>   setRedirect(true);
>   }
>   };
> 
> My SearchResultsPage is mapped to /search, so after a query i get
> redirected to /search/query/some+query. After the first submit
> everything works (the submit is happening from a different page), I
> get the redirect and see the results. But then if I try to use the
> form from that page, I get redirected with the previous search params
> in the url, like so: /search/query/search/query/second+query. Im not
> sure how this is happening since I am passing a class and new page
> parameters. The String query inside the onSubmit has the correct
> value, its not appending any of the previous parameters, and besides,
> this only happens with 1.4.6. I tried it on 1.4.4 and 1.4.5 and it
> worked fine with the same code. Any ideas?
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Bug-with-setResponsePage-and-PageParameters-for-wicket-1.4.6--tp27475350p27481276.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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