Re: Wicket training this weekend - voucher for subscribers to this list.

2010-05-07 Thread James Perry
Hey Cemal,

Do you know of any Wicket developers that are looking for work? I am
leaving my current employer, CPG, to work for an investment bank in a
front office. CPG are struggling to find any Wicket developers and I
thought that you may know a few good Wicket people.

Hope all is well on your side.

Best,
James.

On 7 May 2010 11:03, Cemal Bayramoglu jweekend_for...@cabouge.com wrote:
 You can use this voucher [1] for a 33% discount on bookings [2]
 completed today, using Google Checkout, for this weekend's Wicket
 course [3] in London for subscribers to this list and friends.

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket
 Consulting, Development, Training
 http://jWeekend.com

 [1] WU_MAY0809_EXP0608
 [2] http://jweekend.com/dev/BookingPage
 [3] http://jweekend.com/dev/JW703

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





-- 
Best,
James.

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



Wicket Developer Role in Portsmouth, Hampshire, England

2010-04-23 Thread James Perry
CPG Logistics, a supply chain to the pharmaceutical industry, are
seeking a strong Wicket developer on a permanent basis. The work is
predominately greenfield projects and both enhancements and
maintenance to existing projects. The developer they seek must have
strong Wicket skills to produce a scalable Wicket web application from
design to deployment. Salary from £35k to £50k depending on experience
and technical skills.

Mandatory skills:

Core Java, Wicket, Spring, Hibernate, SQL, HTML, CSS, Struts,
Javascript, Subversion, XML, Tomcat, JBoss.

Desirable skills:
Adobe Flex, Maven, Ant, Web Services, XML Schema, XLST and Linux.

Please email your CV to martin.sum...@cpg-logistics.com to apply. Any
non UK applicants must have good written and verbal English skills and
the relevant Visa to work lawfully in the UK.

-- 
Best,
James.

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



Re: Type Inference for Wicket 1.4

2010-04-15 Thread James Perry
I can sympathise with that. However I don't think it would be a
maintenance nightmare if the constructors are set to private; but that
would mean a dramatic API change for such convenience and I'm guessing
you're not willing to do this.

Best,
James.

On 14 April 2010 17:01, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 you are going to have one factory method for each constructor, its
 going to be a pita to maintain. not something we will want in core.

 -igor

 On Wed, Apr 14, 2010 at 8:51 AM, James Perry
 james.austin.pe...@gmail.com wrote:
 I am looking to migrate from Wicket 1.3 and Wicket 1.4 and I really
 like the type-safe goodies but I do not like its verbosity. I was
 thinking of writing a patch that provides factories to improve the
 brevity by type inference of the generic invariant.

 This is an example of my idea:

 ModelMySuperLongNameForASimpleFooObject model = Model.newModel();

 public static T ModelT newModel() {
    return new ModelT();
 }

 Feedback welcomed. :-)

 --
 Best,
 James.

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



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



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



Type Inference for Wicket 1.4

2010-04-14 Thread James Perry
I am looking to migrate from Wicket 1.3 and Wicket 1.4 and I really
like the type-safe goodies but I do not like its verbosity. I was
thinking of writing a patch that provides factories to improve the
brevity by type inference of the generic invariant.

This is an example of my idea:

ModelMySuperLongNameForASimpleFooObject model = Model.newModel();

public static T ModelT newModel() {
return new ModelT();
}

Feedback welcomed. :-)

-- 
Best,
James.

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



Re: PROBLEM WITH PAY PAL INTEGRATION

2010-03-28 Thread James Perry
It not a wicket issue. You have two input elements with the same name:

1.input type=text name=item_name
2.input type=text name=item_name wicket:id=itemName

Remove the line 1 and voila!

Best,
James.

On 28 March 2010 22:06, victorTrapiello vic...@trapiello.net wrote:

 Hello guys! I´m trying to implement a simple buy now action with pay pal:
 with the code:

   # xxx

 form action=https://www.paypal.com/cgi-bin/webscr; method=post
 !-- Identify your business so that you can collect the payments. --
 input type=hidden name=business value=herschelgo...@xyzzyu.com
 !-- Specify a Buy Now button. --
 input type=hidden name=cmd value=_xclick
 !-- Specify details about the item that buyers will purchase. --

 input type=hidden name=amount value=5.95
 input type=hidden name=currency_code value=USD
 !-- Display the payment button. --
 input type=image name=submit border=0
 src=styles/images/comprar.jpg
 alt=PayPal - The safer, easier way to pay online
 styles/images/comprar.gif
 /form

 if for example I excute
 input type=text name=item_name wicket:id=itemName
 it appears on the scream the text box filled with my item_name but when you
 press the form´s button it sends you to a paypal web page in which the field
 item_name appears empty, it is like the wicket is lost by the way any
 help¿?

 Thanks guys!!!


 jwcarman wrote:

 Does anyone have a required border class (something that automatically
 puts a little red * next to a required field)?  I have one that I'm
 using, but it doesn't work under ajax!  When the component gets
 updated via ajax, it keeps appending little red *s to the markup.
 Don't get me wrong, it's quite funny, but I just don't think my users
 will get it.  I've tried using a border and I've also tried doing it
 as a behavior.  Either way I get the endless string if *s.

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




 --
 View this message in context: 
 http://old.nabble.com/Required-Border...-tp28006887p28062450.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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





-- 
Best,
James.

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



[wicket] Load Testing Wicket Applications

2010-01-28 Thread James Perry
Today I looked for a programmatic way to load test a Wicket
application and there doesn't appear to be any tools at present to do
so. I was thinking of writing one that load tests Wicket
applications in a programmatic manner, which IMHO will be cleaner than
using regular expressions with JMeter. I was thinking of an API that
specifies the a test suite contain individual load tests, which
contain the amount of threads to create and the target components to
test. I do not have a deep knowledge of the internals of Wicket so it
would be good to receive advice on the best way to program this tool.

Best,
James.

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



Re: creating item after form is submitted via ajax

2009-12-30 Thread James Perry
you have not added panel2 and you would need to it to panel1. I.e.
panel1.add(panel2)

why don't you add it on page construction and then change its
visibility on form submit?

best,
james.

2009/12/30 wic...@geofflancaster.com wic...@geofflancaster.com:
 Is there a way to create an item only after a form has been submitted?

 For example, how can I do the following:

 ---Java Psuedo-Code---
  Panel panel1 = new RandomPanel(panel1);

  add(panel1);

  add(new AjaxButton(button, form){

    onSubmit(AjaxRequestTarget target, Form form){
       Panel panel2 = new RandomPanel(panel2);
    }
  };

 ---End java Psuedo-Code---

 ---Psuedo-HTML---
 ...
 span wicket:id=panel1span wicket:id=panel2/span/span
 ...
 ---End Psuedo-HTML---

 When I try it now I get an error saying panel2 is in my markup but not
 added to the page. Any help is greatly appreciated.

 Thanks!



 
 mail2web.com – Enhanced email for the mobile individual based on Microsoft®
 Exchange - http://link.mail2web.com/Personal/EnhancedEmail



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





-- 
Best,
James.

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



Re: Very Basic Hello World - Applet

2009-12-09 Thread James Perry
Oh, I went to Southampton Uni'!  :-)

It depends how it is being deployed but the most simplest way is to
put your the applet in your 'webapp' folder.

Best,
James.

2009/12/9 local_shamil shaena...@gmail.com:

 Ok... this is the code i used to create my Maven Wicket project

  mvn archetype:create -DarchetypeGroupId=org.apache.wicket
 -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4.3
 -DgroupId=com.mycompany -DartifactId=myproject 

 and i used the above example to create
 http://journals.ecs.soton.ac.uk/java/tutorial/getStarted/applet/index.html
 my applet

 So what i did was i added the HelloWorld.java and HelloWorld.html file
 in the com.mycompany pakage..

 have i done correctly up to this point ??

 then i dont undestand what archive=/xyz.jar  that u have quoted in your
 reply ... Should i have to create a HelloWorl.jar file and have it in the
 com.mycompany  package ??

 Please help ... :( :(
 --
 View this message in context: 
 http://old.nabble.com/Very-Basic-Hello-World---Applet-tp26712682p26712974.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: How do you achieve persistency

2009-10-07 Thread James Perry
Interesting, but how would you provide transactional isolation so you do not
experience phantom or dirty reads?

2009/10/6 Igor Vaynberg igor.vaynb...@gmail.com

 i think all the suggestions you have gotten until now are
 overcomplicated and have a high learning curve. i think the easiest
 and fastest way to achieve persistency is to use a database that all
 operating systems already have - the file system.

 each table is a directory, each entity is simply a file that has
 the serialized state of that entity named something like uuid.ser.

 done. its easy and simple. most importantly, there is absolutely no
 configuration needed other then the root folder and nothing to learn
 other then being able to read and write a file.

 if you want to take it up a notch you can use something like xstream
 or jaxb to serialize your entities into xml - which will make
 debugging easier.

 -igor


 On Tue, Oct 6, 2009 at 2:34 AM, Peter Arnulf Lustig u...@yahoo.de
 wrote:
  What's the fast and easy way?
 
  I am asking because of a lot of trouble with hibernate.
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




Re: server push

2009-10-06 Thread James Perry
Depending when you have to roll this out, have you considered HTML 5's web
sockets? It will give you server push and more.

On Mon, Oct 5, 2009 at 8:08 AM, Md. Jahid Shohel ja...@outscore.se wrote:

 Hi,

 We need server push for one of our web application. Is there something
 that you can suggest? The requirement is, it should work on any server
 (Tomcat, jetty, jboss,). is there any wicket component that does
 this?

 I have heard about wicketstuff-push, but i also heard that it only works
 with jetty. any kind of suggestion is welcome.

 thanks in advance.


 //jahid


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




Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread James Perry
Nice one Cemal!
I will have to use leg up to get a leg over setting up Wicket projects ;-)

Best,
James.

On Tue, Oct 6, 2009 at 2:47 PM, jWeekend jweekend_for...@cabouge.comwrote:

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of Spring,
 Guice, WarpPersist, JPA (with one or more implementation from EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more combinations.
 Also feel free to raise any issues [2].

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket Training and Development
 http://jWeekend.com

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


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




Re: How do you achieve persistency

2009-10-06 Thread James Perry
Assembler!

On Tue, Oct 6, 2009 at 10:34 AM, Peter Arnulf Lustig u...@yahoo.dewrote:

 What's the fast and easy way?

 I am asking because of a lot of trouble with hibernate.





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




Re: How do you achieve persistency

2009-10-06 Thread James Perry
On a more serious note then perhaps just using raw JDBC if you are unsure of
ORM concepts.

On Tue, Oct 6, 2009 at 4:03 PM, James Perry james.austin.pe...@gmail.comwrote:

 Assembler!


 On Tue, Oct 6, 2009 at 10:34 AM, Peter Arnulf Lustig u...@yahoo.dewrote:

 What's the fast and easy way?

 I am asking because of a lot of trouble with hibernate.





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





Re: How do you achieve persistency

2009-10-06 Thread James Perry
There are many ways to skin a cat. Personally I like to use machine code to
give it a slow, painful death.
Best,
James.

On Tue, Oct 6, 2009 at 4:42 PM, James Carman
jcar...@carmanconsulting.comwrote:

 On Tue, Oct 6, 2009 at 11:05 AM, James Perry
 james.austin.pe...@gmail.com wrote:
  On a more serious note then perhaps just using raw JDBC if you are unsure
 of
  ORM concepts.
 

 Isn't that kind of like saying I suggest you walk everywhere you want
 to go if you're unfamiliar with how to drive a car?

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




Re: Wicket + Hibernate without Spring for lazy loading

2009-10-05 Thread James Perry
Well you can use your business logic objects inside Wicket but you have to
ensure that you you hold one, and only one, instance for each business
object (assuming these objects are stateless) and that you do not
accidentally serialize these objects and their dependencies within your
Wicket pages.
If you don't want to use Spring, have a look at Google Guice - which is a
very simple, elegant yet powerful DI framework. Wicket provides support for
Guice so you don't have to worry about accidental serialization. Once you
have got to grips with Wicket and Guice then you can get really creative to
enable Guice to inject Wicket components in your Wicket application.

Cheers,
James.

On Mon, Oct 5, 2009 at 3:49 PM, Jeffrey Schneller 
jeffrey.schnel...@envisa.com wrote:

 I looked into the wicket London presentation/code and databinder.net and
 it all makes sense but it looks like then my wicket forms/components are
 tied directly to the database.  When I submit a form then the data is
 persisted but I don't want this.   I want to be able to call the data
 layer to retrieve data or to persist data and not care that a form is
 tied to it or not.  I also need to be able to get data to populate lists
 or tables on a page.

 I currently have my project set up like:

 Data objects - POJOs to hold data that comes from or will be persisted
 to the db
 Data Access Objects - objects to get and persistent data using hibernate
 using the data objects
 Business Logic - helper classes to access the data access objects if
 additional logic needs to be performed before persisting to the db.
 Wicket Pages - all my wicket pages.  The pages call the data access
 objects to retrieve data to display on pages and forms.  The pages also
 handle the form submits and call the Data Access Objects to persistent
 to the db.  In some cases I call the Business Logic layer to do the
 persistence.

 In the end I have data layer which I can re-use.  The business logic
 layer which I can change as needed.  Then the wicket pages which once
 they work I shouldn't need to touch if the logic changes or the data
 layer changes.  This is what I think of as a true 3-tier architecture.

 I also am not using maven.  I have eclipse running and added the jars to
 the project myself.  If I need to use maven then I will but it seems
 like adding more stuff to something that should be very simple.


 Should I be doing something different in terms of my architecture to
 implement wicket?  Everything is running fine for me except the lazy
 loading of data from hibernate.  Not sure how my session size is going
 to look doing it this way either.  Would prefer to have the smallest
 session size possible but this is a small app with little traffic for
 now so not that big of a deal.

 I am a wicket newbie and want to get this right as this is the first
 wicket project which will lead to a much larger higher traffic project
 that is currently planned to be developed using wicket.

 Thanks.




 -Original Message-
 From: Adrian Merrall [mailto:pigeonra...@gmail.com]
 Sent: Monday, October 05, 2009 6:17 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket + Hibernate without Spring for lazy loading

 Google for a wicket london weekend presentation and follow up blog on
 loading jpa entity managers on demand.  There have also been various
 posts
 relating to using the open session in view Hibernate filter.

 The JPA blog entry uses the requestcycle to prepare a thread local.  The
 first call to use it creates the entity manager and keeps it in the
 thread
 local.

 The request cycle end request and exception methods handle the cleanup
 and
 close.

 Very brief description but if you google for the topics above it is all
 very
 well explained.

 HTH

 Adrian

 On Mon, Oct 5, 2009 at 6:22 PM, Petr Fejfar petr.fej...@gmail.com
 wrote:

  On Mon, Oct 5, 2009 at 5:12 AM, Jeffrey Schneller
  jeffrey.schnel...@envisa.com wrote:
 
   I really don't want to bloat my code to implement Spring but if it
 is the
  only way to do it then I will.
 
  When I've started learning of Wicket few month ago, my position was
  the similiar: I'd like to avoid stuff like Maven, Spring etc... I
  found out Databinder as well and tried it. But I was not able to make
  it running with Hibernate, just with HSQLDB.
 
  So we've decided to continue with Spring, Maven... We've increased our
  overhead little bit, but once we define beans, we do not care about
  them any more. There was only one pitfall: manually invoking injection
  of non-visual components. After few month I must say that Spring seems
  to be the least problematic part of our projects.
 
 
  Petr
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 -
 To unsubscribe, e-mail: 

[OT] Test Driven Scaffolding

2009-09-02 Thread James Perry
I thought fellow Wicket users would be interested in my article:

http://www.theserverside.com/news/thread.tss?thread_id=57443
Cheers,
James.


Re: [OT] Book/pointers on caching

2009-03-30 Thread James Perry
Caching wicket components is a really bad idea as you will run into
concurrency issues. IMHO the caching strategy depends on the how immutable
the data is, its transaction isolation (read-only, read-write, etc) and what
performance problem you are encountering (Cartesian product, N+1 select,
etc). Have a look at the Java Persistence with Hibernate for a primer on the
subject.

Cheers,
James.

On Sun, Mar 29, 2009 at 5:46 PM, Kaspar Fischer fisch...@inf.ethz.chwrote:

 I again and again run into the following problem: My Wicket app displays a
 complex page, and in order to compile the information needed for this page,
 I need to do many database/repository queries and/or computations -- so many
 that it simply takes to long and the user has two wait.

 Take for instance a page with many news blocks for different topics, a
 recently added content block, polls, the list of all active users, etc.
 Fetching all this data requires tons of queries to the backend.

 I understand that I need some caching mechanism. And as many have pointed
 out on this list, it is preferable to not do this in the presentation layer
 (caching Wicket components) but to move the caching to the business logic or
 persistence layer. So my Wicket models still make the same calls, like
 service.find(blabla), but behind the scenes, a cache speeds up the access.

 The question is just: what are good caching strategies? When to update the
 cache? Should the cache itself know when to invalidate entries? Etc. Is
 there any sample code, articles, or books on this that you can recommend?

 I liked to read Multitiered architectures in Wicket in Action and would
 enjoy something in this direction: Spring, Hibernate (or db4o), services,
 ...

 Thanks a lot,
 Kaspar

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




Re: [OT] Framework for managing task

2009-02-23 Thread James Perry
IMHO, you might want to look at the Spring framework as it provides a nice
API on top of the asynchronous JEE features you need.

Best,
James.

On Sun, Feb 22, 2009 at 10:26 PM, Kaspar Fischer fisch...@inf.ethz.chwrote:

 My Wicket app needs to run tasks in the background and I am looking for a
 Java framework to persist tasks in the sense that I can submit a task and
 the framework would ensure that once submitted (transactions?), the task
 will be run, even if the server is shut down in between and the task needs
 to be restarted. Also, tasks that support cancellation (à la
 java.util.concurrent.ExecutorService) should be cancelled when the system
 stops. Do you know of anything similar?

 Whatever tool I'll end up with I will document the integration with Wicket
 on the wiki.

 Thanks a lot,
 Kaspar

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




Re: @SpringBean vs getApplication().getDao()

2009-02-17 Thread James Perry
As far as I am aware, the main internal differential is that annotations
provides a quick, safe way to access your spring beans and ensure that the
whole container does not get serialized via a proxy. However the magic comes
at a cost that it will serial the bean id (as a string) - which can be
costly if used a lot in your components. On the other side of the coin,
using the other option does not have any serialization cost but its very
vulnerable to accidentally serializing the bean and, potentially, the whole
application context.

Personally I use the latter option where I access my service facade bean by
a static import. I prefer this route as I am paranoid about memory usage but
each their own.

Best,
James.

On Tue, Feb 17, 2009 at 4:55 PM, Sergey Podatelev 
brightnesslev...@gmail.com wrote:

 Okay, this question might actually be more related to Spring, but I'm
 completely lost here, and my question on Spring forums usually don't get
 any
 replies, so I hope Wicket community might help as it usually does.

 I'm using JCR, and have a RepositoryDao bean configured in
 applicationContext.xml.
 RepositoryDao has a template property which points to an instance of
 JcrTemplate in applicationContext.xml, all repository access is performed
 through that template.

 I have an AccessPage which has a RepositoryDao injected via @SpringBean.
 There is an inner class Form on that page, it has a default submit button
 and three submit buttons that skip default processing and perform their own
 operations onSubmit(). Both default button and skip-default-processing
 buttons use the same repositoryDao property of AccessPage to perform
 certain
 operations on repository.

 I noticed that when I actually open that AccessPage, there's a new
 RepositoryDao object created, and it's template property is null. When I
 press any of those non-default submit buttons of the form, everything works
 fine. But on default button onSubmit(), I see that there's yet another
 insance of RepositoryDao created, and it's template is also null, which
 leads to NullPointerException.

 I assumed that beans configured in applicationContext.xml are actually
 singletons, so there won't be any new instances of such nodes upon
 pages-with-injections instantiation.

 Regardless of whether that assumption is correct/incorrect/my-god-rtfm, I
 still won't understand why default submit button reaction is NPE as it uses
 same partnershipDao property of AccessPage.

 Could someone please elaborate some internal differences of the
 annotation-based approach as opposed to storing DAOs in Application object.
 In the latter case it's quite clear that there's a single instance of
 RepositoryDao as a property of MyApplication which is pulled on
 ((MyApplication) Application.get()).getRepositoryDao().

 Thanks.

 --
 sp



[OT] PHP based Open Source Content Management Systems

2009-01-07 Thread James Perry
Does anyone have a recommendation for a PHP Open Source Content Management
System? I ask as I volunteered to setup my local running club's web site and
I'm constrained to PHP due to their hosting plan. I would be grateful for a
recommendation if you have experience with them.

Best,
JP.


Re: Participating in Wicket

2008-12-18 Thread James Perry
I'd recommend examining the WicketFilter as your starting point. This is
where wicket requests get intercepted and processed accordingly.

Best,
James.

On Thu, Dec 18, 2008 at 10:07 AM, HHB hubaghd...@yahoo.ca wrote:


 Thank you all guys but maybe I'm expressing my ideas the wrong way.
 I don't mean how to get Wicket source and create a patch, I mean what is
 the
 best way to start studying Wicket source code? where to start? which
 module?


 Steve Swinsburg-2 wrote:
 
  If you want the source code for Wicket, check it out from SVN into
  your own local working copy. You can then build Wicket via maven after
  you have made any local changes to the source code to see if the bug
  has been fixed.
 
  You can then generate a patch and attach it to a Jira issue so the
  developers can review it.
 
  cheers.
 
 
  On 18/12/2008, at 8:19 AM, HHB wrote:
 
 
  Thanks.
  My problem is I don't where to start.
  Lets say I want to fix that bug, in order to know how to fix it, I
  have to
  be aware of the whole source code of Wicket, am I right?
  How to start studying the source code? I mean where to start
  reviewing?
 
 
  Scott Swank wrote:
 
  I found this helpful.
 
  http://cwiki.apache.org/WICKET/lifecycle-of-a-wicket-application.html
 
  Scott
 
 
  On Wed, Dec 17, 2008 at 2:38 AM, HHB hubaghd...@yahoo.ca wrote:
 
  Thanks Martijn
  How do you suggest to start studying Wicket core code (I don't mean
  getting
  the source code :) )?
  It is complicated to study and grasp?
  Thanks again.
 
 
  Martijn Dashorst wrote:
 
  Look at jira issues, fix them, create a patch and attach it to the
  jira issue. When we like your code and are tired of applying the
  fixes
  for you, you might be proposed to become a committer yourself.
 
  Valuable info:
 
  http://apache.org/dev/contributors.html#patches
 
  Martijn
 
  On Wed, Dec 17, 2008 at 11:13 AM, HHB hubaghd...@yahoo.ca wrote:
 
  Hey,
  I really have a great passion toward Wicket framework and I
  really want
  to
  participate with their core developer teams.
  My problem is that this framework has really great and passion
  developers
  and I can't imagine myself trying to join them (nor they will
  accept, I
  think) not to mention this great community.
  What do you suggest me to do?
  Thanks for your time.
  --
  View this message in context:
 
 http://www.nabble.com/Participating-in-Wicket-tp21050410p21050410.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
  --
  Become a Wicket expert, learn from the best:
 http://wicketinaction.com
  Apache Wicket 1.3.4 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/Participating-in-Wicket-tp21050410p21050753.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  View this message in context:
  http://www.nabble.com/Participating-in-Wicket-tp21050410p21068635.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Participating-in-Wicket-tp21050410p21069869.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: When to pass object instance /class type?

2008-12-17 Thread James Perry
That is incorrect. You can pass data to your CoolPage regardless of the
setResponsePage() method signature. Just try implementing both and observe
the URL once you invoke both its signatures. One will be bookmarkable and
the other will not be but I'll leave it to you which signature is
bookmarkable. Once you have explored this, investigate PageParameters,
WebApplication's mountBookmarkablePage method then URL Coding strategies.

Oh, make sure you have either a default constructor or a constructor passing
in a PageParameters in your CoolPage before playing around with the
setResponsePage(Class pageClass) signature. ;-)

Best,
James.

On Wed, Dec 17, 2008 at 10:50 AM, HHB hubaghd...@yahoo.ca wrote:


 We call setResponsePage(new CoolPage()) if want to pass some data to
 CoolPage
 and we call setResponsePage(CoolPage.class) if we only want to render
 CoolPage
 Am I right?


 HHB wrote:
 
  Hey,
  What is the difference between:
  setResponsePage(CoolPage.class)
  and
  setResponsePage(new CoolPage())
  ?
  When to use each one?
  Thanks.
 
 

 --
 View this message in context:
 http://www.nabble.com/When-to-pass-object-instance--class-type--tp20998410p21050898.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread James Perry
Firstly, your code is rather strange. That getFoos() method is not part of
the List Interface API.

Two possible solutions:

The filter chain maybe incorrect in your web.xml. Your
OpenEntityManagerInViewFilter might not be preceding the Wicket filter.
Check that it does precede it.

If you have a deadline then I recommend having one query that retrieving
both foos and bars in one hit. I've never touched JPQL but in Hibernate
Query Language (HQL), one could write this:

select f from Foo f inner join fetch f.boo b where b.id = :id

Good luck,
James.

On Mon, Nov 3, 2008 at 7:04 PM, JulianS [EMAIL PROTECTED] wrote:


 I am experiencing exactly the problem outlined in the subject of this post,
 and I would really appreciate any help I can get, as I am under a deadline.
 It's the first time I'm using Wicket with JPA, and I just don't understand
 why this isn't working.

 I have a Wicket dataprovider that looks like this (I've simplified it a
 bit):

 public abstract class FooDataProvider extends SortableDataProvider
 {
private static final long serialVersionUID = 1L;

@SpringBean
protected MyAPI myApi;

public FooDataProvider()
{
super();
// Injects the spring bean
InjectorHolder.getInjector().inject(this);
}

public Iterator iterator(final int first, final int count)
{
ListBar bars = myApi.getBars();
ListFoo foos = bars.getFoos();
return foos.iterator();
}
 }

 I am using a very standard Spring JPA setup, and my web.xml includes a
 OpenEntityManagerInViewFilter. The spring bean is being injected properly,
 and my list of Bar is returned correctly. But I get a
 LazyInitializationException no matter what I try. What am I doing wrong?

 Many thanks,
 Julian

 --
 View this message in context:
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20308559.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Add a * (star) to a mandatory field

2008-09-17 Thread James Perry
Have a look at this link as it's provides an excellent example:

http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.BorderPage

Best,
James.


On Wed, Sep 17, 2008 at 9:42 AM, Eyal Golan [EMAIL PROTECTED] wrote:
 Igor, James,
 Could you please give a short example of what you mean by using a Border?
 I haven't used this component yet, and another example, beside what there is
 in the site will be welcome


 On Tue, Sep 16, 2008 at 5:43 PM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 we use componentborder to do this, works like a charm. still it is
 interesting that the * is output before, are you sure its not your
 css, can you check the generated source?

 -igor

 On Tue, Sep 16, 2008 at 6:23 AM, James Perry
 [EMAIL PROTECTED] wrote:
  I too recently had a use case where the customer wanted a '*' to
  represent a mandatory field. IMO, using a border is more subtle and
  tidier then your approach.
 
  On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote:
  Hi,
  I created this behavior for adding a star BEFORE the component is
 rendered:
  public final class MandatoryBehavior extends AbstractBehavior {
 private static final long serialVersionUID = 5368825601887534185L;
 
 @Override
 public void beforeRender(Component component) {
 component.getResponse().write(* );
 }
 
  }
 
  1. For some reason, the star is added AFTER the label. For example:
  Configuration: * instead of * Configuration
  2. I am adding this to labels that displays mandatory fields such as
  DropDown and TextField. Is there a nicer way?
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P Save a tree. Please don't print this e-mail unless it's really necessary


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



Re: Add a * (star) to a mandatory field

2008-09-16 Thread James Perry
I too recently had a use case where the customer wanted a '*' to
represent a mandatory field. IMO, using a border is more subtle and
tidier then your approach.

On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 Hi,
 I created this behavior for adding a star BEFORE the component is rendered:
 public final class MandatoryBehavior extends AbstractBehavior {
private static final long serialVersionUID = 5368825601887534185L;

@Override
public void beforeRender(Component component) {
component.getResponse().write(* );
}

 }

 1. For some reason, the star is added AFTER the label. For example:
 Configuration: * instead of * Configuration
 2. I am adding this to labels that displays mandatory fields such as
 DropDown and TextField. Is there a nicer way?

 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really necessary


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



Re: Wicket Cart: open-source e-commerce wicket app

2008-08-29 Thread James Perry
Thanks to the individuals who have both replied to the thread and
emailed me personally. I will get the ball rolling next week.

Cheers,
James.

On Thu, Aug 28, 2008 at 1:54 PM, Serkan Camurcuoglu
[EMAIL PROTECTED] wrote:
 I have another idea for brix.. I believe that a portlet which displays these
 brix tiles as portlets would be incredibly useful for portal developers,
 because WYSIWYG content editing in portals is a very handy feature, and it's
 missing in Jetspeed AFAIK.. For example, one could add an instance of this
 portlet to a portal page, and in the edit (or edit-defaults) mode of the
 portlet, he/she would select the tile that should be displayed by this
 portlet fragment, and in the view mode the portlet would display the tile
 content..



 Patrick Angeles wrote:

 James,

 If you need any CMS functionality at all for your cart project, please
 have
 a look at:

 http://brix-cms.googlecode.com/

 For example, you could incorporate your cart panels as tiles inside of
 Brix.


 msc65jap wrote:


 Is anyone interested in contributing to an open-source e-commerce
 wicket engine? I was thinking of calling it WicketCart. I have written
 a primitive version which serves as a good foundation to build upon.

 I have a new client, a royal college, requiring an e-commerce web app
 so just pondering the idea of WicketCart. If other developers are
 interested in contributing then I will make it open-source. I have
 written it so far using Spring and Hibernate but very open for it to
 additionally be implemented for other frameworks.

 If anyone wants specific details or wants to discuss it a bit more,
 then feel free to email me.

 Best,
 James.

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








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



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



Re: Wicket Cart: open-source e-commerce wicket app

2008-08-29 Thread James Perry
Thank you. I will have a look. :-)

Cheers,
James.

On Wed, Aug 27, 2008 at 11:06 PM, Patrick Angeles
[EMAIL PROTECTED] wrote:

 James,

 If you need any CMS functionality at all for your cart project, please have
 a look at:

 http://brix-cms.googlecode.com/

 For example, you could incorporate your cart panels as tiles inside of
 Brix.


 msc65jap wrote:

 Is anyone interested in contributing to an open-source e-commerce
 wicket engine? I was thinking of calling it WicketCart. I have written
 a primitive version which serves as a good foundation to build upon.

 I have a new client, a royal college, requiring an e-commerce web app
 so just pondering the idea of WicketCart. If other developers are
 interested in contributing then I will make it open-source. I have
 written it so far using Spring and Hibernate but very open for it to
 additionally be implemented for other frameworks.

 If anyone wants specific details or wants to discuss it a bit more,
 then feel free to email me.

 Best,
 James.

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




 --
 View this message in context: 
 http://www.nabble.com/Wicket-Cart%3A-open-source-e-commerce-wicket-app-tp19184933p19190630.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Crystal Report

2008-08-29 Thread James Perry
Yeah, I have with a Wicket app. that serves Crystal Reports XI
reports. I scrapped using its J2EE business connector and, instead,
wrote the reports in PDF format to the local filesystem and emailed
them to user. I would recommend doing this asynchronously because of
the expensive I/O costs. You don't have to email them but I had to do
as it was my use case.

Crystal Reports API is a big pain in the backside so good luck!

Best,
James.

On Fri, Aug 29, 2008 at 11:24 AM, freak182 [EMAIL PROTECTED] wrote:

 Hello,

 Does anyone here had encountered using crystal report with wicket as a
 reporting tool? Any idea how to integrate crystal report? I already know how
 to integrate jasper.

 Thanks a lot.
 Cheers.
 --
 View this message in context: 
 http://www.nabble.com/Crystal-Report-tp19217374p19217374.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Crystal Report

2008-08-29 Thread James Perry
Just to clarify, I wrote the report in PDF format via its API. I can
tell you where to look if needed.

On Fri, Aug 29, 2008 at 11:24 AM, freak182 [EMAIL PROTECTED] wrote:

 Hello,

 Does anyone here had encountered using crystal report with wicket as a
 reporting tool? Any idea how to integrate crystal report? I already know how
 to integrate jasper.

 Thanks a lot.
 Cheers.
 --
 View this message in context: 
 http://www.nabble.com/Crystal-Report-tp19217374p19217374.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: GetModelObject returns null-filled Object?

2008-08-27 Thread James Perry
What model are you using for the form? How are you setting it?

While you're there have a look at IFormValidator (look at its
implementations to see how to use it) as it's much neater to add your
Hibernate validator like this rather then hard coding it in your
overridden onSubmit method.

Best,
James.

On Wed, Aug 27, 2008 at 2:06 PM, Markus [EMAIL PROTECTED] wrote:
 Following Code: (just Stubs used for Form / onSubmit for illustration)



 Form {

 onSubmit {



 Users foo = (Users) this.getModelObject();

 String bar = foo.getNick();



 //Hibernate-Validator validateForm()

 if (!validateForm(foo)) {

  (…)

 }





 When I use the debugger and look at foo, every variable is filled with null,
 but bar contains the right value?

 Why is this the way it is? Can I change it?

 Because Hibernate Validator also can´t read out the correct content and says
 it is null or empty :(



 Thanks for you help.

 Markus





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



Wicket Cart: open-source e-commerce wicket app

2008-08-27 Thread James Perry
Is anyone interested in contributing to an open-source e-commerce
wicket engine? I was thinking of calling it WicketCart. I have written
a primitive version which serves as a good foundation to build upon.

I have a new client, a royal college, requiring an e-commerce web app
so just pondering the idea of WicketCart. If other developers are
interested in contributing then I will make it open-source. I have
written it so far using Spring and Hibernate but very open for it to
additionally be implemented for other frameworks.

If anyone wants specific details or wants to discuss it a bit more,
then feel free to email me.

Best,
James.

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



Re: application scope objects in Wicket

2008-08-26 Thread James Perry
Firstly I hope you are enjoying building your first Wicket web app.

Is this application scope object immutable? What is the data structure?

IMHO, if it's immutable then it's OK to use composition within your
WebApplication by adding this object as a field within WebApplication.
I would just make it final so it never gets incorrectly pointed to a
different object once initialized.

However if this has mutable shared data, then do not use the
WebApplication's intrinsic lock as you will jeopardize its throughput
to process requests. For example:

public class FooBarApplication extends WebApplication {

private MyAppScopeObject appScopeObject;

public synchronized MyAppScopeObject getAppScopeObject(){
 return appScopeObject;
}

public synchronized void setAppScopeObject(MyAppScopeObject appScopeObject) {
this.appScopeObject = appScopeObject;
}

}

Instead, use your application-scope object's intrinsic lock or use a
suitable mutex in the Java 5/6 API.

Best,
James.

On Mon, Aug 25, 2008 at 12:04 PM, Marvan Spagnolo [EMAIL PROTECTED] wrote:
 Hi all, I'm new to Wicket and developing my first Wicket website.
 I have some temporary objects created inside a users' session but needed by
 a parallel process which uses them
 outside the user session and I would like to avoid temporarily persisting
 them into a database.

 I'm looking at using application scope objects but I'm not sure how to do it
 best
 in Wicket.

 I guess I should override the get() method of WebApplication
 mimicking the pattern used for custom Session objects.

 public class WicketApplication extends MyWebApplication
 {
  private Object applicationScopeObject;

 public WicketApplication() {
 setApplicationScopeObject( init value );
 }
  @Override
 public static WicketApplication get() {
 return (WicketApplication) WebApplication.get();
 }
  public Object getApplicationScopeObject(){
 return this.applicationScopeObject;
 }
  public void setApplicationScopeObject( Object applicationScopeObject ){
 this.applicationScopeObject = applicationScopeObject;
 }
  [...]
 }

 public class PageInsideUserSession
 {
 public PageInsideUserSession(){
  [...]
 // object has already been initialized
 WicketApplication.get().setApplicationScopeObject( object );
 }
 }

 public class PageOutsideUserSession
 {
 public PageOutsideUserSession(){
 Object object = WicketApplication.get().getApplicationScopeObject();
 [...]
 }
 }

 In my case synchronizing the access to the application scope object should
 not be needed.

 Is this approach correct (and efficient) or is there a better solution ?
 Should I maybe use a separate parent class (parent of WicketApplication and
 child of WebApplication) for
 overriding the get() method (in case the override interferes with something
 else in the framework) ?

 Cheers,

 Marvan

 --
 Reza Marvan Spagnolo
 SW Engineer - Freelancer


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



Re: My Wicket + Hibernate project- Transaction solutions? Java EE w/ Wicket?

2008-08-26 Thread James Perry
On Sun, Aug 24, 2008 at 4:11 AM, jpswain [EMAIL PROTECTED] wrote:

 I'm just curious what everyone is using for transaction management.  I have
 been working with Wicket for a while now (and loving it) on a pet project
 that also uses Hibernate and Guice.
 I'm realizing now that I might need/want transactional support for a couple
 parts of my app.

I can't comment on Guide as it's not something I've evaluated yet
however I do like some of its idiosyncrasies. I use Spring/Hibernate
as my stack and I find it fits perfectly with Wicket and my domain
models. I personally think Spring offers rich transaction management
with its transaction managers, DAO template classes and generic DAO
exception hierarchy.

 I don't have any experience with Spring or Java EE or EJB, but have been
 avoiding Spring because of what I have read and seen online with so much
 XML-coding.  Is it possible to use spring transaction module by itself and
 without too much XML?  I'd really appreciate hearing what y'all are you guys
 using for your transactional needs.

As of Spring 2.5, you can configure your beans with non-evasive, fine
grained annotations. It's declarative transaction model is now
annotation based (as of Spring 2.0) so you can make your methods
transactional using the @Transactional annotation and it can even be
declared on an interface. The propagation and isolation can also fine
tuned like:

@Transactional(propagation=Propagation.NOT_SUPPORTED, readOnly=false)
void updateOrderLineQuantities(ListOrderLine orderLines);

Read this chapter to understand how Spring does transaction management:

http://static.springframework.org/spring/docs/2.5.x/reference/transaction.html

Best,
James.

 If anyone has recommendations on where to get started with transactions,
 that would be great too.

 Thanks!
 J
 --
 View this message in context: 
 http://www.nabble.com/My-Wicket-%2B-Hibernate-project--Transaction-solutions--Java-EE-w--Wicket--tp19127403p19127403.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Transactions won´t work?

2008-08-22 Thread James Perry
How are you configuring Spring within Wicket?

Correct me if I'm wrong but the transactional weaving that you are
trying to advise will only work if Spring can see them in its object
factory (i.e. constructed within spring) - which I suspect is the
case. Perhaps having spring managed service beans and proxy those in
wicket using the @SpringBean annotations.

Cheers,
JP.

On Fri, Aug 22, 2008 at 11:36 AM, Markus [EMAIL PROTECTED] wrote:
 Hi all,



 I am using Spring, Hibernate @ MySQL with InnoDB-Tables with a JDBC-Spy in
 between and Wicket.
 Deactivating the Spy changes nothing.

 I am using following Dialect:  property
 name=dialectorg.hibernate.dialect.MySQL5InnoDBDialect/property.



 My SpringConfig-Part:

 bean id=transactionManager


 class=org.springframework.orm.hibernate3.HibernateTransactionManager

   property name=sessionFactory
 ref=sessionFactory /

/bean

tx:annotation-driven /



 Now when I am annotating a WebPage or a method inside it with @
 Transactional, it won´t rollback. I built in an error on purpose to make it
 crash and rollback, but the Table still contains the previous entered
 variables and the TRACE of Hibernate nowhere says it´s opening an
 Transaction?



 Any idea how I can solve this Problem?



 Thank you.



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



Re: Unable to find component with id

2008-08-21 Thread James Perry
Send the code for HomePage.html and HomePage.html. It looks like you
declaring the label in the markup incongruent to your page hierarchy;
make sure it's in the wicket tag menu.

Cheers,
JP.

On Thu, Aug 21, 2008 at 5:00 PM, btakacs [EMAIL PROTECTED] wrote:

 Hi

 I'm new in wicket. I tried to display a list of components, but I get the
 following error:

 WicketMessage: Unable to find component with id 'label' in [MarkupContainer
 [Component id = link, page = com.myapp.wicket.HomePage, path =
 0:mainNavigation:menu:0:link.BookmarkablePageLink, isVisible = true,
 isVersioned = true]]. This means that you declared wicket:id=label in your
 markup, but that you either did not add the component to your page at all,
 or that the hierarchy does not match.
 [markup =
 file:/D:/workspace/NetBeansProjects/WicketTest/build/web/WEB-INF/classes/com/myapp/wicket/HeaderPanel.html

 The html:
 html xmlns:wicket
 body
  wicket:panel
h1Wicket Example/h1
p id=titleblock
Start of Example Title Goes Here

   /p

   ul wicket:id=menu
li  /li

  /ul

  /wicket:panel
 /body
 /html

 The MarkupComponents are:
 #   PathSizeTypeModel Object
 1   mainNavigation  3K  com.myapp.wicket.HeaderPanel  
   No get
 method defined for class: class com.myapp.wicket.HomePage expression:
 mainNavigation
 2   mainNavigation:exampleTitle 421 bytes
 org.apache.wicket.markup.html.basic.Label   wicket
 3   mainNavigation:menu 4.4K
 org.apache.wicket.markup.html.list.ListView
 [EMAIL PROTECTED],
 [EMAIL PROTECTED],
 [EMAIL PROTECTED]
 4   mainNavigation:menu:0   4.4K
 org.apache.wicket.markup.html.list.ListItem
 [EMAIL PROTECTED]
 5   mainNavigation:menu:0:label 418 bytes
 org.apache.wicket.markup.html.basic.Label   First Page
 6   mainNavigation:menu:0:link  1K
 org.apache.wicket.markup.html.link.BookmarkablePageLink No get method
 defined for class: class com.myapp.wicket.HomePage expression: link
 7   mainNavigation:menu:1   4.4K
 org.apache.wicket.markup.html.list.ListItem
 [EMAIL PROTECTED]
 8   mainNavigation:menu:1:label 419 bytes
 org.apache.wicket.markup.html.basic.Label   Second Page
 9   mainNavigation:menu:1:link  1K
 org.apache.wicket.markup.html.link.BookmarkablePageLink No get method
 defined for class: class com.myapp.wicket.HomePage expression: link
 10  mainNavigation:menu:2   4.4K
 org.apache.wicket.markup.html.list.ListItem
 [EMAIL PROTECTED]
 11  mainNavigation:menu:2:label 418 bytes
 org.apache.wicket.markup.html.basic.Label   Third Page
 12  mainNavigation:menu:2:link  1K
 org.apache.wicket.markup.html.link.BookmarkablePageLink No get method
 defined for class: class com.myapp.wicket.HomePage expression: link
 13  param   409 bytes   
 org.apache.wicket.markup.html.basic.Label
 0
 14  stylesheet  1.4K
 org.apache.wicket.markup.html.resources.StyleSheetReference No get
 method defined for class: class com.myapp.wicket.HomePage expression:
 stylesheet

 I have the following classes:

 public class HeaderPanel{
public HeaderPanel(String componentName, String exampleTitle)
{
super(componentName);
add(new Label(exampleTitle, exampleTitle));
ArrayListMenuModel menu=new ArrayListMenuModel();
menu.add(new MenuModel(1, HomePage, First Page));
menu.add(new MenuModel(2, HomePage, Second Page));
menu.add(new MenuModel(3, HomePage, Third Page));

MenuView view = new MenuView(menu, menu);
add(view);

}
 }

 public class MenuView extends ListView {

public MenuView(final String id) {
super(id);
}

public MenuView(final String id, final IModel model) {
super(id, model);
}

public MenuView(final String id, final List list) {
super(id, list);
}

@Override
protected void populateItem(ListItem item) {
final MenuModel element = (MenuModel) item.getModelObject();
Class clas;
try {
clas = Class.forName(element.getClas());
} catch (ClassNotFoundException ex) {
Logger.getLogger(MenuView.class.getName()).log(Level.WARNING,
 null, ex);
clas=this.getApplication().getHomePage();
}

item.add(new Label(label, element.getLabel()));
item.add(new BookmarkablePageLink(link, clas,
new PageParameters(id= + element.getId(;
}
 }

 public class MenuModel implements Serializable{

public String clas;
public String label;
public String id;

public MenuModel(String id, String clas, String label){
this.id=id;
this.clas=clas;
this.label=label;
}

public String getClas() {
return clas;
}

public void setClas(String clas) {
this.clas = clas;
}

public String getLabel() {
return label;
}

public void 

Re: WicketSessionFilter Problem: java.lang.IllegalStateException

2008-08-01 Thread James Perry
I tried declaring the filter to invoke the request dispatcher but
still got the same exception. I tested to see if the session exists in
the Struts code and it doesn't; which is extremely fustrating! Anyone
shed any more light?

Cheers for all you help,
James.



On Wed, Jul 30, 2008 at 5:38 PM, Zappaterrini, Larry
[EMAIL PROTECTED] wrote:
 One more suggestion is to declare the filter so that it is invoked when
 request dispatcher methods are called:

 filter-mapping
  filter-nameWicketSessionFilter/filter-name
  url-pattern*.do/url-pattern
  dispatcherREQUEST/dispatcher
  dispatcherINCLUDE/dispatcher
 /filter-mapping

 I'm not sure if that is what is happening in this situation, but it
 might be worth a shot.

 -Original Message-
 From: James Perry [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 30, 2008 7:31 AM
 To: users@wicket.apache.org
 Subject: Re: WicketSessionFilter Problem:
 java.lang.IllegalStateException

 I can't work out why it doesn't work so I decided to subclass the
 WebRequestCycle and access the HTTPSession's attributes via my
 PharmisisSession.

 Cheers,
 Jim.

 On Wed, Jul 30, 2008 at 11:19 AM, James Perry
 [EMAIL PROTECTED] wrote:
 Thanks for the swift reply. That's what I originally had but it didn't
 work and just tried again to re-confirm. :-)

 Any other suggestions? I've checkout the source code to see if that
 helps.

 On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 I think you have to wrap the wicket session filter around your *.do
 mapping, not your new/* mapping.

 Martijn

 On Wed, Jul 30, 2008 at 11:35 AM, James Perry
 [EMAIL PROTECTED] wrote:
 Hello!

 I would be grateful for any advice with the below problem I am
 encountering with the WicketSessionFilter.

 I managed to convince my colleagues to migrate our
 www.mypharmisis.com
 (a drug ordering system for the Pharmaceutical industry) from Struts
 to Wicket after the success of a greenfield project using Wicket. I
 don't have the resources to migrate all at once so Struts 1 and
 Wicket
 so I have set them up to coexist congruently. However! I am having
 problems sharing necessary state between Struts 1 and Wicket using
 the
 WicketSessionFilter :-(

 When my Strut controllers tries to access my WebSession, it throws a
 java.lang.IllegalStateException: you can only locate or create
 sessions in the context of a request cycle. My stack trace is:

 org.apache.wicket.Session.findOrCreate(Session.java:206)
 org.apache.wicket.Session.get(Session.java:250)

 com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.jav
 a:24)

 com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(Abstr
 actEasyAction.java:52)

 com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(Easy
 OrderHomeAction.java:53)

 Here is a snippet of my web.xml:

!-- Wicket configuration using standard JEE filter --
filter
filter-namewicket.pharmisis/filter-name

 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

init-param
param-nameapplicationClassName/param-name

 param-valuecom.mypharmisis.pages.PharmisisApplication/param-value
/init-param
/filter

filter
filter-nameWicketSessionFilter/filter-name

 filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilte
 r/filter-class
init-param
param-namefilterName/param-name
param-valuewicket.pharmisis/param-value
/init-param
/filter

filter-mapping
filter-namewicket.pharmisis/filter-name
url-pattern/secure/new/*/url-pattern
/filter-mapping

filter-mapping
filter-nameWicketSessionFilter/filter-name
url-pattern*.do/url-pattern
/filter-mapping

!-- End of Wicket configuration --

context-param
param-name
javax.servlet.jsp.jstl.fmt.localizationContext
/param-name
param-value
com.mypharmisis.isis.ApplicationResources
/param-value
/context-param

context-param
param-namecrystal_image_uri/param-name
param-value/isis2/crystalreportviewers11/param-value
/context-param

distributable/
listener

 listener-classcom.mypharmisis.struts.isis.framework.IsisContextListene
 r/listener-class
/listener

servlet
servlet-nameaction/servlet-name

 servlet-classorg.apache.struts.action.ActionServlet/servlet-class

init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
init-param
param-namedetail/param-name
param-value9/param-value
/init-param
init-param
param-namenocache/param-name
param-valuetrue/param-value
/init-param
init-param
param-namevalidate/param-name

WicketSessionFilter Problem: java.lang.IllegalStateException

2008-07-30 Thread James Perry
Hello!

I would be grateful for any advice with the below problem I am
encountering with the WicketSessionFilter.

I managed to convince my colleagues to migrate our www.mypharmisis.com
(a drug ordering system for the Pharmaceutical industry) from Struts
to Wicket after the success of a greenfield project using Wicket. I
don't have the resources to migrate all at once so Struts 1 and Wicket
so I have set them up to coexist congruently. However! I am having
problems sharing necessary state between Struts 1 and Wicket using the
WicketSessionFilter :-(

When my Strut controllers tries to access my WebSession, it throws a
java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle. My stack trace is:

org.apache.wicket.Session.findOrCreate(Session.java:206)
org.apache.wicket.Session.get(Session.java:250)
com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24)
com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52)
com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53)

Here is a snippet of my web.xml:

!-- Wicket configuration using standard JEE filter --
filter
filter-namewicket.pharmisis/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name

param-valuecom.mypharmisis.pages.PharmisisApplication/param-value
/init-param
/filter

filter
filter-nameWicketSessionFilter/filter-name

filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class
init-param
param-namefilterName/param-name
param-valuewicket.pharmisis/param-value
/init-param
/filter

filter-mapping
filter-namewicket.pharmisis/filter-name
url-pattern/secure/new/*/url-pattern
/filter-mapping

filter-mapping
filter-nameWicketSessionFilter/filter-name
url-pattern*.do/url-pattern
/filter-mapping

!-- End of Wicket configuration --

context-param
param-name
javax.servlet.jsp.jstl.fmt.localizationContext
/param-name
param-value
com.mypharmisis.isis.ApplicationResources
/param-value
/context-param

context-param
param-namecrystal_image_uri/param-name
param-value/isis2/crystalreportviewers11/param-value
/context-param

distributable/
listener

listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class
/listener

servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class

init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
init-param
param-namedetail/param-name
param-value9/param-value
/init-param
init-param
param-namenocache/param-name
param-valuetrue/param-value
/init-param
init-param
param-namevalidate/param-name
param-valuetrue/param-value
/init-param

load-on-startup1/load-on-startup


/servlet

!-- DWR configuration --
servlet
servlet-namedwr-invoker/servlet-name
display-nameDWR Servlet/display-name
servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
/servlet

!-- Action Servlet Mappings --

servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping

servlet-mapping
servlet-namedwr-invoker/servlet-name
url-pattern/dwr/*/url-pattern
/servlet-mapping

!-- The Welcome File List--
welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list

error-page
error-code400/error-code
location/isisErrorAction.do?code=400/location
/error-page

error-page
error-code404/error-code
location/isisErrorAction.do?code=404/location
/error-page

error-page
error-code500/error-code
location/isisErrorAction.do?code=500/location
/error-page


!-- Start: Struts Tag Library Descriptors  --
!--
   taglib
   taglib-uristruts.jar/taglib-uri
   taglib-location/meta-inf/taglib.tld/taglib-location
   /taglib
--

taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib
taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri

Re: WicketSessionFilter Problem: java.lang.IllegalStateException

2008-07-30 Thread James Perry
Thanks for the swift reply. That's what I originally had but it didn't
work and just tried again to re-confirm. :-)

Any other suggestions? I've checkout the source code to see if that helps.

On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 I think you have to wrap the wicket session filter around your *.do
 mapping, not your new/* mapping.

 Martijn

 On Wed, Jul 30, 2008 at 11:35 AM, James Perry
 [EMAIL PROTECTED] wrote:
 Hello!

 I would be grateful for any advice with the below problem I am
 encountering with the WicketSessionFilter.

 I managed to convince my colleagues to migrate our www.mypharmisis.com
 (a drug ordering system for the Pharmaceutical industry) from Struts
 to Wicket after the success of a greenfield project using Wicket. I
 don't have the resources to migrate all at once so Struts 1 and Wicket
 so I have set them up to coexist congruently. However! I am having
 problems sharing necessary state between Struts 1 and Wicket using the
 WicketSessionFilter :-(

 When my Strut controllers tries to access my WebSession, it throws a
 java.lang.IllegalStateException: you can only locate or create
 sessions in the context of a request cycle. My stack trace is:

 org.apache.wicket.Session.findOrCreate(Session.java:206)
 org.apache.wicket.Session.get(Session.java:250)
 com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24)
 com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52)
 com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53)

 Here is a snippet of my web.xml:

!-- Wicket configuration using standard JEE filter --
filter
filter-namewicket.pharmisis/filter-name

 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name

 param-valuecom.mypharmisis.pages.PharmisisApplication/param-value
/init-param
/filter

filter
filter-nameWicketSessionFilter/filter-name

 filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class
init-param
param-namefilterName/param-name
param-valuewicket.pharmisis/param-value
/init-param
/filter

filter-mapping
filter-namewicket.pharmisis/filter-name
url-pattern/secure/new/*/url-pattern
/filter-mapping

filter-mapping
filter-nameWicketSessionFilter/filter-name
url-pattern*.do/url-pattern
/filter-mapping

!-- End of Wicket configuration --

context-param
param-name
javax.servlet.jsp.jstl.fmt.localizationContext
/param-name
param-value
com.mypharmisis.isis.ApplicationResources
/param-value
/context-param

context-param
param-namecrystal_image_uri/param-name
param-value/isis2/crystalreportviewers11/param-value
/context-param

distributable/
listener

 listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class
/listener

servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class

init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
init-param
param-namedetail/param-name
param-value9/param-value
/init-param
init-param
param-namenocache/param-name
param-valuetrue/param-value
/init-param
init-param
param-namevalidate/param-name
param-valuetrue/param-value
/init-param

load-on-startup1/load-on-startup


/servlet

!-- DWR configuration --
servlet
servlet-namedwr-invoker/servlet-name
display-nameDWR Servlet/display-name

 servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
/servlet

!-- Action Servlet Mappings --

servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping

servlet-mapping
servlet-namedwr-invoker/servlet-name
url-pattern/dwr/*/url-pattern
/servlet-mapping

!-- The Welcome File List--
welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list

error-page
error-code400/error-code
location/isisErrorAction.do?code=400/location
/error-page

error-page
error-code404/error-code
location/isisErrorAction.do?code=404/location
/error-page

error-page
error-code500/error-code
location

Re: WicketSessionFilter Problem: java.lang.IllegalStateException

2008-07-30 Thread James Perry
I can't work out why it doesn't work so I decided to subclass the
WebRequestCycle and access the HTTPSession's attributes via my
PharmisisSession.

Cheers,
Jim.

On Wed, Jul 30, 2008 at 11:19 AM, James Perry
[EMAIL PROTECTED] wrote:
 Thanks for the swift reply. That's what I originally had but it didn't
 work and just tried again to re-confirm. :-)

 Any other suggestions? I've checkout the source code to see if that helps.

 On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 I think you have to wrap the wicket session filter around your *.do
 mapping, not your new/* mapping.

 Martijn

 On Wed, Jul 30, 2008 at 11:35 AM, James Perry
 [EMAIL PROTECTED] wrote:
 Hello!

 I would be grateful for any advice with the below problem I am
 encountering with the WicketSessionFilter.

 I managed to convince my colleagues to migrate our www.mypharmisis.com
 (a drug ordering system for the Pharmaceutical industry) from Struts
 to Wicket after the success of a greenfield project using Wicket. I
 don't have the resources to migrate all at once so Struts 1 and Wicket
 so I have set them up to coexist congruently. However! I am having
 problems sharing necessary state between Struts 1 and Wicket using the
 WicketSessionFilter :-(

 When my Strut controllers tries to access my WebSession, it throws a
 java.lang.IllegalStateException: you can only locate or create
 sessions in the context of a request cycle. My stack trace is:

 org.apache.wicket.Session.findOrCreate(Session.java:206)
 org.apache.wicket.Session.get(Session.java:250)
 com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24)
 com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52)
 com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53)

 Here is a snippet of my web.xml:

!-- Wicket configuration using standard JEE filter --
filter
filter-namewicket.pharmisis/filter-name

 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name

 param-valuecom.mypharmisis.pages.PharmisisApplication/param-value
/init-param
/filter

filter
filter-nameWicketSessionFilter/filter-name

 filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class
init-param
param-namefilterName/param-name
param-valuewicket.pharmisis/param-value
/init-param
/filter

filter-mapping
filter-namewicket.pharmisis/filter-name
url-pattern/secure/new/*/url-pattern
/filter-mapping

filter-mapping
filter-nameWicketSessionFilter/filter-name
url-pattern*.do/url-pattern
/filter-mapping

!-- End of Wicket configuration --

context-param
param-name
javax.servlet.jsp.jstl.fmt.localizationContext
/param-name
param-value
com.mypharmisis.isis.ApplicationResources
/param-value
/context-param

context-param
param-namecrystal_image_uri/param-name
param-value/isis2/crystalreportviewers11/param-value
/context-param

distributable/
listener

 listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class
/listener

servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class

init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
init-param
param-namedetail/param-name
param-value9/param-value
/init-param
init-param
param-namenocache/param-name
param-valuetrue/param-value
/init-param
init-param
param-namevalidate/param-name
param-valuetrue/param-value
/init-param

load-on-startup1/load-on-startup


/servlet

!-- DWR configuration --
servlet
servlet-namedwr-invoker/servlet-name
display-nameDWR Servlet/display-name

 servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
/servlet

!-- Action Servlet Mappings --

servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping

servlet-mapping
servlet-namedwr-invoker/servlet-name
url-pattern/dwr/*/url-pattern
/servlet-mapping

!-- The Welcome File List--
welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list

error-page
error-code400/error-code
location

Re: Wicket + Spring 2.5

2007-12-15 Thread James Perry
For an example app for Spring 2.5, download the full distrubution jar
with dependencies; which contains ample sample apps.

To understand how Wicket and Spring can be integrated and its
implications, go to: http://cwiki.apache.org/WICKET/spring.html. As
for a wicket app that uses Spring:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/.
However, I would recommend injecting service beans rather than your
DAOs



Good luck,
JP.

On Dec 15, 2007 3:16 PM, Korbinian Bachl [EMAIL PROTECTED] wrote:
 Hi,

 im currently using ANT + IDE (EAR having EJBapp + WEBapp) to get my
 wicket apps started, but somehow I looked at the new spring 2.5 and it
 seems interesting to me (same possibilities but no big appserver
 needed)... can anyone post a example app or structure to me where I can
 see how to plug wicket + spring 2.5 together? (or a Maven2 Archetype for
 it?)

 I mean, where do you stere there? first a spring 2.5 App and then put
 wicket in? or wicket first and then spring in?... sorry for the noobish
 question but I never used spring before.

 Best,

 Korbinian

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



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



Re: Problems deploying Wicket application with Tomcat

2007-12-05 Thread James Perry
Checking my Tomcat's server log (catalina.out), it appears the issue is:
ERROR - [wicketcart]   - Servlet.service() for servlet wicketcart th
rew exception
java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.jav
a:381)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.
java:377)
at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(
MethodAccessorGenerator.java:95)
at sun.reflect.ReflectionFactory.newConstructorForSerialization(Reflecti
onFactory.java:313)
at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClas
s.java:1327)
at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:52)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:437)


Any thoughts?

On Dec 5, 2007 1:00 PM, James Perry [EMAIL PROTECTED] wrote:
 Bare with me. I am just redeploying it.


 On Dec 5, 2007 12:56 PM, wicket user [EMAIL PROTECTED] wrote:
  I'm getting a 503,
  HTTP Status 503 - This application is not currently available
 
  On 05/12/2007, James Perry [EMAIL PROTECTED] wrote:
  
   Dear all,
  
   I am deploying my first wicket based web app selling British
   traditional sweets at http://www.thebritishsweetshop.co.uk/
  
   There seems to be a problem as all the links lead to a 'Page Expired'
   error page.
  
   Any ideas?
  
   Cheers,
   J.
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 


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



Problems deploying Wicket application with Tomcat

2007-12-05 Thread James Perry
Dear all,

I am deploying my first wicket based web app selling British
traditional sweets at http://www.thebritishsweetshop.co.uk/

There seems to be a problem as all the links lead to a 'Page Expired'
error page.

Any ideas?

Cheers,
J.

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



Re: Problems deploying Wicket application with Tomcat

2007-12-05 Thread James Perry
Bare with me. I am just redeploying it.

On Dec 5, 2007 12:56 PM, wicket user [EMAIL PROTECTED] wrote:
 I'm getting a 503,
 HTTP Status 503 - This application is not currently available

 On 05/12/2007, James Perry [EMAIL PROTECTED] wrote:
 
  Dear all,
 
  I am deploying my first wicket based web app selling British
  traditional sweets at http://www.thebritishsweetshop.co.uk/
 
  There seems to be a problem as all the links lead to a 'Page Expired'
  error page.
 
  Any ideas?
 
  Cheers,
  J.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: Getting started

2007-11-23 Thread James Perry
Bonjour Gervais,

To help you understand the fundamentals of Wicket, I would strongly
recommend reading the first few chapters of Wicket in Action. It's
available for the Manning Early Access Program.

To answer your third qestion on how to bind more then one domain model
to a form, I would recommend using the Data Transfer Object which has
associations to the domain models you are binding. Then use a
CompoundPropertyModel
 to access the associatios.

For example, if you are wanting to bind both Foo and Bar to a form,
you would do it like this

public class FooBarDTO implements Serializable {

  private static final long serialVersionUID = 1L;

  private Foo foo;

  private Bar bar;

}

And the inner class form would look like this:

private final class FooBarForm extends Form {

 public FooBarForm(String id, FooBarDTO fooBarDTO) {
super(id, new CompoundPropertyModel(foorBarDTO));
add(new RequiredTextField(foo.name));
add(new RequiredTextField(bar.name);
  }

 @Override
 protected void onSubmit() {
FooBarDTO fooBarDTO = (FooBarDTO) this.getModelObject();
 }

}

If it's a big form then I would recommend using a Wizard.


Cheers,
James.



 3° In a big form ( with more than 20 fields ) that represnet more than
 one Pojo Bean how must i work ?


 Thanks



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



Repeater View with an empty List

2007-11-23 Thread James Perry
Hello fellow Wicket users,

If I have a FooDataProvider going to a DataView which provides a ListFoo.
How do I get the DataView to display default markup, for example: trtd
colspan=2There are no Foos fool!/td/tr, if this list is empty. At the
moment, my table is empty and I want to give indication that there are no
Foos.

I am asking as I have convinced my boss to re-write our SilverStream legacy
information system using Wicket.

Cheers,
James.


Re: Wicket-security 0.1-beta1 released

2007-11-19 Thread James Perry
Would you say this release is production ready for a low volume e-commerce
site?

Cheers,
James.

On Nov 19, 2007 11:25 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

 Beta1 has just been released for the following projects.
 Wasp
 Swarm
 and the accompanying Examples.

 The files are available on the wicketstuff maven repository
 http://wicketstuff.org/maven/repository/
 And on sourceforge
 http://sourceforge.net/project/showfiles.php?group_id=134391
 The live examples can be found at http://wicketstuff.org/wicketsecurity/

 The biggest changes since the previous release (on July 15) are:
 Wasp
 -Added support for basic http authentication
 -Added several secure components
 -Updated several dependencies
 -Updated documentation
 -Added more security checks
 -Made some small changes to the API

 Swarm
 -Updated dependencies
 -Added new permission and action to imply all other permissions
 -Made some small API changes
 -Updated documentation
 -Improved basic action class

 Examples
 -Added example showing basic http authentication
 -Added example showing how to customize authorization
 -Added example showing Acegi authentication

 For those of you who got the maven snapshots, the only difference is
 that i put the wicket dependency on 1.3.0-rc1 instead of snapshot, but
 thats just a formality since it will run on any 1.3.0 version.

 Maurice

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




Re: WicketNotSerializableException withi FileUpload

2007-11-09 Thread James Perry
I removed the Model instantion from the FileUploadField and this issue has gone.

Cheers!
J.

On Nov 8, 2007 11:31 PM, Johan Compagner [EMAIL PROTECTED] wrote:
 Ok the problem is that somehow you are holding on to a FileUpload in your
 page
 And those are not meant to be kept over requests.

 it seems that you keep it if i read it right in a normal Model:

 [class=org.apache.wicket.model.Model]
private java.io.Serializable
 org.apache.wicket.model.Model.object
 [class=org.apache.wicket.markup.html.form.upload.FileUpload]

 How do you create the FileUploadField?

 I guess with a normal new Model()?

 I think we need to fix that somehow in the detach of the FUF because if the
 model is set
 we should look into the model and if it is a FileUpload get rid of it or
 something.

 johan

 On Nov 8, 2007 3:26 PM, James Perry [EMAIL PROTECTED] wrote:

  Hello Johan,
 
  Thanks for the repsonse. :-)
 
  All I have done is follow the code within theSingleFileUpload example
  in wicketstuff.com. Is this a bug or am I doing something wrong? I am
  using Wicket 1.3.0-beta4 and here is the stack of the exception:
 
  ERROR - Objects- Error serializing object class
  com.wicketcart.pages.admin.AddProductPage [object=[Page class =
  com.wicketcart.pages.admin.AddProductPage, id = 2, version = 0]]
 
  org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
  Unable to serialize class:
  org.apache.wicket.util.io.DeferredFileOutputStream
  Field hierarchy is:
   2 [class=com.wicketcart.pages.admin.AddProductPage, path=2]
 private java.lang.Object
  org.apache.wicket.MarkupContainer.children
  [class=com.wicketcart.components.MenuBorder, path=2:libBorder]
   private java.lang.Object
  org.apache.wicket.MarkupContainer.children
  [class=[Lorg.apache.wicket.Component;]
 private
  org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper
 
  org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelper
  [7]
  [class=com.wicketcart.pages.admin.AddProductPage$AddProductForm,
  path=2:libBorder:productForm]
   private java.lang.Object
  org.apache.wicket.MarkupContainer.children
  [class=[Lorg.apache.wicket.Component;]
 private final java.lang.String
  org.apache.wicket.markup.html.form.ChoiceRenderer.idExpression[7]
  [class=org.apache.wicket.markup.html.form.upload.FileUploadField,
  path=2:libBorder:productForm:fileInput]
   org.apache.wicket.model.IModel
  org.apache.wicket.Component.model
  [class=org.apache.wicket.model.Model]
 private java.io.Serializable
  org.apache.wicket.model.Model.object
  [class=org.apache.wicket.markup.html.form.upload.FileUpload]
   private final org.apache.wicket.util.upload.FileItem
  org.apache.wicket.markup.html.form.upload.FileUpload.item
  [class=org.apache.wicket.util.upload.DiskFileItem]
 private
  org.apache.wicket.util.io.DeferredFileOutputStream
  org.apache.wicket.util.upload.DiskFileItem.dfos
  [class=org.apache.wicket.util.io.DeferredFileOutputStream] -
  field that is not serializable
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:347)
 at org.apache.wicket.util.io.SerializableChecker.checkFields(
  SerializableChecker.java:615)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:538)
 at org.apache.wicket.util.io.SerializableChecker.checkFields(
  SerializableChecker.java:615)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:538)
 at org.apache.wicket.util.io.SerializableChecker.checkFields(
  SerializableChecker.java:615)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:538)
 at org.apache.wicket.util.io.SerializableChecker.checkFields(
  SerializableChecker.java:615)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:538)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:393)
 at org.apache.wicket.util.io.SerializableChecker.checkFields(
  SerializableChecker.java:615)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:538)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:393)
 at org.apache.wicket.util.io.SerializableChecker.checkFields(
  SerializableChecker.java:615)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:538)
 at org.apache.wicket.util.io.SerializableChecker.checkFields(
  SerializableChecker.java:615)
 at org.apache.wicket.util.io.SerializableChecker.check(
  SerializableChecker.java:538)
 at
  org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(
  SerializableChecker.java:683

Re: Wicket runtime Exception

2007-11-09 Thread James Perry
Hello,

Please send your code.

J.

On Nov 9, 2007 9:48 AM, tbt [EMAIL PROTECTED] wrote:

 Hi

 I'm a newbie to wicket and i'm using RadioGroup in my application. But
 sometimes it gives the following runtime exception

 ERROR (RequestCycle.java:1043) - submitted http post value [radio0] for
 RadioGroup component [27:paperForm:panel:radioGroup] is illegal because it
 does not contain relative path to a Radio componnet. Due to this the
 RadioGroup component cannot resolve the selected Radio component pointed to
 by the illegal value. A possible reason is that componment hierarchy changed
 between rendering and form submission.
 wicket.WicketRuntimeException: submitted http post value [radio0] for
 RadioGroup component [27:paperForm:panel:radioGroup] is illegal because it
 does not contain relative path to a Radio componnet. Due to this the
 RadioGroup component cannot resolve the selected Radio component pointed to
 by the illegal value. A possible reason is that componment hierarchy changed
 between rendering and form submission.
 at 
 wicket.markup.html.form.RadioGroup.convertValue(RadioGroup.java:102)
 at 
 wicket.markup.html.form.FormComponent.convert(FormComponent.java:878)
 at wicket.markup.html.form.Form$14.validate(Form.java:983)
 at
 wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:144)
 at wicket.markup.html.form.Form$4.component(Form.java:459)
 at wicket.MarkupContainer.visitChildren(MarkupContainer.java:744)
 at wicket.MarkupContainer.visitChildren(MarkupContainer.java:759)
 at wicket.markup.html.form.Form.visitFormComponents(Form.java:455)
 at wicket.markup.html.form.Form.validateConversion(Form.java:979)
 at wicket.markup.html.form.Form.validate(Form.java:953)
 at wicket.markup.html.form.Form.process(Form.java:867)
 at wicket.markup.html.form.Form.onFormSubmitted(Form.java:310)
 at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at
 wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:163)
 at
 wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:74)
 at
 wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65)
 at
 wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57)
 at 
 wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:896)
 at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
 at wicket.RequestCycle.step(RequestCycle.java:1010)
 at wicket.RequestCycle.steps(RequestCycle.java:1084)
 at wicket.RequestCycle.request(RequestCycle.java:454)
 at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
 at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:262)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
 at 
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Unknown Source)

 This doesn't happen often and only happens once in a while. How can I fix
 this

 Thanks
 --
 View this message in context: 
 http://www.nabble.com/Wicket-runtime-Exception-tf4776682.html#a13663985
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



How to enable AJAX in a Wicket application

2007-11-09 Thread James Perry
I am wanting to use AJAX for my Wicket application but I could not
find any reference documentation on how to configure it. I looked at
the examples and it appears that you need to add the following to the
application's init() method:

getRequestCycleSettings().addResponseFilter(new
AjaxServerAndClientTimeFilter());

Is this correct?

Cheers,
James.

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



Re: How to enable AJAX in a Wicket application

2007-11-09 Thread James Perry
Happy days! :-)

On Nov 9, 2007 1:14 PM, Frank Bille [EMAIL PROTECTED] wrote:
 No, you just use an Ajax component (like AjaxLink) and it is enabled.
 Nothing else than that.

 Frank


 On Nov 9, 2007 2:09 PM, James Perry [EMAIL PROTECTED] wrote:

  I am wanting to use AJAX for my Wicket application but I could not
  find any reference documentation on how to configure it. I looked at
  the examples and it appears that you need to add the following to the
  application's init() method:
 
  getRequestCycleSettings().addResponseFilter(new
  AjaxServerAndClientTimeFilter());
 
  Is this correct?
 
  Cheers,
  James.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: Strange behavior with DropDownChoice and PropertyModel

2007-11-09 Thread James Perry
I had a similar problem but I had accidentally used == for string
equality within my equals(). I will add this to the Wiki as it's a
common problem for beginners. A lot of MSc Internet Software Systems
students at the University of Birmingham (they teach Wicket as part of
the syllabus) had this problem with DDC.

James.

On Nov 9, 2007 3:40 PM, Pills [EMAIL PROTECTED] wrote:

 I think I've found the problem: I didn't override equals and hashcode in my
 class Shop.

 Can anybody confirm that was the cause of that problem?
 --
 View this message in context: 
 http://www.nabble.com/Strange-behavior-with-DropDownChoice-and-PropertyModel-tf4778359.html#a13669424
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Strange behavior with DropDownChoice and PropertyModel

2007-11-09 Thread James Perry
I would also recommend using CompoundPropertyModel rather than using
lots of PropertyModels; it will save you a lot of time and code.

J.

On Nov 9, 2007 4:05 PM, Pills [EMAIL PROTECTED] wrote:

 So it's just because we have to override equals when using custom objects.

 Thank you for your answer ;)



 msc65jap wrote:
 
  I had a similar problem but I had accidentally used == for string
  equality within my equals(). I will add this to the Wiki as it's a
  common problem for beginners. A lot of MSc Internet Software Systems
  students at the University of Birmingham (they teach Wicket as part of
  the syllabus) had this problem with DDC.
 
  James.
 
  On Nov 9, 2007 3:40 PM, Pills [EMAIL PROTECTED] wrote:
 
  I think I've found the problem: I didn't override equals and hashcode in
  my
  class Shop.
 
  Can anybody confirm that was the cause of that problem?
  --
  View this message in context:
  http://www.nabble.com/Strange-behavior-with-DropDownChoice-and-PropertyModel-tf4778359.html#a13669424
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Strange-behavior-with-DropDownChoice-and-PropertyModel-tf4778359.html#a13669936

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


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



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



Re: Question about Guice integration with Wicket 1.3 beta 4

2007-11-09 Thread James Perry
Hello Peter,

Out of interest why did you migrate from a Spring/Hibernate design to Guice?

Cheers,
James.

On Nov 9, 2007 5:03 PM, pmularien [EMAIL PROTECTED] wrote:

 Hi Wicket folks,

 I've just spent some time converting a Wicket 1.2.6 / Spring 2.0 / Hibernate
 3 project that we did to Wicket 1.3 beta 4 / Warp (bleeding edge ;) / Guice
 1.0.

 I am happy to report it went very smoothly. I actually had a question on the
 class hierarchy for wicket-ioc and how it relates (or doesn't) to
 wicket-guice.

 Was there a conscious design decision to not use the
 org.apache.wicket.injection.web.InjectorHolder class (and, by association,
 have the wicket-guice stuff inherit from ConfigurableInjector)? It would be
 pretty convenient if the GuiceComponentInjector worked similarly to the
 SpringComponentInjector and stuffed away a reference to the Guice injector -
 for easy access throughout the application, and also for easier mock
 testing.

 Just curious - thanks for all the hard work :)

 Peter Mularien
 --
 View this message in context: 
 http://www.nabble.com/Question-about-Guice-integration-with-Wicket-1.3-beta-4-tf4778901.html#a13671046
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Repeater View Examples are broken

2007-11-08 Thread James Perry
I have noticed that there is an internal server error with the
Repeater examples: http://wicketstuff.org/wicket13/repeater/

Cheers,
James.

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



Re: WicketNotSerializableException withi FileUpload

2007-11-08 Thread James Perry
.writeObjectOverride(IObjectStreamFactory.java:66)

On Nov 7, 2007 10:06 PM, Johan Compagner [EMAIL PROTECTED] wrote:
 what is the full stack of the exception?
 because who does have that field?
 Streams should always be transient because those can't be serialized
 whats the wicket version?

 johan



 On 11/6/07, James Perry [EMAIL PROTECTED] wrote:
 
  Hello fellow Wicket users,
 
  I am getting a
  org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
  Unable to serialize class:
  org.apache.wicket.util.io.DeferredFileOutputStream exception when I
  added a file upload feature to my AddProductForm.
 
  My form is serialiazable yet I don't which of its child components are
  not serializable. Can anyone shed any light on this?
 
  Cheers,
  James.
 
  Here is my Page class:
 
  public class AddProductPage extends AdminPage {
 
 private static final long serialVersionUID = 1L;
 
 @SpringBean(name=adminService)
 private AdminService adminService;
 
 public AddProductPage(Product product) {
 MenuBorder border = new MenuBorder(libBorder);
 border.add(new FeedbackPanel(feedback));
 border.add(new AddProductForm(productForm, product));
 add(border);
 }
 
 private final class AddProductForm extends Form {
 
 private static final long serialVersionUID = 1L;
 
 private FileUploadField fileUploadField;
 
 public AddProductForm(String id, Product product) {
 super(id, new CompoundPropertyModel(product));
 setMultiPart(true);
 add(new RequiredTextField(name));
 add(new RequiredTextArea(description));
 add(new RequiredTextField(sellValue,
  BigDecimal.class));
 add(new RequiredTextField(units, Long.class));
 add(new CheckBox(onSell));
 add(new DropDownChoice(category,
  catalogService.getCategories()));
 add(new DropDownChoice(manufacturer,
  catalogService.getManufacturers()));
 add(fileUploadField = new
  FileUploadField(fileInput, new
  Model(fileUploadField)));
 setMaxSize(Bytes.megabytes(100));
 }
 
 @Override
 protected void onSubmit() {
 final FileUpload upload =
  fileUploadField.getFileUpload();
 if (upload != null)
 System.out.println(File is not empty! Whoo
  hooo!);
 else
 System.out.println(File is empty! Whoo
  hooo!);
 fileUploadField.detachModels();
 /**Product product = (Product) getModelObject();
 product.setEntryDate(new Timestamp(
  System.currentTimeMillis()));
 product.setImageURL(uploads/);
 System.out.println(product.getCategory());
 adminService.saveProduct(product);
 setResponsePage(ViewProductsPage.class);**/
 }
 
 }
 
  }
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



WicketNotSerializableException withi FileUpload

2007-11-06 Thread James Perry
Hello fellow Wicket users,

I am getting a 
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class:
org.apache.wicket.util.io.DeferredFileOutputStream exception when I
added a file upload feature to my AddProductForm.

My form is serialiazable yet I don't which of its child components are
not serializable. Can anyone shed any light on this?

Cheers,
James.

Here is my Page class:

public class AddProductPage extends AdminPage {

private static final long serialVersionUID = 1L;

@SpringBean(name=adminService)
private AdminService adminService;

public AddProductPage(Product product) {
MenuBorder border = new MenuBorder(libBorder);
border.add(new FeedbackPanel(feedback));
border.add(new AddProductForm(productForm, product));
add(border);
}

private final class AddProductForm extends Form {

private static final long serialVersionUID = 1L;

private FileUploadField fileUploadField;

public AddProductForm(String id, Product product) {
super(id, new CompoundPropertyModel(product));
setMultiPart(true);
add(new RequiredTextField(name));
add(new RequiredTextArea(description));
add(new RequiredTextField(sellValue, 
BigDecimal.class));
add(new RequiredTextField(units, Long.class));
add(new CheckBox(onSell));
add(new DropDownChoice(category, 
catalogService.getCategories()));
add(new DropDownChoice(manufacturer, 
catalogService.getManufacturers()));
add(fileUploadField = new FileUploadField(fileInput, 
new
Model(fileUploadField)));
setMaxSize(Bytes.megabytes(100));
}

@Override
protected void onSubmit() {
final FileUpload upload = 
fileUploadField.getFileUpload();
if (upload != null)
System.out.println(File is not empty! Whoo 
hooo!);
else
System.out.println(File is empty! Whoo hooo!);
fileUploadField.detachModels();
/**Product product = (Product) getModelObject();
product.setEntryDate(new 
Timestamp(System.currentTimeMillis()));
product.setImageURL(uploads/);
System.out.println(product.getCategory());
adminService.saveProduct(product);
setResponsePage(ViewProductsPage.class);**/
}

}

}

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



Problem with selecting default value with DropDownChoice

2007-11-05 Thread James Perry
I have a problem with the DropDownChoice. More specifically, I have a
Product class which is like:

public class Product implements Serializable {

private static final long serialVersionUID = 1L;

private Manufacturer manufacturer;
//other states

//getters and setters

}

I have a form which allows to edit a product, which allows to change the
manufacturer object with a DropDownChoice. However, an Xbox product for
instance, it should display its Microsoft manufacturer object as selected
but it selects 'Choose One' instead. Also, the setRequired for the
DropDownChoice does not work as it allows users to select 'Choose One'. I
notice it works with primitive types but not with my compositional objects.

Here is my EditProductPage:

package net.sourceforge.springcart.wicket.pages.admin;

public class EditProductPage extends AdminPage {

private static final long serialVersionUID = 1L;

@SpringBean(name = adminService)
private AdminService adminService;

public EditProductPage() {
this(new Product());
}

public EditProductPage(Product product) {
MenuBorder border = new MenuBorder(libBorder);
border.add(new EditProductForm(productForm, product));
add(border);
}

private final class EditProductForm extends Form {

public EditProductForm(String id, Product product) {
super(id, new CompoundPropertyModel(product));
add(new RequiredTextField(name));
add(new RequiredTextArea(description));
add(new RequiredTextField(sellValue, BigDecimal.class));
add(new RequiredTextField(units, Long.class));
add(new CheckBox(onSell).setRequired(true));
add(new DropDownChoice(category, catalogService.getCategories
())
.setRequired(true));
add(new DropDownChoice(manufacturer, catalogService
.getManufacturers()).setRequired(true));
}

@Override
protected void onSubmit() {
Product product = (Product) getModelObject();
product.setEntryDate(new Timestamp(System.currentTimeMillis()));
adminService.updateProduct(product);
setResponsePage(ViewProductsPage.class);
}

}

}

Any advice please?

Cheers,
James.


Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread James Perry
Hello all,

Thanks for the replies so far.

Well I have taken the feedback and my manufacturer object and category
object are certainly are there when it passed to my form.

It is really bizarre as if I select a manufactuer and persist the product
obejct upon the form's onSubmit, it's correctly persisted. So I don't
understand why it can correctly set the manufacturer object when changing a
manufacturer yet it doesn't select the correct manufacturer upon going to
EditProductPage.

Any thoughts? I tried it with a RadioChoice and it has the same problem. :-(


On 11/5/07, Gwyn Evans [EMAIL PROTECTED] wrote:

 Hi James,

 While the implementation's not a big deal, and you'll probably want
 one, Choose One is the default for when the selected (or
 pre-selected) item's not found in the DDC list of values, so I don't
 think it's directly that.  I'd be tempted to double-check (either via
 logging or via a debugger) that all the data's there as expected
 (although an anonymous implementation of a IChoiceRender's as good a
 way as any of having somewhere to set a breakpoint!)

 /Gwyn

 Monday, November 5, 2007, 2:54:09 PM, you wrote:

 JP Hello Dima,

 JP That was my initial assumption but I already have overrided my
 JP equals()/hashCode() methods for Manufacturer's business key in
 Hibernate
 JP and ensured my HQL query retrieves Manufacturer objects. Do I need to
 add an
 JP implementation of IChoiceRendered as an argument to DDC?

 JP Thanks,
 JP James.

 JP On 11/5/07, Dmitry Kandalov [EMAIL PROTECTED] wrote:
 
  On Monday 05 November 2007 16:39:02 James Perry wrote:
   I have a problem with the DropDownChoice. More specifically, I have a
   Product class which is like:
  
   public class Product implements Serializable {
  
   private static final long serialVersionUID = 1L;
  
   private Manufacturer manufacturer;
   //other states
  
   //getters and setters
  
   }
  
   I have a form which allows to edit a product, which allows to change
 the
   manufacturer object with a DropDownChoice. However, an Xbox product
 for
   instance, it should display its Microsoft manufacturer object as
  selected
   but it selects 'Choose One' instead.
 
  May be choices and value in the DDC are different java objects and you
  didn't
  implement equals(), hashCode() in Manufacturer class?
 
  Dima



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




Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread James Perry
Some notes I have observed.

* All my objects within the list are correctly in the DDC
* All my objects within the list have an implemented equals/hashcode.
* It doesn't correctly pre-select both my Manufacturer associations within
Product; it just goes to 'Choose One'
* It correctly sets Manufacturer if we change the pre-selected 'Choose One'
to any object within the DDC.

So why is it not correctly pre-selecting? For example, my Xbox is not
pre-selecting to Microsoft instead going to 'Choose One'.

Cheers,
James.

On 11/5/07, James Perry [EMAIL PROTECTED] wrote:

 Hello all,

 Thanks for the replies so far.

 Well I have taken the feedback and my manufacturer object and category
 object are certainly are there when it passed to my form.

 It is really bizarre as if I select a manufactuer and persist the product
 obejct upon the form's onSubmit, it's correctly persisted. So I don't
 understand why it can correctly set the manufacturer object when changing a
 manufacturer yet it doesn't select the correct manufacturer upon going to
 EditProductPage.

 Any thoughts? I tried it with a RadioChoice and it has the same problem.
 :-(

 On 11/5/07, Gwyn Evans  [EMAIL PROTECTED] wrote:
 
  Hi James,
 
  While the implementation's not a big deal, and you'll probably want
  one, Choose One is the default for when the selected (or
  pre-selected) item's not found in the DDC list of values, so I don't
  think it's directly that.  I'd be tempted to double-check (either via
  logging or via a debugger) that all the data's there as expected
  (although an anonymous implementation of a IChoiceRender's as good a
  way as any of having somewhere to set a breakpoint!)
 
  /Gwyn
 
  Monday, November 5, 2007, 2:54:09 PM, you wrote:
 
  JP Hello Dima,
 
  JP That was my initial assumption but I already have overrided my
  JP equals()/hashCode() methods for Manufacturer's business key in
  Hibernate
  JP and ensured my HQL query retrieves Manufacturer objects. Do I need
  to add an
  JP implementation of IChoiceRendered as an argument to DDC?
 
  JP Thanks,
  JP James.
 
  JP On 11/5/07, Dmitry Kandalov  [EMAIL PROTECTED] wrote:
  
   On Monday 05 November 2007 16:39:02 James Perry wrote:
I have a problem with the DropDownChoice. More specifically, I have
  a
Product class which is like:
   
public class Product implements Serializable {
   
private static final long serialVersionUID = 1L;
   
private Manufacturer manufacturer;
//other states
   
//getters and setters
   
}
   
I have a form which allows to edit a product, which allows to
  change the
manufacturer object with a DropDownChoice. However, an Xbox product
  for
instance, it should display its Microsoft manufacturer object as
   selected
but it selects 'Choose One' instead.
  
   May be choices and value in the DDC are different java objects and
  you
   didn't
   implement equals(), hashCode() in Manufacturer class?
  
   Dima
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Best practises and advice for integrating Wicket with Spring

2007-10-19 Thread James Perry
Dear Wicket community,

What are the best practises and advice for integrating Wicket with Spring. I
have read the Wiki so I'm aware of injecting Spring's beans using
annotations. I am also interested to know if I should just keep an Spring
ApplicationContext in Wicket's Application class, inject the proxy-based
Service POJOs into the Application or just inject them into each component
that needs to use my service's methods?

Look forward to your advice,
James.