Re: How to support multiple themes in Wicket application.

2010-06-19 Thread Duy Do
I would like to support different  layout structure, not only CSS.

I will follow your help and try to do it.  Thank you for your help, I really
appreciated it.

Duy


On Tue, Jun 15, 2010 at 5:40 AM, Russell Simpkins 
russellsimpk...@hotmail.com wrote:


  I would like to support multiple themes in Wicket application like
 Wordpress, Drupal. Could you please give me suggestion?
 I would make sure that every element has class set. I would also
 recommend always setting component.setMarkupId(String id) for your
 components so that you can style on ID and Class. Then you can play around
 with setting the name of the selected stylesheet in the application session
 store.
 Russ




 _
 The New Busy is not the too busy. Combine all your e-mail accounts with
 Hotmail.

 http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4



Re: ListView + dynamic rows: always remove last row...

2010-06-19 Thread jOki

Even Im trying to implement the remove link as:

 - item.add(removeLink(removeKeyword, item));

and it doesnt work... always remove the last row...


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ListView-dynamic-rows-always-remove-last-row-tp2260480p2261045.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



Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread Kent Tong
Hi,

I've written a tutorial on this topic. You may check it out at
http://www.dzone.com/links/getting_started_with_scala_spring_hibernate_wicket.html




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



Re: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread James Carman
Why is spring-orm version 3.0.1.RELEASE and not 3.0.3.RELEASE?  Why
not just uset a {spring.version} property in your POM so that it all
stays in synch?

On Sat, Jun 19, 2010 at 7:23 AM, Kent Tong k...@cpttm.org.mo wrote:
 Hi,

 I've written a tutorial on this topic. You may check it out at
 http://www.dzone.com/links/getting_started_with_scala_spring_hibernate_wicket.html




 -
 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: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread James Carman
Why do you have page - service - dao?  Why not just talk directly to
the DAO for the getAll() method.  This level of indirection just
causes more code (and confusion) in your simple example.  Is this just
a best practice that you've devised?  I've never really understood
folks' aversion to talking to the DAOs from the view layer, especially
when it means you have to have duplicate methods in your service layer
to do so.  It just doesn't make sense to me.


On Sat, Jun 19, 2010 at 8:01 AM, James Carman
ja...@carmanconsulting.com wrote:
 Why is spring-orm version 3.0.1.RELEASE and not 3.0.3.RELEASE?  Why
 not just uset a {spring.version} property in your POM so that it all
 stays in synch?

 On Sat, Jun 19, 2010 at 7:23 AM, Kent Tong k...@cpttm.org.mo wrote:
 Hi,

 I've written a tutorial on this topic. You may check it out at
 http://www.dzone.com/links/getting_started_with_scala_spring_hibernate_wicket.html




 -
 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: ResourceStreamLocator and mvn resource:resource copying resources in the right directory

2010-06-19 Thread Erik van Oosten

Hi,

https://issues.apache.org/jira/browse/WICKET-1974 describes a way to 
make all URLs absolute.


Unfortunately the patch attached to the issue is still not applied so 
you'll have to build wicket yourself.


Regards,
Erik.


Op 18-06-10 21:56, b...@actrix.gen.nz schreef:

Hi Fernando,

obviously quite a few including yourself are separating markup from
Java packages to make it accessable to HTML developers.

How do you cope with the fact that Wicket markup, when rendered in any
folder without flattening the package structure, gets broken images?

That is what I am trying to address with

Cannot substitute RelativePathPrefixHandler
https://issues.apache.org/jira/browse/WICKET-2881

The three lines of Java code in RelativePathPrefixHandler are solving
this problem.

int lastIndex = attrValue.lastIndexOf(../);
if (lastIndex= 0){
 attrValue = attrValue.substring(lastIndex + 3);
}

Regards,
Bernard

   


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: ListView + dynamic rows: always remove last row...

2010-06-19 Thread Erik van Oosten

Try to use the RemoveLink that is available as inner class of ListView.

Regards,
Erik.


Op 18-06-10 18:29, jOki wrote:

Hi!!

Im trying to implement a dynamic Form, where you can add textfields and
remove as you want. The add button works fine, but the remove button always
remove the last testfield and not the selected field. For example:

Textfield1 add remove
Textfield2 add remove
Textfield3 add remove

click on remove (row textfield2) and Textfield3 is removed. It should remove
Textfield2, doesnt it?


Some code:

public class KeywordObject implements Serializable {
 private static final long serialVersionUID = 1L;
 private String keyword;

 public void setKeyword(String keyword) {
 this.keyword = keyword;
 }

 public String getKeyword() {
 return this.keyword;
 }
 }

And in the form...

ListKeywordObject  keyList = new ArrayListKeywordObject();
keyList.add(new KeywordObject());

final ListView keywordView = new ListView(keywordView, keyList) {

 @Override
 protected void populateItem(final ListItem item) {
 KeywordObject model = (KeywordObject)
item.getModelObject();
 item.add(new TextField(keyword, new
PropertyModel(model, keyword)));

 // keyword add link
 Link addKeyword = new Link(addKeyword,
item.getModel()) {

 @Override
 public void onClick() {
 keyList.add(new KeywordObject());
 }
 };

 // keyword remove link
 Link removeKeyword = new Link(removeKeyword,
item.getModel()) {

 @Override
 public void onClick() {
 KeywordObject selected = (KeywordObject)
getModelObject();
 keyList.remove(selected);
 }
 };

 item.add(addKeyword);
 item.add(removeKeyword);
 }
 };

 add(keywordView);
 keywordView.setReuseItems(true);


Im getting crazy about that...

Thanks.
   



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: ListView + dynamic rows: always remove last row...

2010-06-19 Thread James Carman
Just as a test, turn off the reuseItems property.  See what happens.

On Sat, Jun 19, 2010 at 5:04 AM, jOki joa...@gmail.com wrote:

 Even Im trying to implement the remove link as:

  - item.add(removeLink(removeKeyword, item));

 and it doesnt work... always remove the last row...


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/ListView-dynamic-rows-always-remove-last-row-tp2260480p2261045.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: ListView + dynamic rows: always remove last row...

2010-06-19 Thread Jeremy Thomerson
Also, is the item you're trying to remove a null in the list?  Or, is it a
problem with equals/hashcode not being implemented correctly?  I just fixed
a bug in ListView this week with the remove link and move up/down links.  It
was relying on the equals of the model object of the item to find which to
remove.  Now it removes by index.  But I think James is on to the right
answer for your case.

On Sat, Jun 19, 2010 at 7:50 AM, James Carman ja...@carmanconsulting.comwrote:

 Just as a test, turn off the reuseItems property.  See what happens.

 On Sat, Jun 19, 2010 at 5:04 AM, jOki joa...@gmail.com wrote:
 
  Even Im trying to implement the remove link as:
 
   - item.add(removeLink(removeKeyword, item));
 
  and it doesnt work... always remove the last row...
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ListView-dynamic-rows-always-remove-last-row-tp2260480p2261045.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




-- 
Jeremy Thomerson
http://www.wickettraining.com


Apache Roller - Blog integration

2010-06-19 Thread Arjun Dhar

Hi,
 not sure if I should post this in Apache Roller or Wicket; but is there
any way to integrate Apache ROller and Wicket?

..are there any good blog engines with Wicket, or perhaps Some blog
components within Wicket?
Frankly I like ROllers feature set and I doubt wicket itself would have a
full fledged blogging engine, though worth asking about possibilities 
ideas!?

thanks!
Arjun
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Roller-Blog-integration-tp2261140p2261140.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: Suggestion about wicket's Wizard

2010-06-19 Thread David Chang
Did not hear any feedback. Just curious about whether I explained clearly or 
about what others may think about my suggestions.

Regards.

--- On Fri, 6/18/10, David Chang david_q_zh...@yahoo.com wrote:

 From: David Chang david_q_zh...@yahoo.com
 Subject: Suggestion about wicket's Wizard
 To: users@wicket.apache.org
 Date: Friday, June 18, 2010, 5:39 PM
 I have been playing wicket's Wizard
 (1.4.9) and feel it is quite helpful but lacking in some
 ways. 
 
 Here is what I suggest:
 
 1. Add a method (called size or something else) to
 WizardModel to provide the number of wizard steps it
 contains.
 
 2. Add a method to Wizard or WizardModel to provide the
 index of a IWizardStep in a number of the wizard steps
 
 3. The current WizardModel#previous remembers the click
 history in a browser style. Put it another way, it remembers
 whatever steps were visited and return to them in reversing
 (FILO) order. I call it browser style. This visit order does
 not reflect the actual order of wizard steps defined when a
 Wizard is created. I would like to see an added style
 (called Linear, for example) that strictly ask
 WizardModel#previous or another new method to return Wizard
 to step that is defined (NOT visited) before the current
 active wizard step. (The background for this request is that
 I created a few links each of which takes me directly to
 individual wizard steps in a Wizard. So i can visit the
 wizard steps in any order instead of following the default
 Previous and Next button. When I click a link and then click
 the Prevoius button, the wizard takes me to the previously
 visited wizard step, not the one defined before the current
 active step. I feel my need is a useful
  usecase. I inherited WizardModel and modified the previous
 method in order to satisfy the usecase). 
 
 Best!
 
 
 
 
 
       
 
 -
 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: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread Kent Tong
Hi James,

 Why is spring-orm version 3.0.1.RELEASE and not 3.0.3.RELEASE?  Why
 not just uset a {spring.version} property in your POM so that it all
 stays in synch?

Thanks for your good advice. I've updated the tutorial.

 Why do you have page - service - dao?  Why not just talk directly to
 the DAO for the getAll() method.  This level of indirection just
 causes more code (and confusion) in your simple example.  Is this just
 a best practice that you've devised?  I've never really understood
 folks' aversion to talking to the DAOs from the view layer, especially
 when it means you have to have duplicate methods in your service layer
 to do so.  It just doesn't make sense to me.

I agree that if the service is simply delegating to the DAO without
adding anything, then it is probably be a good idea to merge them.
However, this sample application is meant to demonstrate how to do
it in a general case where the service does more than simple delegation.




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



Re: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread James Carman
On Sat, Jun 19, 2010 at 10:10 AM, Kent Tong k...@cpttm.org.mo wrote:
 I agree that if the service is simply delegating to the DAO without
 adding anything, then it is probably be a good idea to merge them.
 However, this sample application is meant to demonstrate how to do
 it in a general case where the service does more than simple delegation.


If you use a more domain-driven approach, you don't need services as
much.  Your entities can have the repositories (daos) injected into
them via Spring's @Configurable/@Autowire support.  So, you can move a
lot of your business logic into the entities themselves.  Now,
sometimes you just have to use services because there's just no good
way to do some things, but for a lot of the usecases you'll encounter,
you don't.

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



Re: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread Brian Topping
The best reason for me to keep a service/business layer talking to the DAO is 
to provide a clean transactional boundary.  Then, all I have to do is add a 
Spring @Transactional annotation to the method and I'm fully atomic.  

If my view logic is calling a half dozen DAO methods to effect an update, 
there's no way to have a single method demarcate the transaction.  Without a 
single method, no use of @Transactional, and I have to maintain complex 
transactional code by hand.  This is way more error prone and complex than 
taking (what are admittedly attractive) shortcuts to remove the service layer.

As a bonus, with well-defined service layer interfaces, I can easily generate 
SOAP or REST interfaces and expose them to other fat clients like mobile 
devices in the future.

On Jun 19, 2010, at 8:07 AM, James Carman wrote:

 Why do you have page - service - dao?  Why not just talk directly to
 the DAO for the getAll() method.  This level of indirection just
 causes more code (and confusion) in your simple example.  Is this just
 a best practice that you've devised?  I've never really understood
 folks' aversion to talking to the DAOs from the view layer, especially
 when it means you have to have duplicate methods in your service layer
 to do so.  It just doesn't make sense to me.
 
 
 On Sat, Jun 19, 2010 at 8:01 AM, James Carman
 ja...@carmanconsulting.com wrote:
 Why is spring-orm version 3.0.1.RELEASE and not 3.0.3.RELEASE?  Why
 not just uset a {spring.version} property in your POM so that it all
 stays in synch?
 
 On Sat, Jun 19, 2010 at 7:23 AM, Kent Tong k...@cpttm.org.mo wrote:
 Hi,
 
 I've written a tutorial on this topic. You may check it out at
 http://www.dzone.com/links/getting_started_with_scala_spring_hibernate_wicket.html
 
 
 
 
 -
 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



Re: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread James Carman
On Sat, Jun 19, 2010 at 11:54 AM, Brian Topping brian.topp...@gmail.com wrote:
 The best reason for me to keep a service/business layer talking to the DAO is 
 to provide a clean transactional boundary.  Then, all I have to do is add a 
 Spring @Transactional annotation to the method and I'm fully atomic.

 If my view logic is calling a half dozen DAO methods to effect an update, 
 there's no way to have a single method demarcate the transaction.  Without a 
 single method, no use of @Transactional, and I have to maintain complex 
 transactional code by hand.  This is way more error prone and complex than 
 taking (what are admittedly attractive) shortcuts to remove the service layer.


You can also annotate your Wicket pages/components methods with the
@Transactional annotation if you use the AspectJ compiler.  They have
to be public or protected in order for the compiler to pick them up
and weave them I believe.  No big deal, in practice, really.

 As a bonus, with well-defined service layer interfaces, I can easily generate 
 SOAP or REST interfaces and expose them to other fat clients like mobile 
 devices in the future.


Agreed, but having one method that merely delegates to another is just
plain silly, IMHO.  You'd probably generate custom services that are
tailored to the different view implementations so that you can
aggregate things correctly for optimization purposes.

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



RE: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread Tim L Casey


That’s ok.  I never understood folks who don’t use layers.

-Original Message-
From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On
Behalf Of James Carman
Sent: Saturday, June 19, 2010 5:07 AM
To: users@wicket.apache.org
Subject: Re: Getting started with Scala, Spring, Hibernate  Wicket

Why do you have page - service - dao?  Why not just talk directly to
the DAO for the getAll() method.  This level of indirection just
causes more code (and confusion) in your simple example.  Is this just
a best practice that you've devised?  I've never really understood
folks' aversion to talking to the DAOs from the view layer, especially
when it means you have to have duplicate methods in your service layer
to do so.  It just doesn't make sense to me.


On Sat, Jun 19, 2010 at 8:01 AM, James Carman
ja...@carmanconsulting.com wrote:
 Why is spring-orm version 3.0.1.RELEASE and not 3.0.3.RELEASE?  Why
 not just uset a {spring.version} property in your POM so that it all
 stays in synch?

 On Sat, Jun 19, 2010 at 7:23 AM, Kent Tong k...@cpttm.org.mo wrote:
 Hi,

 I've written a tutorial on this topic. You may check it out at

http://www.dzone.com/links/getting_started_with_scala_spring_hibernate_wicke
t.html




 -
 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



Re: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread James Carman
On Sat, Jun 19, 2010 at 12:06 PM, Tim L Casey tca...@cataphora.com wrote:


 That’s ok.  I never understood folks who don’t use layers.


I do use layers, when it makes sense.  It's just a matter of taste, I
guess.  Some folks like to stick with their paradigm no matter what.
I guess I've just become a bit more flexible when it turns out to save
me some code (like having pass-through methods just to have them).  If
I need to introduce some logic in between my view/data layers later, I
can easily do so.  Using services too much is a symptom of an anemic
domain model.

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



RE: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread Tim L Casey


The reaction comes from years of watching UI centric people, who have a
different design goal, use dao code poorly; and then watching dao type
people use UI code poorly.

I guess I view the layering as inevitable.  Even if it is as simple as
moving a tag, I am not sure I want anyone to have that choice. 

-Original Message-
From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On
Behalf Of James Carman
Sent: Saturday, June 19, 2010 9:12 AM
To: users@wicket.apache.org; tim.ca...@cataphora.com
Subject: Re: Getting started with Scala, Spring, Hibernate  Wicket

On Sat, Jun 19, 2010 at 12:06 PM, Tim L Casey tca...@cataphora.com wrote:


 That’s ok.  I never understood folks who don’t use layers.


I do use layers, when it makes sense.  It's just a matter of taste, I
guess.  Some folks like to stick with their paradigm no matter what.
I guess I've just become a bit more flexible when it turns out to save
me some code (like having pass-through methods just to have them).  If
I need to introduce some logic in between my view/data layers later, I
can easily do so.  Using services too much is a symptom of an anemic
domain model.

-
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: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread Brian Topping

On Jun 19, 2010, at 12:05 PM, James Carman wrote:

 On Sat, Jun 19, 2010 at 11:54 AM, Brian Topping brian.topp...@gmail.com 
 wrote:
 The best reason for me to keep a service/business layer talking to the DAO 
 is to provide a clean transactional boundary.  Then, all I have to do is add 
 a Spring @Transactional annotation to the method and I'm fully atomic.
 
 If my view logic is calling a half dozen DAO methods to effect an update, 
 there's no way to have a single method demarcate the transaction.  Without a 
 single method, no use of @Transactional, and I have to maintain complex 
 transactional code by hand.  This is way more error prone and complex than 
 taking (what are admittedly attractive) shortcuts to remove the service 
 layer.
 
 
 You can also annotate your Wicket pages/components methods with the
 @Transactional annotation if you use the AspectJ compiler.  They have
 to be public or protected in order for the compiler to pick them up
 and weave them I believe.  No big deal, in practice, really.

Sure, but AspectJ can be a machine gun in the hands of babes.  I try to avoid 
requiring team members be that qualified just to work on basic code.  Because 
once something like AspectJ is in the source base, it starts getting used, and 
before you know it, you have to start making solid experience with this new 
esoterica a hiring requirement.  Too expensive.

 
 As a bonus, with well-defined service layer interfaces, I can easily 
 generate SOAP or REST interfaces and expose them to other fat clients like 
 mobile devices in the future.
 
 
 Agreed, but having one method that merely delegates to another is just
 plain silly, IMHO.  You'd probably generate custom services that are
 tailored to the different view implementations so that you can
 aggregate things correctly for optimization purposes.

It's a pattern, and sticking with one pattern is very smart.  Especially 
because very few screens in a reasonably valuable application are only going to 
call a single DAO method.  It happens, but I'd question the value of the app at 
that point, and whether it needs transactions at all.  In that case, you are 
right, kill the service layer.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ListView + dynamic rows: always remove last row...

2010-06-19 Thread jOki

Hi,

I tried with/without setReuseItems and the behaviour is the same.

I think you can be right with equals/hashcode not being implemented
correctly...

I tried another time with a ListString with different values and its
working...

I tried as well to implement these methods (equals/hashcode) in my code but
it doesnt work.

How can I differentiate objects even if when they are added (they are
textfields) they just have empty values

Thanks for the help!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ListView-dynamic-rows-always-remove-last-row-tp2260480p2261292.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: ListView + dynamic rows: always remove last row...

2010-06-19 Thread James Carman
What kind of objects are they?  For entities, I use a uuid for the primary
key and it's assigned when the object is created.  That way you make
equals/hashcode based on the uuid so that everything stays consistent

On Jun 19, 2010 1:42 PM, jOki joa...@gmail.com wrote:


Hi,

I tried with/without setReuseItems and the behaviour is the same.

I think you can be right with equals/hashcode not being implemented
correctly...

I tried another time with a ListString with different values and its
working...

I tried as well to implement these methods (equals/hashcode) in my code but
it doesnt work.

How can I differentiate objects even if when they are added (they are
textfields) they just have empty values

Thanks for the help!
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/ListView-dynamic-rows-always-remove-last-row-tp2260480p2261292.html

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

---...


Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory

2010-06-19 Thread bht
Thanks Erik.

Why are you using absolute URLS?

Are you using absolute URLs to support editing in the web directory,
with a directory structure the same as the java package structure,
without breaking images?

Then it would look like you have found a different solution for the
same problem. Interesting. Both solutions require only small changes.
Have you tried to patch RelativePathPrefixHandler? With that change,
you would no longer be restricted to absolute paths.


Regards,

Bernard


On Sat, 19 Jun 2010 14:15:44 +0200, you wrote:

Hi,

https://issues.apache.org/jira/browse/WICKET-1974 describes a way to 
make all URLs absolute.

Unfortunately the patch attached to the issue is still not applied so 
you'll have to build wicket yourself.

Regards,
 Erik.


Op 18-06-10 21:56, b...@actrix.gen.nz schreef:
 Hi Fernando,

 obviously quite a few including yourself are separating markup from
 Java packages to make it accessable to HTML developers.

 How do you cope with the fact that Wicket markup, when rendered in any
 folder without flattening the package structure, gets broken images?

 That is what I am trying to address with

 Cannot substitute RelativePathPrefixHandler
 https://issues.apache.org/jira/browse/WICKET-2881

 The three lines of Java code in RelativePathPrefixHandler are solving
 this problem.

 int lastIndex = attrValue.lastIndexOf(../);
 if (lastIndex= 0){
  attrValue = attrValue.substring(lastIndex + 3);
 }

 Regards,
 Bernard




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



Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory

2010-06-19 Thread Erik van Oosten

Hi Bernard,

We are using absolute URLs in one application (http://tipspot.com) that 
does not use the wicket ajax library, only javascript (based on jquery) 
written by the frontend developer. One of the things we do there is 
filling popups through ajax requests. As most of that information is 
completely stateless, we use a wicket page to produce the html 
fragments. The URL depth and path of the original page (containing the 
popup), and the page that is pasted into the popup, almost never 
matches. This is a problem for linking to other pages. I found it easy 
to make this problem go away by making all URLs absolute.


I did not look at RelativePathPrefixHandler as I was unaware of its 
existence. I am also not certain that any relative schema would be able 
to solve the problem cleanly/easily. Secondly having absolute paths is a 
non-issue for this application.


Regards,
Erik.


Op 19-06-10 20:27, b...@actrix.gen.nz wrote:

Thanks Erik.

Why are you using absolute URLS?

Are you using absolute URLs to support editing in the web directory,
with a directory structure the same as the java package structure,
without breaking images?

Then it would look like you have found a different solution for the
same problem. Interesting. Both solutions require only small changes.
Have you tried to patch RelativePathPrefixHandler? With that change,
you would no longer be restricted to absolute paths.


Regards,

Bernard


On Sat, 19 Jun 2010 14:15:44 +0200, you wrote:

   

Hi,

https://issues.apache.org/jira/browse/WICKET-1974 describes a way to
make all URLs absolute.

Unfortunately the patch attached to the issue is still not applied so
you'll have to build wicket yourself.

Regards,
 Erik.


Op 18-06-10 21:56, b...@actrix.gen.nz schreef:
 

Hi Fernando,

obviously quite a few including yourself are separating markup from
Java packages to make it accessable to HTML developers.

How do you cope with the fact that Wicket markup, when rendered in any
folder without flattening the package structure, gets broken images?

That is what I am trying to address with

Cannot substitute RelativePathPrefixHandler
https://issues.apache.org/jira/browse/WICKET-2881

The three lines of Java code in RelativePathPrefixHandler are solving
this problem.

int lastIndex = attrValue.lastIndexOf(../);
if (lastIndex= 0){
  attrValue = attrValue.substring(lastIndex + 3);
}

Regards,
Bernard


   


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

   



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: Getting started with Scala, Spring, Hibernate Wicket

2010-06-19 Thread Erik van Oosten
The latest and greatest in the domain-driven world would be CQRS where 
the UI code needs two types of dependencies: the command bus and a 
repository. No more need of a 'services' layer.


I adore CQRS because it provides a simple and clear view of what code to 
put where. Though the amount of code stays the same, it will be simpler.


Regards,
Erik.

PS. Kent, thanks for taking the time to write this tutorial.


Op 19-06-10 17:39, James Carman wrote:

On Sat, Jun 19, 2010 at 10:10 AM, Kent Tongk...@cpttm.org.mo  wrote:
   

I agree that if the service is simply delegating to the DAO without
adding anything, then it is probably be a good idea to merge them.
However, this sample application is meant to demonstrate how to do
it in a general case where the service does more than simple delegation.

 

If you use a more domain-driven approach, you don't need services as
much.  Your entities can have the repositories (daos) injected into
them via Spring's @Configurable/@Autowire support.  So, you can move a
lot of your business logic into the entities themselves.  Now,
sometimes you just have to use services because there's just no good
way to do some things, but for a lot of the usecases you'll encounter,
you don't.

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

   



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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