Re: [Wicket-user] The other side of Wicket ...

2006-05-05 Thread Vincent Jenks

I don't think ASP.NET is superior to Wicket in any of the items you
described, honestly.

ASP.NET requires more work for "including" separate pages, "panels",
etc.  I found the Panel much more elegant in Wicket than a "User
Control" in ASP.NET.

I think you're right, however, the one-off stuff that you don't plan
to grow or maintain regularly is well suited for ASP.NETsmaller
applications that don't require much thought.  If you're in a
Windows-only environment and it's already there for you...it's just
convenient.

I still think it can be done more productively in Wicket.  And, I
never want to have to write a pile of ADO.NET code for a
more-than-trivial web app again...I've been spoiled by Hibernate &
EJB3.

On 5/5/06, Frank Silbermann <[EMAIL PROTECTED]> wrote:

For the last couple of months I've been building in Wicket to replace an
ASP.NET application.  My impression is that ASP.NET is the best thing
I've ever seen for doing a "one-of".  Any page content that I'm going to
build and use in just one page (or simply "include" with no
modifications in a variety of places) is incredibly easy to do in
ASP.NET.

Wicket is far superior for situations where I need to do the same _kind_
of thing in a variety of different places, but with variations.  With
Wicket it is easier to build and use a component with a variety of
constructors, and with methods that can be easily replaced each time I
use it.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent
Jenks
Sent: Thursday, May 04, 2006 5:49 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] The other side of Wicket ...

Oh yeah, just jokes, .NET is a pretty great technology...though it
still requires far more work than the EJB3+Wicket combo.

MS's tools are great, they have a snazzy IDE...but I still prefer
Eclipse...perhaps because of its open nature and breadth of industry
support both pro & amateur.

The tools are also the problemyou can't rely on much else outside
of MS's visual studio tools to do the job.  I personally hate WYSIWYG
environments and writing asp.net pages, controls, etc. w/o the editor
can be quite tedious.

JSF's similarity to ASP.NET is one reason I didn't want to use
it...not to mention all of the strange issues I had heard of w/ JSF
1.1.

.NET has it's place...but now that EJB3 is a finalized spec...I doubt
it can keep up w/ Java EE 5 and beyond in a one-on-one comparison.
stinfo/wicket-user


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The other side of Wicket ...

2006-05-04 Thread Vincent Jenks

Oh yeah, just jokes, .NET is a pretty great technology...though it
still requires far more work than the EJB3+Wicket combo.

MS's tools are great, they have a snazzy IDE...but I still prefer
Eclipse...perhaps because of its open nature and breadth of industry
support both pro & amateur.

The tools are also the problemyou can't rely on much else outside
of MS's visual studio tools to do the job.  I personally hate WYSIWYG
environments and writing asp.net pages, controls, etc. w/o the editor
can be quite tedious.

JSF's similarity to ASP.NET is one reason I didn't want to use
it...not to mention all of the strange issues I had heard of w/ JSF
1.1.

.NET has it's place...but now that EJB3 is a finalized spec...I doubt
it can keep up w/ Java EE 5 and beyond in a one-on-one comparison.

On 5/4/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:

On 5/4/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> I don't hear great things about Struts!  My experience w/
> Java/J2EE/Java EE before wicket was Servlets+JSP+Hibernate (and JDBC),
> and I've only been doing Java for about a year.  I had made a living
> off of Microsoft technologies for years prior to that, specifically C#
> and the .NET framework.

Actually, .NET isn't that bad. Way better than Struts or any other
model 2 framework imo. It's component oriented, and personally I think
they even did that in a better way (because simpler) than JSF. JSF and
.NET or very close cousins. Not something I would like to do without
IDEs that support it though, and I've seen people doing .NET with word
pad because VS crashed on their files.

Eelco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The other side of Wicket ...

2006-05-04 Thread Vincent Jenks

I don't hear great things about Struts!  My experience w/
Java/J2EE/Java EE before wicket was Servlets+JSP+Hibernate (and JDBC),
and I've only been doing Java for about a year.  I had made a living
off of Microsoft technologies for years prior to that, specifically C#
and the .NET framework.

I guess you could say I had a far worse infection than even a reformed
Struts user would have had :D

Seriously though, I looked at Struts and tried to walk through a few
tutorials.  If I can't grasp the framework, even at a very basic,
high-level after doing a couple tutorials...it's probably too complex.

Just glancing over the Wicket examples was enough for me to know it
was something worth pursuing.

On 5/4/06, Johan Compagner <[EMAIL PROTECTED]> wrote:



> and doing all of this while training a new developer who just joined
> the company and is not familiar w/ Java, Wicket, or even web apps
> development in general.



lucky you!!! because they are not completely infected by the mvc (struts)
way of working!
Because that would be much worse :)

johan






---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The other side of Wicket ...

2006-05-04 Thread Vincent Jenks

>
>
>
> I am just wondering how other frameworks handle this problem and why it
seems more difficult in Wicket? Would Wicket fit in well as a Web
presentation layer for an application using EJB3 (including JPA)?


i believe Vincent is working with ejb3 so maybe he can tell you about his
experience. i think it would be trivial to create an IFieldValueFactory that
can inject ejb3 beans instead of spring beans. the contribution would be
welcome.

the code can look identical to the spring injection

@EjbBean private UserService userService;

-Igor




I'm about 90% finished w/ a Wicket/EJB3 (JBoss) storefront solution
for my company to start doing consumer web sales.  In my personal
opinion, Wicket + EJB3 is the holy grail of Java web development...and
I'm not being dramatic.  It would be hard to convince me to use
another framework, going forward.

The app was incredibly easy to build once I got past the few
learning-curve hurdles w/ Wicket (with the help of the exceptional
Wicket devs, of course ;).  I'm now rapidly adding features, tweaking,
and doing all of this while training a new developer who just joined
the company and is not familiar w/ Java, Wicket, or even web apps
development in general.

My app only has one Stateful bean, the ShoppingCart, and I didn't use
injection in the Wicket layer since everything I'm doing passes
through a thin proxy layer...but it was trivial to make calls to the
EJB, nonetheless.  I keep the stub stored in a session class in Wicket
which I did by simply inheriting the WebSession class.

We looked at several other technologies and my first choice was JSF +
JBoss Seam.  It's nice...but doesn't hold a candle to Wicket IMHO.  I
also looked at Tapestry, Struts, WebWork, etc. - none of them had the
simplicity and elegance that Wicket offers...and so far the
performance exceeds my expectations.

-v


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Image upload

2006-05-02 Thread Vincent Jenks
I honestly haven't had the opportunity to integrate it into my app yet.  I'm going to have to pick it apart a bit to conform to my shopping cart.I'll probably rip into it today sometime and I'll post my progress.
I really appreciate the hand, thanks!On 5/2/06, Philip A. Chapman <[EMAIL PROTECTED]> wrote:



  
  


How was it?  Do I need to make any edits to make it easier to understand?

On Mon, 2006-05-01 at 11:28 -0600, Vincent Jenks wrote:

I'll read through this, thanks a ton!



On 5/1/06, Philip A. Chapman <
[EMAIL PROTECTED]> wrote:



Sorry for the delay, but I spent the time to create a wiki page so that hopefully others can benefit from what little I have to say on the subject:

http://www.wicket-wiki.org.uk/wiki/index.php/UploadDownload







On Mon, 2006-05-01 at 08:01 -0700, Igor Vaynberg wrote:

yes, thats it.

basically you would create a that resource that takes the filename/fileid/whatever off the url and streams the file. there is an example of this, i will ask one of my friends to post it here. stay tuned. 


-Igor

    
On 5/1/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:

Did you mean to say DynamicWebResource?

On 4/21/06, Johan Compagner <[EMAIL PROTECTED]> wrote:

> you could save those images to a DB or to a working dir on the server. 
> Then have a DynamicByteArrayResource or the 1.2 one: WebDynamicResource to
> load the image from the location you stored the image.
>
> johan
>
>
> On 4/21/06, Steve Knight < [EMAIL PROTECTED]> wrote:

> >
> > I am creating a form that will allow users to upload image files that will
> be displayed on other pages.  How should I go about uploading the images so 
> that they can be used in Wicket Image components on the other pages?  The
> upload part is not problem, I just don't know where I should put them.
> >
> > On my view pages, I am using ThumbnailImageResource which takes a 
> WebResource in it's contructor to find the image.  Where should I save the
> images to make this work?
> >
> > Thanks.
> >
> >
> > Steve
> >
> > 
> >
>
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier 
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 










-- Philip A. ChapmanDesktop and Web Application Development:Java, .NET, PostgreSQL, MySQL, MSSQLLinux, Windows 2000, Windows XP








-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBEVjqCAdpynRSGw3URAiqOAKCDsSpRHf8WQ8EGaneJoAGS4WD5bwCfaYED
Kb0kHbQYO8P7wOBWUVGWw7I=
=x7ml
-END PGP SIGNATURE- 










-- Philip A. ChapmanDesktop and Web Application Development:Java, .NET, PostgreSQL, MySQL, MSSQLLinux, Windows 2000, Windows XP






-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQBEV4M6AdpynRSGw3URAhkvAJ4tHqn2wYOd9LuuD43MWsGhnGGgxACffIoBEKdVHMEHbsM6PC+E9nkwcFw==GFH9-END PGP SIGNATURE-



Re: [Wicket-user] cannot get DropDownList to select item

2006-05-01 Thread Vincent Jenks

OK, I thought I had it working correctly...but I can't seem to figure
out why I'm getting a ClassCastException in the model now.

It displays the correct quantity when the page is first pulled up
(after selecting an item & quantity on previous page) - but if I
change the quantity and re-submit on the Cart page I get this:

java.lang.ClassCastException: java.lang.Integer
at com.agribeef.abcommerce.ui.Cart$1$1.setObject(Cart.java:121)
at wicket.Component.setModelObject(Component.java:1908)

Line 121 is commented:

IModel selectionModel = new Model()
{
public void setObject(Component c, 
Object o)
{
   //121: CCE HAPPENS HERE
selection.put(config, 
Integer.valueOf((String)o));
}

public Object getObject(Component c)
{
return selection.get(config);
}
};

If I'm selecting a string from the DropDownChoice as a value, why
would this barf?

I think I've been staring at this code too long...I'm starting to trip
over my own toes.

On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:

Man, that'd be nice

On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> no prob.
>
> for future ref keep in mind wicket works on objects. this will be easier
> when we have generics in 2.0 because then the decl would be
>
> DropDownChoice(String id, IModel selection, IModel> choices)
>
> -Igor
>
>
> On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> >
>  Ahh crap...that worked.  I had been around in circles on this so many
> times that was the only combination I *hadn't* tried.
>
> Thanks Igor, I really appreciate it.
>
> On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > next thing is your choices need to be integers, because "10"!=10
> >
> >
> > -Igor
> >
> >
> > On 5/1/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > I set it to return selection.get(config) and it still doesn't select
> > anything.
> > >
> > > I have this now:
> > >
> > > IModel selectionModel =
> > new Model()
> > > {
> > > public void
> > setObject(Component c, Object o)
> > > {
> > >
> > selection.put(config, Integer.parseInt((String)o));
> > > }
> > >
> > > public Object
> > getObject(Component c)
> > > {
> > > return
> > selection.get(config);
> > > }
> > > };
> > >
> > > ...which is still producing this:
> > >
> > > 
> > > 0
> > > 1
> > > 2
> > > 3
> > > 4
> > > 5
> > > 6
> > > 7
> > > 8
> > > 9
> > > 
> > >
> > > I don't want to work directly on the cart object since I have a method
> > > in another class that accepts a Mapand I'm reusing that method
> > > throughout the cart.  I don't want to write another method or alter
> > > the one I have to get around this issue.  It works well as it takes
> > > the map apart, determines if the object already exists, adjusts the
> > > quantity, etc.  I want all cart item additions, adjustments, etc. to
> > > flow thorugh this single method.
> > >
> > > On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > > furthermore, if you wanted you can work on your cart object directly
> > instead
> > > > of having to translate to and from the map.
> > > >
> > > > -Igor
> > > >
> > > >
> > > >
> > > > On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >IModel
> selectionModel
> > = new Model()
> > > > >{
> > > > >     

Re: [Wicket-user] Deployment Help

2006-05-01 Thread Vincent Jenks

Coming from the PHP world might make Java, Wicket, etc. seem more
challenging until you get your development environment setup.  Once
you have a good IDE (in my opinion) you'll find that it's a breeze to
start building apps...especially w/ Wicket.

The quickstarts are good.  Also take a look at the wicket-examples
code to try individual widgets and test-run them.

I think you'll find both Eclipse & Netbeans very nice IDEs, far above
anything that I've ever heard of for PHP.  I prefer Eclipse +
MyEclipse or if you'd rather go 100% free & open source, Eclipse +
Eclipse Webtools.

I've used Netbeans and it's nice too...you get pretty much everything
you need out-of-the-box vs. installing plugins (which is trivial,
really.)

HTH

On 5/1/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:

Packaging using the quickstart project as a basis should be a matter of
running either:

ant war
or
maven war
or
mvn package

if you have installed either ant, maven 1, or maven 2

the resulting war archive will be in the target directory, where you can
pick it up and drop it into the jetty/webapps directory.

But for normal development, you don't really need to do this, as you can and
should just press run (or debug) in your IDE to check your application.


Martijn


On 5/1/06, Steve Moitozo <[EMAIL PROTECTED]> wrote:
> Firstly, please excuse my lack of background. I'm coming from years of
> PHP development and I'm attempting to use the Wicket framework to write
> a simple web application. This is my first entrance into Servlets and
> Wicket and is further complicated because I've never used any of the
> Java IDEs.
>
> I'm having a terribly challenging time trying to figure out where Wicket
> needs to be in relation to my sample application and where all of this
> needs to be in relation to Jetty so that I can run the app.
>
> I have looked all over the Wicket sites and done many different Google
> sessions attempting to get my simple app from "Ready to deploy" to
> "Deployed" in Jetty and cannot seem to find anything to bridge the gap.
> Am I looking too hard or not in the right place?
>
> Thank you for any help you can provide.
>
> -S2
> --
> Steve Moitozo II
>
>
>



--
Wicket 1.2 is coming! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] cannot get DropDownList to select item

2006-05-01 Thread Vincent Jenks

nevermind, it came to me in a trance, I fixed it by doing the following:

selection.put(config, (Integer)o);

On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:

OK, I thought I had it working correctly...but I can't seem to figure
out why I'm getting a ClassCastException in the model now.

It displays the correct quantity when the page is first pulled up
(after selecting an item & quantity on previous page) - but if I
change the quantity and re-submit on the Cart page I get this:

java.lang.ClassCastException: java.lang.Integer
at com.agribeef.abcommerce.ui.Cart$1$1.setObject(Cart.java:121)
at wicket.Component.setModelObject(Component.java:1908)

Line 121 is commented:

IModel selectionModel = new Model()
{
public void setObject(Component c, 
Object o)
{
//121: CCE HAPPENS HERE
selection.put(config, 
Integer.valueOf((String)o));
}

public Object getObject(Component c)
{
return selection.get(config);
}
};

If I'm selecting a string from the DropDownChoice as a value, why
would this barf?

I think I've been staring at this code too long...I'm starting to trip
over my own toes.

On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> Man, that'd be nice
>
> On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > no prob.
> >
> > for future ref keep in mind wicket works on objects. this will be easier
> > when we have generics in 2.0 because then the decl would be
> >
> > DropDownChoice(String id, IModel selection, IModel> choices)
> >
> > -Igor
> >
> >
> > On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > >
> >  Ahh crap...that worked.  I had been around in circles on this so many
> > times that was the only combination I *hadn't* tried.
> >
> > Thanks Igor, I really appreciate it.
> >
> > On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > next thing is your choices need to be integers, because "10"!=10
> > >
> > >
> > > -Igor
> > >
> > >
> > > On 5/1/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > > I set it to return selection.get(config) and it still doesn't select
> > > anything.
> > > >
> > > > I have this now:
> > > >
> > > > IModel selectionModel =
> > > new Model()
> > > > {
> > > > public void
> > > setObject(Component c, Object o)
> > > > {
> > > >
> > > selection.put(config, Integer.parseInt((String)o));
> > > > }
> > > >
> > > > public Object
> > > getObject(Component c)
> > > > {
> > > > return
> > > selection.get(config);
> > > > }
> > > > };
> > > >
> > > > ...which is still producing this:
> > > >
> > > > 
> > > > 0
> > > > 1
> > > > 2
> > > > 3
> > > > 4
> > > > 5
> > > > 6
> > > > 7
> > > > 8
> > > > 9
> > > > 
> > > >
> > > > I don't want to work directly on the cart object since I have a method
> > > > in another class that accepts a Mapand I'm reusing that method
> > > > throughout the cart.  I don't want to write another method or alter
> > > > the one I have to get around this issue.  It works well as it takes
> > > > the map apart, determines if the object already exists, adjusts the
> > > > quantity, etc.  I want all cart item additions, adjustments, etc. to
> > > > flow thorugh this single method.
> > > >
> > > > On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > > > furthermore, if you wanted you can work on your cart object d

Re: [Wicket-user] cannot get DropDownList to select item

2006-05-01 Thread Vincent Jenks

HAHA!  Finally, I nailed one first.

On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

ha! beat you by a minute!


-Igor


On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> nevermind, it came to me in a trance, I fixed it by doing the following:
>
> selection.put (config, (Integer)o);
>
> On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > OK, I thought I had it working correctly...but I can't seem to figure
> > out why I'm getting a ClassCastException in the model now.
> >
> > It displays the correct quantity when the page is first pulled up
> > (after selecting an item & quantity on previous page) - but if I
> > change the quantity and re-submit on the Cart page I get this:
> >
> > java.lang.ClassCastException: java.lang.Integer
> > at
com.agribeef.abcommerce.ui.Cart$1$1.setObject(Cart.java:121)
> > at wicket.Component.setModelObject(Component.java:1908)
> >
> > Line 121 is commented:
> >
> > IModel selectionModel =
new Model()
> > {
> > public void
setObject(Component c, Object o)
> > {
> > //121:
CCE HAPPENS HERE
> >
selection.put(config, Integer.valueOf((String)o));
> > }
> >
> > public Object
getObject(Component c)
> > {
> > return
selection.get(config);
> > }
> > };
> >
> > If I'm selecting a string from the DropDownChoice as a value, why
> > would this barf?
> >
> > I think I've been staring at this code too long...I'm starting to trip
> > over my own toes.
> >
> > On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > Man, that'd be nice
> > >
> > > On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > > no prob.
> > > >
> > > > for future ref keep in mind wicket works on objects. this will be
easier
> > > > when we have generics in 2.0 because then the decl would be
> > > >
> > > > DropDownChoice(String id, IModel selection, IModel>
choices)
> > > >
> > > > -Igor
> > > >
> > > >
> > > > On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > > >
> > > >  Ahh crap...that worked.  I had been around in circles on this so
many
> > > > times that was the only combination I *hadn't* tried.
> > > >
> > > > Thanks Igor, I really appreciate it.
> > > >
> > > > On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > > > next thing is your choices need to be integers, because "10"!=10
> > > > >
> > > > >
> > > > > -Igor
> > > > >
> > > > >
> > > > > On 5/1/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > > > > I set it to return selection.get(config) and it still doesn't
select
> > > > > anything.
> > > > > >
> > > > > > I have this now:
> > > > > >
> > > > > > IModel
selectionModel =
> > > > > new Model()
> > > > > > {
> > > > > > public
void
> > > > > setObject(Component c, Object o)
> > > > > > {
> > > > > >
> > > > > selection.put(config, Integer.parseInt((String)o));
> > > > > > }
> > > > > >
> > > > > > public
Object
> > > > > getObject(Component c)
> > > > > > {
> > > > > >
return
> > > > > selection.get(config);
> > > > > > }
> > > > > > };
> > > > > >
> > > > > > ...which is still producing this:
> > > > > >
> > > > > > 
> > > > > > 0
> > > > > >

Re: [Wicket-user] cannot get DropDownList to select item

2006-05-01 Thread Vincent Jenks

Man, that'd be nice

On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

no prob.

for future ref keep in mind wicket works on objects. this will be easier
when we have generics in 2.0 because then the decl would be

DropDownChoice(String id, IModel selection, IModel> choices)

-Igor


On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
>
 Ahh crap...that worked.  I had been around in circles on this so many
times that was the only combination I *hadn't* tried.

Thanks Igor, I really appreciate it.

On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> next thing is your choices need to be integers, because "10"!=10
>
>
> -Igor
>
>
> On 5/1/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > I set it to return selection.get(config) and it still doesn't select
> anything.
> >
> > I have this now:
> >
> > IModel selectionModel =
> new Model()
> > {
> > public void
> setObject(Component c, Object o)
> > {
> >
> selection.put(config, Integer.parseInt((String)o));
> > }
> >
> > public Object
> getObject(Component c)
> > {
> > return
> selection.get(config);
> > }
> > };
> >
> > ...which is still producing this:
> >
> > 
> > 0
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> > 7
> > 8
> > 9
> > 
> >
> > I don't want to work directly on the cart object since I have a method
> > in another class that accepts a Mapand I'm reusing that method
> > throughout the cart.  I don't want to write another method or alter
> > the one I have to get around this issue.  It works well as it takes
> > the map apart, determines if the object already exists, adjusts the
> > quantity, etc.  I want all cart item additions, adjustments, etc. to
> > flow thorugh this single method.
> >
> > On 5/1/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > furthermore, if you wanted you can work on your cart object directly
> instead
> > > of having to translate to and from the map.
> > >
> > > -Igor
> > >
> > >
> > >
> > > On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > >
> > > >IModel
selectionModel
> = new Model()
> > > >{
> > > >public void
> setObject(Component c,
> > > Object o)
> > > >{
> > > >
> selection.put(config,
> > > Integer.parseInt((String)o));
> > > >}
> > > >
> > > >public
Object
> getObject(Component
> > > c)
> > > >{
> > > >
return
> selection.get(this);
> > > >}
> > > >};
> > > >
> > > >
> > > > in getObject() shouldnt that be return selection.get(config);
> get(this)
> > > will always return null.
> > > >
> > > >
> > > > -Igor
> > > >
> > > >
> > > >
> > > >
> > > > On 5/1/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:
> > > > > I'm back on this issue now after having put it on the
"back-burner"
> > > > > for a short time...since I couldn't figure it out before.  I had
> > > > > posted several messages about this but can't find the original
> emails
> > > > > to reply to, so I'm sorry to create a new thread out of an old
> issue!
> > > > >
> > > > > I *just can't* get this dropdown to choose an item after loading
the
> > > > > model and passing it in...I've exhausted all of my own ideas and
> > > > > really need help figuring this out.
> > > > >
> > > > > I'm building a shopping cart and after selecting an item to add to
> > > > > your cart on a products-list page...you see the next page (Cart
> > > > 

Re: [Wicket-user] cannot get DropDownList to select item

2006-05-01 Thread Vincent Jenks

Ahh crap...that worked.  I had been around in circles on this so many
times that was the only combination I *hadn't* tried.

Thanks Igor, I really appreciate it.

On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

next thing is your choices need to be integers, because "10"!=10


-Igor


On 5/1/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> I set it to return selection.get(config) and it still doesn't select
anything.
>
> I have this now:
>
> IModel selectionModel =
new Model()
> {
> public void
setObject(Component c, Object o)
> {
>
selection.put(config, Integer.parseInt((String)o));
> }
>
> public Object
getObject(Component c)
> {
> return
selection.get(config);
> }
> };
>
> ...which is still producing this:
>
> 
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 
>
> I don't want to work directly on the cart object since I have a method
> in another class that accepts a Mapand I'm reusing that method
> throughout the cart.  I don't want to write another method or alter
> the one I have to get around this issue.  It works well as it takes
> the map apart, determines if the object already exists, adjusts the
> quantity, etc.  I want all cart item additions, adjustments, etc. to
> flow thorugh this single method.
>
> On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > furthermore, if you wanted you can work on your cart object directly
instead
> > of having to translate to and from the map.
> >
> > -Igor
> >
> >
> >
> > On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > >
> > >IModel selectionModel
= new Model()
> > >{
> > >public void
setObject(Component c,
> > Object o)
> > >{
> > >
selection.put(config,
> > Integer.parseInt((String)o));
> > >}
> > >
> > >public Object
getObject(Component
> > c)
> > >{
> > >        return
selection.get(this);
> > >}
> > >};
> > >
> > >
> > > in getObject() shouldnt that be return selection.get(config);
get(this)
> > will always return null.
> > >
> > >
> > > -Igor
> > >
> > >
> > >
> > >
> > > On 5/1/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:
> > > > I'm back on this issue now after having put it on the "back-burner"
> > > > for a short time...since I couldn't figure it out before.  I had
> > > > posted several messages about this but can't find the original
emails
> > > > to reply to, so I'm sorry to create a new thread out of an old
issue!
> > > >
> > > > I *just can't* get this dropdown to choose an item after loading the
> > > > model and passing it in...I've exhausted all of my own ideas and
> > > > really need help figuring this out.
> > > >
> > > > I'm building a shopping cart and after selecting an item to add to
> > > > your cart on a products-list page...you see the next page (Cart
> > > > class).
> > > >
> > > > In the previous page I used a Map to store the Configuration item +
> > > > its quantity selected by the user (Igor, you may remember my many
> > > > posts on this issue)I then use the Cart page to load the Map
into
> > > > the page for display.  Adding & changing items in my cart revolve
> > > > around Wicket passing this Map into it.
> > > >
> > > > In the Cart page I pre-load a new Map to pass into a ListView and
the
> > > > user can then adjust the quantity of the items chosen and re-submit
> > > > the changes.
> > > >
> > > > Here is the entire class:
> > > >
> > > >
> >

&g

Re: [Wicket-user] cannot get DropDownList to select item

2006-05-01 Thread Vincent Jenks

I set it to return selection.get(config) and it still doesn't select anything.

I have this now:

IModel selectionModel = new Model()
{
public void setObject(Component c, 
Object o)
{
selection.put(config, 
Integer.parseInt((String)o));
}

public Object getObject(Component c)
{
return selection.get(config);
}
};

...which is still producing this:


0
1
2
3
4
5
6
7
8
9
 

I don't want to work directly on the cart object since I have a method
in another class that accepts a Mapand I'm reusing that method
throughout the cart.  I don't want to write another method or alter
the one I have to get around this issue.  It works well as it takes
the map apart, determines if the object already exists, adjusts the
quantity, etc.  I want all cart item additions, adjustments, etc. to
flow thorugh this single method.

On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

furthermore, if you wanted you can work on your cart object directly instead
of having to translate to and from the map.

-Igor



On 5/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
>IModel selectionModel = new Model()
>{
>public void setObject(Component c,
Object o)
>{
>selection.put(config,
Integer.parseInt((String)o));
>}
>
>public Object getObject(Component
c)
>{
>return selection.get(this);
>}
>};
>
>
> in getObject() shouldnt that be return selection.get(config); get(this)
will always return null.
>
>
> -Igor
>
>
>
>
> On 5/1/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:
> > I'm back on this issue now after having put it on the "back-burner"
> > for a short time...since I couldn't figure it out before.  I had
> > posted several messages about this but can't find the original emails
> > to reply to, so I'm sorry to create a new thread out of an old issue!
> >
> > I *just can't* get this dropdown to choose an item after loading the
> > model and passing it in...I've exhausted all of my own ideas and
> > really need help figuring this out.
> >
> > I'm building a shopping cart and after selecting an item to add to
> > your cart on a products-list page...you see the next page (Cart
> > class).
> >
> > In the previous page I used a Map to store the Configuration item +
> > its quantity selected by the user (Igor, you may remember my many
> > posts on this issue)I then use the Cart page to load the Map into
> > the page for display.  Adding & changing items in my cart revolve
> > around Wicket passing this Map into it.
> >
> > In the Cart page I pre-load a new Map to pass into a ListView and the
> > user can then adjust the quantity of the items chosen and re-submit
> > the changes.
> >
> > Here is the entire class:
> >
> >

> > public class Cart extends WebPage
> > {
> > private Map selection = new
> > HashMap();
> >
> > public Cart()
> > {
> > //get cart from session
> > final ShoppingCart cart =
((UserSession)getSession()).getCart();
> >
> > //create form
> > Form form = new Form("cartForm");
> >
> > //add OrderLine items to map
> > for (OrderLine line : cart.getOrderLines())
> > {
> > selection.put(line.getConfiguration(),
line.getQuantity());
> > }
> >
> > //add list of Configuration objects to form
> > form.add(new ListView("cartView", cart.getOrderLines())
> > {
> > protected void
populateItem(ListItem item)
&

Re: [Wicket-user] Wicket book

2006-05-01 Thread Vincent Jenks

I have to agree.  What would be nice, if possible, is a small example
code snippet in the Javadoc for each object.  However, some may feel
that code doesn't belong in there at all and should be in the wiki
instead.

Personally, I like example code too but small examples don't always
fully illustrate some conceptsthat's there the wiki comes in.

On 5/1/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:

Due to the lack of time most of us have here, we need to make choices.
I think the WIKI is great for getting the contributions from the
community itself, though the core devs - especially Gwyn - regularly
update it too. But it's really great to see more people are helping
out and writing items on the WIKI.

I try to focus on examples personally. Everyone has a different way of
learning; I find examples always really useful, and it has the
additional advantage of functioning as proof-of-concept/ test code a
lot of times.

Just my 2c,

Eelco


On 5/1/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> It's very useful, however, it's also lacking quite a bit of
> information.  The Wiki and the Javadoc doesn't get you as far as you'd
> hope, as a newbie.
>
> I use the Wiki, search the mailing list, and then post when I run out
> of options for info.
>
> Anyhow, everything is improving daily...including the wiki.
>
> On 5/1/06, Timo Stamm <[EMAIL PROTECTED]> wrote:
> > Vincent Jenks schrieb:
> > > Yes, the developers are *insanely* helpful and patient. ;)  Without
> > > this list I'm not sure I would have been able to use Wicket for long,
> > > to be perfectly honest.
> >
> > "Try the Wiki!" wasn't ment as "Try the Wiki because the devs have
> > better things to do", it was ment as "Try the Wiki because it's become
> > damn useful!"
> >
> >
> > Timo
> >
> >
> > > On 5/1/06, Timo Stamm <[EMAIL PROTECTED]> wrote:
> > >> Rivka Shisman schrieb:
> > >> > A good book with examples and recipes is quite necessary :-)
> > >>
> > >> Try the Wiki! http://www.wicket-wiki.org.uk
> > >>
> > >> There is nice guide for beginners that should get you started:
> > >> http://www.wicket-wiki.org.uk/wiki/index.php/Newuserguide
> > >>
> > >> Then there is the reference library with information and howtos on a lot
> > >> of topics: http://www.wicket-wiki.org.uk/wiki/index.php/Reference_library
> > >>
> > >>
> > >> Timo
> > >>
> > >>
> > >> ---
> > >> Using Tomcat but need to do more? Need to support web services, security?
> > >> Get stuff done quickly with pre-integrated technology to make your job
> > >> easier
> > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > >> Geronimo
> > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > >> ___
> > >> Wicket-user mailing list
> > >> Wicket-user@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >>
> > >
> > >
> > > ---
> > > Using Tomcat but need to do more? Need to support web services, security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> > > easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> >
> > ---
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job 
easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> ---
> Using Tomcat b

Re: [Wicket-user] Wicket book

2006-05-01 Thread Vincent Jenks

It's very useful, however, it's also lacking quite a bit of
information.  The Wiki and the Javadoc doesn't get you as far as you'd
hope, as a newbie.

I use the Wiki, search the mailing list, and then post when I run out
of options for info.

Anyhow, everything is improving daily...including the wiki.

On 5/1/06, Timo Stamm <[EMAIL PROTECTED]> wrote:

Vincent Jenks schrieb:
> Yes, the developers are *insanely* helpful and patient. ;)  Without
> this list I'm not sure I would have been able to use Wicket for long,
> to be perfectly honest.

"Try the Wiki!" wasn't ment as "Try the Wiki because the devs have
better things to do", it was ment as "Try the Wiki because it's become
damn useful!"


Timo


> On 5/1/06, Timo Stamm <[EMAIL PROTECTED]> wrote:
>> Rivka Shisman schrieb:
>> > A good book with examples and recipes is quite necessary :-)
>>
>> Try the Wiki! http://www.wicket-wiki.org.uk
>>
>> There is nice guide for beginners that should get you started:
>> http://www.wicket-wiki.org.uk/wiki/index.php/Newuserguide
>>
>> Then there is the reference library with information and howtos on a lot
>> of topics: http://www.wicket-wiki.org.uk/wiki/index.php/Reference_library
>>
>>
>> Timo
>>
>>
>> ---
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
>
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Image upload

2006-05-01 Thread Vincent Jenks
I'll read through this, thanks a ton!On 5/1/06, Philip A. Chapman <[EMAIL PROTECTED]> wrote:



  
  


Sorry for the delay, but I spent the time to create a wiki page so that hopefully others can benefit from what little I have to say on the subject:

http://www.wicket-wiki.org.uk/wiki/index.php/UploadDownload


On Mon, 2006-05-01 at 08:01 -0700, Igor Vaynberg wrote:

yes, thats it.

basically you would create a that resource that takes the filename/fileid/whatever off the url and streams the file. there is an example of this, i will ask one of my friends to post it here. stay tuned. 


-Igor




On 5/1/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:

Did you mean to say DynamicWebResource?

On 4/21/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> you could save those images to a DB or to a working dir on the server. 
> Then have a DynamicByteArrayResource or the 1.2 one: WebDynamicResource to
> load the image from the location you stored the image.
>
> johan
>
>
> On 4/21/06, Steve Knight < [EMAIL PROTECTED]> wrote:
> >
> > I am creating a form that will allow users to upload image files that will
> be displayed on other pages.  How should I go about uploading the images so 
> that they can be used in Wicket Image components on the other pages?  The
> upload part is not problem, I just don't know where I should put them.
> >
> > On my view pages, I am using ThumbnailImageResource which takes a 
> WebResource in it's contructor to find the image.  Where should I save the
> images to make this work?
> >
> > Thanks.
> >
> >
> > Steve
> >
> > 
> >
>
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier 
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user









-- Philip A. ChapmanDesktop and Web Application Development:Java, .NET, PostgreSQL, MySQL, MSSQLLinux, Windows 2000, Windows XP






-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQBEVjqCAdpynRSGw3URAiqOAKCDsSpRHf8WQ8EGaneJoAGS4WD5bwCfaYEDKb0kHbQYO8P7wOBWUVGWw7I==x7ml-END PGP SIGNATURE-



[Wicket-user] cannot get DropDownList to select item

2006-05-01 Thread Vincent Jenks

I'm back on this issue now after having put it on the "back-burner"
for a short time...since I couldn't figure it out before.  I had
posted several messages about this but can't find the original emails
to reply to, so I'm sorry to create a new thread out of an old issue!

I *just can't* get this dropdown to choose an item after loading the
model and passing it in...I've exhausted all of my own ideas and
really need help figuring this out.

I'm building a shopping cart and after selecting an item to add to
your cart on a products-list page...you see the next page (Cart
class).

In the previous page I used a Map to store the Configuration item +
its quantity selected by the user (Igor, you may remember my many
posts on this issue)I then use the Cart page to load the Map into
the page for display.  Adding & changing items in my cart revolve
around Wicket passing this Map into it.

In the Cart page I pre-load a new Map to pass into a ListView and the
user can then adjust the quantity of the items chosen and re-submit
the changes.

Here is the entire class:


public class Cart extends WebPage
{   
private Map selection = new
HashMap();

public Cart()
{   
//get cart from session
final ShoppingCart cart = ((UserSession)getSession()).getCart();

//create form
Form form = new Form("cartForm");

//add OrderLine items to map
for (OrderLine line : cart.getOrderLines())
{
selection.put(line.getConfiguration(), 
line.getQuantity());
}

//add list of Configuration objects to form
form.add(new ListView("cartView", cart.getOrderLines())
{
protected void populateItem(ListItem item)
{
//get object
final OrderLine line = 
(OrderLine)item.getModelObject();

//pull config from line
final Configuration config = 
line.getConfiguration();

//store Configuration and qty in model
IModel selectionModel = new Model()
{
public void setObject(Component c, 
Object o)
{
selection.put(config, 
Integer.parseInt((String)o));
}

public Object getObject(Component c)
{
return selection.get(this);
}
};

//qty select values
List choices = Arrays.asList(
new String[] {"0", "1", "2", "3", "4", "5", "6", 
"7", "8", "9"});

//add quantity select list  

item.add(new DropDownChoice("quantity", 
selectionModel, choices)
{
protected String getDefaultChoice(final 
Object selected)
{
return ""; //get rid of "Choose One" default
}

public String getDisplayValue(Object 
object)
{
return object.toString();
}

public String getIdValue(Object object, 
int index)
{
return object.toString();
}   

}); 

//create link w/ event handler
item.add(new Link("removeLink")
{   
public void onClick()
{
  
 

Re: [Wicket-user] Image upload

2006-05-01 Thread Vincent Jenks

Did you mean to say DynamicWebResource?

On 4/21/06, Johan Compagner <[EMAIL PROTECTED]> wrote:

you could save those images to a DB or to a working dir on the server.
Then have a DynamicByteArrayResource or the 1.2 one: WebDynamicResource to
load the image from the location you stored the image.

johan


On 4/21/06, Steve Knight <[EMAIL PROTECTED]> wrote:
>
> I am creating a form that will allow users to upload image files that will
be displayed on other pages.  How should I go about uploading the images so
that they can be used in Wicket Image components on the other pages?  The
upload part is not problem, I just don't know where I should put them.
>
> On my view pages, I am using ThumbnailImageResource which takes a
WebResource in it's contructor to find the image.  Where should I save the
images to make this work?
>
> Thanks.
>
>
> Steve
>
>
>





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Image upload

2006-05-01 Thread Vincent Jenks

This all sounds fantastic to me...and I'm sure it's second nature to
you...but means nothing to me ;)  I've never used struts.  Is there an
example in wicket-examples?  It's not obvious to me if there is one in
there.

Sorry for the hand-holding but I'm not at all familiar w/ this concept yet.

On 4/27/06, Johan Compagner <[EMAIL PROTECTED]> wrote:

WebDynamicResource is new in the latest 1.2 releases
just a rename of DynamicByteArrayResource

just make a ResourceState (inner class of DynamicByteArrayResource)
and in getDate() you lazy load youre byte array from somewhere

johan



On 4/27/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
>
 I definitely don't want to use blobs

Where can I find an example of doing what I need using
WebDynamicResource?  I don't even see this class listed in the 1.2
Javadoc...

Where do I start?

Thanks!

On 4/21/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> wicket-contrib-examples of wicket-stuff has the cdapp example that
> does this. It uses hibernate and stores uploaded images in the
> database as a blob.
>
> Eelco
>
>
> On 4/21/06, Steve Knight <[EMAIL PROTECTED]> wrote:
> > I am creating a form that will allow users to upload image files that
will
> > be displayed on other pages.  How should I go about uploading the images
so
> > that they can be used in Wicket Image components on the other pages?
The
> > upload part is not problem, I just don't know where I should put them.
> >
> > On my view pages, I am using ThumbnailImageResource which takes a
> > WebResource in it's contructor to find the image.  Where should I save
the
> > images to make this work?
 > >
> > Thanks.
> >
> > Steve
> >
> >
> >
>
>
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket book

2006-05-01 Thread Vincent Jenks

Yes, the developers are *insanely* helpful and patient. ;)  Without
this list I'm not sure I would have been able to use Wicket for long,
to be perfectly honest.

On 5/1/06, Timo Stamm <[EMAIL PROTECTED]> wrote:

Rivka Shisman schrieb:
> A good book with examples and recipes is quite necessary :-)

Try the Wiki! http://www.wicket-wiki.org.uk

There is nice guide for beginners that should get you started:
http://www.wicket-wiki.org.uk/wiki/index.php/Newuserguide

Then there is the reference library with information and howtos on a lot
of topics: http://www.wicket-wiki.org.uk/wiki/index.php/Reference_library


Timo


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] markup in Label

2006-04-29 Thread Vincent Jenks

Good point, thanks!

On 4/29/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:

The current default is the most safe option. It provides a first guard
against javascript injections to your markup if you have an input that takes
some text, and that will be presented to your users.

It is a conscious decision on your part whether to allow those things.

Martijn


On 4/29/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> Excellent, thank you!  I looked at the javadoc but must have passed
> right over that method...too easy!
>
> However, I suppose I would have intuitively expected it to be exactly
> the opposite.  I guess I expected that if I wanted to escape markup, I
> should set it, otherwise it would be rendered.
>
> Anyhow, thanks again.
>
> On 4/29/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> > I was just writing that part of Wicket in Action, so I'll just
copy/paste...
> >
> >
> > You can tell Wicket not to escape the contents by setting a flag on the
> > component. Take a look at the next Java snippet:
> > add(new Label("markup", "Hello!")
> > .setEscapeModelStrings(false));
> >
> > The call to setEscapeModelStrings tells Wicket not to escape the
contents of
> > the provided string, and just render the contents into the resulting
markup.
> >
> >
> > Martijn
> >
> >
> >
> > On 4/29/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > >
> >  How do I prevent HTML markup from being converted to literal values,
> > i.e. "<" converted to "<" when rendering a Label?
> >
> > I'm using the xinha editor on a TextArea and once the user submits the
> > form there is HTML mixed into the value of the widget.  When I pull up
> > the data on a page w/ a Label, I'm able to see the tags and not the
> > actual markup being rendered in the browser.
> >
> > Thanks!
> >
> >
> > ---
> >
> > Using Tomcat but need to do more? Need to support web services,
security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
> >
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> >
https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
> >
> > --
> > Wicket 1.2 is coming! Write Ajax applications without touching
JavaScript!
> > -- http://wicketframework.org
>
>
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>



--
Wicket 1.2 is coming! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] markup in Label

2006-04-29 Thread Vincent Jenks

Excellent, thank you!  I looked at the javadoc but must have passed
right over that method...too easy!

However, I suppose I would have intuitively expected it to be exactly
the opposite.  I guess I expected that if I wanted to escape markup, I
should set it, otherwise it would be rendered.

Anyhow, thanks again.

On 4/29/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:

I was just writing that part of Wicket in Action, so I'll just copy/paste...


You can tell Wicket not to escape the contents by setting a flag on the
component. Take a look at the next Java snippet:
add(new Label("markup", "Hello!")
.setEscapeModelStrings(false));

The call to setEscapeModelStrings tells Wicket not to escape the contents of
the provided string, and just render the contents into the resulting markup.


Martijn



On 4/29/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
>
 How do I prevent HTML markup from being converted to literal values,
i.e. "<" converted to "<" when rendering a Label?

I'm using the xinha editor on a TextArea and once the user submits the
form there is HTML mixed into the value of the widget.  When I pull up
the data on a page w/ a Label, I'm able to see the tags and not the
actual markup being rendered in the browser.

Thanks!


---

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Wicket 1.2 is coming! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] markup in Label

2006-04-29 Thread Vincent Jenks

How do I prevent HTML markup from being converted to literal values,
i.e. "<" converted to "<" when rendering a Label?

I'm using the xinha editor on a TextArea and once the user submits the
form there is HTML mixed into the value of the widget.  When I pull up
the data on a page w/ a Label, I'm able to see the tags and not the
actual markup being rendered in the browser.

Thanks!


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Image upload

2006-04-28 Thread Vincent Jenks

What is this going to do to speed/scalability?  This is for a shopping
cart and these images will be what the users see on the first (and
busiest) page of the app.

On 4/27/06, Johan Compagner <[EMAIL PROTECTED]> wrote:

WebDynamicResource is new in the latest 1.2 releases
just a rename of DynamicByteArrayResource

just make a ResourceState (inner class of DynamicByteArrayResource)
and in getDate() you lazy load youre byte array from somewhere

johan



On 4/27/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
>
 I definitely don't want to use blobs

Where can I find an example of doing what I need using
WebDynamicResource?  I don't even see this class listed in the 1.2
Javadoc...

Where do I start?

Thanks!

On 4/21/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> wicket-contrib-examples of wicket-stuff has the cdapp example that
> does this. It uses hibernate and stores uploaded images in the
> database as a blob.
>
> Eelco
>
>
> On 4/21/06, Steve Knight <[EMAIL PROTECTED]> wrote:
> > I am creating a form that will allow users to upload image files that
will
> > be displayed on other pages.  How should I go about uploading the images
so
> > that they can be used in Wicket Image components on the other pages?
The
> > upload part is not problem, I just don't know where I should put them.
> >
> > On my view pages, I am using ThumbnailImageResource which takes a
> > WebResource in it's contructor to find the image.  Where should I save
the
> > images to make this work?
 > >
> > Thanks.
> >
> > Steve
> >
> >
> >
>
>
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Image upload

2006-04-27 Thread Vincent Jenks
I definitely don't want to use blobs

Where can I find an example of doing what I need using
WebDynamicResource?  I don't even see this class listed in the 1.2
Javadoc...

Where do I start?

Thanks!

On 4/21/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> wicket-contrib-examples of wicket-stuff has the cdapp example that
> does this. It uses hibernate and stores uploaded images in the
> database as a blob.
>
> Eelco
>
>
> On 4/21/06, Steve Knight <[EMAIL PROTECTED]> wrote:
> > I am creating a form that will allow users to upload image files that will
> > be displayed on other pages.  How should I go about uploading the images so
> > that they can be used in Wicket Image components on the other pages?  The
> > upload part is not problem, I just don't know where I should put them.
> >
> > On my view pages, I am using ThumbnailImageResource which takes a
> > WebResource in it's contructor to find the image.  Where should I save the
> > images to make this work?
> >
> > Thanks.
> >
> > Steve
> >
> >
> >
>
>
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RE: Resetting a Form

2006-04-26 Thread Vincent Jenks
You could redirect back to the current page.

On 4/26/06, Andrew Strickland <[EMAIL PROTECTED]> wrote:
>
>
> How would I go about resetting a form to a blank state after it validates
> it's data and stores it to a database?  Subsequent visits to the Page the
> form is on still contains the data from the last submission.
>
> I tried re-initializing the object that backs the BoundCompoundPropertyModel
> but that didn't seem to work.
>
>
> The FormComponent(s) inherit their model from the BoundCompoundPropertyModel
> of the Panel they are on, which in turn gets the model object from the Page.
>
> Andy
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___ Wicket-user
> mailing list Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] image upload

2006-04-26 Thread Vincent Jenks
I'm sure this has been asked before but I couldn't find an example.

I'm using JBoss 4 and Wicket 1.2RC2...and I'm trying to upload images
into a specific folder inside of a deployed .ear project.  The folder
in the web app would be /http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HelloWorldApplication won't show index page

2006-04-22 Thread Vincent Jenks
Webtools is great (considering the price ;)) if you don't want to
purchase MyEclipse.  That'll give you web-based projects that Eclipse
currently does not have out-of-the-box.

On 4/22/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> install maven 2 and inside quickstart folder type
>
> mvn package
>
> that will build a deployable war inside the target subfolder. you can see
> that for an example of a war.
>
> -Igor
>
>
>
>  On 4/22/06, Rui Pacheco <[EMAIL PROTECTED]> wrote:
> >
> > I can get the QuickStart application to run, but thats it. When I move the
> classes to my application they just stop working.
> > One thing: I am deploying the application as a standard web app. I am
> putting my classes and HTML files inside packages and placing the compiled
> classes inside WEB-INF/classes and the wicket .jar inside WEB-INF/lib. I am
> supposed to do this, right?
> > The QuickStart example has an empty directory, except for a web.xml file.
> >
> >
> >
> >
> > On 4/23/06, Rui Pacheco <[EMAIL PROTECTED] > wrote:
> > >
> > > I have already removed it, as Gwyn sugested. And still just the 404.
> > >
> > >
> > >
> > > On 4/22/06, Lasse Koskela < [EMAIL PROTECTED] > wrote:
> > > >
> > >
> > > On 4/23/06, Rui Pacheco < [EMAIL PROTECTED] > wrote:
> > > > Yesterday I sent a message asking wondering why my helloworld
> application
> > > > didn't go beyond loading the main class by Tomcat. Someone asked for
> my
> > > > source code, I'm sending it in attachment.
> > >
> > >
> > > Why are you overriding "newSession()" in your Application class? Maybe
> > > that's the culprit?
> > >
> > > -Lasse-
> > >
> > >
> > >
> > > ---
> > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> >
> >
> > --
> > Cumprimentos,
> >
> > Rui Pacheco
>
>
>
> --
> Cumprimentos,
> Rui Pacheco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] wicket download links broken

2006-04-22 Thread Vincent Jenks
These give a 500 error:

http://wicket.sourceforge.net/Download.html

...but I can get to these through SF:

http://sourceforge.net/project/showfiles.php?group_id=119783


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RC2 - still have javascript errors

2006-04-21 Thread Vincent Jenks
Interesting, I had never noticed it before and didn't get the error
while using 1.1.1.  I've only been using wicket for about 1.5 mo. so
I'm still a greenhorn.

On 4/21/06, Gwyn Evans <[EMAIL PROTECTED]> wrote:
> Just as an aside, to the best of my knowledge, this isn't something
> that's new/changed in 1.2, hence nothing in any transition notes -
> this is been there right from the start, but maybe it's more apparent
> now there tends to be more to Wicket than the basic servlet, if you
> see what I mean.
>
> /Gwyn
>
> On 21/04/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > Finally got around to putting the /* in the mapping and t's all good
> > now, thanks!
> >
> > On 4/21/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > Oh, sorry, here's the whole thing.
> > >
> > >   
> > > ProductCatalogApp
> > > wicket.protocol.http.WicketServlet
> > > 
> > >   applicationClassName
> > >   com.myapp.ProductCatalogApp
> > > 
> > > 1
> > >   
> > >   
> > > ProductCatalogApp
> > > /products
> > >   
> > >
> > > ...obviously I need to change it to /products/* ??  I guess I must
> > > have missed that in the transition doc, sorry!
>
>
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: ListView.setUseOptimizedItemRemoval()

2006-04-21 Thread Vincent Jenks
+1 - it's certainly easier on the eyes.

On 4/21/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> +1
>
> we can deprecate the existing one and have it forward to the new one as not
> to break the api. then remove the deprecated method once 1.2 is out of the
> door.
>
> -Igor
>
>
>
>  On 4/21/06, cowwoc <[EMAIL PROTECTED]> wrote:
> >
> > I vote in favor of renaming setUseOptimizedItemRemoval() to
> > setReuseItems() because I feel it is more descriptive of what it
> > actually does. What do the rest of you think?
> >
> > Thanks,
> > Gili
> >
> >
> >
> >
>
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] migrating to 1.1

2006-04-21 Thread Vincent Jenks
And, if I'm not mistaken, the book will be based on 1.2, correct?

On 4/21/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> we are going to release 1.2 pretty soon, I suppose somewhere in the next two
> weeks, preferrable before 1st of may.
>
>  Wicket 1.2 has many improvements over 1.1 and will be our major release. I
> don't know how long a release cycle for the netbeans module will be, but you
> might want to wait for the 1.2 final release.
>
>  Martijn
>
>
> On 4/21/06, Geertjan Wielenga <[EMAIL PROTECTED]> wrote:
> >
> >
> > Yes, I had 1.0.3 samples and now, for the NetBeans support, I'd like to
> use the latest stable major version, which is 1.1. So I don't know what the
> difference was exactly, but I got the 1.1 samples and everything seems to be
> ok now.
> >
> > Gj
> >
> >
> >
> > Johan Compagner wrote:
> >
> > migrating to 1.1? from where 1.0?
> > For every release we have a 1-1 relation shipt with our examples or
> extentions (and most wicket-stuff things also)
> >
> > johan
> >
> >
> >
> > On 4/21/06, Geertjan Wielenga <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > I migrated to Wicket 1.1 and found a problem with this method in Guest
> > > Book (the arrow point to the problematic line):
> > >
> > >
> > > public CommentForm(final String id) {
> > > // Construct form with no validation listener
> > > -->   super(id, new CompoundPropertyModel(new Comment()),
> > > null);
> > >
> > > // Add text entry widget
> > > add(new TextArea("text"));
> > > }
> > >
> > >
> > > Does 1.1 come with updated samples? Or can I change the above somehow?
> > >
> > > Gj
> >
> >
> >
> >
> > ---
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
>
>
> --
> Wicket 1.2 is coming! Write Ajax applications without touching JavaScript!
> -- http://wicketframework.org


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Index page not loading

2006-04-21 Thread Vincent Jenks
Post your code and the lines from web.xml where you've configured the
Wicket servlet.

On 4/21/06, Rui Pacheco <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I am currently writing a HelloWorld application using 1.2RC2.
>
> My problem is when I deploy the application I see the class that extends
> WebApplication being instantiated by Tomcat (I have a system.err.println
> there) but I can't make my index page appear. Internet Explorer keeps on
> spinning eternally and I see no activity on Tomcat's logs.
>
> Can anyone help me diagnose whats happening? I am using the latest edition
> of Tomcat and Java 5 as of this writing.
>
> --
> Cumprimentos,
> Rui Pacheco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] migrating to 1.1

2006-04-21 Thread Vincent Jenks
I'd almost say that you might want to consider just using 1.2 since it
is now in RC mode and will be production-grade soon?  Correct me if
I'm wrong, but 1.1.1 will be obsolete soon.

I'm using 1.2RC2 on a project that will go into productin in less than
a month and so far I'm very happy w/ it.  I just upgraded from 1.1.1
and so far, it's solid.

On 4/21/06, Geertjan Wielenga <[EMAIL PROTECTED]> wrote:
>
>  Yes, I had 1.0.3 samples and now, for the NetBeans support, I'd like to use
> the latest stable major version, which is 1.1. So I don't know what the
> difference was exactly, but I got the 1.1 samples and everything seems to be
> ok now.
>
>  Gj
>
>
>  Johan Compagner wrote:
>
> migrating to 1.1? from where 1.0?
>  For every release we have a 1-1 relation shipt with our examples or
> extentions (and most wicket-stuff things also)
>
>  johan
>
>
>
> On 4/21/06, Geertjan Wielenga <[EMAIL PROTECTED]> wrote:
> >
> >
> > I migrated to Wicket 1.1 and found a problem with this method in Guest
> > Book (the arrow point to the problematic line):
> >
> >
> > public CommentForm(final String id) {
> > // Construct form with no validation listener
> > -->   super(id, new CompoundPropertyModel(new Comment()),
> > null);
> >
> > // Add text entry widget
> > add(new TextArea("text"));
> > }
> >
> >
> > Does 1.1 come with updated samples? Or can I change the above somehow?
> >
> > Gj
> >
> >
> > ---
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RC2 - still have javascript errors

2006-04-21 Thread Vincent Jenks
Finally got around to putting the /* in the mapping and t's all good
now, thanks!

On 4/21/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> Oh, sorry, here's the whole thing.
>
>   
> ProductCatalogApp
> wicket.protocol.http.WicketServlet
> 
>   applicationClassName
>   com.myapp.ProductCatalogApp
> 
> 1
>   
>   
> ProductCatalogApp
> /products
>   
>
> ...obviously I need to change it to /products/* ??  I guess I must
> have missed that in the transition doc, sorry!
>
> On 4/20/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > I think Igor meant what the  element looks like. E.g.
> > phonebook has:
> >
> > 
> > phonebook
> > /app/*
> > 
> >
> > if that would be
> >
> > 
> > phonebook
> > /app/
> > 
> >
> > (without the *), package resources won't work.
> >
> > Eelco
> >
> >
> > On 4/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > wicket.protocol.http.WicketServlet
> > >
> > > On 4/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > > what is the servlet mapping you use for the wicket servlet?
> > > >
> > > > -Igor
> > > >
> > > >
> > > >
> > > > On 4/20/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:
> > > > > 404 not found
> > > > >
> > > > > On 4/20/06, Johan Compagner < [EMAIL PROTECTED]> wrote:
> > > > > > and what does this link return?
> > > > > >
> > > > > >
> > > > > >
> > > > /MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF
> > > > > >
> > > > > > johan
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 4/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > >  Yep, here's all the js stuff I see in the head:
> > > > > >
> > > > > >  > > > > >
> > > > src="/MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF">
> > > > > > var pagemapcookie =
> > > > > > getWicketCookie('pm-null/MyAppProductCatalogApp');
> > > > > > if(!pagemapcookie && pagemapcookie !=
> > > > > >
> > > > '1'){setWicketCookie('pm-null/MyAppProductCatalogApp',1);}
> > > > > > else {document.location.href =
> > > > > >
> > > > '/MyApp/products;jsessionid=8D5250BD41A597EBD63C695113E757DF?wicket:bookmarkablePage=wicket-0:com.myapp.ui.ProductCatalog';}
> > > > > > 
> > > > > >
> > > > > > ...and in the body tag:
> > > > > >
> > > > > >  > > > > >
> > > > onUnLoad="deleteWicketCookie('pm-null/MyAppProductCatalogApp');">
> > > > > >
> > > > > > On 4/20/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > > > > > > how is that possible?
> > > > > > > don't you have a script like:
> > > > > > >  > > > > > >
> > > > > >
> > > > src="/wicket/forminput/resources/wicket.markup.html.WebPage/cookies.js">
> > > > > > >
> > > > > > > included in youre page?
> > > > > > >
> > > > > > >
> > > > > > > johan
> > > > > > >
> > > > > > >
> > > > > > > On 4/20/06, Vincent Jenks < [EMAIL PROTECTED] > wrote:
> > > > > > > >
> > > > > > >  Using Wicket 1.2RC2, I still get these javascript errors in both
> > > > > > > Firefox 1.5.0.2 and IE 6.0:
> > > > > > >
> > > > > > > deleteWicketCookie is not defined
> > > > > > > getWicketCookie is not defined
> > > > > > >
> > > > > > >
> > > > > > >
> > > > ---
> > > > > > > Using Tomcat but need to do more? Need to support web services,
> > > > security?
> >

Re: [Wicket-user] RC2 - still have javascript errors

2006-04-21 Thread Vincent Jenks
Oh, sorry, here's the whole thing.

  
ProductCatalogApp
wicket.protocol.http.WicketServlet

  applicationClassName
  com.myapp.ProductCatalogApp

1
  
  
ProductCatalogApp
/products
  

...obviously I need to change it to /products/* ??  I guess I must
have missed that in the transition doc, sorry!

On 4/20/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> I think Igor meant what the  element looks like. E.g.
> phonebook has:
>
> 
> phonebook
> /app/*
> 
>
> if that would be
>
> 
> phonebook
> /app/
> 
>
> (without the *), package resources won't work.
>
> Eelco
>
>
> On 4/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > wicket.protocol.http.WicketServlet
> >
> > On 4/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > what is the servlet mapping you use for the wicket servlet?
> > >
> > > -Igor
> > >
> > >
> > >
> > > On 4/20/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:
> > > > 404 not found
> > > >
> > > > On 4/20/06, Johan Compagner < [EMAIL PROTECTED]> wrote:
> > > > > and what does this link return?
> > > > >
> > > > >
> > > > >
> > > /MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF
> > > > >
> > > > > johan
> > > > >
> > > > >
> > > > >
> > > > > On 4/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > >  Yep, here's all the js stuff I see in the head:
> > > > >
> > > > >  > > > >
> > > src="/MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF">
> > > > > var pagemapcookie =
> > > > > getWicketCookie('pm-null/MyAppProductCatalogApp');
> > > > > if(!pagemapcookie && pagemapcookie !=
> > > > >
> > > '1'){setWicketCookie('pm-null/MyAppProductCatalogApp',1);}
> > > > > else {document.location.href =
> > > > >
> > > '/MyApp/products;jsessionid=8D5250BD41A597EBD63C695113E757DF?wicket:bookmarkablePage=wicket-0:com.myapp.ui.ProductCatalog';}
> > > > > 
> > > > >
> > > > > ...and in the body tag:
> > > > >
> > > > >  > > > >
> > > onUnLoad="deleteWicketCookie('pm-null/MyAppProductCatalogApp');">
> > > > >
> > > > > On 4/20/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > > > > > how is that possible?
> > > > > > don't you have a script like:
> > > > > >  > > > > >
> > > > >
> > > src="/wicket/forminput/resources/wicket.markup.html.WebPage/cookies.js">
> > > > > >
> > > > > > included in youre page?
> > > > > >
> > > > > >
> > > > > > johan
> > > > > >
> > > > > >
> > > > > > On 4/20/06, Vincent Jenks < [EMAIL PROTECTED] > wrote:
> > > > > > >
> > > > > >  Using Wicket 1.2RC2, I still get these javascript errors in both
> > > > > > Firefox 1.5.0.2 and IE 6.0:
> > > > > >
> > > > > > deleteWicketCookie is not defined
> > > > > > getWicketCookie is not defined
> > > > > >
> > > > > >
> > > > > >
> > > ---
> > > > > > Using Tomcat but need to do more? Need to support web services,
> > > security?
> > > > > > Get stuff done quickly with pre-integrated technology to make your 
> > > > > > job
> > > > > > easier
> > > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > > Geronimo
> > > > > >
> > > > >
> > > http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > > > > > ___
> > > > > > Wicket-user mailing list
> > > > > > Wicket-user@lists.sourceforge.net
> > > > > >
> > > https://lists.sourceforge.net/lists/li

Re: [Wicket-user] RC2 - still have javascript errors

2006-04-20 Thread Vincent Jenks
wicket.protocol.http.WicketServlet

On 4/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> what is the servlet mapping you use for the wicket servlet?
>
> -Igor
>
>
>
> On 4/20/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:
> > 404 not found
> >
> > On 4/20/06, Johan Compagner < [EMAIL PROTECTED]> wrote:
> > > and what does this link return?
> > >
> > >
> > >
> /MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF
> > >
> > > johan
> > >
> > >
> > >
> > > On 4/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > >
> > >  Yep, here's all the js stuff I see in the head:
> > >
> > >  > >
> src="/MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF">
> > > var pagemapcookie =
> > > getWicketCookie('pm-null/MyAppProductCatalogApp');
> > > if(!pagemapcookie && pagemapcookie !=
> > >
> '1'){setWicketCookie('pm-null/MyAppProductCatalogApp',1);}
> > > else {document.location.href =
> > >
> '/MyApp/products;jsessionid=8D5250BD41A597EBD63C695113E757DF?wicket:bookmarkablePage=wicket-0:com.myapp.ui.ProductCatalog';}
> > > 
> > >
> > > ...and in the body tag:
> > >
> > >  > >
> onUnLoad="deleteWicketCookie('pm-null/MyAppProductCatalogApp');">
> > >
> > > On 4/20/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > > > how is that possible?
> > > > don't you have a script like:
> > > >  > > >
> > >
> src="/wicket/forminput/resources/wicket.markup.html.WebPage/cookies.js">
> > > >
> > > > included in youre page?
> > > >
> > > >
> > > > johan
> > > >
> > > >
> > > > On 4/20/06, Vincent Jenks < [EMAIL PROTECTED] > wrote:
> > > > >
> > > >  Using Wicket 1.2RC2, I still get these javascript errors in both
> > > > Firefox 1.5.0.2 and IE 6.0:
> > > >
> > > > deleteWicketCookie is not defined
> > > > getWicketCookie is not defined
> > > >
> > > >
> > > >
> ---
> > > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > > Get stuff done quickly with pre-integrated technology to make your job
> > > > easier
> > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > > >
> > >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > >
> > >
> > > ---
> > >
> > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> > > easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> > ---
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RC2 - still have javascript errors

2006-04-20 Thread Vincent Jenks
404 not found

On 4/20/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> and what does this link return?
>
>
> /MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF
>
> johan
>
>
>
> On 4/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> >
>  Yep, here's all the js stuff I see in the head:
>
>  src="/MyApp/products/resources/wicket.markup.html.WebPage/cookies.js;jsessionid=8D5250BD41A597EBD63C695113E757DF">
> var pagemapcookie =
> getWicketCookie('pm-null/MyAppProductCatalogApp');
> if(!pagemapcookie && pagemapcookie !=
> '1'){setWicketCookie('pm-null/MyAppProductCatalogApp',1);}
> else {document.location.href =
> '/MyApp/products;jsessionid=8D5250BD41A597EBD63C695113E757DF?wicket:bookmarkablePage=wicket-0:com.myapp.ui.ProductCatalog';}
> 
>
> ...and in the body tag:
>
>  onUnLoad="deleteWicketCookie('pm-null/MyAppProductCatalogApp');">
>
> On 4/20/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > how is that possible?
> > don't you have a script like:
> >  >
> src="/wicket/forminput/resources/wicket.markup.html.WebPage/cookies.js">
> >
> > included in youre page?
> >
> >
> > johan
> >
> >
> > On 4/20/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > >
> >  Using Wicket 1.2RC2, I still get these javascript errors in both
> > Firefox 1.5.0.2 and IE 6.0:
> >
> > deleteWicketCookie is not defined
> > getWicketCookie is not defined
> >
> >
> > ---
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> ---
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RC2 - still have javascript errors

2006-04-20 Thread Vincent Jenks
Yep, here's all the js stuff I see in the head:


var pagemapcookie =
getWicketCookie('pm-null/MyAppProductCatalogApp');
if(!pagemapcookie && pagemapcookie !=
'1'){setWicketCookie('pm-null/MyAppProductCatalogApp',1);}
else {document.location.href =
'/MyApp/products;jsessionid=8D5250BD41A597EBD63C695113E757DF?wicket:bookmarkablePage=wicket-0:com.myapp.ui.ProductCatalog';}


...and in the body tag:



On 4/20/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> how is that possible?
> don't you have a script like:
>  src="/wicket/forminput/resources/wicket.markup.html.WebPage/cookies.js">
>
> included in youre page?
>
>
> johan
>
>
> On 4/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> >
>  Using Wicket 1.2RC2, I still get these javascript errors in both
> Firefox 1.5.0.2 and IE 6.0:
>
> deleteWicketCookie is not defined
> getWicketCookie is not defined
>
>
> ---
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] RC2 - still have javascript errors

2006-04-20 Thread Vincent Jenks
Using Wicket 1.2RC2, I still get these javascript errors in both
Firefox 1.5.0.2 and IE 6.0:

deleteWicketCookie is not defined
getWicketCookie is not defined


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.2-rc1 available for download

2006-04-17 Thread Vincent Jenks
Sorry, IE 6.0 on WinXP SP1, line 7 (I believe it said) - I'm not at
work now so I can't be entirely sure...I'm pretty sure it was 7.

On 4/17/06, Ramnivas Laddad <[EMAIL PROTECTED]> wrote:
>  Yep, you are absolutely right.
>
>  Thanks for fixing this quickly.
>
>  -Ramnivas
>
>  Eelco Hillenius wrote:
>  That must have been the case where you mount the application on the
> server root and where you don't use a web app name.
>
> Fixed in trunk.
>
> Eelco
>
>
> On 4/17/06, Ramnivas Laddad <[EMAIL PROTECTED]> wrote:
>
>
>  Just switched over to rc1 and I started getting the following exception for
> every request.
>
>  String index out of range: -1
>  java.lang.StringIndexOutOfBoundsException: String index
> out of range: -1
>  at
> wicket.util.string.AppendingStringBuffer.charAt(AppendingStringBuffer.java:247)
>  at
> wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:584)
>  at
> wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:198)
>  at wicket.RequestCycle.urlFor(RequestCycle.java:717)
>  at wicket.RequestCycle.urlFor(RequestCycle.java:699)
>  at wicket.Component.urlFor(Component.java:2187)
>  at
> wicket.markup.html.WebPage$PageMapChecker.renderHead(WebPage.java:466)
>  at wicket.Component.renderHead(Component.java:1731)
>  at
> wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:231)
>  at
> wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:141)
>  at
> wicket.Component.renderComponent(Component.java:1662)
>  at wicket.MarkupContainer.onRender(MarkupContainer.java:917)
>  at wicket.Component.render(Component.java:1507)
>  at wicket.Component.render(Component.java:1473)
>  at wicket.MarkupContainer.autoAdd(MarkupContainer.java:196)
>  at
> wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:82)
>  at
> wicket.MarkupContainer.renderNext(MarkupContainer.java:1351)
>  at
> wicket.MarkupContainer.renderAll(MarkupContainer.java:934)
>  at wicket.Page.onRender(Page.java:863)
>  at wicket.Component.render(Component.java:1507)
>  at wicket.Page.renderPage(Page.java:407)
>  at
> wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:148)
>  at
> wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60)
>  at
> wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)
>  at
> wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
>  at wicket.RequestCycle.respond(RequestCycle.java:905)
>  at wicket.RequestCycle.step(RequestCycle.java:975)
>  at wicket.RequestCycle.steps(RequestCycle.java:1034)
>  at wicket.RequestCycle.request(RequestCycle.java:453)
>  at
> wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:215)
>  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
>  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>  at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
>  at
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
>  at
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
>  at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>  at
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
>  at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
>  at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
>  at
> org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
>  at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
>  at
> org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
>  at
> org.mortbay.http.HttpServer.service(HttpServer.java:927)
>  at
> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
>  at
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
>  at
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
>  at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
>  at
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>  at
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>  1933 [SocketListener0-8] ERROR
> wicket.protocol.http.WebRequestCycle - String index out of
> range: -1
>
>  -Ramnivas
>
>
>  Martijn Dashorst wrote:
> The first release candidate of the 1.2 version of Wicket and its subprojects
> is available for download.
>
>  You can download the release here:
>
>
> http://sourceforge.net/project/showfiles.php?group_id=119783
>
>  Available in this release are:
>  o wicket
>  o wicket-extensions
>  o wicket-examples
>  o wicket-auth-roles
>  o wicket-auth-roles-examples
>  o wicket-spring
>  o 

Re: [Wicket-user] Wicket 1.2-rc1 available for download

2006-04-17 Thread Vincent Jenks
I'm getting an "Object expected" javascript error on every page...did
I forget a jar or something?  These pages don't have any of my own
javascript so I'm assuming it has something to do w/ the wicket cookie
scripts I'm seeing while viewing the generated source in the browser.

Those scripts don't exist on the path that's being generated.

On 4/17/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Hi Gustavo,
>
> Sorry for the inconvenience. What kind of test cases are failing? If
> you use jWebUnit tests, you probably should set
>
> HttpUnitOptions.setExceptionsThrownOnScriptError(false);
>
> as jWebUnit does not seem not recognize history as a valid javascript 
> property.
>
> Could you give more specifics please?
>
> Eelco
>
>
> On 4/17/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote:
> >   Argh, my tests don't run anymore.  Is there a place where I can find the 
> > detailed changelog between 1.2b3 to 1.2rc1?
> >
> >   []s Gus
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.2-rc1 available for download

2006-04-17 Thread Vincent Jenks
I just dropped wicket 1.2RC1 into my 1.1.1-based shopping cart and
only had to change two lines to get it working!  Whoo hooo!

I'm going to run some benchmarks against it this weekend to see the
improvements.

On 4/17/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote:
>   Also, a suggestion: the licenses for ognl and echo2 are still being 
> shipped, although the jars were already removed.
>
>   []s Gus
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Martijn Dashorst
> Sent: April 17, 2006 2:41 PM
> To: Wicket User
> Subject: [Wicket-user] Wicket 1.2-rc1 available for download
>
>
> The first release candidate of the 1.2 version of Wicket and its subprojects 
> is available for download.
>
> You can download the release here:
>
>
> http://sourceforge.net/project/showfiles.php?group_id=119783
>
>
> Available in this release are:
>  o wicket
>  o wicket-extensions
>  o wicket-examples
>  o wicket-auth-roles
>  o wicket-auth-roles-examples
>  o wicket-spring
>  o wicket-spring-examples
>  o wicket-spring-annot
>  o wicket-spring-annot-examples
>  o wicket-quickstart
>
> This release has several fixes on the beta3 release, so it is highly 
> recommended to update your current development to rc1.
>
> With this release we are finally in the end game for 1.2. We hope to move 
> quickly with these releases, so please consider upgrading and help test the 
> final stages. We don't expect major and minor changes in the API's, as such 
> subsequent releases should be a drop in replacement (we do keep the 
> possibility open that a bug might require us to break this promise).
>
> Martijn
>
> --
> Wicket 1.2 is coming! Write Ajax applications without touching JavaScript!
> -- http://wicketframework.org
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] bind Map to DropDownChoice

2006-04-12 Thread Vincent Jenks
It'd obviously be very helpful to have a more specific exception
message...it was so obvious I looked right over it (and I'm still
getting familiar w/ models.)

What I had done is copied some code where I was using a detachable
model...and just changed it to a regular model...that's where load()
came from...

On 4/12/06, Gwyn Evans <[EMAIL PROTECTED]> wrote:
> The current equivalent is line 305, i.e.
>
> protected void onComponentTagBody(final MarkupStream markupStream,
> final ComponentTag openTag)
> {
>   List choices = getChoices();
>   final AppendingStringBuffer buffer = new
> AppendingStringBuffer((choices.size() * 50) + 16);
>
> getChoices() is returning null there, as the model is empty and the
> choices.size() causes the NPE.
>
> Leaving aside the use of 'magic' numbers, should we do something
> explict there, i.e. log something & then use Collections.EMPTY_LIST,
> or even throw a NPE with an explicit message?
>
> /Gwyn
>
>
> On 12/04/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > if you change that strange load method to what i and gwyn are saying does it
> > work then
> > what wicket version are you using because if i look at 290 of AbstractChoice
> > it is nothing.
> >
> >
> >
> >  On 4/12/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > OK, I did this exactly how you showed me here...and I'm still getting the
> > error.
> > >
> > > Here's my model:
> > >
> > > IModel dropDownModel = new Model()
> > > {
> > > protected Object load()
> > > {
> > > return new
> > > ArrayList(StringValues.getUSAStates().keySet()); //via proxy
> > > }
> > > };
> > >
> > > Here's my dropdown:
> > >
> > > add(new DropDownChoice("billingState",
> > dropDownModel, new IChoiceRenderer()
> > > {
> > > public String
> > getDisplayValue(Object object)
> > > {
> > > return
> > StringValues.getUSAStates().get(object);
> > > }
> > >
> > > public String
> > getIdValue(Object object, int index)
> > > {
> > > return
> > object.toString();
> > > }
> > > }));
> > >
> > > Here's the exception:
> > >
> > > 13:00:19,000 ERROR [RequestCycle] Unexpected runtime exception [page =
> > > [Page class = com.myapp.ui.AddressInfo, id = 3]]
> > > java.lang.NullPointerException
> > > at
> > wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:290)
> > > at wicket.Component.renderComponent
> > (Component.java:1888)
> > > at
> > wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)
> > > at wicket.Component.render(Component.java:1163)
> > > at
> > wicket.MarkupContainer.renderNext(MarkupContainer.java
> > :1136)
> > > at
> > wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:811)
> > > at
> > wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:753)
> > > at wicket.Component.renderComponent
> > (Component.java:1888)
> > > at
> > wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)
> > > at
> > wicket.markup.html.form.Form.onRender(Form.java:517)
> > > at wicket.Component.render(Component.java :1163)
> > > at
> > wicket.markup.html.BodyOnLoadContainer.resolve(BodyOnLoadContainer.java:106)
> > > at
> > wicket.MarkupContainer.renderNext(MarkupContainer.java:1159)
> > > at wicket.MarkupContainer.renderComponentTagBody
> > (MarkupContainer.java:811)
> > > at
> > wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:753)
> > > at
> > wicket.Component.renderComponent(Component.java:1888)
> > > at wicket.markup.html.WebMarkupContainer.onRender
> > (WebMarkupContainer.java:77)
> > > at wic

Re: [Wicket-user] bind Map to DropDownChoice

2006-04-12 Thread Vincent Jenks
Good God...I don't believe I missed that!

Ok, this never happened...and thanks!

BTW - I'm using Wicket 1.1.1

On 4/12/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> if you change that strange load method to what i and gwyn are saying does it
> work then
> what wicket version are you using because if i look at 290 of AbstractChoice
> it is nothing.
>
>
>
>  On 4/12/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> >
>  OK, I did this exactly how you showed me here...and I'm still getting the
> error.
>
> Here's my model:
>
> IModel dropDownModel = new Model()
> {
> protected Object load()
> {
> return new
> ArrayList(StringValues.getUSAStates().keySet()); //via proxy
> }
> };
>
> Here's my dropdown:
>
> add(new DropDownChoice("billingState",
> dropDownModel, new IChoiceRenderer()
> {
> public String
> getDisplayValue(Object object)
> {
> return
> StringValues.getUSAStates().get(object);
> }
>
> public String
> getIdValue(Object object, int index)
> {
> return
> object.toString();
> }
> }));
>
> Here's the exception:
>
> 13:00:19,000 ERROR [RequestCycle] Unexpected runtime exception [page =
> [Page class = com.myapp.ui.AddressInfo, id = 3]]
> java.lang.NullPointerException
> at
> wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:290)
> at wicket.Component.renderComponent
> (Component.java:1888)
> at
> wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)
> at wicket.Component.render(Component.java:1163)
> at
> wicket.MarkupContainer.renderNext(MarkupContainer.java
> :1136)
> at
> wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:811)
> at
> wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:753)
> at wicket.Component.renderComponent
> (Component.java:1888)
> at
> wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)
> at
> wicket.markup.html.form.Form.onRender(Form.java:517)
> at wicket.Component.render(Component.java :1163)
> at
> wicket.markup.html.BodyOnLoadContainer.resolve(BodyOnLoadContainer.java:106)
> at
> wicket.MarkupContainer.renderNext(MarkupContainer.java:1159)
> at wicket.MarkupContainer.renderComponentTagBody
> (MarkupContainer.java:811)
> at
> wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:753)
> at
> wicket.Component.renderComponent(Component.java:1888)
> at wicket.markup.html.WebMarkupContainer.onRender
> (WebMarkupContainer.java:77)
> at wicket.Component.render(Component.java:1163)
> at wicket.MarkupContainer.autoAdd(MarkupContainer.java:170)
> at
> wicket.markup.html.BodyOnLoadResolver.resolve(BodyOnLoadResolver.java
> :60)
> at
> wicket.MarkupContainer.renderNext(MarkupContainer.java:1146)
> at
> wicket.MarkupContainer.renderAll(MarkupContainer.java:779)
> at wicket.Page.onRender(Page.java:788)
> at wicket.Component.render (Component.java:1163)
> at wicket.Page.doRender(Page.java:251)
> at
> wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:276)
> at wicket.RequestCycle.respond(RequestCycle.java:934)
> at wicket.RequestCycle.request(RequestCycle.java:411)
> at
> wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)
> at
> wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:234)
> ..
>
> It's definitely the dropdown that is the culprit...when I remove it
> from the page the
> page renders just fine.
>
> Any ideas?
>
> On 4/10/06, Johan Compagner < [EMAIL PROTECTED]> wrote:
> > ok then youre dropdown is wrong.
> >
> >  IModel dropDownModel = new Model()
> > {
> > public Object getObject(final Component component)
> > {
> >return new
> > ArrayList(StringValues.getUSAStates().keySet()); //via proxy
> > }
> >  

Re: [Wicket-user] bind Map to DropDownChoice

2006-04-12 Thread Vincent Jenks
OK, I did this exactly how you showed me here...and I'm still getting the error.

Here's my model:

IModel dropDownModel = new Model()
{
protected Object load()
{
return new
ArrayList(StringValues.getUSAStates().keySet()); //via proxy
}
};

Here's my dropdown:

add(new DropDownChoice("billingState", dropDownModel, 
new IChoiceRenderer()
{
public String getDisplayValue(Object object)
{
return 
StringValues.getUSAStates().get(object);
}

public String getIdValue(Object object, int 
index)
{
return object.toString();
}
}));

Here's the exception:

13:00:19,000 ERROR [RequestCycle] Unexpected runtime exception [page =
[Page class = com.myapp.ui.AddressInfo, id = 3]]
java.lang.NullPointerException
at 
wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:290)
at wicket.Component.renderComponent(Component.java:1888)
at 
wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)
at wicket.Component.render(Component.java:1163)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1136)
at 
wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:811)
at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:753)
at wicket.Component.renderComponent(Component.java:1888)
at 
wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)
at wicket.markup.html.form.Form.onRender(Form.java:517)
at wicket.Component.render(Component.java:1163)
at 
wicket.markup.html.BodyOnLoadContainer.resolve(BodyOnLoadContainer.java:106)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1159)
at 
wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:811)
at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:753)
at wicket.Component.renderComponent(Component.java:1888)
at 
wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)
at wicket.Component.render(Component.java:1163)
at wicket.MarkupContainer.autoAdd(MarkupContainer.java:170)
at 
wicket.markup.html.BodyOnLoadResolver.resolve(BodyOnLoadResolver.java:60)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1146)
at wicket.MarkupContainer.renderAll(MarkupContainer.java:779)
at wicket.Page.onRender(Page.java:788)
at wicket.Component.render(Component.java:1163)
at wicket.Page.doRender(Page.java:251)
at 
wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:276)
at wicket.RequestCycle.respond(RequestCycle.java:934)
at wicket.RequestCycle.request(RequestCycle.java:411)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)
at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:234)
..

It's definitely the dropdown that is the culprit...when I remove it
from the page the
page renders just fine.

Any ideas?

On 4/10/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> ok then youre dropdown is wrong.
>
>  IModel dropDownModel = new Model()
> {
> public Object getObject(final Component component)
> {
>return new
> ArrayList(StringValues.getUSAStates().keySet()); //via proxy
> }
> };
>
>
>  add(new DropDownChoice("billingState", dropDownModel, new IChoiceRenderer()
> {
> public String getDisplayValue(Object object)
> {
>
> return StringValues.getUSAStates().get(object);
>
>
> }
>
> public String getIdValue(Object object, int index)
> {
> return object.toString();
> }
> }));
>
> I haven't seen many usecases for that because most of the time
> You have a List of States so getUSAStates doesn't return a map but directly
> a list.
> With State objects that has properties like: a key "AL" and as name
> "Alabama".
>
> That is the most used usecase i know of.
>
> johan
>
>
>
>  On 4/11/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> >
>

Re: [Wicket-user] View from 30,000 feet of Wicket infrastructure

2006-04-12 Thread Vincent Jenks
They definitely seem more focused on new features and longer delays on
releases.  Personally, I don't use half of the features but that's not
to say that I never will.  I do, however, appreciate the rock-solid
stability and the support, so far, has been very good.

How is the dependencies feature not flexible?  I specifically chose
MyEclipse because Webtools 1.0 had a broken dependencies problem and
you had to manually add jars to the web project for them to be
deployed.

On 4/12/06, Timo Stamm <[EMAIL PROTECTED]> wrote:
> Johan Compagner schrieb:
> > the problem with myeclipse is that they don't move quickly enough for me.
> > They should be atleast have a version of myeclipse for every milestone
> > build. Else i can't really use there software.
>
>
> Yes, they don't move very fast. Dependencies for web projects are also a
> big issue for me. They wanted to improve the flexibility of the build
> process last summer, but AFAIK that's not done yet.
>
> On the other hand, support is very good.
>
>
> Timo
>
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-04-12 Thread Vincent Jenks
Ahh yes...I've seen that done too but couldn't figure out how that would be any different than eager fetching?I have seen that trick before but wasn't sure if that was the best approach since I don't *always* want the collection (but would have it since I'm "preloading" before it gets to the view.)
On 4/12/06, Marco Geier <[EMAIL PROTECTED]> wrote:
"preloading" is basically just calling "mybean.getMyCollection().size()"while you still have a session context. (i.e. either in an ejb sessionbean or for a example in your Wicket page constructor, given that you
wrapped the eventhandling phase in a usertransaction.This approach feels a little bit like EJB2 "value objects" withouthaving separate classes for separate usescasesVincent Jenks wrote:
> Ugh...I thought once I started using a container this issue would go> away...that was the one thing that made setting up Hibernate a> PITAmanaging the frickin' session context (I thought it was really
> ugly to open the session in the DAO and close it in a filter...with no> real control over the transaction.)>> Marco, what do you mean by "preloading" the collections?  Not a term
> I've heard before...not familiar w/ the concept - it sounds a little> like eager fetching.  Or, is that to say that you fetch them> separately instead of allowing hibernate/EJB3 to automatically pull
> the collection?>> I'll just use eager fetching for now and see if someone can help me> out on the EJB3 user forums in figuring out the session problem.  I've> been scanning over the EntityManager docs for a couple hours and I
> don't see an obvious solution.>> Thanks guys!>> On 4/11/06, Marco Geier <[EMAIL PROTECTED]> wrote:>>>you could wrap a transaction around the render phase)
>>(and also around the event processing phase, or both, depending on your>>RenderStrategy)>>>>The key is:>>>> UserTransaction ut = (UserTransaction) new>>InitialContext().lookup("java:comp/UserTransaction");
>>>>But you may need to reattach beans to the session, for the lazy>>collection thing to work properly.>>>>But ususally i just "preload" the collections, for example when i build
>>or attach the model,>>>>hth>>>>Marco>>>>Vincent Jenks wrote:>>>>>Yes...if I were using plain Hibernate and not EJB3...like I explained
>>>in my first post.  I need another way of making this work (as Igor>>>said...a way to keep the session open somehow in the container) - a>>>way that wouldn't require any Hibernate-specific coding...
>>>>>>I've built several plain Hibernate (Hibernate + Servlets + EJB) where>>>the DAOs would open the transaction and a filter would close the>>>session...but that doesn't apply so much here, if I'm not mistaken.
>>>>>>On 4/11/06, Andrew Berman <[EMAIL PROTECTED]> wrote:>>>>>>>>>>You need Open Session In View -->
>>>>http://www.hibernate.org/43.html>>>>>>>>>>>>On 4/11/06, Igor Vaynberg < 
[EMAIL PROTECTED]> wrote:>>>>>>>>>>>>>in that case your container's persistence mechanism is closing the>>>>>>>>underlying hibernate session after the end of the invocation? this is a
>>>>container specific problem not a wicket one. you need to figure out how to>>>>tell your container to keep the underlying entity manager session open so>>>>that lazy collections can be fetched even outside the session/stateless
>>>>bean's method invocation.>>>>>>>>>>>>>-Igor>>>>>>>>>>>>>>>>>>>>On 4/11/06, Vincent Jenks < 
[EMAIL PROTECTED]> wrote:>>>>>>>>>>>>>>>>I changed the param to look like yours:>>>>>>
>>>>>>new PropertyModel(blogModel, "categories")>>>>>>>>>>>>...and I get the same exception...no luck!>>>>>>>>>>>>On 4/11/06, Igor Vaynberg < 
[EMAIL PROTECTED]> wrote:>>>>>>>>>>>>>>>>>>>you are still not using a model for the listview, you are binding the
>>>>>>>listview to hibernate's lazy initializable set instead in this line:>>>>>>>>>>>>>>>>>>>>>add(new ListView("categoriesView", ((Blog)getModelObject())
>>>>>>&g

Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-04-11 Thread Vincent Jenks
So, when I reference these persistent child collections, won't they
also need to be wrapped in a detachable model, i.e. when they're
passed to a ListView?  Or, because they're child objects of an already
detachable model, are they detached?

On 4/11/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> ah, if you were doing the same thing in jsp and it worked then it should
> work in wicket. there is no difference. if it is still not working then you
> are still not using a model somewhere and a persistent object/set ends up in
> session.
>
>
> -Igor
>
> On 4/11/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > That'd basically require me to re-write my application and do
> > everything in an entirely different way...and I'd rather just deal w/
> > eager fetching and limit the number of records I'm calling instead.
> > Since I'm using the EJB3 EntityManager I don't want to have to resort
> > to touching the Hibernate details underneath (or using EJB at all is
> > worthless to me since I could just use Hibernate and do it w/ less
> > dinking around.)  This EJB3 stuff was supposed to make my life easier
> > ;)
> >
> > I guess I assumed Wicket wouldn't cause this since I was doing the
> > same thing when using Servlets & JSP.  The panels were JSP Tag Files
> > and I passed data in through attributes...as wasn't getting the Lazy
> > exception.  Obviously...different
> technologies...different issues.
> > I'm still fairly ignorant when it comes to Wicket.
> >
> > I appreciate all the help anyways!
> >
> > On 4/11/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > you can have a filter that opens AND closes the session/transaction.
> keep it
> > > in a threadlocal, and a base dao that retrieves it from the threadlocal.
> you
> > > can also keep rollback flag in the threadlocal so the filter knows if it
> > > needs to rollback or commit the transaction.
> > >
> > > hibernate 3 also has the sessionfactory.currentsession that lets you
> hook
> > > into the filter's session threadlocal so that your daos can just go
> > > sessionfactory.currentsession().
> > >
> > > also spring takes care of all this for you via open session in view
> filter.
> > > im sure there is something similar for ejb3.
> > >
> > >
> > > -Igor
> > >
> > >
> > > On 4/11/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > > Ugh...I thought once I started using a container this issue would go
> > > > away...that was the one thing that made setting up Hibernate a
> > > > PITAmanaging the frickin' session context (I thought it was really
> > > > ugly to open the session in the DAO and close it in a filter...with no
> > > > real control over the transaction.)
> > > >
> > > > Marco, what do you mean by "preloading" the collections?  Not a term
> > > > I've heard before...not familiar w/ the concept - it sounds a little
> > > > like eager fetching.  Or, is that to say that you fetch them
> > > > separately instead of allowing hibernate/EJB3 to automatically pull
> > > > the collection?
> > > >
> > > > I'll just use eager fetching for now and see if someone can help me
> > > > out on the EJB3 user forums in figuring out the session problem.  I've
> > > > been scanning over the EntityManager docs for a couple hours and I
> > > > don't see an obvious solution.
> > > >
> > > > Thanks guys!
> > > >
> > > > On 4/11/06, Marco Geier < [EMAIL PROTECTED] > wrote:
> > > > > you could wrap a transaction around the render phase)
> > > > > (and also around the event processing phase, or both, depending on
> your
> > > > > RenderStrategy)
> > > > >
> > > > > The key is:
> > > > >
> > > > >  UserTransaction ut = (UserTransaction) new
> > > > >
> InitialContext().lookup("java:comp/UserTransaction");
> > > > >
> > > > > But you may need to reattach beans to the session, for the lazy
> > > > > collection thing to work properly.
> > > > >
> > > > > But ususally i just "preload" the collections, for example when i
> build
> > > > > or attach the model,
> > > > >
> > > > > hth
> > > > >
> > > > > Marco
> >

Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-04-11 Thread Vincent Jenks
That'd basically require me to re-write my application and do
everything in an entirely different way...and I'd rather just deal w/
eager fetching and limit the number of records I'm calling instead. 
Since I'm using the EJB3 EntityManager I don't want to have to resort
to touching the Hibernate details underneath (or using EJB at all is
worthless to me since I could just use Hibernate and do it w/ less
dinking around.)  This EJB3 stuff was supposed to make my life easier
;)

I guess I assumed Wicket wouldn't cause this since I was doing the
same thing when using Servlets & JSP.  The panels were JSP Tag Files
and I passed data in through attributes...as wasn't getting the Lazy
exception.  Obviously...different technologies...different issues. 
I'm still fairly ignorant when it comes to Wicket.

I appreciate all the help anyways!

On 4/11/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> you can have a filter that opens AND closes the session/transaction. keep it
> in a threadlocal, and a base dao that retrieves it from the threadlocal. you
> can also keep rollback flag in the threadlocal so the filter knows if it
> needs to rollback or commit the transaction.
>
> hibernate 3 also has the sessionfactory.currentsession that lets you hook
> into the filter's session threadlocal so that your daos can just go
> sessionfactory.currentsession().
>
> also spring takes care of all this for you via open session in view filter.
> im sure there is something similar for ejb3.
>
>
> -Igor
>
>
> On 4/11/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > Ugh...I thought once I started using a container this issue would go
> > away...that was the one thing that made setting up Hibernate a
> > PITAmanaging the frickin' session context (I thought it was really
> > ugly to open the session in the DAO and close it in a filter...with no
> > real control over the transaction.)
> >
> > Marco, what do you mean by "preloading" the collections?  Not a term
> > I've heard before...not familiar w/ the concept - it sounds a little
> > like eager fetching.  Or, is that to say that you fetch them
> > separately instead of allowing hibernate/EJB3 to automatically pull
> > the collection?
> >
> > I'll just use eager fetching for now and see if someone can help me
> > out on the EJB3 user forums in figuring out the session problem.  I've
> > been scanning over the EntityManager docs for a couple hours and I
> > don't see an obvious solution.
> >
> > Thanks guys!
> >
> > On 4/11/06, Marco Geier <[EMAIL PROTECTED] > wrote:
> > > you could wrap a transaction around the render phase)
> > > (and also around the event processing phase, or both, depending on your
> > > RenderStrategy)
> > >
> > > The key is:
> > >
> > >  UserTransaction ut = (UserTransaction) new
> > > InitialContext().lookup("java:comp/UserTransaction");
> > >
> > > But you may need to reattach beans to the session, for the lazy
> > > collection thing to work properly.
> > >
> > > But ususally i just "preload" the collections, for example when i build
> > > or attach the model,
> > >
> > > hth
> > >
> > > Marco
> > >
> > > Vincent Jenks wrote:
> > > > Yes...if I were using plain Hibernate and not EJB3...like I explained
> > > > in my first post.  I need another way of making this work (as Igor
> > > > said...a way to keep the session open somehow in the container) - a
> > > > way that wouldn't require any Hibernate-specific coding...
> > > >
> > > > I've built several plain Hibernate (Hibernate + Servlets + EJB) where
> > > > the DAOs would open the transaction and a filter would close the
> > > > session...but that doesn't apply so much here, if I'm not mistaken.
> > > >
> > > > On 4/11/06, Andrew Berman < [EMAIL PROTECTED]> wrote:
> > > >
> > > >>You need Open Session In View -->
> > > >>http://www.hibernate.org/43.html
> > > >>
> > > >>
> > > >>On 4/11/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > >>
> > > >>>in that case your container's persistence mechanism is closing the
> > > >>
> > > >>underlying hibernate session after the end of the invocation? this is
> a
> > > >>container specific problem not a wicket one. you need to figure out
> how to
> > > >>tell y

Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-04-11 Thread Vincent Jenks
Ugh...I thought once I started using a container this issue would go
away...that was the one thing that made setting up Hibernate a
PITAmanaging the frickin' session context (I thought it was really
ugly to open the session in the DAO and close it in a filter...with no
real control over the transaction.)

Marco, what do you mean by "preloading" the collections?  Not a term
I've heard before...not familiar w/ the concept - it sounds a little
like eager fetching.  Or, is that to say that you fetch them
separately instead of allowing hibernate/EJB3 to automatically pull
the collection?

I'll just use eager fetching for now and see if someone can help me
out on the EJB3 user forums in figuring out the session problem.  I've
been scanning over the EntityManager docs for a couple hours and I
don't see an obvious solution.

Thanks guys!

On 4/11/06, Marco Geier <[EMAIL PROTECTED]> wrote:
> you could wrap a transaction around the render phase)
> (and also around the event processing phase, or both, depending on your
> RenderStrategy)
>
> The key is:
>
>  UserTransaction ut = (UserTransaction) new
> InitialContext().lookup("java:comp/UserTransaction");
>
> But you may need to reattach beans to the session, for the lazy
> collection thing to work properly.
>
> But ususally i just "preload" the collections, for example when i build
> or attach the model,
>
> hth
>
> Marco
>
> Vincent Jenks wrote:
> > Yes...if I were using plain Hibernate and not EJB3...like I explained
> > in my first post.  I need another way of making this work (as Igor
> > said...a way to keep the session open somehow in the container) - a
> > way that wouldn't require any Hibernate-specific coding...
> >
> > I've built several plain Hibernate (Hibernate + Servlets + EJB) where
> > the DAOs would open the transaction and a filter would close the
> > session...but that doesn't apply so much here, if I'm not mistaken.
> >
> > On 4/11/06, Andrew Berman <[EMAIL PROTECTED]> wrote:
> >
> >>You need Open Session In View -->
> >>http://www.hibernate.org/43.html
> >>
> >>
> >>On 4/11/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> >>
> >>>in that case your container's persistence mechanism is closing the
> >>
> >>underlying hibernate session after the end of the invocation? this is a
> >>container specific problem not a wicket one. you need to figure out how to
> >>tell your container to keep the underlying entity manager session open so
> >>that lazy collections can be fetched even outside the session/stateless
> >>bean's method invocation.
> >>
> >>>
> >>>-Igor
> >>>
> >>>
> >>>
> >>>On 4/11/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> >>>
> >>>>I changed the param to look like yours:
> >>>>
> >>>>new PropertyModel(blogModel, "categories")
> >>>>
> >>>>...and I get the same exception...no luck!
> >>>>
> >>>>On 4/11/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> >>>>
> >>>>>you are still not using a model for the listview, you are binding the
> >>>>>listview to hibernate's lazy initializable set instead in this line:
> >>>>>
> >>>>>
> >>>>>add(new ListView("categoriesView", ((Blog)getModelObject())
> >>>>> .getCategories())
> >>>>>
> >>>>>try changing that to:
> >>>>>
> >>>>>add(new ListView("categoriesView", new PropertyModel(blogModel,
> >>>>>"categories"));
> >>>>>
> >>>>>or create a simple wrapper around blogmodel directly if you dont want
> >>
> >>to use
> >>
> >>>>>"soft binding" and reflection.
> >>>>>
> >>>>>-Igor
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>On 4/11/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> >>>>>
> >>>>> OK, this doesn't appear to work.  I finally got around to testing
> >>
> >>this
> >>
> >>>>>and I still get a
> >>>>>LazyInitializationException.
> >>>>>
> >>>>>I passed the model around and it's barfing.
> >>>>>
> >>>>>

Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-04-11 Thread Vincent Jenks
Yes...if I were using plain Hibernate and not EJB3...like I explained
in my first post.  I need another way of making this work (as Igor
said...a way to keep the session open somehow in the container) - a
way that wouldn't require any Hibernate-specific coding...

I've built several plain Hibernate (Hibernate + Servlets + EJB) where
the DAOs would open the transaction and a filter would close the
session...but that doesn't apply so much here, if I'm not mistaken.

On 4/11/06, Andrew Berman <[EMAIL PROTECTED]> wrote:
> You need Open Session In View -->
> http://www.hibernate.org/43.html
>
>
> On 4/11/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> >
> > in that case your container's persistence mechanism is closing the
> underlying hibernate session after the end of the invocation? this is a
> container specific problem not a wicket one. you need to figure out how to
> tell your container to keep the underlying entity manager session open so
> that lazy collections can be fetched even outside the session/stateless
> bean's method invocation.
> >
> >
> > -Igor
> >
> >
> >
> > On 4/11/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > I changed the param to look like yours:
> > >
> > > new PropertyModel(blogModel, "categories")
> > >
> > > ...and I get the same exception...no luck!
> > >
> > > On 4/11/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > > you are still not using a model for the listview, you are binding the
> > > > listview to hibernate's lazy initializable set instead in this line:
> > > >
> > > >
> > > > add(new ListView("categoriesView", ((Blog)getModelObject())
> > > >  .getCategories())
> > > >
> > > > try changing that to:
> > > >
> > > > add(new ListView("categoriesView", new PropertyModel(blogModel,
> > > > "categories"));
> > > >
> > > > or create a simple wrapper around blogmodel directly if you dont want
> to use
> > > > "soft binding" and reflection.
> > > >
> > > > -Igor
> > > >
> > > >
> > > >
> > > >
> > > > On 4/11/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > > >
> > > >  OK, this doesn't appear to work.  I finally got around to testing
> this
> > > > and I still get a
> > > > LazyInitializationException.
> > > >
> > > > I passed the model around and it's barfing.
> > > >
> > > > "main" page (ViewBlog.class):
> > > >
> > > > //get object graph in detachable model
> > > > IModel blogModel = new LoadableDetachableModel()
> > > > {
> > > > protected Object load()
> > > > {
> > > > //get blog & entries
> > > > Blog blog =
> > > > BlogProxy.getDefault ();
> > > > return blog;
> > > > }
> > > > };
> > > >
> > > > //set as page model
> > > > setModel(blogModel);
> > > >
> > > > //add panel components
> > > > add(new TopicsPanel("topicsPanel", blogModel));
> > > >
> > > > In the TopicsPanel class:
> > > >
> > > > public class TopicsPanel extends Panel
> > > > {
> > > > public TopicsPanel(String id, IModel blogModel)
> > > > {
> > > > super(id, blogModel);
> > > >
> > > > //get model object
> > > > Blog blog = (Blog)getModelObject();
> > > >
> > > > //add list view repeater
> > > > add(new ListView("categoriesView",
> > > > ((Blog)getModelObject()).getCategories())
> > > > {
> > > > protected void
> > > > populateItem(ListItem item)
> > > > {
> > > > //get row model
> > > > final Category
> category =
> > > > (Category)item.getModelObje

Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-04-11 Thread Vincent Jenks
I changed the param to look like yours:

new PropertyModel(blogModel, "categories")

...and I get the same exception...no luck!

On 4/11/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> you are still not using a model for the listview, you are binding the
> listview to hibernate's lazy initializable set instead in this line:
>
>
> add(new ListView("categoriesView", ((Blog)getModelObject())
>  .getCategories())
>
> try changing that to:
>
> add(new ListView("categoriesView", new PropertyModel(blogModel,
> "categories"));
>
> or create a simple wrapper around blogmodel directly if you dont want to use
> "soft binding" and reflection.
>
> -Igor
>
>
>
>
> On 4/11/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> >
>  OK, this doesn't appear to work.  I finally got around to testing this
> and I still get a
> LazyInitializationException.
>
> I passed the model around and it's barfing.
>
> "main" page (ViewBlog.class):
>
> //get object graph in detachable model
> IModel blogModel = new LoadableDetachableModel()
> {
> protected Object load()
> {
> //get blog & entries
> Blog blog =
> BlogProxy.getDefault();
> return blog;
> }
> };
>
> //set as page model
> setModel(blogModel);
>
> //add panel components
> add(new TopicsPanel("topicsPanel", blogModel));
>
> In the TopicsPanel class:
>
> public class TopicsPanel extends Panel
> {
> public TopicsPanel(String id, IModel blogModel)
> {
> super(id, blogModel);
>
> //get model object
> Blog blog = (Blog)getModelObject();
>
> //add list view repeater
> add(new ListView("categoriesView",
> ((Blog)getModelObject()).getCategories())
> {
> protected void
> populateItem(ListItem item)
> {
> //get row model
> final Category category =
> (Category)item.getModelObject();
>
> //create link
> Link categoryLink = new
> PageLink("categoryLink", ViewBlog.class)
> {
> public void
> onClick()
> {
>
> info("booyah!");
> }
> };
>
> //add category name label
> categoryLink.add(new
> Label("topic", category.getName()));
>
> //add link
> item.add(categoryLink);
> }
> });
> }
> }
>
> Where I'm trying to retrive the lazy collection in the ListView the
> session has still been lost.
>
> What have I done wrong?  How can I get the lazily loaded collection
> and not have to resort to eager fetching?
>
> Remember, I'm not using Hibernate directly...I'm using JBoss EJB3 in
> JBoss 4.0.4RC1...I don't have a lot of control over Hibernate...no do
> I want to if I want to keep my project container-independent.
>
> Thanks!
>
> On 3/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> >
> > or pass the same model :)
> >
> >
> > -Igor
> >
> >
>  >
> > On 3/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > >
> > > Well, in the previous page which passes the Product into this page...the
> object was wrapped in a detachable model...not just called directly...so I
> should try and wrap it again in the current page?
> > >
> > >
> > >
> > >  On 3/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > >
> > > > instead of using the product object directly, use a detachable model.
> > > >
> > > > you might also need to use an open session in view interceptor in case
> jboss closes the hibernate session after your bean's method is finished
> executing. if it does this, then by the time wicket code runs the object is
> already disconnected from its session and thus cant load any child
> collections.
> > > >
> >

Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-04-11 Thread Vincent Jenks
OK, this doesn't appear to work.  I finally got around to testing this
and I still get a
LazyInitializationException.

I passed the model around and it's barfing.

"main" page (ViewBlog.class):

//get object graph in detachable model
IModel blogModel = new LoadableDetachableModel()
{
protected Object load()
{
//get blog & entries
Blog blog = BlogProxy.getDefault(); 

return blog;
}
};

//set as page model
setModel(blogModel);

//add panel components
add(new TopicsPanel("topicsPanel", blogModel));

In the TopicsPanel class:

public class TopicsPanel extends Panel
{
public TopicsPanel(String id, IModel blogModel)
{
super(id, blogModel);

//get model object
Blog blog = (Blog)getModelObject();

//add list view repeater
add(new ListView("categoriesView", 
((Blog)getModelObject()).getCategories())
{
protected void populateItem(ListItem item)
{
//get row model
final Category category = 
(Category)item.getModelObject();

//create link
Link categoryLink = new 
PageLink("categoryLink", ViewBlog.class)
{
public void onClick()
{
info("booyah!");
}
};

//add category name label
categoryLink.add(new Label("topic", 
category.getName()));

//add link
item.add(categoryLink);
}
});
}
}

Where I'm trying to retrive the lazy collection in the ListView the
session has still been lost.

What have I done wrong?  How can I get the lazily loaded collection
and not have to resort to eager fetching?

Remember, I'm not using Hibernate directly...I'm using JBoss EJB3 in
JBoss 4.0.4RC1...I don't have a lot of control over Hibernate...no do
I want to if I want to keep my project container-independent.

Thanks!

On 3/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> or pass the same model :)
>
>
> -Igor
>
>
>
> On 3/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
> >
> > Well, in the previous page which passes the Product into this page...the 
> > object was wrapped in a detachable model...not just called directly...so I 
> > should try and wrap it again in the current page?
> >
> >
> >
> >  On 3/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > >
> > > instead of using the product object directly, use a detachable model.
> > >
> > > you might also need to use an open session in view interceptor in case 
> > > jboss closes the hibernate session after your bean's method is finished 
> > > executing. if it does this, then by the time wicket code runs the object 
> > > is already disconnected from its session and thus cant load any child 
> > > collections.
> > >
> > >
> > > -Igor
> > >
> > >
> > >
> > >
> > > On 3/20/06,  Vincent Jenks <[EMAIL PROTECTED]> wrote:
> > > >
> > > > OK, so I'm in a bit of a quagmire.
> > > >
> > > > I'm using Wicket + EJB3 (JBoss 4.0.4RC1) which uses Hibernate as the 
> > > > persistence behind EJB3.
> > > >
> > > > Unless I set all of my parent/child object relationship annotations to 
> > > > EAGER fetching...I get this error:
> > > >
> > > > "org.hibernate.LazyInitializationException: failed to lazily initialize 
> > > > a collection of role:"
> > > >
> > > > ...when I try to access the child collection of the parent object.  In 
> > > > my case, for example, I am passing an object to a form in Wicket using 
> > > > the constructor:
> > > >
> > > > public class ProductDeta

Re: [Wicket-user] bind Map to DropDownChoice

2006-04-10 Thread Vincent Jenks
I'm sorry, I don't think I quite understand.I have dropDownModel which looks like this:            IModel dropDownModel = new Model()            {                protected Object load()                {
                    return StringValues.getUSAStates(); //via proxy                }            };StringValues.getUSAStates() looks something like this:    public static Map getUSAStates()
    {        Map states = new HashMap();        states.put("AL", "Alabama");        states.put("AK", "Alaska");        
states.put("AZ", "Arizona");        states.put("AR", "Arkansas");        states.put("CA", "California");..Where "CA" is the key and "California" is the value...which is exactly how I'd like to see it in the select dropdown.
Are you saying that I should split the keys and values into two different lists and look them up that way?It would be extremely useful, in my opinion, if Wicket had support for these types of objects internally, given the frequency of which they're used.  It would be very intuitive if I could supply key/value Map objects into what is essentially a list of key/value pairs.
Thanks again...On 4/10/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
give the choice renderen the complete hashmapAnd give the dropdown a model with the keys of that hashmap as a list.so if StringValues.getUSAStates(); are th ids in the hashmap then that should go ok.

but youre choicerender is wrong:  add(new DropDownChoice("billingState", dropDownModel, new IChoiceRenderer()
            {                public String getDisplayValue(Object object)                {                    return idValueHashmap.get(object);
                }                                public String getIdValue(Object object, int index)
                {                    return object.toString();                }            }));
On 4/11/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:Is there an example of this somewhere?  I'm struggling to get this working where I have a HashMap...the first String is the ID and the second String is the value.
I have this:            IModel dropDownModel = new Model()
            {                protected Object load()                {                    return StringValues.getUSAStates();                }            };            add(new DropDownChoice("billingState", dropDownModel, new IChoiceRenderer()
            {                public String getDisplayValue(Object object)                {                    return object.toString();                }                                public String getIdValue(Object object, int index)
                {                    return object.toString();                }            }));I *just* wanted to see the page render...I know the values aren't right...but anything would have been acceptable.  I keep getting a very unhelpful NullPointerException that I'm not even sure has anything to do w/ the dropdowns...but I assume it does since the rest of the form is very straightforward TextField components.
I don't see where this is being done in wicket-examplesI'm using 1.1.1Thanks!On 4/1/06, 
Johan Compagner <
[EMAIL PROTECTED]> wrote:
there is no map support for this.
What you could do is give the map to the ChoiceRenderer impland give the keys of the map as a list to the Choice.johan


On 3/31/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:



I'm trying to get a Map of data so I can have the key be the value of the dropdown options and the value of the Map item be the value of the option in the dropdown.  Problem is, it doesn't look like DropDownChoice will accept a Map...unless I'm doing it wrong?
Is a Map the best way to go?  I was maybe considering using a single List collection and splitting a single string to get the two valuesbut that's pretty fugly too.










Re: [Wicket-user] bind Map to DropDownChoice

2006-04-10 Thread Vincent Jenks
Is there an example of this somewhere?  I'm struggling to get this working where I have a HashMap...the first String is the ID and the second String is the value.I have this:            IModel dropDownModel = new Model()
            {                protected Object load()                {                    return StringValues.getUSAStates();                }            };            add(new DropDownChoice("billingState", dropDownModel, new IChoiceRenderer()
            {                public String getDisplayValue(Object object)                {                    return object.toString();                }                                public String getIdValue(Object object, int index)
                {                    return object.toString();                }            }));I *just* wanted to see the page render...I know the values aren't right...but anything would have been acceptable.  I keep getting a very unhelpful NullPointerException that I'm not even sure has anything to do w/ the dropdowns...but I assume it does since the rest of the form is very straightforward TextField components.
I don't see where this is being done in wicket-examplesI'm using 1.1.1Thanks!On 4/1/06, Johan Compagner <
[EMAIL PROTECTED]> wrote:there is no map support for this.
What you could do is give the map to the ChoiceRenderer impland give the keys of the map as a list to the Choice.johan
On 3/31/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

I'm trying to get a Map of data so I can have the key be the value of the dropdown options and the value of the Map item be the value of the option in the dropdown.  Problem is, it doesn't look like DropDownChoice will accept a Map...unless I'm doing it wrong?
Is a Map the best way to go?  I was maybe considering using a single List collection and splitting a single string to get the two valuesbut that's pretty fugly too.






Re: [Wicket-user] View from 30,000 feet of Wicket infrastructure

2006-04-10 Thread Vincent Jenks
See, I look at it the other way around...they release a very stable, feature-rich plugin for the current release and support it well w/ regular upgrades, fixes, etc.  I'm sure 5.0 will support Eclipse 3.2 but I'm not entirely sure.
I'd rather not be upgrading Eclipse at every milestone and work in a reassuringly stable environment.Personally, I probably won't switch to eclipse 3.2 until it's either a) a final release or b) JDK 1.6 final is released - whichever comes first.
I couldn't see anything that compelling about 3.2M6, so far that would make me have to have it just yet...but I haven't looked at it that carefully.On 4/10/06, 
Johan Compagner <[EMAIL PROTECTED]> wrote:
the problem with myeclipse is that they don't move quickly enough for me.They should be atleast have a version of myeclipse for every milestone build. Else i can't really use there software.
Do they have a version for 
3.2M6 ?johanOn 4/10/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

Johan, I agree, the basic types that webtools provides editability for should be built into eclipse...like html, xml, _javascript_, css, etc.  However, for a beginner, installing eclipse + webtools gives you everything you need to build a basic Java EE-based web app.
It was my experience, when starting out w/ Java about a year ago, that these tools alone got me up and running, building sites very quickly.  I was able to work from my Gentoo workstation at home and my Winxp box at work w/ exactly the same tools.
As for MyEclipse...that was my only compromise when it came to choosing tools and trying to keep everything open source.  After using it, I had to have it! :D  I'm glad I did, they have a Matisse editor coming anytime now...should be interesting.
On 4/10/06, Daniel Spiewak <

[EMAIL PROTECTED]> wrote:
Merve will either deploy to Tomcat or run the webapp in a bundled Tomcat instance.  Just to give you a headstart in the flakey-ness, it all has to do with creating the Run Configuration and the webapp context dir.  :-)

I would use MyEclipse if I was willing to spend the money on it.Daniel
On 4/10/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:Hmm...not familiar but it sounds like a beginner might struggle w/ something like that?  I could be wrong.  The webtools platform was brutally poor until recently when they managed to stabilize it...I was actually impressed the last time I test-drove it.
I'll have to check out Merve.  Is it simply a plugin that deploys to tomcat?  I'm using a lot of Wicket + EJB3 on JBoss 4 these days (zen, if you ask me.)  I've been using Eclipse 3.1.2 & MyEclipse 4.1...couldn't




 be happier.On 4/9/06, Daniel Spiewak <



[EMAIL PROTECTED]> wrote:
Personally, I prefer vanilla Eclipse 3.2, XMLBuddy and the Merve plugin (very flakey, but it works well once you figure out its idiosyncrasies).
DanielOn 4/9/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:





That's tough since there is no ground-up tutorial like this when it comes to Wicket (that I know of.)  There's a Wicket book on the way from what I understand but that may not be for a few months or so?
The best thing you can do is get a simple Hello World working on your local machine.
1. download and install Tomcat (servlet container, http server)http://tomcat.apache.org/download-55.cgi
2. download and install Eclipse (and Eclipse Webtools)
http://www.eclipse.org/downloads/





http://download.eclipse.org/webtools/downloads/3. download wicket, create a User Library in Eclipse and add the Wicket jars
http://download.eclipse.org/eclipse/downloads/drops/R-3.0-200406251208/eclipse-news-part5-R3.html
 - see section on "
User-defined libraries"4. Create a web project in Eclipse, add reference to Wicket User Library from step 3.  Also set up Tomcat so you can deploy your test app to it - this should be fairly intuitive while creating your web project.
5. do this tutorialhttp://wicket.sourceforge.net/ExampleHelloWorld.html





This should at least give you a few clues on how to get started ASAP on a small scale.  The documentation at each of the sites for each of the projects should get you what you need.
The best way to get started is to jump in!  If you're comfortable w/ Eclipse and want more than Webtools can offer you, MyEclipse is a great plugin for Eclipse...I've been using it for about 4 mo. and I love it.  It's not free, however.
After all of this, deploying to a linux server or another machine of any platform should be fairly simple.  A web project in eclipse webtools can be exported as a .war archive which can be dropped in just about any app server/container.
Hope this helps in some way.-v
On 4/9/06, Daniel Spiewak <[EMAIL PROTECTED]> wrote:
I can't think of many references that give the kind of overview you're looking for.  Having just been (arguably still at) the same point you're at in terms of knowledge 

Re: [Wicket-user] View from 30,000 feet of Wicket infrastructure

2006-04-10 Thread Vincent Jenks
Johan, I agree, the basic types that webtools provides editability for should be built into eclipse...like html, xml, _javascript_, css, etc.  However, for a beginner, installing eclipse + webtools gives you everything you need to build a basic Java EE-based web app.
It was my experience, when starting out w/ Java about a year ago, that these tools alone got me up and running, building sites very quickly.  I was able to work from my Gentoo workstation at home and my Winxp box at work w/ exactly the same tools.
As for MyEclipse...that was my only compromise when it came to choosing tools and trying to keep everything open source.  After using it, I had to have it! :D  I'm glad I did, they have a Matisse editor coming anytime now...should be interesting.
On 4/10/06, Daniel Spiewak <[EMAIL PROTECTED]> wrote:
Merve will either deploy to Tomcat or run the webapp in a bundled Tomcat instance.  Just to give you a headstart in the flakey-ness, it all has to do with creating the Run Configuration and the webapp context dir.  :-)

I would use MyEclipse if I was willing to spend the money on it.Daniel
On 4/10/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:Hmm...not familiar but it sounds like a beginner might struggle w/ something like that?  I could be wrong.  The webtools platform was brutally poor until recently when they managed to stabilize it...I was actually impressed the last time I test-drove it.
I'll have to check out Merve.  Is it simply a plugin that deploys to tomcat?  I'm using a lot of Wicket + EJB3 on JBoss 4 these days (zen, if you ask me.)  I've been using Eclipse 3.1.2 & MyEclipse 4.1...couldn't


 be happier.On 4/9/06, Daniel Spiewak <

[EMAIL PROTECTED]> wrote:
Personally, I prefer vanilla Eclipse 3.2, XMLBuddy and the Merve plugin (very flakey, but it works well once you figure out its idiosyncrasies).
DanielOn 4/9/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:



That's tough since there is no ground-up tutorial like this when it comes to Wicket (that I know of.)  There's a Wicket book on the way from what I understand but that may not be for a few months or so?
The best thing you can do is get a simple Hello World working on your local machine.
1. download and install Tomcat (servlet container, http server)http://tomcat.apache.org/download-55.cgi
2. download and install Eclipse (and Eclipse Webtools)
http://www.eclipse.org/downloads/



http://download.eclipse.org/webtools/downloads/3. download wicket, create a User Library in Eclipse and add the Wicket jars
http://download.eclipse.org/eclipse/downloads/drops/R-3.0-200406251208/eclipse-news-part5-R3.html
 - see section on "
User-defined libraries"4. Create a web project in Eclipse, add reference to Wicket User Library from step 3.  Also set up Tomcat so you can deploy your test app to it - this should be fairly intuitive while creating your web project.
5. do this tutorialhttp://wicket.sourceforge.net/ExampleHelloWorld.html



This should at least give you a few clues on how to get started ASAP on a small scale.  The documentation at each of the sites for each of the projects should get you what you need.
The best way to get started is to jump in!  If you're comfortable w/ Eclipse and want more than Webtools can offer you, MyEclipse is a great plugin for Eclipse...I've been using it for about 4 mo. and I love it.  It's not free, however.
After all of this, deploying to a linux server or another machine of any platform should be fairly simple.  A web project in eclipse webtools can be exported as a .war archive which can be dropped in just about any app server/container.
Hope this helps in some way.-v
On 4/9/06, Daniel Spiewak <[EMAIL PROTECTED]> wrote:
I can't think of many references that give the kind of overview you're looking for.  Having just been (arguably still at) the same point you're at in terms of knowledge of web apps, I really can't say that there is a good solution.  What I did is blindly followed the install instructions and then poked around with the various options checking consequences.  I found as many references as I could find about wicket component details, as many tutorials as I could dig up on using them, and stumbled my way through configuring Tomcat so I could experiment.
If anyone does have any references of this type, I'm interested too.  :-)Daniel
On 4/9/06, Dave Johnson <
[EMAIL PROTECTED]> wrote:I'm an old COBOL guy who has learned enough Java to be useful in a
corporate environment where I can see the need for a new class, generatea _javascript_ proxy to call the Java class from the UI, and build a classwith Eclipse to do the job.Now I'd like to begin developing in Wicket for my own purposes under
Windows 2000 / XP.  However, when it comes to the infrastructure of webapps, I get mired in details much too quickly.What are some good references that clearly explain the various levels 

Re: [Wicket-user] View from 30,000 feet of Wicket infrastructure

2006-04-09 Thread Vincent Jenks
Hmm...not familiar but it sounds like a beginner might struggle w/ something like that?  I could be wrong.  The webtools platform was brutally poor until recently when they managed to stabilize it...I was actually impressed the last time I test-drove it.
I'll have to check out Merve.  Is it simply a plugin that deploys to tomcat?  I'm using a lot of Wicket + EJB3 on JBoss 4 these days (zen, if you ask me.)  I've been using Eclipse 3.1.2 & MyEclipse 4.1...couldn't
 be happier.On 4/9/06, Daniel Spiewak <[EMAIL PROTECTED]> wrote:
Personally, I prefer vanilla Eclipse 3.2, XMLBuddy and the Merve plugin (very flakey, but it works well once you figure out its idiosyncrasies).
DanielOn 4/9/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

That's tough since there is no ground-up tutorial like this when it comes to Wicket (that I know of.)  There's a Wicket book on the way from what I understand but that may not be for a few months or so?
The best thing you can do is get a simple Hello World working on your local machine.
1. download and install Tomcat (servlet container, http server)http://tomcat.apache.org/download-55.cgi
2. download and install Eclipse (and Eclipse Webtools)
http://www.eclipse.org/downloads/

http://download.eclipse.org/webtools/downloads/3. download wicket, create a User Library in Eclipse and add the Wicket jars
http://download.eclipse.org/eclipse/downloads/drops/R-3.0-200406251208/eclipse-news-part5-R3.html
 - see section on "
User-defined libraries"4. Create a web project in Eclipse, add reference to Wicket User Library from step 3.  Also set up Tomcat so you can deploy your test app to it - this should be fairly intuitive while creating your web project.
5. do this tutorialhttp://wicket.sourceforge.net/ExampleHelloWorld.html

This should at least give you a few clues on how to get started ASAP on a small scale.  The documentation at each of the sites for each of the projects should get you what you need.
The best way to get started is to jump in!  If you're comfortable w/ Eclipse and want more than Webtools can offer you, MyEclipse is a great plugin for Eclipse...I've been using it for about 4 mo. and I love it.  It's not free, however.
After all of this, deploying to a linux server or another machine of any platform should be fairly simple.  A web project in eclipse webtools can be exported as a .war archive which can be dropped in just about any app server/container.
Hope this helps in some way.-v
On 4/9/06, Daniel Spiewak <[EMAIL PROTECTED]> wrote:
I can't think of many references that give the kind of overview you're looking for.  Having just been (arguably still at) the same point you're at in terms of knowledge of web apps, I really can't say that there is a good solution.  What I did is blindly followed the install instructions and then poked around with the various options checking consequences.  I found as many references as I could find about wicket component details, as many tutorials as I could dig up on using them, and stumbled my way through configuring Tomcat so I could experiment.
If anyone does have any references of this type, I'm interested too.  :-)Daniel
On 4/9/06, Dave Johnson <
[EMAIL PROTECTED]> wrote:I'm an old COBOL guy who has learned enough Java to be useful in a
corporate environment where I can see the need for a new class, generatea _javascript_ proxy to call the Java class from the UI, and build a classwith Eclipse to do the job.Now I'd like to begin developing in Wicket for my own purposes under
Windows 2000 / XP.  However, when it comes to the infrastructure of webapps, I get mired in details much too quickly.What are some good references that clearly explain the various levels ofsoftware I encounter, such as Linux, Tomcat,  Jetty, Hibernate, PHP,
MySQL and all the rest, and whether they're on the local machine or theremote server?  And which are even needed?Most of what I find seems to assume too much familiarity with theseissues.  I need a high-level overview that explains all this stuff
without dropping down to 300 feet so quickly.  Blindly followinginstallation instructions doesn't work well without knowing theconsequences of various choices.Thanks for any help.Dave



---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast



and join the prime developer group breaking into this new coding territory!


http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user








Re: [Wicket-user] View from 30,000 feet of Wicket infrastructure

2006-04-09 Thread Vincent Jenks
That's tough since there is no ground-up tutorial like this when it comes to Wicket (that I know of.)  There's a Wicket book on the way from what I understand but that may not be for a few months or so?The best thing you can do is get a simple Hello World working on your local machine.
1. download and install Tomcat (servlet container, http server)http://tomcat.apache.org/download-55.cgi2. download and install Eclipse (and Eclipse Webtools)
http://www.eclipse.org/downloads/http://download.eclipse.org/webtools/downloads/3. download wicket, create a User Library in Eclipse and add the Wicket jars
http://download.eclipse.org/eclipse/downloads/drops/R-3.0-200406251208/eclipse-news-part5-R3.html - see section on "
User-defined libraries"4. Create a web project in Eclipse, add reference to Wicket User Library from step 3.  Also set up Tomcat so you can deploy your test app to it - this should be fairly intuitive while creating your web project.
5. do this tutorialhttp://wicket.sourceforge.net/ExampleHelloWorld.htmlThis should at least give you a few clues on how to get started ASAP on a small scale.  The documentation at each of the sites for each of the projects should get you what you need.
The best way to get started is to jump in!  If you're comfortable w/ Eclipse and want more than Webtools can offer you, MyEclipse is a great plugin for Eclipse...I've been using it for about 4 mo. and I love it.  It's not free, however.
After all of this, deploying to a linux server or another machine of any platform should be fairly simple.  A web project in eclipse webtools can be exported as a .war archive which can be dropped in just about any app server/container.
Hope this helps in some way.-vOn 4/9/06, Daniel Spiewak <[EMAIL PROTECTED]> wrote:
I can't think of many references that give the kind of overview you're looking for.  Having just been (arguably still at) the same point you're at in terms of knowledge of web apps, I really can't say that there is a good solution.  What I did is blindly followed the install instructions and then poked around with the various options checking consequences.  I found as many references as I could find about wicket component details, as many tutorials as I could dig up on using them, and stumbled my way through configuring Tomcat so I could experiment.
If anyone does have any references of this type, I'm interested too.  :-)Daniel
On 4/9/06, Dave Johnson <
[EMAIL PROTECTED]> wrote:I'm an old COBOL guy who has learned enough Java to be useful in a
corporate environment where I can see the need for a new class, generatea _javascript_ proxy to call the Java class from the UI, and build a classwith Eclipse to do the job.Now I'd like to begin developing in Wicket for my own purposes under
Windows 2000 / XP.  However, when it comes to the infrastructure of webapps, I get mired in details much too quickly.What are some good references that clearly explain the various levels ofsoftware I encounter, such as Linux, Tomcat,  Jetty, Hibernate, PHP,
MySQL and all the rest, and whether they're on the local machine or theremote server?  And which are even needed?Most of what I find seems to assume too much familiarity with theseissues.  I need a high-level overview that explains all this stuff
without dropping down to 300 feet so quickly.  Blindly followinginstallation instructions doesn't work well without knowing theconsequences of various choices.Thanks for any help.Dave

---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast

and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user




Re: [Wicket-user] Enterprise application using Wicket

2006-04-09 Thread Vincent Jenks
What argument *couldn't* be made?  Comparing JSP and Wicket is like night and day...JSP is antiquated technology in comparison.The fact that you can be many more times productive and simultaneously produce clean, manageable code is probably the top-most incentive for using Wicket.
A con might be the fact that session-state is used rather heavily.  However, in my own benchmarking...Wicket holds up extremely well w/ 100's of simultaneous users (that was while testing Wicket 1.1.1 & Hibernate, pulling up several different types of object graphs.)
Just my 2c...-vOn 4/9/06, dave723 <[EMAIL PROTECTED]> wrote:
The Fortune 50 company where I work is migrating a proprietary webapplication and is tending toward JSP.I'd like to get them to consider Wicket.  What persuasive arguments can Imake that would counter the momentum of JSP?  Thanks.
--View this message in context: http://www.nabble.com/Enterprise-application-using-Wicket-t1420394.html#a3828769Sent from the Wicket - User forum at 
Nabble.com.---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Floating Panels - any tip

2006-04-09 Thread Vincent Jenks
A good example of this...and a very easy open source _javascript_ lib to use is called wz dragdrop:http://www.walterzorn.com/dragdrop/dragdrop_e.htm
Very non-invasive and easy to use!-vOn 4/9/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
dragging a panel around looks to me like a complete client side thing.
So you can use any _javascript_ library you find for this that does this platform independend for you,And include that in the markup.johan
On 4/9/06, Ayodeji Aladejebi <
[EMAIL PROTECTED]> wrote:
Two questions:
Presently now without using _javascript_, can i build a floating Panel in Wicket which can be dragged around on the page?
 
I see Wicket and ECMAScript like Java and JNI.  Knowing when to use ECMAscript in ur development is important not assuming the wicket API will totally eradicate _javascript_ focus in development. I think according to wicket vision , focus on even areas like _javascript_ should be as minimal as possible.  i could use DW to generate ECMAScript for dragging a DIV but i dont think the _javascript_ code is cross platform and when i build my own custom wicket panels, i want to ensure the _javascript_ i use with the panel is also cross platform. Anyway that aside, my question is remains the same.







Re: [Wicket-user] ending a response

2006-04-06 Thread Vincent Jenks
Hey, that's good news...maybe I'll start looking at it.  I assume it's not a drop-in replacement for an existing 1.1.1 project ;)On 4/6/06, Igor Vaynberg
 <[EMAIL PROTECTED]> wrote:
heh, if we are still at 1.2 in a month from now i quit! hopefully rc1 is out this weekend.-Igor
On 4/6/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:Ouch, maybe it's time to upgrade to 
1.2though I'm supposed to launch this app in a month and I don't want to use a beta or RC in production.
On 4/6/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:


yeah thats 1.2in 1.1 i guess what you can do is create your own runtimeexception that takes a page, override onRuntimeException in requestcycle? application? and return that page from that method. that should work although im not sure.
-IgorOn 4/6/06, Vincent Jenks <


[EMAIL PROTECTED]> wrote:
I'm using 1.1.1, is that a 1.2 class?On 4/6/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:
throw new RestartResponseException or throw new RestartResponseAtInterceptPageException depending on your needs.
you pass in the page you want to restart at via exception's constructor-Igor

On 4/6/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:





I'm convinced that I saw an example of what do to when one would like to end the response of a page and redirect to another...but I can't put my finger on it...so here's my problem:In my page I'm testing for the existence of an object...if it doesn't exist I'd like to redirec to another page...but it appears to continue to try and render the page...which throws a NullReferenceException (obviously) because my object is null:
        //get cart from session        final ShoppingCart cart = ((UserSession)getSession()).getCart();                if (cart == null)            setResponsePage(new EmptyCart());I want the page to stop rendering and redirect to EmptyCart
Thanks!














Re: [Wicket-user] ending a response

2006-04-06 Thread Vincent Jenks
Ouch, maybe it's time to upgrade to 1.2though I'm supposed to launch this app in a month and I don't want to use a beta or RC in production.On 4/6/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:
yeah thats 1.2in 1.1 i guess what you can do is create your own runtimeexception that takes a page, override onRuntimeException in requestcycle? application? and return that page from that method. that should work although im not sure.
-IgorOn 4/6/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:
I'm using 1.1.1, is that a 1.2 class?On 4/6/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:
throw new RestartResponseException or throw new RestartResponseAtInterceptPageException depending on your needs.
you pass in the page you want to restart at via exception's constructor-Igor

On 4/6/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:



I'm convinced that I saw an example of what do to when one would like to end the response of a page and redirect to another...but I can't put my finger on it...so here's my problem:In my page I'm testing for the existence of an object...if it doesn't exist I'd like to redirec to another page...but it appears to continue to try and render the page...which throws a NullReferenceException (obviously) because my object is null:
        //get cart from session        final ShoppingCart cart = ((UserSession)getSession()).getCart();                if (cart == null)            setResponsePage(new EmptyCart());I want the page to stop rendering and redirect to EmptyCart
Thanks!










Re: [Wicket-user] ending a response

2006-04-06 Thread Vincent Jenks
I'm using 1.1.1, is that a 1.2 class?On 4/6/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
throw new RestartResponseException or throw new RestartResponseAtInterceptPageException depending on your needs.
you pass in the page you want to restart at via exception's constructor-Igor

On 4/6/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:

I'm convinced that I saw an example of what do to when one would like to end the response of a page and redirect to another...but I can't put my finger on it...so here's my problem:In my page I'm testing for the existence of an object...if it doesn't exist I'd like to redirec to another page...but it appears to continue to try and render the page...which throws a NullReferenceException (obviously) because my object is null:
        //get cart from session        final ShoppingCart cart = ((UserSession)getSession()).getCart();                if (cart == null)            setResponsePage(new EmptyCart());I want the page to stop rendering and redirect to EmptyCart
Thanks!






[Wicket-user] ending a response

2006-04-06 Thread Vincent Jenks
I'm convinced that I saw an example of what do to when one would like to end the response of a page and redirect to another...but I can't put my finger on it...so here's my problem:In my page I'm testing for the existence of an object...if it doesn't exist I'd like to redirec to another page...but it appears to continue to try and render the page...which throws a NullReferenceException (obviously) because my object is null:
        //get cart from session        final ShoppingCart cart = ((UserSession)getSession()).getCart();                if (cart == null)            setResponsePage(new EmptyCart());I want the page to stop rendering and redirect to EmptyCart
Thanks!


Re: [Wicket-user] passing IModel around

2006-04-03 Thread Vincent Jenks
I didn't actually try that...but I like the idea of setting the page model and having access to it that way...that seems to work just fine.  Thanks!On 4/2/06, 
karthik Guru <[EMAIL PROTECTED]> wrote:
just curiousBlog blog = (Blog)blogModel.getObject(null);didn't work for you?On 4/3/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:> Works great, thanks Eelco!
>>> On 4/2/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:> > Aaargh. Ok, final try:> >> > public HeaderPanel(String id, IModel blogModel) {
> >   super(id, blogModel);> >   Blog blog = (Blog)getModelObject();> >> > or> >> > public HeaderPanel(String id, IModel blogModel) {> >   super(id);
> >   setModel(blogModel);> >   Blog blog = (Blog)getModelObject();> >> > Eelco> >> > On 4/2/06, Eelco Hillenius <[EMAIL PROTECTED]
> wrote:> > > Oh, I didn't look at your example yet. Better is this:> > >> > > public HeaderPanel(String id, IModel blogModel)> > > {> > > super(id);
> > >> > > Blog blog = (Blog)getModelObject();> > >> > > Eelco> > >> > >> > > On 4/2/06, Eelco Hillenius < 
[EMAIL PROTECTED]> wrote:> > > > Just pass in null. The component parameter is only used by> > > > CompoundPropertyModel and friends, not by LoadableDetachableModel.> > > >
> > > > Eelco> > > >> > > >> > > > On 4/2/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:> > > > > That won't work, since getObject takes a parameter of
> Component....what> > > > > would I pass in?> > > > >> > > > >> > > > > On 4/2/06, karthik Guru < 
[EMAIL PROTECTED]> wrote:> > > > > > The model isn't of type Blog. The object stored within> > > > > > LoadableDetachableModel is of type Blog.> > > > > >
> > > > > > Blog blog = (Blog)blogModel.getObject( )> > > > > >> > > > > > should hopefully work.?> > > > > >> > > > > > On 4/2/06, Vincent Jenks <
[EMAIL PROTECTED] > wrote:> > > > > > > I'm just testing something out.  Since I use EJB3 and need lazy> > > > > > > initialization I'm making an attempt to see if passing an object
> with a> > > > > > > collection of lazily-loaded elements in an IModel, from> page-to-page,> > > > > will> > > > > > > prevent a LazyInitializationException (Hibernate).
> > > > > > >> > > > > > > I start here in the first page:> > > > > > >> > > > > > > public class ViewBlog extends WebPage
> > > > > > > {> > > > > > > public ViewBlog()> > > > > > > {> > > > > > > //get Blog in detached model
> > > > > > > IModel blogModel = new LoadableDetachableModel()> > > > > > > {> > > > > > > protected Object load()> > > > > > > {
> > > > > > > return BlogProxy.getDefault(); //via proxy> > > > > > > }> > > > > > > };> > > > > > >
> > > > > > > //add panel components> > > > > > > add(new HeaderPanel("headerPanel", blogModel));> > > > > > > 
> > > > > > >> > > > > > > ...and then in the HeaderPanel I do this:> > > > > > >> > > > > > > public class HeaderPanel extends Panel
> > > > > > > {> > > > > > > public HeaderPanel(String id, IModel blogModel)> > > > > > > {> > > > > > > super(id);
> > > > > > >> > > > > > >  Blog blog = (Blog)blogModel; //EXCEPTION HERE!> > > > > > > ..> > > > > > >
> > > > > > > I get this exception:> > > > > > >> > > > > > > java.lang.ClassCastException: com.myapp.ui.ViewBlog$1> > > > > > > at 
com.myapp.ui.panel.HeaderPanel.(HeaderPanel.java> :34)> > > > > > > at com.myapp.ui.ViewBlog .(ViewBlog.java:53)> > > > > > 

Re: [Wicket-user] passing IModel around

2006-04-02 Thread Vincent Jenks
Works great, thanks Eelco!On 4/2/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
Aaargh. Ok, final try:public HeaderPanel(String id, IModel blogModel) {  super(id, blogModel);  Blog blog = (Blog)getModelObject();orpublic HeaderPanel(String id, IModel blogModel) {  super(id);
  setModel(blogModel);  Blog blog = (Blog)getModelObject();EelcoOn 4/2/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:> Oh, I didn't look at your example yet. Better is this:
>> public HeaderPanel(String id, IModel blogModel)> {> super(id);>> Blog blog = (Blog)getModelObject();>> Eelco>>> On 4/2/06, Eelco Hillenius <
[EMAIL PROTECTED]> wrote:> > Just pass in null. The component parameter is only used by> > CompoundPropertyModel and friends, not by LoadableDetachableModel.
> >> > Eelco> >> >> > On 4/2/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:> > > That won't work, since getObject takes a parameter of Componentwhat
> > > would I pass in?> > >> > >> > > On 4/2/06, karthik Guru < [EMAIL PROTECTED]> wrote:> > > > The model isn't of type Blog. The object stored within
> > > > LoadableDetachableModel is of type Blog.> > > >> > > > Blog blog = (Blog)blogModel.getObject( )> > > >> > > > should hopefully work.?
> > > >> > > > On 4/2/06, Vincent Jenks <[EMAIL PROTECTED] > wrote:> > > > > I'm just testing something out.  Since I use EJB3 and need lazy
> > > > > initialization I'm making an attempt to see if passing an object with a> > > > > collection of lazily-loaded elements in an IModel, from page-to-page,> > > will
> > > > > prevent a LazyInitializationException (Hibernate).> > > > >> > > > > I start here in the first page:> > > > >> > > > > public class ViewBlog extends WebPage
> > > > > {> > > > > public ViewBlog()> > > > > {> > > > > //get Blog in detached model> > > > > IModel blogModel = new LoadableDetachableModel()
> > > > > {> > > > > protected Object load()> > > > > {> > > > > return BlogProxy.getDefault(); //via proxy
> > > > > }> > > > > };> > > > >> > > > > //add panel components> > > > > add(new HeaderPanel("headerPanel", blogModel));
> > > > > > > > > >> > > > > ...and then in the HeaderPanel I do this:> > > > >> > > > > public class HeaderPanel extends Panel
> > > > > {> > > > > public HeaderPanel(String id, IModel blogModel)> > > > > {> > > > > super(id);> > > > >
> > > > >  Blog blog = (Blog)blogModel; //EXCEPTION HERE!> > > > > ..> > > > >> > > > > I get this exception:> > > > >
> > > > > java.lang.ClassCastException: com.myapp.ui.ViewBlog$1> > > > > at com.myapp.ui.panel.HeaderPanel.(HeaderPanel.java :34)> > > > > at com.myapp.ui.ViewBlog
.(ViewBlog.java:53)> > > > > at> > > > >> > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native> > > > > Method)> > > > > at
> > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance> > > (NativeConstructorAccessorImpl.java> > > > > :39)> > > > > at> > > > >
> > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)> > > > > at> > > > > java.lang.reflect.Constructor.newInstance
> > > (Constructor.java:494)> > > > > at java.lang.Class.newInstance0 (Class.java:350)> > > > > at java.lang.Class.newInstance(Class.java:303)> > > > >
> > > > > How do I down-cast to Blog (entity bean) from the IModel param?> > > > >> > > >> > > >> > > > --> > > > -- karthik --
> > > >> > > >> > > > ---> > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting> > > language
> > > > that extends applications into web and mobile media. Attend the live> > > webcast> > > > and join the prime developer group breaking into this new coding> > > territory!
> > > >> > > http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642> > > > ___
> > > > Wicket-user mailing list> > > > Wicket-user@lists.sourceforge.net> > > > 
https://lists.sourceforge.net/lists/listinfo/wicket-user> > > >> > >> > >> >>---This SF.Net
 email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] passing IModel around

2006-04-02 Thread Vincent Jenks
That won't work, since getObject takes a parameter of Componentwhat would I pass in?On 4/2/06, karthik Guru <
[EMAIL PROTECTED]> wrote:The model isn't of type Blog. The object stored within
LoadableDetachableModel is of type Blog.Blog blog = (Blog)blogModel.getObject( )should hopefully work.?On 4/2/06, Vincent Jenks <[EMAIL PROTECTED]
> wrote:> I'm just testing something out.  Since I use EJB3 and need lazy> initialization I'm making an attempt to see if passing an object with a> collection of lazily-loaded elements in an IModel, from page-to-page, will
> prevent a LazyInitializationException (Hibernate).>> I start here in the first page:>> public class ViewBlog extends WebPage> {> public ViewBlog()> {> //get Blog in detached model
> IModel blogModel = new LoadableDetachableModel()> {> protected Object load()> {> return BlogProxy.getDefault(); //via proxy> }
> };>> //add panel components> add(new HeaderPanel("headerPanel", blogModel));> >> ...and then in the HeaderPanel I do this:
>> public class HeaderPanel extends Panel> {> public HeaderPanel(String id, IModel blogModel)> {> super(id);>>  Blog blog = (Blog)blogModel; //EXCEPTION HERE!
> ..>> I get this exception:>> java.lang.ClassCastException: com.myapp.ui.ViewBlog$1> at com.myapp.ui.panel.HeaderPanel.(HeaderPanel.java :34)> at 
com.myapp.ui.ViewBlog.(ViewBlog.java:53)> at> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native> Method)> at> sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java> :39)> at> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)> at> java.lang.reflect.Constructor.newInstance
(Constructor.java:494)> at java.lang.Class.newInstance0 (Class.java:350)> at java.lang.Class.newInstance(Class.java:303)>> How do I down-cast to Blog (entity bean) from the IModel param?
>-- -- karthik -This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] passing IModel around

2006-04-02 Thread Vincent Jenks
I'm just testing something out.  Since I use EJB3 and need lazy initialization I'm making an attempt to see if passing an object with a collection of lazily-loaded elements in an IModel, from page-to-page, will prevent a LazyInitializationException (Hibernate).
I start here in the first page:public class ViewBlog extends WebPage{        public ViewBlog()    {        //get Blog in detached model        IModel blogModel = new LoadableDetachableModel()
        {            protected Object load()            {                return BlogProxy.getDefault(); //via proxy            }        };                //add panel components        add(new HeaderPanel("headerPanel", blogModel));
...and then in the HeaderPanel I do this:public class HeaderPanel extends Panel{        public HeaderPanel(String id, IModel blogModel)    {        super(id);        
        Blog blog = (Blog)blogModel; //EXCEPTION HERE!..I get this exception:java.lang.ClassCastException: com.myapp.ui.ViewBlog$1    at com.myapp.ui.panel.HeaderPanel.(HeaderPanel.java
:34)    at com.myapp.ui.ViewBlog.(ViewBlog.java:53)    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java
:39)    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)    at java.lang.Class.newInstance0
(Class.java:350)    at java.lang.Class.newInstance(Class.java:303)How do I down-cast to Blog (entity bean) from the IModel param?


Re: [Wicket-user] can't get rid of "Choose One" in DropDownChoice

2006-04-01 Thread Vincent Jenks
Why have the default message at all?  Why provide something for developers that they should be determining themselves?  The default should be the first item in the list...if you need a default, override the method and provide one.
On 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
yes moving the method to the renderer and calling that render method in the choice method is fine by me.Except what is then the default "Choose one" ?We can add it ofcourse in our default renderer: ChoiceRenderer
But then you have to specify it or subclass choicerenderer. Else suddenly you don't have that default message anymore.johan
On 3/31/06, Igor Vaynberg
 <[EMAIL PROTECTED]> wrote:

yes its a bit weird. if youd like you are more then welcome to file an rfe and maybe we can clean it up in a future version.-Igor
On 3/31/06, Vincent Jenks
 <[EMAIL PROTECTED]> wrote:


Got it, thanks.  It's confusing that it doesn't work like I described, even though the method can be overridden.  It'd be convenient to be able to do it how I posed verses doing this:


    //create calendar    List days = 
DateTime.getDaysListForward(2, 4);       DropDownChoice arrivalChoices = new DropDownChoice("arrivalDate", days)


    {    protected String getDefaultChoice(final Object selected)
    {    return ""; //get rid of "Choose One" default    }       };       arrivalChoices.setChoiceRenderer


(new IChoiceRenderer()
    {       public String getDisplayValue(Object object)    {    return object.toString();    }   
    public String getIdValue(Object object, int index)
    {    return object.toString();    }       });       form.add(arrivalChoices);


On 3/30/06, 
Igor Vaynberg <
[EMAIL PROTECTED]> wrote:you are putting getDefaultChoice into the renderer, when it actually belongs in the DropDownChoice
-IgorOn 3/30/06, 
Vincent Jenks <
[EMAIL PROTECTED]> wrote:The code...





        //create calendar        List days = DateTime.getDaysListForward(2, 4);                //add quantity select list                                form.add(new DropDownChoice("arrivalDate", days, new IChoiceRenderer()
        {            protected String getDefaultChoice(final Object selected)        {    return ""; //get rid of "Choose One" default        }                        public String getDisplayValue(Object object)
            {                return object.toString();            }                        public String getIdValue(Object object, int index)            {                return object.toString





();
            }                                }));        When rendered...I still get the "Choose One" option first.  Did I lose too much sleep last night...what did I miss?













Re: [Wicket-user] bind Map to DropDownChoice

2006-04-01 Thread Vincent Jenks
I see.  I just went w/ a List and changed the value when I created the list.  The dropdown was a list of dates so I just formatted the date differently for the view portion of the list.Thanks!
On 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
there is no map support for this.What you could do is give the map to the ChoiceRenderer impland give the keys of the map as a list to the Choice.
johanOn 3/31/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

I'm trying to get a Map of data so I can have the key be the value of the dropdown options and the value of the Map item be the value of the option in the dropdown.  Problem is, it doesn't look like DropDownChoice will accept a Map...unless I'm doing it wrong?
Is a Map the best way to go?  I was maybe considering using a single List collection and splitting a single string to get the two valuesbut that's pretty fugly too.






Re: [Wicket-user] wicket tv commercial?

2006-03-31 Thread Vincent Jenks
ha!  It was only a matter of time until Wicket went to "the big show".On 3/31/06, Igor Vaynberg <
[EMAIL PROTECTED]> wrote:
http://www.chevyapprentice.com/view.php?country=us&uniqueid=c4911602-1265-1029-98eb-0013724ff5a7




Re: [Wicket-user] Wicket/Tomcat configuration: Where is System.out ???

2006-03-31 Thread Vincent Jenks
Of course this happens while debugging too and can drive you nuts until you realize you've goofed.Since I use MyEclipse...I like to use println statements occasionally and just watch them roll by in the Console panel...you could do this w/ Netbeans or any other IDE, I'm sure.  That is - if you're actually *using* an IDE.
On 3/31/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
You have to put the statements somewhere where you are sure they will be invoked. For instance, you might want to do System.out.println() in your page constructor. Or your application constructor.
This is something that has bitten me quite often: putting debug println statements in my code, and not seeing the results. Only to discover that the method never got called in the first place.
MartijnOn 3/31/06, Igor Vaynberg <
[EMAIL PROTECTED]> wrote:



Possibility 1:  What does the Wicket application have to
do to pass the System.out.println() statements?this has nothing to do with wicket, this is only about how you configured tomcat.

-Igor

-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!-- 
http://wicketframework.org




[Wicket-user] bind Map to DropDownChoice

2006-03-31 Thread Vincent Jenks
I'm trying to get a Map of data so I can have the key be the value of the dropdown options and the value of the Map item be the value of the option in the dropdown.  Problem is, it doesn't look like DropDownChoice will accept a Map...unless I'm doing it wrong?
Is a Map the best way to go?  I was maybe considering using a single List collection and splitting a single string to get the two valuesbut that's pretty fugly too.


Re: [Wicket-user] can't get rid of "Choose One" in DropDownChoice

2006-03-31 Thread Vincent Jenks
Got it, thanks.  It's confusing that it doesn't work like I described, even though the method can be overridden.  It'd be convenient to be able to do it how I posed verses doing this:    //create calendar    List days = 
DateTime.getDaysListForward(2, 4);       DropDownChoice arrivalChoices = new DropDownChoice("arrivalDate", days)    {    protected String getDefaultChoice(final Object selected)
    {    return ""; //get rid of "Choose One" default    }       };       arrivalChoices.setChoiceRenderer(new IChoiceRenderer()
    {       public String getDisplayValue(Object object)    {    return object.toString();    }       public String getIdValue(Object object, int index)
    {    return object.toString();    }       });       form.add(arrivalChoices);On 3/30/06, 
Igor Vaynberg <
[EMAIL PROTECTED]> wrote:you are putting getDefaultChoice into the renderer, when it actually belongs in the DropDownChoice
-IgorOn 3/30/06, 
Vincent Jenks <
[EMAIL PROTECTED]> wrote:The code...


        //create calendar        List days = DateTime.getDaysListForward(2, 4);                //add quantity select list                                form.add(new DropDownChoice("arrivalDate", days, new IChoiceRenderer()
        {            protected String getDefaultChoice(final Object selected)        {    return ""; //get rid of "Choose One" default        }                        public String getDisplayValue(Object object)
            {                return object.toString();            }                        public String getIdValue(Object object, int index)            {                return object.toString


();
            }                                }));        When rendered...I still get the "Choose One" option first.  Did I lose too much sleep last night...what did I miss?







Re: [Wicket-user] EJB3 Stateful SB - session issues/questions

2006-03-31 Thread Vincent Jenks
As it is, if I *don't* store the stub in-session to a stateful session bean, somehow, I'll most definitely get the wrong reference to the bean.  Outside of Wicket it would be done in HttpSession.
On 3/31/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
in ejb3? i thought these were stateful beans stored in user's session? maybe im wrong.if they are not, then yes it would not be safe to store them in session. instead a locator proxy should be used like the one in wicket-spring.
-IgorOn 3/30/06, 
Eelco Hillenius <[EMAIL PROTECTED]> wrote:

EJB session beans are unrelated to servlet sessions. It's probably notwise to store such reference objects in the servlet session as - ifthey would be clustered - they might point to the wrong address.Eelco
On 3/30/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:> the only concern here is that you do not want to put things into session
> that you dont want serialized, etc. since this is a session bean that means
> it is in session already anyways, so you should be ok passing it around in> wicket.>>> -Igor>>> On 3/30/06, Vincent Jenks <

[EMAIL PROTECTED]> wrote:> >> > Well...on page1 it would create the ShoppingCart stub from JNDII'd> pass it to page2 as a parampage2 would modify itand pass it to> page3and so on.
> >> > It's a single, stateful session bean.> >> >> >> > On 3/30/06, Igor Vaynberg <
[EMAIL PROTECTED]> wrote:
> > >> > > depends on what the stub references. if you already have it in session> somewhere then its ok.> > >> > >> > > -Igor> > >
> > >
> > >> > > On 3/30/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> > > >> > > > OK, I'll check into it, thanks.  Meanwhile, if I *did* want to...I
> could pass the cart stub around in the constructors, couldn't I?  Or, is> this somehow not safe?> > > >> > > > I'm thinking that might be the quickest, easiest approach for now.  I
> only need it for a few pages.> > > >> > > >> > > >> > > > On 3/30/06, Igor Vaynberg < 
[EMAIL PROTECTED]
> wrote:> > > > >> > > > > i didnt say introduce spring as a dependency.> > > > > i said look at how wicket-spring injects special proxies into wicket> components that you can safely store in session, etc
> > > > > it will take very little tweaking to make it work for ejb3.> > > > >> > > > > look at the Spring page on the wiki to see why the proxies exist and> how they work.
> > > > >> > > > > wicket-spring provides an elegant solution, but only a tiny portion> of it is spring related.> > > > >> > > > >> > > > > -Igor
> > > > >> > > > >> > > > >> > > > >> > > > > On 3/30/06, Vincent Jenks <
[EMAIL PROTECTED]
 > wrote:> > > > > >> > > > > > I'd rather not introduce spring as yet another dependency on this> project...especially because I know very little about it and don't have the
> time to tinker w/ it for this project.> > > > > >> > > > > > What about passing the ShoppingCart EJB stub around in my page> constructors instead of using a getter/setter in my custom UserSession
> class?  Wouldn't that be safe?> > > > > >> > > > > >> > > > > >> > > > > > On 3/29/06, Igor Vaynberg < 

[EMAIL PROTECTED]> wrote:> > > > > > >> > > > > > > you can inject the proxy into any component> > > > > > >> > > > > > > look at wicket-spring project
> > > > > > >> > > > > > > you can create a IFieldValueFactory that injects a proxy for> your stateful bean.> > > > > > >> > > > > > >
> > > > > > > -Igor> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > > On 3/29/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:> > > > > > > >> > > > > > > > I'm sitting here, pondering, and getting fatter.  I'm building
> a storefront app w/ a simple shopping cart for which I'm thinking of using a> Stateful session bean (EJB 3.0).> > > > > > > >> > > > > > > > It looks like, no matter how I look at it, I'll have to keep

[Wicket-user] can't get rid of "Choose One" in DropDownChoice

2006-03-30 Thread Vincent Jenks
The code...        //create calendar        List days = DateTime.getDaysListForward(2, 4);                //add quantity select list                                form.add(new DropDownChoice("arrivalDate", days, new IChoiceRenderer()
        {            protected String getDefaultChoice(final Object selected)        {    return ""; //get rid of "Choose One" default        }                        public String getDisplayValue(Object object)
            {                return object.toString();            }                        public String getIdValue(Object object, int index)            {                return object.toString();
            }                                }));        When rendered...I still get the "Choose One" option first.  Did I lose too much sleep last night...what did I miss?


Re: [Wicket-user] EJB3 Stateful SB - session issues/questions

2006-03-30 Thread Vincent Jenks
Well...on page1 it would create the ShoppingCart stub from JNDII'd pass it to page2 as a parampage2 would modify itand pass it to page3and so on.It's a single, stateful session bean.
On 3/30/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
depends on what the stub references. if you already have it in session somewhere then its ok.-Igor
On 3/30/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:OK, I'll check into it, thanks.  Meanwhile, if I *did* want to...I could pass the cart stub around in the constructors, couldn't I?  Or, is this somehow not safe?
I'm thinking that might be the quickest, easiest approach for now.  I only need it for a few pages.
On 3/30/06, Igor Vaynberg <

[EMAIL PROTECTED]> wrote:
i didnt say introduce spring as a dependency.i said look at how wicket-spring injects special proxies into wicket components that you can safely store in session, etcit will take very little tweaking to make it work for ejb3.
look at the Spring page on the wiki to see why the proxies exist and how they work.wicket-spring provides an elegant solution, but only a tiny portion of it is spring related.


-Igor
On 3/30/06, Vincent Jenks <[EMAIL PROTECTED]
> wrote:
I'd rather not introduce spring as yet another dependency on this project...especially because I know very little about it and don't have the time to tinker w/ it for this project.What about passing the ShoppingCart EJB stub around in my page constructors instead of using a getter/setter in my custom UserSession class?  Wouldn't that be safe?
On 3/29/06, Igor Vaynberg <



[EMAIL PROTECTED]> wrote:
you can inject the proxy into any componentlook at wicket-spring projectyou can create a IFieldValueFactory that injects a proxy for your stateful bean.




-Igor
On 3/29/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:





I'm sitting here, pondering, and getting fatter.  I'm building a storefront app w/ a simple shopping cart for which I'm thinking of using a Stateful session bean (EJB 3.0).It looks like, no matter how I look at it, I'll have to keep the SFSB stub in-session throughout its use in the application...and I'm not sure of a real elegant way of doing that.  So, I was just hoping someone here could provide some insight.
In Wicket, I've already got a class called UserSession which I use to pass around an User so I can test whether or not a page is accessible by certain user groups.  I decided, to keep it simple, that I'd add a getter & setter for my ShoppingCart stub in the same class so it could be passed around in-session w/ the User, since each shopper will have an User automatically created for them before checking out and paying.
The problem w/ all this SFSB business is; it violates my design because I have to make my web tier talk directly to my session bean in order to keep track of its state.  For everything else I've been using a handful of proxy classes where I could place calls to my session beans and other business logic.
It looks a little like this:Wicket->ProxyClass->SessionBean->DatabaseSo, now I'll have to keep track of the ShoppingCart stub class in Wicket, pass the ShoppingCart and the users' chosen form values into the Proxy, perform business logic, and then return a ShoppingCart which I'll have to place *back* into the 
UserSession.setCart() method to continue to keep track of the state of the users' carts.This is kinda nasty, is there an easier (or just more elegant) way to do this?Thanks all!














Re: [Wicket-user] EJB3 Stateful SB - session issues/questions

2006-03-30 Thread Vincent Jenks
OK, I'll check into it, thanks.  Meanwhile, if I *did* want to...I could pass the cart stub around in the constructors, couldn't I?  Or, is this somehow not safe?I'm thinking that might be the quickest, easiest approach for now.  I only need it for a few pages.
On 3/30/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
i didnt say introduce spring as a dependency.i said look at how wicket-spring injects special proxies into wicket components that you can safely store in session, etcit will take very little tweaking to make it work for ejb3.
look at the Spring page on the wiki to see why the proxies exist and how they work.wicket-spring provides an elegant solution, but only a tiny portion of it is spring related.
-Igor
On 3/30/06, Vincent Jenks <[EMAIL PROTECTED]
> wrote:
I'd rather not introduce spring as yet another dependency on this project...especially because I know very little about it and don't have the time to tinker w/ it for this project.What about passing the ShoppingCart EJB stub around in my page constructors instead of using a getter/setter in my custom UserSession class?  Wouldn't that be safe?
On 3/29/06, Igor Vaynberg <

[EMAIL PROTECTED]> wrote:
you can inject the proxy into any componentlook at wicket-spring projectyou can create a IFieldValueFactory that injects a proxy for your stateful bean.


-Igor
On 3/29/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:



I'm sitting here, pondering, and getting fatter.  I'm building a storefront app w/ a simple shopping cart for which I'm thinking of using a Stateful session bean (EJB 3.0).It looks like, no matter how I look at it, I'll have to keep the SFSB stub in-session throughout its use in the application...and I'm not sure of a real elegant way of doing that.  So, I was just hoping someone here could provide some insight.
In Wicket, I've already got a class called UserSession which I use to pass around an User so I can test whether or not a page is accessible by certain user groups.  I decided, to keep it simple, that I'd add a getter & setter for my ShoppingCart stub in the same class so it could be passed around in-session w/ the User, since each shopper will have an User automatically created for them before checking out and paying.
The problem w/ all this SFSB business is; it violates my design because I have to make my web tier talk directly to my session bean in order to keep track of its state.  For everything else I've been using a handful of proxy classes where I could place calls to my session beans and other business logic.
It looks a little like this:Wicket->ProxyClass->SessionBean->DatabaseSo, now I'll have to keep track of the ShoppingCart stub class in Wicket, pass the ShoppingCart and the users' chosen form values into the Proxy, perform business logic, and then return a ShoppingCart which I'll have to place *back* into the 
UserSession.setCart() method to continue to keep track of the state of the users' carts.This is kinda nasty, is there an easier (or just more elegant) way to do this?Thanks all!










Re: [Wicket-user] Re: TabbedPanel, InputForm and submit

2006-03-30 Thread Vincent Jenks
That'd be awesome, I could use something like this!On 3/30/06, Martijn Dashorst <[EMAIL PROTECTED]
> wrote:Feel free to contribute! You now know how to do it, write a (small) document about it and put it on our wiki!
MartijnOn 3/30/06, 
Stefan Lindner
 <[EMAIL PROTECTED]> wrote:
Once again thanks for all your help. The problem is solved. Not every
comonent inside of the form must be an ajax component.form.setOutputMarkupId(true);add(form);AjaxFormValidatingBehavior.addToAllFormComponents(form,"onblur");

Does it all. It's a pleasure to use wicket. But it would be much muchmore pleasent if the documentation could be improved.Stefan Lindner
--Visionet GmbH, Am Weichselgarten 7, 91058 ErlangenTel.: (09131)691-230, FAX: (09131)691-111E-Mail: mailto:
[EMAIL PROTECTED], Internet:
http://www.visionet.de---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user
-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!-- 
http://wicketframework.org




Re: [Wicket-user] EJB3 Stateful SB - session issues/questions

2006-03-30 Thread Vincent Jenks
I'd rather not introduce spring as yet another dependency on this project...especially because I know very little about it and don't have the time to tinker w/ it for this project.What about passing the ShoppingCart EJB stub around in my page constructors instead of using a getter/setter in my custom UserSession class?  Wouldn't that be safe?
On 3/29/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
you can inject the proxy into any componentlook at wicket-spring projectyou can create a IFieldValueFactory that injects a proxy for your stateful bean.
-Igor
On 3/29/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:

I'm sitting here, pondering, and getting fatter.  I'm building a storefront app w/ a simple shopping cart for which I'm thinking of using a Stateful session bean (EJB 3.0).It looks like, no matter how I look at it, I'll have to keep the SFSB stub in-session throughout its use in the application...and I'm not sure of a real elegant way of doing that.  So, I was just hoping someone here could provide some insight.
In Wicket, I've already got a class called UserSession which I use to pass around an User so I can test whether or not a page is accessible by certain user groups.  I decided, to keep it simple, that I'd add a getter & setter for my ShoppingCart stub in the same class so it could be passed around in-session w/ the User, since each shopper will have an User automatically created for them before checking out and paying.
The problem w/ all this SFSB business is; it violates my design because I have to make my web tier talk directly to my session bean in order to keep track of its state.  For everything else I've been using a handful of proxy classes where I could place calls to my session beans and other business logic.
It looks a little like this:Wicket->ProxyClass->SessionBean->DatabaseSo, now I'll have to keep track of the ShoppingCart stub class in Wicket, pass the ShoppingCart and the users' chosen form values into the Proxy, perform business logic, and then return a ShoppingCart which I'll have to place *back* into the 
UserSession.setCart() method to continue to keep track of the state of the users' carts.This is kinda nasty, is there an easier (or just more elegant) way to do this?Thanks all!






[Wicket-user] EJB3 Stateful SB - session issues/questions

2006-03-29 Thread Vincent Jenks
I'm sitting here, pondering, and getting fatter.  I'm building a storefront app w/ a simple shopping cart for which I'm thinking of using a Stateful session bean (EJB 3.0).It looks like, no matter how I look at it, I'll have to keep the SFSB stub in-session throughout its use in the application...and I'm not sure of a real elegant way of doing that.  So, I was just hoping someone here could provide some insight.
In Wicket, I've already got a class called UserSession which I use to pass around an User so I can test whether or not a page is accessible by certain user groups.  I decided, to keep it simple, that I'd add a getter & setter for my ShoppingCart stub in the same class so it could be passed around in-session w/ the User, since each shopper will have an User automatically created for them before checking out and paying.
The problem w/ all this SFSB business is; it violates my design because I have to make my web tier talk directly to my session bean in order to keep track of its state.  For everything else I've been using a handful of proxy classes where I could place calls to my session beans and other business logic.
It looks a little like this:Wicket->ProxyClass->SessionBean->DatabaseSo, now I'll have to keep track of the ShoppingCart stub class in Wicket, pass the ShoppingCart and the users' chosen form values into the Proxy, perform business logic, and then return a ShoppingCart which I'll have to place *back* into the 
UserSession.setCart() method to continue to keep track of the state of the users' carts.This is kinda nasty, is there an easier (or just more elegant) way to do this?Thanks all!


Re: [Wicket-user] Html Resources Configuration in WebApplication subclasses

2006-03-29 Thread Vincent Jenks
Is there a performance hit for customizing the location of the html files?  I thought I had read that somewhere in the wiki, once upon a time.On 3/29/06, Juergen Donnerstag
 <[EMAIL PROTECTED]> wrote:
please see wicket-example  customresourceloadingJuergenOn 3/29/06, Bruno Borges <[EMAIL PROTECTED]> wrote:> I don't like the way wicket put together Java classes with HTML resources
> (in the same package structure).>> Even if I move the structure to another path, like WEB-INF/html, I must> reproduce all the package tree, and then add a resource folder in my init()> WebApplication subclass.
>> I was wondering if is it possible to implement a feature where we can map a> hole package tree to a simple directory, and from there, respect the sub> packages. Please follow my toughs:>
> This is how I'm doing right now:>> src/com/foo/view/pages/IndexPage.java> src/com/foo/view/panels/BannerPanel.java> webapp/WEB-INF/html/com/foo/view/panels/BannerPanel.html> webapp/WEB-INF/html/com/foo/view/pages/IndexPage.html
>> And this is how I'd like to do without hacks and Java code:>>  src/com/foo/view/pages/IndexPage.java> src/com/foo/view/panels/BannerPanel.java> webapp/WEB-INF/html/panels/BannerPanel.html
>  webapp/WEB-INF/html/pages/IndexPage.html>> This means that the package "com.foo.view" is mapped to the resource> directory "WEB-INF/html".>> This sounds a good idea, specially for huge projects that will need to
> modularize their interfaces.>> src/com/foo/moduleA/view/[pages/panels]/[Classes]  -->> webapp/WEB-INF/html/moduleA/[pages/panels]/[Htmls]>> This reduce the path size and our designers will love it. :)
>> This can maybe be implemented like this:>> getResourceSettings().addResourceMappingPackage("com.foo.moduleA",> "/WEB-INF/html/moduleA");>>  And all resources beneath from html/moduleA will need to follow the rest of
> the package structure.>> I like wicket, because it gives designers the possibility to don't worry> about java taglibs, <%= hell code %> and other things. Of course, I like it> because the rest of its features :o)
>> But out-of-the-box, it's not easy to say: Designers, access the "source"> folder and edit only the html files and don't mess up with the directories.> They must have some independence :)
>> Regards,>> --> Bruno Borges> [EMAIL PROTECTED]> Sun Certified Java Programmer for 1.4> Sun Certified Web Component Developer for 
1.4>---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Need session subclass example

2006-03-27 Thread Vincent Jenks
There's a great example of how to do this (which I followed successfully) in wicket-examples.  See the SignIn example code.On 3/27/06, Frank Silbermann
 <[EMAIL PROTECTED]> wrote:

















I understand that
the Wicket way to store data in the session is to subclass WicketSession
and override getSessionFactory() in the application
object.  I'm having trouble
making it work – I'm getting a class cast exception where I try to
retrieve my session subclass.

 

Would someone please
point me to a good example program which subclasses WicketSession?  









Re: [Wicket-user] gnarly form model issue

2006-03-26 Thread Vincent Jenks
Yes, we're definitely on the same page there.I'd rather see something like this:private Map selection = new HashMap();...where I pass the Configuration in as the first arg and the quantity in as the second.
Now, help me understand how assigning a selection model like this:        form.add(new ListView("configs", product.getConfigurations())        {            protected void populateItem(ListItem item)
            {                //get object                final Configuration config = (Configuration)item.getModelObject();                                IModel selectionModel = new Model()     {
  public void setObject(Component c, Object o)   {      selection.put(config, (Integer)o);  }        public Object getObject(Component c)         {            return 
selection.get(c);        }    };..to my DropDownChoice will give the DropDownChoice list a set of pre-populated strings between 0 and 9??In other words...how do I get this:
                //qty select values                List choices = Arrays.asList(                        new String[] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"});
...into the DropDownChoice...and the associate it with "selectionModel"?*That's* where I'm stuck...how do I bring the selectionModel you showed me w/ together with the DropDownChoice while at the same time getting string values 0-9 into the DropDownChoice menus?
I think I'm almost there...just trying to bring it all together now.On 3/26/06, Igor Vaynberg <
[EMAIL PROTECTED]> wrote:you are not supposed to do /exactly/ what i told you, what i wrote was
some pseudo code. if you do what i showed you, after the form submits
you would have a map where keys are the product configuration ids and
values are the quantities selected. is that not what you want??? a
map:productConfigurationId->quantity?

-Igor
On 3/26/06, Vincent Jenks <[EMAIL PROTECTED]
> wrote:
OK, I must just be dense...because that doesn't sound at all like what I want to do.Why would I assign the model of IDs from the ListView to the quantity DropDownChoice list?I
want numbers 0 through 9 in all of the selection lists...not the ID
values from the Configuration objects in the ListView.  The
DropDownChoice menus are supposed to be completely *static*...they just
need to contain the numbers 0-9 so the user can select the quantity he
wants.
If you noticed in my last post...I created this List of values that I assigned to the DropDownChoice select menu:                List choices = 
Arrays.asList(   
           
        new String[] {"0", "1", "2", "3",
"4", "5", "6", "7", "8", "9"});
In your code sample, you want me to bind the selectionModel of Configuration IDs to the DropDownChoice for the quantity:
"add(new DropDownChoice("qty", selectionModel, .)
"But, to be thorough...I did it exactly like you told me to...and I got this exception, predictably:java.lang.NullPointerExceptionat wicket.markup.html.form.AbstractChoice.onComponentTagBody

(
AbstractChoice.java:290)at wicket.Component.renderComponent(Component.java:1888)at wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)at wicket.Component.render(Component.java


:1163)Even
if I end up getting a list of Configuration IDs...what good would it do
me?  I don't need the ID values for the items in the ListViewI
need the quantity that the user has selected for each of the items and
*all* of the other fields in the Configuration model object...not just
the ID.
Again, my model looks like this:An Order has a list of OrderItem objects (one-to-many).Each OrderItem has a one-to-one with a Configuration...it encapsulates a Configuration but contains a field for quantity.
A Product has a list of Configuration objects (one-to-many).  If
you look at the image I attached a few posts back, you'll see that the
page represents an OrderItem.  The two items listed on the right
are Configuration objects.  In order to add an OrderItem to the
Order in the ShoppingCart session bean...I need to determine the
quantity selected from each Configuration listed in the form (quantity
dropdown).  If the user selects more than one Configuration from
the form I add more than one OrderItem, etc.
I'm sorry if I'm just not grasping what you're trying to make clear to me...but it's just not making any sense.Thanks again...
On 3/26/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:


my solution was going to work fine because
the id came from the product configuration you are iterating over in
the listview. it is not encoded in the dropdown but rather in the model
that you attach to it. take a closer look.
-IgorOn 3/26/

Re: [Wicket-user] gnarly form model issue

2006-03-26 Thread Vincent Jenks
OK, I must just be dense...because that doesn't sound at all like what I want to do.Why would I assign the model of IDs from the ListView to the quantity DropDownChoice list?I want numbers 0 through 9 in all of the selection lists...not the ID values from the Configuration objects in the ListView.  The DropDownChoice menus are supposed to be completely *static*...they just need to contain the numbers 0-9 so the user can select the quantity he wants.
If you noticed in my last post...I created this List of values that I assigned to the DropDownChoice select menu:                List choices = Arrays.asList(                        new String[] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"});
In your code sample, you want me to bind the selectionModel of Configuration IDs to the DropDownChoice for the quantity:"add(new DropDownChoice("qty", selectionModel, .)
"But, to be thorough...I did it exactly like you told me to...and I got this exception, predictably:java.lang.NullPointerExceptionat wicket.markup.html.form.AbstractChoice.onComponentTagBody(
AbstractChoice.java:290)at wicket.Component.renderComponent(Component.java:1888)at wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:77)at wicket.Component.render(Component.java
:1163)Even if I end up getting a list of Configuration IDs...what good would it do me?  I don't need the ID values for the items in the ListViewI need the quantity that the user has selected for each of the items and *all* of the other fields in the Configuration model object...not just the ID.
Again, my model looks like this:An Order has a list of OrderItem objects (one-to-many).Each OrderItem has a one-to-one with a Configuration...it encapsulates a Configuration but contains a field for quantity.
A Product has a list of Configuration objects (one-to-many).  If you look at the image I attached a few posts back, you'll see that the page represents an OrderItem.  The two items listed on the right are Configuration objects.  In order to add an OrderItem to the Order in the ShoppingCart session bean...I need to determine the quantity selected from each Configuration listed in the form (quantity dropdown).  If the user selects more than one Configuration from the form I add more than one OrderItem, etc.
I'm sorry if I'm just not grasping what you're trying to make clear to me...but it's just not making any sense.Thanks again...On 3/26/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:
my solution was going to work fine because the id came from the product configuration you are iterating over in the listview. it is not encoded in the dropdown but rather in the model that you attach to it. take a closer look.
-IgorOn 3/26/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

OK, I finally sat down and tried to work through this solution but what you've posted isn't going to solve my problem.On this page, what I *really* need to capture is the value from the dropdown lists for each of the configurations.  The dropdowns don't contain the IDs of the configurations like your code sample...they contain a static list of numbers 0-9 - the user is selecting the quantity they would like of each product configuration to add to their shopping cart.
I need to know which item(s) they chose and what quantity they'd like.I had done something similar to what you described only I was capturing each of the Configuration objects in a global List field...but they still don't have the updated "quantity" values the user selects.
To be more clear, I'll post the entire page class:public class ProductDetail extends WebPage{    private Map selection = new HashMap();        public ProductDetail()
    {        this(null);    }    public ProductDetail(Product product)    {        if (product == null) setResponsePage(new ProductCatalog());        add(new FeedbackPanel("feedbackPanel"));
                //modify thumbnail img tag        WebMarkupContainer wmc = new WebMarkupContainer("photoImg");        wmc.add(new AttributeModifier("src", new Model("assets/images/" + 
product.getPhoto(;        add(wmc);                //add product labels        add(new Label("longName", product.getLongName()));        add(new Label("summary", product.getSummary


()));        add(new Label("description", product.getDescription()));                Form form = new Form("productDetailForm");                form.add(new ListView("configs", 
product.getConfigurations())        {            protected void populateItem(ListItem item)            {                //get object                final Configuration config = (Configuration)item.getModelObject();            
                final Long cfgId = config.getCo

Re: [Wicket-user] gnarly form model issue

2006-03-26 Thread Vincent Jenks
OK, I finally sat down and tried to work through this solution but what you've posted isn't going to solve my problem.On this page, what I *really* need to capture is the value from the dropdown lists for each of the configurations.  The dropdowns don't contain the IDs of the configurations like your code sample...they contain a static list of numbers 0-9 - the user is selecting the quantity they would like of each product configuration to add to their shopping cart.
I need to know which item(s) they chose and what quantity they'd like.I had done something similar to what you described only I was capturing each of the Configuration objects in a global List field...but they still don't have the updated "quantity" values the user selects.
To be more clear, I'll post the entire page class:public class ProductDetail extends WebPage{    private Map selection = new HashMap();        public ProductDetail()
    {        this(null);    }    public ProductDetail(Product product)    {        if (product == null) setResponsePage(new ProductCatalog());        add(new FeedbackPanel("feedbackPanel"));
                //modify thumbnail img tag        WebMarkupContainer wmc = new WebMarkupContainer("photoImg");        wmc.add(new AttributeModifier("src", new Model("assets/images/" + 
product.getPhoto(;        add(wmc);                //add product labels        add(new Label("longName", product.getLongName()));        add(new Label("summary", product.getSummary
()));        add(new Label("description", product.getDescription()));                Form form = new Form("productDetailForm");                form.add(new ListView("configs", 
product.getConfigurations())        {            protected void populateItem(ListItem item)            {                //get object                final Configuration config = (Configuration)item.getModelObject();            
                final Long cfgId = config.getConfigId();                    IModel selectionModel = new Model()     {  public void setObject(Component c, Object o)   { 
selection.put(cfgId, (Long)o);  }        public Object getObject(Component c)         {        return selection.get(cfgId);        }    };                
                //qty select values                List choices = Arrays.asList(                        new String[] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"});
                                //add labels                String detail = String.valueOf(config.getQuantity()) + " " +                 config.getName() + " " +                 config.getWeight
();                item.add(new Label("fullDescription", detail));                item.add(new Label("price", String.valueOf(config.getPrice(;                                //add quantity select list
                DropDownChoice ddc = new DropDownChoice("quantity", choices);                ddc.setChoiceRenderer(new IChoiceRenderer()                {                    public String getDisplayValue(Object object)
                    {                        return object.toString();                    }                                        public String getIdValue(Object object, int index)                    {
                        return object.toString();                    }                                        });                                item.add(ddc);            }        });        
        form.add(new Button("addToCartButton")        {            public void onSubmit()            {                info("Saved model " + getModelObject());            }        });
                add(form);    }So, in this case, when I submit the form I get an exception because there *is* no model object in the form.I'm still confused on how I can make this work w/ Wicket...I've been screwing w/ this for 2 days and haven't made any progress.
Any ideas?On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
public class MyPage extends WebPage {private Map selection=new HashMap();public MyPage() {   IModel categories=      Form form=new Form("form");
   add(form);   firm.add(new ListView("quantities", categories) {  public void populateItem(ListItem item) {     ProductCategory cat=item.getModelObject(); final Long catId=
cat.getId(); // this model will populate an appropriate entry in the selection map    IModel selectionModel=new Model() { setObject(Component c, Object o) {        selection.put

(catId, (Integer)o);    }    Object getObject(Component c) {   return selection.get(catId);   }  

Re: [Wicket-user] gnarly form model issue

2006-03-25 Thread Vincent Jenks
That's assuming I *have* a model object, right?  Simply put, can I access each form element as a *string*, just like I would w/ JSP if I used getParameter()?  On 3/24/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:

sure, just call formcomponent.getModelObject() and formcomponent.setModelObject()-Igor
On 3/24/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:OK, I'll try itthanks for the help!  But, to answer my question -
Is there a way to access each of the form fields as stand-alone
variables?On 3/24/06, Vincent Jenks <


[EMAIL PROTECTED]> wrote:
OK, I'll try itthanks for the help!  But, to answer my question - Is there a way to access each of the form fields as stand-alone variables?
On 3/24/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:




public class MyPage extends WebPage {private Map selection=new HashMap();public MyPage() {   IModel categories=      Form form=new Form("form");
   add(form);   firm.add(new ListView("quantities", categories) {  public void populateItem(ListItem item) {     ProductCategory cat=item.getModelObject(); final Long catId=
cat.getId(); // this model will populate an appropriate entry in the selection map    IModel selectionModel=new Model() { setObject(Component c, Object o) {    selection.put





(catId, (Integer)o);    }    Object getObject(Component c) {   return selection.get(catId);   }   }  add(new DropDownChoice("qty", selectionModel, .)
    }  }); form.add(new Button() { onSubmit() { System.out.println(selection.toString()); } }...-Igor
On 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:





It makes sense but I wouldn't know how to begin (I'm rather new to Java as well as Wicket)...is there an example in the wicket-examples somewhere?  Would I just create a Map inside of the ListView?

On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:






if you are using a listview there is really no way to use a compound property model. here is what you can do:on your page create a map:configid->qtythen to the dropdown choices assign a model that will read/write a key from this map.
so when the form submits you endup with a filled in map in your page.makes sense?-Igor
On 3/24/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:I've attached a screenshot of what this page does.
Basically, the page you see receives a Product object in the constructor when it is called from the previous page.  Each Product has a List of Configuration objects...which you see listed in the screenshot (
i.e. 1 Bone In Ham Half 7-10 lbs 
@ $99.00).  Admins can define many product Configurations that the user can select on this screen.  The Configurations have an inverse relationship back to the Product so when the Configuration is added to the cart, the Product can be referenced as well.
My problem is; in this form, how can I bind a single Configuration when there are (potentially) several, per-product?My thinking was; I could add the Product to the ShoppingCart session bean instead and it would carry the product Configuration(s) with it...assuming I could grab each Configuration from the ListView in the form (where you see the 
1 "Bone In Ham Half 7-10 lbs"
text and the DropDownChoice lists) and manually create the Configuration object(s) and add them to the Product before submitting the form.Does this make sense?Thanks again!!








On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:








do you have a screenshot/mockup of the form? seeing it would help.so there is a list of configurations? and the user can click on one and edit it?








-IgorOn 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:









I've got a form where I can't exactly bind a model object because of the way the form is used.  On this page, the user selects from a list of product configurations (ProductConfiguration class) which belong to a Product objectso there is a one-to-many Product->ProductConfiguration.  I can't pass a ProductConfiguration object into the CompoundPropertyModel because the user may choose more than one (or can I?)  I'm thinking I need to bind the Product and manually add the ProductConfiguration objects to the product before submitting.
If I do it this way...how can I access each of the form fields programmatically, individually?  In other words...can form field values be called w/o using a CompoundPropertyModel if needed?Also, if there's a better way to do this, please let me know!
Thanks!





















Re: [Wicket-user] users: your opinions please! (was: feedback messages)

2006-03-25 Thread Vincent Jenks
I can see info, warn, & error as useful, others maybe a little redundant.On 3/25/06, Michael K <[EMAIL PROTECTED]
> wrote:I m using 'error'.
Ingram Chen <[EMAIL PROTECTED]> wrote:
 info & errorOn 3/26/06, lu dongping <
[EMAIL PROTECTED]> wrote: info & errorOn 3/26/06, Nick Heudecker <
[EMAIL PROTECTED]> wrote:> I'm only using info and error.>>> On 3/25/06, Eelco Hillenius < 
[EMAIL PROTECTED]> wrote:> > Hey Wicket users, please tell us whether or not you are using those
> > different levels. We are about to remove them for a next version,
  so
 > > *if* you feel attached to them, you should shout out now before it is> > too late.>>-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwan 
blog: http://www.javaworld.com.tw/roller/page/ingramchen 

		Blab-away for as little as 1¢/min. Make 
 PC-to-Phone Calls using Yahoo! Messenger with Voice.



Re: [Wicket-user] gnarly form model issue

2006-03-24 Thread Vincent Jenks
OK, I'll try itthanks for the help!  But, to answer my question -
Is there a way to access each of the form fields as stand-alone
variables?On 3/24/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
OK, I'll try itthanks for the help!  But, to answer my question - Is there a way to access each of the form fields as stand-alone variables?
On 3/24/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:

public class MyPage extends WebPage {private Map selection=new HashMap();public MyPage() {   IModel categories=      Form form=new Form("form");
   add(form);   firm.add(new ListView("quantities", categories) {  public void populateItem(ListItem item) {     ProductCategory cat=item.getModelObject(); final Long catId=
cat.getId(); // this model will populate an appropriate entry in the selection map    IModel selectionModel=new Model() { setObject(Component c, Object o) {    selection.put


(catId, (Integer)o);    }    Object getObject(Component c) {   return selection.get(catId);   }   }  add(new DropDownChoice("qty", selectionModel, .)
    }  }); form.add(new Button() { onSubmit() { System.out.println(selection.toString()); } }...-Igor
On 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:


It makes sense but I wouldn't know how to begin (I'm rather new to Java as well as Wicket)...is there an example in the wicket-examples somewhere?  Would I just create a Map inside of the ListView?

On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:



if you are using a listview there is really no way to use a compound property model. here is what you can do:on your page create a map:configid->qtythen to the dropdown choices assign a model that will read/write a key from this map.
so when the form submits you endup with a filled in map in your page.makes sense?-Igor
On 3/24/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:I've attached a screenshot of what this page does.
Basically, the page you see receives a Product object in the constructor when it is called from the previous page.  Each Product has a List of Configuration objects...which you see listed in the screenshot (
i.e. 1 Bone In Ham Half 7-10 lbs 
@ $99.00).  Admins can define many product Configurations that the user can select on this screen.  The Configurations have an inverse relationship back to the Product so when the Configuration is added to the cart, the Product can be referenced as well.
My problem is; in this form, how can I bind a single Configuration when there are (potentially) several, per-product?My thinking was; I could add the Product to the ShoppingCart session bean instead and it would carry the product Configuration(s) with it...assuming I could grab each Configuration from the ListView in the form (where you see the 
1 "Bone In Ham Half 7-10 lbs"
text and the DropDownChoice lists) and manually create the Configuration object(s) and add them to the Product before submitting the form.Does this make sense?Thanks again!!





On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:





do you have a screenshot/mockup of the form? seeing it would help.so there is a list of configurations? and the user can click on one and edit it?





-IgorOn 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:






I've got a form where I can't exactly bind a model object because of the way the form is used.  On this page, the user selects from a list of product configurations (ProductConfiguration class) which belong to a Product objectso there is a one-to-many Product->ProductConfiguration.  I can't pass a ProductConfiguration object into the CompoundPropertyModel because the user may choose more than one (or can I?)  I'm thinking I need to bind the Product and manually add the ProductConfiguration objects to the product before submitting.
If I do it this way...how can I access each of the form fields programmatically, individually?  In other words...can form field values be called w/o using a CompoundPropertyModel if needed?Also, if there's a better way to do this, please let me know!
Thanks!
















Re: [Wicket-user] gnarly form model issue

2006-03-24 Thread Vincent Jenks
OK, I'll try itthanks for the help!  But, to answer my question - Is there a way to access each of the form fields as stand-alone variables?On 3/24/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:
public class MyPage extends WebPage {private Map selection=new HashMap();public MyPage() {   IModel categories=      Form form=new Form("form");
   add(form);   firm.add(new ListView("quantities", categories) {  public void populateItem(ListItem item) {     ProductCategory cat=item.getModelObject(); final Long catId=
cat.getId(); // this model will populate an appropriate entry in the selection map    IModel selectionModel=new Model() { setObject(Component c, Object o) {    selection.put

(catId, (Integer)o);    }    Object getObject(Component c) {   return selection.get(catId);   }   }  add(new DropDownChoice("qty", selectionModel, .)
    }  }); form.add(new Button() { onSubmit() { System.out.println(selection.toString()); } }...-Igor
On 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

It makes sense but I wouldn't know how to begin (I'm rather new to Java as well as Wicket)...is there an example in the wicket-examples somewhere?  Would I just create a Map inside of the ListView?

On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


if you are using a listview there is really no way to use a compound property model. here is what you can do:on your page create a map:configid->qtythen to the dropdown choices assign a model that will read/write a key from this map.
so when the form submits you endup with a filled in map in your page.makes sense?-Igor
On 3/24/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:I've attached a screenshot of what this page does.
Basically, the page you see receives a Product object in the constructor when it is called from the previous page.  Each Product has a List of Configuration objects...which you see listed in the screenshot (
i.e. 1 Bone In Ham Half 7-10 lbs 
@ $99.00).  Admins can define many product Configurations that the user can select on this screen.  The Configurations have an inverse relationship back to the Product so when the Configuration is added to the cart, the Product can be referenced as well.
My problem is; in this form, how can I bind a single Configuration when there are (potentially) several, per-product?My thinking was; I could add the Product to the ShoppingCart session bean instead and it would carry the product Configuration(s) with it...assuming I could grab each Configuration from the ListView in the form (where you see the 
1 "Bone In Ham Half 7-10 lbs"
text and the DropDownChoice lists) and manually create the Configuration object(s) and add them to the Product before submitting the form.Does this make sense?Thanks again!!




On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:




do you have a screenshot/mockup of the form? seeing it would help.so there is a list of configurations? and the user can click on one and edit it?




-IgorOn 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:





I've got a form where I can't exactly bind a model object because of the way the form is used.  On this page, the user selects from a list of product configurations (ProductConfiguration class) which belong to a Product objectso there is a one-to-many Product->ProductConfiguration.  I can't pass a ProductConfiguration object into the CompoundPropertyModel because the user may choose more than one (or can I?)  I'm thinking I need to bind the Product and manually add the ProductConfiguration objects to the product before submitting.
If I do it this way...how can I access each of the form fields programmatically, individually?  In other words...can form field values be called w/o using a CompoundPropertyModel if needed?Also, if there's a better way to do this, please let me know!
Thanks!














Re: [Wicket-user] gnarly form model issue

2006-03-24 Thread Vincent Jenks
It makes sense but I wouldn't know how to begin (I'm rather new to Java as well as Wicket)...is there an example in the wicket-examples somewhere?  Would I just create a Map inside of the ListView?
On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
if you are using a listview there is really no way to use a compound property model. here is what you can do:on your page create a map:configid->qtythen to the dropdown choices assign a model that will read/write a key from this map.
so when the form submits you endup with a filled in map in your page.makes sense?-Igor
On 3/24/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:I've attached a screenshot of what this page does.
Basically, the page you see receives a Product object in the constructor when it is called from the previous page.  Each Product has a List of Configuration objects...which you see listed in the screenshot (
i.e. 1 Bone In Ham Half 7-10 lbs 
@ $99.00).  Admins can define many product Configurations that the user can select on this screen.  The Configurations have an inverse relationship back to the Product so when the Configuration is added to the cart, the Product can be referenced as well.
My problem is; in this form, how can I bind a single Configuration when there are (potentially) several, per-product?My thinking was; I could add the Product to the ShoppingCart session bean instead and it would carry the product Configuration(s) with it...assuming I could grab each Configuration from the ListView in the form (where you see the 
1 "Bone In Ham Half 7-10 lbs"
text and the DropDownChoice lists) and manually create the Configuration object(s) and add them to the Product before submitting the form.Does this make sense?Thanks again!!


On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


do you have a screenshot/mockup of the form? seeing it would help.so there is a list of configurations? and the user can click on one and edit it?


-IgorOn 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:



I've got a form where I can't exactly bind a model object because of the way the form is used.  On this page, the user selects from a list of product configurations (ProductConfiguration class) which belong to a Product objectso there is a one-to-many Product->ProductConfiguration.  I can't pass a ProductConfiguration object into the CompoundPropertyModel because the user may choose more than one (or can I?)  I'm thinking I need to bind the Product and manually add the ProductConfiguration objects to the product before submitting.
If I do it this way...how can I access each of the form fields programmatically, individually?  In other words...can form field values be called w/o using a CompoundPropertyModel if needed?Also, if there's a better way to do this, please let me know!
Thanks!










Re: [Wicket-user] gnarly form model issue

2006-03-24 Thread Vincent Jenks
I've attached a screenshot of what this page does.Basically, the page you see receives a Product object in the constructor when it is called from the previous page.  Each Product has a List of Configuration objects...which you see listed in the screenshot (
i.e. 1 Bone In Ham Half 7-10 lbs 
@ $99.00).  Admins can define many product Configurations that the user can select on this screen.  The Configurations have an inverse relationship back to the Product so when the Configuration is added to the cart, the Product can be referenced as well.
My problem is; in this form, how can I bind a single Configuration when there are (potentially) several, per-product?My thinking was; I could add the Product to the ShoppingCart session bean instead and it would carry the product Configuration(s) with it...assuming I could grab each Configuration from the ListView in the form (where you see the 
1 "Bone In Ham Half 7-10 lbs"
text and the DropDownChoice lists) and manually create the Configuration object(s) and add them to the Product before submitting the form.Does this make sense?Thanks again!!
On 3/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
do you have a screenshot/mockup of the form? seeing it would help.so there is a list of configurations? and the user can click on one and edit it?
-IgorOn 3/24/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

I've got a form where I can't exactly bind a model object because of the way the form is used.  On this page, the user selects from a list of product configurations (ProductConfiguration class) which belong to a Product objectso there is a one-to-many Product->ProductConfiguration.  I can't pass a ProductConfiguration object into the CompoundPropertyModel because the user may choose more than one (or can I?)  I'm thinking I need to bind the Product and manually add the ProductConfiguration objects to the product before submitting.
If I do it this way...how can I access each of the form fields programmatically, individually?  In other words...can form field values be called w/o using a CompoundPropertyModel if needed?Also, if there's a better way to do this, please let me know!
Thanks!






cart_shot.gif
Description: GIF image


[Wicket-user] gnarly form model issue

2006-03-24 Thread Vincent Jenks
I've got a form where I can't exactly bind a model object because of the way the form is used.  On this page, the user selects from a list of product configurations (ProductConfiguration class) which belong to a Product objectso there is a one-to-many Product->ProductConfiguration.  I can't pass a ProductConfiguration object into the CompoundPropertyModel because the user may choose more than one (or can I?)  I'm thinking I need to bind the Product and manually add the ProductConfiguration objects to the product before submitting.
If I do it this way...how can I access each of the form fields programmatically, individually?  In other words...can form field values be called w/o using a CompoundPropertyModel if needed?Also, if there's a better way to do this, please let me know!
Thanks!


Re: [Wicket-user] HTTPS switching

2006-03-22 Thread Vincent Jenks
I'm actually dying to know this myself as I'm in the throes of building a shopping cart that will need SSL at some point in the process.Can this in fact be done?  Can part of my application somehow reside behind https?
I'm sure it's been asked before but I don't see any examples of this anywhere.Thanks!On 3/22/06, John Patterson <
[EMAIL PROTECTED]> wrote:Hi,Is there a standard way to handle switching between http and https?
Thanks,John.---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] onSubmit vs onClick for form submission

2006-03-20 Thread Vincent Jenks
I "fixed" this by using Form.onSubmit() for the save button and keeping the cancel button the same...now both work just fine...but not exactly as Igor described.Good enough!
On 3/20/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
OK, believe it or not, I did just that and *still* cannot get it to work.Here's my Form class:    private static class EditProductForm extends Form
    {        public EditProductForm(String name, Product product)
        {            super(name, new CompoundPropertyModel(product));                        //get collection of Category items            IModel catsModel = new LoadableDetachableModel()            {
                protected Object load()                {                    return ProductProxy.getAllCategories(); //via proxy                }            };                        //add form components
            add(new TextField("productCode").add(RequiredValidator.getInstance()));            add(new TextField("name").add(RequiredValidator.getInstance()));            add(new TextArea("summary").add(
RequiredValidator.getInstance()));            add(new TextArea("description").add(RequiredValidator.getInstance()));            add(new TextField("unitPrice"));
            add(new TextField("weight"));
            add(new TextField("height"));            add(new TextField("width"));            add(new TextField("length"));            add(new TextField("insuredValue"));
            add(new CheckBox("freeShipping"));            add(new TextField("thumbnail").add(RequiredValidator.getInstance()));            add(new TextField("photo").add(RequiredValidator.getInstance

()));                        //add reset button            add(new Button("cancelButton")            {                public void onSubmit()                {                                        setResponsePage(new EditProduct());
                }            }.setDefaultFormProcessing(false));                        //add reset button            add(new Button("saveButton")
            {                public void onSubmit()
                {                    //save form values, redirect                    Product product = (Product)getModelObject();                    ProductProxy.addProduct(product);                    setResponsePage(new EditProduct());
                }            });        }    }The cancel button works now but the save button is now throwing an exception:wicket.WicketRuntimeException
: Method public abstract void wicket.markup.html.form.IFormSubmitListener.onFormSubmitted
() of interface java.lang.reflect.Method threw an exception ..Caused by: java.lang.reflect.InvocationTargetException ..Caused by: wicket.WicketRuntimeException: OGNL Exception: _expression_='saveButton'; path='4:editProductForm:saveButton'
...Caused by: ognl.NoSuchPropertyException: com.myapp.model.Product.saveButton...Here's the form HTML just in case I'm goofing something there:
...                                                                                                                        
                                                                                                                                 
                                                                                                                                                            

What's wrong w/ this?Thanks!On 3/19/06, Igor Vaynberg <
[EMAIL PROTECTED]> wrote:
the easiest way to do this is add two buttons with two onsubmit handlers instead of using the form's onsubmit.
so add(new Button("save") { onsubmit() { // do the saving here } })add(new Button("cancel") { onsubmit() { //navigate away here } }.setDefaultFormProcessing(false));
notice the call to setDefaultFormProcessing(false) on the cancel button. this will tell wicket that when this button is pressed it should not validate/update model instead go directly to the button's onsubmit handler.
-IgorOn 3/19/06, 
Riyad Kalla <[EMAIL PROTECTED]> wrote:


Don't you need to commit the response?(just a lame guess from the servlet world)On 3/19/06, Vincent Jenks <

[EMAIL PROTECTED]> wrote:> Alright, did that, now the button doesn't do anything at *all*.
>> Here's the HTML button:>> >> ...and the event handler:>>> add(new Button("cancelButton")
> {> public void onClick()> {> setResponsePage(new Home());>         }> });>> Any ideas?
>>> On 3/19/06, Justin Lee <[EMAIL PROTECTED]> wrote:> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: RIPEMD160> >> > Make sure the cancel button is type="but

Re: [Wicket-user] onSubmit vs onClick for form submission

2006-03-20 Thread Vincent Jenks
OK, believe it or not, I did just that and *still* cannot get it to work.Here's my Form class:    private static class EditProductForm extends Form    {        public EditProductForm(String name, Product product)
        {            super(name, new CompoundPropertyModel(product));                        //get collection of Category items            IModel catsModel = new LoadableDetachableModel()            {
                protected Object load()                {                    return ProductProxy.getAllCategories(); //via proxy                }            };                        //add form components
            add(new TextField("productCode").add(RequiredValidator.getInstance()));            add(new TextField("name").add(RequiredValidator.getInstance()));            add(new TextArea("summary").add(
RequiredValidator.getInstance()));            add(new TextArea("description").add(RequiredValidator.getInstance()));            add(new TextField("unitPrice"));            add(new TextField("weight"));
            add(new TextField("height"));            add(new TextField("width"));            add(new TextField("length"));            add(new TextField("insuredValue"));
            add(new CheckBox("freeShipping"));            add(new TextField("thumbnail").add(RequiredValidator.getInstance()));            add(new TextField("photo").add(RequiredValidator.getInstance
()));                        //add reset button            add(new Button("cancelButton")            {                public void onSubmit()                {                                        setResponsePage(new EditProduct());
                }            }.setDefaultFormProcessing(false));                        //add reset button            add(new Button("saveButton")            {                public void onSubmit()
                {                    //save form values, redirect                    Product product = (Product)getModelObject();                    ProductProxy.addProduct(product);                    setResponsePage(new EditProduct());
                }            });        }    }The cancel button works now but the save button is now throwing an exception:wicket.WicketRuntimeException: Method public abstract void wicket.markup.html.form.IFormSubmitListener.onFormSubmitted
() of interface java.lang.reflect.Method threw an exception ..Caused by: java.lang.reflect.InvocationTargetException ..Caused by: wicket.WicketRuntimeException: OGNL Exception: _expression_='saveButton'; path='4:editProductForm:saveButton'
...Caused by: ognl.NoSuchPropertyException: com.myapp.model.Product.saveButton...Here's the form HTML just in case I'm goofing something there:
...                                                                                                                        
                                                                                                                                 
                                                                                                                                                            
What's wrong w/ this?Thanks!On 3/19/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
the easiest way to do this is add two buttons with two onsubmit handlers instead of using the form's onsubmit.
so add(new Button("save") { onsubmit() { // do the saving here } })add(new Button("cancel") { onsubmit() { //navigate away here } }.setDefaultFormProcessing(false));
notice the call to setDefaultFormProcessing(false) on the cancel button. this will tell wicket that when this button is pressed it should not validate/update model instead go directly to the button's onsubmit handler.
-IgorOn 3/19/06, 
Riyad Kalla <[EMAIL PROTECTED]> wrote:

Don't you need to commit the response?(just a lame guess from the servlet world)On 3/19/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:> Alright, did that, now the button doesn't do anything at *all*.
>> Here's the HTML button:>> >> ...and the event handler:>>> add(new Button("cancelButton")
> {> public void onClick()> {> setResponsePage(new Home());> }>     });>> Any ideas?
>>> On 3/19/06, Justin Lee <[EMAIL PROTECTED]> wrote:> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: RIPEMD160> >> > Make sure the cancel button is type="button" and not type="submit".
> > then just define an onClick for your cancel button to navigate where you> > want.> >> > Vincent Jenks wrote:> > > So, I'm trying to figure out if I should do with my form b

Re: [Wicket-user] EJB3/Hibernate Lazy fetching...

2006-03-20 Thread Vincent Jenks
Well, in the previous page which passes the Product into this page...the object was wrapped in a detachable model...not just called directly...so I should try and wrap it again in the current page?
On 3/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
instead of using the product object directly, use a detachable model.you might also need to use an open session in view interceptor in case jboss closes the hibernate session after your bean's method is finished executing. if it does this, then by the time wicket code runs the object is already disconnected from its session and thus cant load any child collections.
-IgorOn 3/20/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

OK, so I'm in a bit of a quagmire.I'm using Wicket + EJB3 (JBoss 4.0.4RC1) which uses Hibernate as the persistence behind EJB3.Unless I set all of my parent/child object relationship annotations to EAGER fetching...I get this error:
"org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role:"...when I try to access the child collection of the parent object.  In my case, for example, I am passing an object to a form in Wicket using the constructor:
public class ProductDetail extends WebPage{    public ProductDetail()    {        this(null);    }    public ProductDetail(Product product)    {    add(new ProductDetailForm("productDetailForm", product));
...The parent object being "Product" and the child being Product.getConfigurations()which is a List.This same ProductDetail page has a form (see above where I passed the Product into the form)...and I need to access the child collection inside the form:
            add(new ListView("configs", product.getConfigurations())            {                protected void populateItem(ListItem item)                {                    final Configuration config = (Configuration)item.getModelObject();
                                        item.add(new Label("quantity", String.valueOf(config.getQuantity(;                    item.add(new Label("name", config.getName()));                    
item.add(new Label("weight", config.getWeight()));                    item.add(new Label("price", String.valueOf(config.getPrice(;                }            });badda-bing...here's when the exception occurs.  Now...I *could* fix it by setting the collection to EAGER fetching...but this could eventually cause me some severe performance problemsespecially once the collections begin to grow in size...I just have to be able to do LAZY fetching.
Since I'm using EJB3 CMP I don't have control over the hibernate session - the container does...so my flexibility there is limited.  Is there something I could do to work around this?Thanks!






[Wicket-user] EJB3/Hibernate Lazy fetching...

2006-03-20 Thread Vincent Jenks
OK, so I'm in a bit of a quagmire.I'm using Wicket + EJB3 (JBoss 4.0.4RC1) which uses Hibernate as the persistence behind EJB3.Unless I set all of my parent/child object relationship annotations to EAGER fetching...I get this error:
"org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role:"...when I try to access the child collection of the parent object.  In my case, for example, I am passing an object to a form in Wicket using the constructor:
public class ProductDetail extends WebPage{    public ProductDetail()    {        this(null);    }    public ProductDetail(Product product)    {    add(new ProductDetailForm("productDetailForm", product));
...The parent object being "Product" and the child being Product.getConfigurations()which is a List.This same ProductDetail page has a form (see above where I passed the Product into the form)...and I need to access the child collection inside the form:
            add(new ListView("configs", product.getConfigurations())            {                protected void populateItem(ListItem item)                {                    final Configuration config = (Configuration)item.getModelObject();
                                        item.add(new Label("quantity", String.valueOf(config.getQuantity(;                    item.add(new Label("name", config.getName()));                    
item.add(new Label("weight", config.getWeight()));                    item.add(new Label("price", String.valueOf(config.getPrice(;                }            });badda-bing...here's when the exception occurs.  Now...I *could* fix it by setting the collection to EAGER fetching...but this could eventually cause me some severe performance problemsespecially once the collections begin to grow in size...I just have to be able to do LAZY fetching.
Since I'm using EJB3 CMP I don't have control over the hibernate session - the container does...so my flexibility there is limited.  Is there something I could do to work around this?Thanks!


Re: [Wicket-user] onSubmit vs onClick for form submission

2006-03-19 Thread Vincent Jenks
Funny seeing you here!  When are we gonna see Wicket support in MyEclipse buddy? ;)On 3/19/06, Riyad Kalla <[EMAIL PROTECTED]
> wrote:Don't you need to commit the response?(just a lame guess from the servlet world)
On 3/19/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:> Alright, did that, now the button doesn't do anything at *all*.>> Here's the HTML button:
>> >> ...and the event handler:>>> add(new Button("cancelButton")
> {> public void onClick()> {> setResponsePage(new Home());> }> });>> Any ideas?
>>> On 3/19/06, Justin Lee <[EMAIL PROTECTED]> wrote:> > -BEGIN PGP SIGNED MESSAGE-> > Hash: RIPEMD160> >> > Make sure the cancel button is type="button" and not type="submit".
> > then just define an onClick for your cancel button to navigate where you> > want.> >> > Vincent Jenks wrote:> > > So, I'm trying to figure out if I should do with my form buttons.  I
> > > have two buttons ('save' and 'cancel') but only the onSubmit event> > > handler is fired.  I have a button inside of the form's constructor that> > > has an onClick event but that never happens...apparently because the
> > > onSubmit 'trumps' the onClick event.> > >> > > Here's my class as it stands:> > >> > > private static class EditProductForm extends Form> > > {
> > > public EditProductForm(String name, Product product)> > > {> > > super(name, new> CompoundPropertyModel(product));> > >> > > //get collection of Category items
> > > IModel catsModel = new LoadableDetachableModel()> > > {> > > protected Object load()> > > {> > > return 
ProductProxy.getAllCategories (); //via proxy> > > }> > > };> > >> > > //add form components> > > add(new
> > > TextField("productCode").add(RequiredValidator.getInstance ()));> > > add(new> TextField("name").add(RequiredValidator.getInstance()));> > > add(new
> > > TextArea("summary").add(RequiredValidator.getInstance()));> > > add(new Button("saveButton"));> > >> > > //add reset button DOESN'T WORK!
> > > add(new Button("cancelButton")> > > {> > > public void onClick()> > > {> > > modelChanged();
> > > setResponsePage(new EditProduct());> > > }> > > });> > > }> > >> > > public void onSubmit()
> > > {> > > //save form values, redirect> > > Product product = (Product)getModelObject();> > > ProductProxy.addProduct(product);
> > > setResponsePage(new EditProduct());> > > }> > > }> > >> > > Should I leave onSubmit empty and use two onClick events for the form
> > > buttons?> > >> > > The form is doing validation, also, if that effects anything.> > >> > > Thanks!> >> > - --> > Justin Lee
> > http://www.antwerkz.com> > AIM : evan chooly> > 720.299.0101> > -BEGIN PGP SIGNATURE-> > Version: GnuPG v1.4.2.1 (Cygwin)
> >> >> iD8DBQFEHc0jJnQfEGuJ90MRA/G9AJ0S8yAzsWWQH802nSef+LS23qNbMACcCWjR> > SDlWuEAvGEj6mweK4RudZ5U=> > =WtvB> > -END PGP SIGNATURE-> >> >
> > ---> > This SF.Net email is sponsored by xPML, a groundbreaking scripting> language> > that extends applications into web and mobile media. Attend the live
> webcast> > and join the prime developer group breaking into this new coding> territory!> >> 
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642> > ___> > Wicket-user mailing list> > 
Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user> >>>---
This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



<    1   2   3   >