[Wicket-user] Spring 2.0 Domain object dependency injection

2006-06-16 Thread Michiel Trimpe








Hey everybody,



Ive followed a few discussions here on dependency
injection and when I was visiting the Spring 2.0 presentation at J-Spring in
the Netherlands
there was one new feature that really drew my attention.



Spring 2.0 offers support for dependency injection into
domain objects using AspectJ, and when I read the description (http://static.springframework.org/spring/docs/2.0-m5/spring-reference.pdf
, section 7.7.1) it sounds like this would be the perfect way to implement
dependency injection with Wicket.



I hope that solves all our problems 



Kind regards,



Michiel Trimpe



Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile







This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.




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


Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-06 Thread Michiel Trimpe
Just did some testing further digging into the issue and it don't really
understand why it would work in the rest of Wicket, unless you test the
classes by startPage(Class) instead of startPage(Page).

What the problem is, is that the tester tries to add the generated Page
to the session after processing the request, BUT the session uses the
RequestCycle in ThreadLocal, which is cleared when processing a request.
See: 
WebRequestCycle(RequestCycle).threadDetach() line: 1079
WebRequestCycle(RequestCycle).detach() line: 836
WebRequestCycle(RequestCycle).steps() line: 1052
WebRequestCycle(RequestCycle).request(IRequestTarget) line: 499
WebRequestCycle(RequestCycle).request(Component) line: 477
ConnectivityTester(MockWebApplication).processRequestCycle(Component)
line: 291

Anyone up for a quick fix? Please??

Michiel Trimpe| Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Day
Sent: Tuesday, June 06, 2006 6:42 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] WicketTester broken on 1.2?

Hrm?  I'm not extending WicketTester -- I'm extending TestCase.  It  
doesn't have an init() method.  I tried adding app.configure 
(development), but it didn't fix the issue.

On Jun 4, 2006, at 4:33 AM, Juergen Donnerstag wrote:

 You need to change init to call the super implementation

   public void init()
   {
   super.init();
   configure(DEVELOPMENT);
   }

 Juergen

 On 5/31/06, Michael Day [EMAIL PROTECTED] wrote:
 I just noticed this thread after posting a bug report:

 http://sourceforge.net/tracker/index.php?
 func=detailaid=1497866group_id=119783atid=684975

 I assume it is related since the exception is the same.

 Michael Day

 On May 30, 2006, at 1:46 PM, Eelco Hillenius wrote:

 Test case wicket.util.tester.WicketTesterTest#testPageConstructor  
 has:

   MyMockApplication tester = new MyMockApplication();
   Book mockBook = new Book(xxId, xxName);
   Page page = new ViewBook(mockBook);
   tester.startPage(page);

   // assertion
   tester.assertRenderedPage(ViewBook.class);
   tester.clickLink(link);
   tester.assertRenderedPage(CreateBook.class);

 and that seems to work... not sure why that wouldn't work for you?

 Eelco


 On 5/30/06, Michiel Trimpe [EMAIL PROTECTED] wrote:




 Hey everyone,



 I just finished creating tests in rc2, but after upgrading to  
 wicket
 1.2-final the tests now fail.



 AppTester.java 

 public class AppTester extends WicketTester {

 public AppTester() {

 super(/admin);

 }

 public void init() {

 configure(DEVELOPMENT);

 }

 @Override

 public Class getHomePage() {

 return ListPage.class;

 }

 }

 TestList.java 
  tester = new AppTester();

 tester.startPage(new ListPage());



 And this returns the error:

 wicket.WicketRuntimeException: Can not set the attribute. No
 RequestCycle
 available

 at wicket.Session.setAttribute(Session.java:918)

 at wicket.PageMap.put(PageMap.java:519)

 at wicket.Session.touch(Session.java:720)

 at
 wicket.util.tester.WicketTester.startPage(WicketTester.java:248)





 Is this because the tester is broken, or am I doing something  
 wrong?



  - michiel





 Michiel Trimpe| Java Developer| TomTom | [EMAIL PROTECTED]
 | +31
 (0)6 41482341mobile




 
  This e-mail message contains information which is confidential
 and may be
 privileged. It is intended for use by the addressee only. If you
 are not the
 intended addressee, we request that you notify the sender
 immediately and
 delete or destroy this e-mail message and any attachment(s),  
 without
 copying, saving, forwarding, disclosing or using its contents in
 any other
 way. TomTom N.V., TomTom International BV or any other company
 belonging to
 the TomTom group of companies will not be liable for damage
 relating to the
 communication by e-mail of data, documents or any other  
 information.




 ---
 All the advantages of Linux Managed Hosting--Without the Cost and
 Risk!
 Fully trained technicians. The highest number of Red Hat
 certifications in
 the hosting industry. Fanatical Support. Click to learn more
 http://sel.as-us.falkag.net/sel?
 cmd=lnkkid=107521bid=248729dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user





 ---
 All the advantages of Linux Managed Hosting--Without the Cost and  
 Risk!
 Fully trained technicians. The highest number of Red Hat  
 certifications in
 the hosting industry. Fanatical Support. Click to learn more
 http://sel.as

[Wicket-user] WicketTester broken on 1.2?

2006-05-30 Thread Michiel Trimpe








Hey everyone,



I just finished creating tests in rc2, but after upgrading
to wicket 1.2-final the tests now fail.



 AppTester.java


public class AppTester extends WicketTester {

public AppTester() {

 super(/admin);

}

public void init() {

 configure(DEVELOPMENT);

}

@Override

public Class getHomePage() {

 return
ListPage.class;

}

}

TestList.java 
tester = new AppTester();

tester.startPage(new ListPage());



And this returns the error:

wicket.WicketRuntimeException: Can not set the attribute. No
RequestCycle available

 at
wicket.Session.setAttribute(Session.java:918)

 at
wicket.PageMap.put(PageMap.java:519)

 at
wicket.Session.touch(Session.java:720)

 at
wicket.util.tester.WicketTester.startPage(WicketTester.java:248)





Is this because the tester is broken, or am I doing
something wrong?



- michiel





Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile







This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.






[Wicket-user] Help creating MapView Component??

2006-05-22 Thread Michiel Trimpe








For my current application I need to write a component that
will edit a Map.



Ive tried a dozen of different approaches and all of
them end up becoming ugly hacks.



Would anyone help me write a proper component for editing
Map objects?



My scenario is:



The map: MapNetwork, NetworkSetting settingsMap ;

Key value list: ListNetwork networkList ;

Value object form: Form(id, new
CompoundPropertyModel(NetworkSetting setting) containing:

-
Form fields

-
Delete link

Add object form: A dropdown box with possible key values
without an existing NetworkSetting and an Add button



This sounds like the ideal scenario for a MapView component:

new MapView(mapViewId, ListNetwork
keys, new Model((Serializable) map ) ;



Could anyone please help me with creating this?



Kind regards,



Michiel Trimpe





Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile







This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.






[Wicket-user] LDAP Authentication

2006-05-18 Thread Michiel Trimpe








Has anyone already tried to implement LDAP-authentication
with Wicket?



If so, do you have some examples??



If not, could someone give me quick step-by-step pointers of
what is needed to implement it?



Kind regards,



Michiel Trimpe



P.S. Are 20Kb Page objects (as reported by the
inspector-bug) normal for Spring-Hibernate apps with fairly complex forms? 





Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile







This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.






[Wicket-user] Session State Profiling

2006-05-17 Thread Michiel Trimpe








Ive just finished writing the prototype for my first
Wicket application (thank you all for the support!) and I now need to start
minimizing the Wicket session state.



What tools do you use to monitor and measure the session
state of wicket pages?



Kind regards,



Michiel Trimpe





Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile







This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.






RE: [Wicket-user] Filterable ListViews

2006-05-09 Thread Michiel Trimpe








Thanks for the feedback, Ive gotten
the basics working but I have two remaining problems:




 How
 do I filter on reference Objects, not strings
 Can
 I make my code filter on partial matches as well?




This is my code excerpt so far:



IColumn[] columns = new IColumn[3];

columns[0] = new
FilteredAbstractColumn(new Model(Actions)) {..};

columns[1] = new
TextFilteredPropertyColumn(new Model(Name),name,
name);

columns[2] = new
ChoiceFilteredPropertyColumn(new Model(Manufacturer),manufacturer,
manufacturer, new Model((Serializable) getSpringHibernateService().getManufacturers()))
;

PhonesDataProvider dataProvider = new
PhonesDataProvider(getSpringHibernateService());

DefaultDataTable phones = new
DefaultDataTable(phones, Arrays.asList(columns), dataProvider, 10);

phones.addTopToolbar(new
FilterToolbar(phones, dataProvider));

add(phones);



The getManufacturers() function returns a
ListManufacturer with manufacturer.name. Ive tried 



columns[2] = new
ChoiceFilteredPropertyColumn(new Model(Manufacturer),manufacturer.name,
manufacturer.name, new Model((Serializable) getSpringHibernateService().getManufacturers()))
;



but that doesnt work either.



Thanks in advance, and I must admit, Im
starting to fall in love with Wicket over here ;)



-
Michiel



P.S. Would someone like to help me create
a proper component for editing Sets? Ive got a basic setup but would
like to get it ready for prime-time as practice.







Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile











From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Friday, May 05, 2006 11:52
PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Filterable ListViews





What about the
DefaultDataTable in wicket-extensions? I'm using Spring and Hibernate and
it works great. 

-- Forwarded message --
From: Michiel Trimpe [EMAIL PROTECTED]
Date: May 5, 2006 11:25 AM
Subject: [Wicket-user] Filterable ListViews 
To: wicket-user@lists.sourceforge.net.





Hey
everybody,



I've
just started a Wicket pilot as a possible web-framework to complement Spring
and Hibernate at our company and I'm going to need some help.



My
first question to the list is, are there any examples of filtered tables??



I
get a list from spring with Hibernate managed objects and a list of possible
objects and so far I've only been able to add a DropDownChoice and a ListView,
but I don't know how to make them work together.



Thanks
a lot already and have a nice weekend!



-
michiel





Michiel Trimpe |Java Developer| TomTom | [EMAIL PROTECTED]
| +31 (0)6 41482341mobile













This e-mail message contains information which is confidential and may
be privileged. It is intended for use by the addressee only. If you are not the
intended addressee, we request that you notify the sender immediately and
delete or destroy this e-mail message and any attachment(s), without copying,
saving, forwarding, disclosing or using its contents in any other way. TomTom
N.V., TomTom International BV
or any other company belonging to the TomTom group of companies will not be
liable for damage relating to the communication by e-mail of data, documents or
any other information. 









This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.






[Wicket-user] Creating form-fields for a SetString

2006-05-08 Thread Michiel Trimpe








Hey everybody,



Thanks for the help on the last problem. Im
implementing it as we speak and Im finally starting to dig the core
Wicket concepts now!! (and loving it)



The next problem that I need to fix to proudly show off my
wicket prototype is editing a Set of Strings in a form.



I have a Spring/Hibernate managed bean with a
SetString attribute and I need to be able to edit this with a form
(preferably with PropertyModel) .



Does anybody have an idea on how to implement this? If it
could be done inline in the rest of the form that would be perfect!



Regards,



Michiel Trimpe 





Michiel Trimpe |Java Developer |
TomTom | [EMAIL PROTECTED]
| +31 (0)6 41482341mobile







This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.






[Wicket-user] Filterable ListViews

2006-05-05 Thread Michiel Trimpe








Hey everybody,



Ive just started a Wicket pilot as a possible web-framework
to complement Spring and Hibernate at our company and Im going to need
some help.



My first question to the list is, are there any examples of
filtered tables??



I get a list from spring with Hibernate managed objects and
a list of possible objects and so far Ive only been able to add a
DropDownChoice and a ListView, but I dont know how to make them work
together.



Thanks a lot already and have a nice weekend!



- michiel





Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile







This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.