[Wicket-user] Spring integration using AspectJ

2007-03-22 Thread Carlos Pita

Hi all,

I'm very new to Wicket (with no more than a few hours of fly). I would like
to integrate it with the spring AplicationContext/BeanFactory so I've been
reading the solutions described in
http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object
to them but I think it would be possible to get the integration by means of
the @Configurable annotation that spring 2 offers too. This annotation
injects dependencies upon bean instantiation (ie. with new) based on a
prototype scope bean definition. Also from version 2.0.3 onwards this
annotation would inject dependencies after deserialization as described in
this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896.
So you can declare your dependencies as transient and expect them to be
injected at instantiation-time and at deserialization-time. Weaving can be
done at compile-time and at loading-time. If you are already using aspectj
with spring, for example for domain object dependency injection, you won't
need extra stuff to make it inject Wicket pages' properties. I have written
a toy example of this approach and it seems to work fine. What do you think?
Maybe I'm missing something.

Cheers,
Carlos
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Newbie needs help to generate dynamic content

2007-03-22 Thread Martijn Dashorst
new textfield(..., new Model(my_textfield_value))

does not know how to react when you change my_text_field_value. Remember:
1. strings are not mutable
2. you pass in a reference, not a pointer

In your case you should use:

new TextField(..., new PropertyModel(this, // <- this is the page
   "my_textfield_value"));

If you haven't yet, read [1] which is the primer for understanding models.

Martijn

[1] http://cwiki.apache.org/WICKET/working-with-wicket-models.html

On 3/23/07, Nicolai Dymosz <[EMAIL PROTECTED]> wrote:
> Hi Marc-Andre, Hi Eelco,
>
> thank you very much for your very fast answers. Before the code a attempt to
> explain you my plan. I try to build a wizard. For usability reasons  the
> wizard  should  be able to show  and hide form-elements  depending on  the
> users  interaction. For example if the user selecet a CheckBox a text with
> further information appears or elements that are not needed disappears to
> avoid confusion. Or if a CheckBox is selected another CheckBox (not in the
> same Group) should also be selected.
>
> In the Code below the value for the TextField "myTextField" should be set,
> if a user select or deselect the CheckBox "myCB". Is it possible without
> Ajax? For my use there can be a complete PageReload. If yes, how can i tell
> my WebPage to refresh it self.
>
>
> Regards Nico
>
>
> ##  My Java Code 
>
>
> public class Test extends WebPage{
>
>
> //My WebPage Elements
> private String text_for_my_textField;
> private TextField myTextField;
> private CheckBox myCheckBox;
>
>
> public Test() {
>
> //Instance of myForm
> Form myForm = new MyForm("myForm");
>
> //Adding Form to WebPage
> add(myForm);
>
> //Instance of a TextField
> myTextField = new TextField("myTxT",new
> Model(text_for_my_textField));
>
> //Adding TextField to Form
> myForm.add(myTextField);
>
>
> //Instance of a CheckBox
> myCheckBox = new CheckBox("myCB",new Model()){
>
> protected boolean wantOnSelectionChangedNotificat
> ions()
> {
> return true;
> }
>
> public void onSelectionChanged()
> {
>   text_for_my_textField = "Hello, this Text should be added to
> myTextField";
>
>   //Or something like
>   //myTextField.setValue() 
> }
>
> };
>
> //Adding CheckBox to Form
> myForm.add(myCheckBox);
>
> }
>
>
> //Subclass for my Form
> class MyForm extends Form
> {
> public MyForm(String id)
> {
> super(id);
> }
>
> protected void onSubmit() {
>
> //do nothing
> }
> }
> }
>
> #  My corresponding HTML ###
>
> 
> OnSelectionChanged
> insert Text into myTxT
> 
> 
>
> 
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>


-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Newbie needs help to generate dynamic content

2007-03-22 Thread Nicolai Dymosz

Hi Marc-Andre, Hi Eelco,

thank you very much for your very fast answers. Before the code a attempt to
explain you my plan. I try to build a wizard. For usability reasons  the
wizard  should  be able to show  and hide form-elements  depending on  the
users  interaction. For example if the user selecet a CheckBox a text with
further information appears or elements that are not needed disappears to
avoid confusion. Or if a CheckBox is selected another CheckBox (not in the
same Group) should also be selected.

In the Code below the value for the TextField "myTextField" should be set,
if a user select or deselect the CheckBox "myCB". Is it possible without
Ajax? For my use there can be a complete PageReload. If yes, how can i tell
my WebPage to refresh it self.


Regards Nico


##  My Java Code 


public class Test extends WebPage{


   //My WebPage Elements
   private String text_for_my_textField;
   private TextField myTextField;
   private CheckBox myCheckBox;


   public Test() {

   //Instance of myForm
   Form myForm = new MyForm("myForm");

   //Adding Form to WebPage
   add(myForm);

   //Instance of a TextField
   myTextField = new TextField("myTxT",new
Model(text_for_my_textField));

   //Adding TextField to Form
   myForm.add(myTextField);


   //Instance of a CheckBox
   myCheckBox = new CheckBox("myCB",new Model()){

   protected boolean wantOnSelectionChangedNotifications()
   {
   return true;
   }

   public void onSelectionChanged()
   {
 text_for_my_textField = "Hello, this Text should be added to
myTextField";

 //Or something like
 //myTextField.setValue() 
   }

   };

   //Adding CheckBox to Form
   myForm.add(myCheckBox);

   }


   //Subclass for my Form
   class MyForm extends Form
   {
   public MyForm(String id)
   {
   super(id);
   }

   protected void onSubmit() {

   //do nothing
   }
   }
}

#  My corresponding HTML ###


OnSelectionChanged insert Text into
myTxT




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DopDown comes on top of ModalWindow

2007-03-22 Thread vsubedar

When using panels or pages, in a Modal dialog all the DropDownChoices "shine
through" the dialog and
places themselves on top of everything in IE.Problem arises when there is a
modalWindow inside  a modalWindow. 
-- 
View this message in context: 
http://www.nabble.com/DopDown-comes-on-top-of-ModalWindow-tf3451971.html#a9629095
Sent from the Wicket - User mailing list archive at Nabble.com.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Submitting checkboxes from a datatable

2007-03-22 Thread Igor Vaynberg

please try to search the mailing list archives before posting questions

http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510863

-igor


On 3/22/07, Shawn Tumey <[EMAIL PROTECTED]> wrote:


Hello,

I have a page that uses datatable with several custom column.

One of the columns implements a checkbox. The datatable is wrapped in a
form.

When the form is submitted, how do I capture what rows are checked?

The value passed back is simply "on" for the checkbox.

Any suggestions would be appreciated.

-Shawn

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Submitting checkboxes from a datatable

2007-03-22 Thread Shawn Tumey

Hello,

I have a page that uses datatable with several custom column.

One of the columns implements a checkbox. The datatable is wrapped in a
form.

When the form is submitted, how do I capture what rows are checked?

The value passed back is simply "on" for the checkbox.

Any suggestions would be appreciated.

-Shawn
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] attach/detach refactor in 1.x branch

2007-03-22 Thread Igor Vaynberg

yes. 1.2.6 is in the wicket-1.2.x branch. 1.x branch will fork into
1.3release and a
1.3.x branch

-igor


On 3/22/07, Marc-Andre Houle <[EMAIL PROTECTED]> wrote:


1.X is not the same as a future 1.2.6?  I am right to think it is only
useful for 1.3 adopters?

On 3/22/07, Igor Vaynberg < [EMAIL PROTECTED]> wrote:

> i have just backported the attach/detach refactor into 1.x branch from
> trunk
>
> what this means for you, if you dont already know, is that any time you
> override onattach()/ondetach() you must call super. if you do not you will
> get a runtime exception.
>
> the reasons for this are in the mailing list archives if you are
> interested.
>
> -igor
>
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] attach/detach refactor in 1.x branch

2007-03-22 Thread Marc-Andre Houle

1.X is not the same as a future 1.2.6?  I am right to think it is only
useful for 1.3 adopters?

On 3/22/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


i have just backported the attach/detach refactor into 1.x branch from
trunk

what this means for you, if you dont already know, is that any time you
override onattach()/ondetach() you must call super. if you do not you will
get a runtime exception.

the reasons for this are in the mailing list archives if you are
interested.

-igor


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] attach/detach refactor in 1.x branch

2007-03-22 Thread Igor Vaynberg

i have just backported the attach/detach refactor into 1.x branch from trunk

what this means for you, if you dont already know, is that any time you
override onattach()/ondetach() you must call super. if you do not you will
get a runtime exception.

the reasons for this are in the mailing list archives if you are interested.

-igor
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Newbie needs help to generate dynamic content

2007-03-22 Thread Eelco Hillenius
What version are you using and did you nest the check box in a form?

Eelco

On 3/22/07, Nicolai Dymosz <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> inside of a form  i have CheckBox and a TextField. In Java code i
> implemented the onSelectionChanged Method for the CheckBox. The call of the
> onSelectionChanged Method works fine. I changed the value of the TextField
> Model, but the page doesnt't show the change. Can anybody help me?
>
> Regards Nico
>
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Newbie needs help to generate dynamic content

2007-03-22 Thread Marc-Andre Houle

Are you sure you have add the TextField in the ajaxTarget of the selection
change?
Maybe you can past us some code to look at it...

On 3/22/07, Nicolai Dymosz <[EMAIL PROTECTED]> wrote:


Hi All,

inside of a form  i have CheckBox and a TextField. In Java code i
implemented the onSelectionChanged Method for the CheckBox. The call of the
onSelectionChanged Method works fine. I changed the value of the TextField
Model, but the page doesnt't show the change. Can anybody help me?

Regards Nico



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Newbie needs help to generate dynamic content

2007-03-22 Thread Nicolai Dymosz

Hi All,

inside of a form  i have CheckBox and a TextField. In Java code i
implemented the onSelectionChanged Method for the CheckBox. The call of the
onSelectionChanged Method works fine. I changed the value of the TextField
Model, but the page doesnt't show the change. Can anybody help me?

Regards Nico
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket and Error messages

2007-03-22 Thread Shams Mahmood

I think you can have a look at equal input validator which use two
text-fields.

Using that code a san example you should be able to generate the
type of Validator you need that will generate only one message.

Hope it helps.

Shams


Hello Guys,

We have the following problem: based on client requirements we have to
break the ssn fields into 3 separate text fields. But even if all 3 of
them
are incorrect we should see just one error message and to have all 3 of
them highlighted, since for a client logically it is one field. How can we
do it using wicket. What we have seen until now, was that for every field
that failed  validation there was an error message appearing. In our case
while we have to highlight a group of fields, we also have to show only
one
error message for the group.

The other question is how do we make the error messages dynamic.. For
example I have 2 address components on the page and both of the components
have address 1 and address 2 fields. Still one address shows the address
of
the person, while the other address shows the address of the person's
child. When I have the error message I would have liked to see something
like "Member address 1 us missing", not just "address 1 is missing". In
other words my messages need to be parameterized based not only on the
field name, but also on some property that is stored in Model for the
panel
that holds other elements.


Thank you
Gennadiy





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Correct way to implement ajax event not tied to a direct javascript event?

2007-03-22 Thread Igor Vaynberg

yes, extend the default one instead

-igor


On 3/22/07, jamieballing <[EMAIL PROTECTED]> wrote:



We have a situation where we want to have an applet invoke an ajax event
after it finishes something. We don't want the ajax event to be invoked by
a
user action (i.e. onclick).

Our current approach is that we extend the AjaxEventBehvior, make the
getCallbackScript() public so that the applet can see it, and set the
event
to be some string that isn't tied to an actual javascript event (e.g.
"XXX"). We then do our thing in the onEvent() method and everything seems
to
work.

This seems a little messy... Is there a better way to accomplish it (e.g.
extend AbstractDefaultAjaxBehavior)?

Many Thanks,
Jamie
--
View this message in context:
http://www.nabble.com/Correct-way-to-implement-ajax-event-not-tied-to-a-direct-javascript-event--tf3448858.html#a9619123
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Correct way to implement ajax event not tied to a direct javascript event?

2007-03-22 Thread jamieballing

We have a situation where we want to have an applet invoke an ajax event
after it finishes something. We don't want the ajax event to be invoked by a
user action (i.e. onclick).

Our current approach is that we extend the AjaxEventBehvior, make the
getCallbackScript() public so that the applet can see it, and set the event
to be some string that isn't tied to an actual javascript event (e.g.
"XXX"). We then do our thing in the onEvent() method and everything seems to
work.

This seems a little messy... Is there a better way to accomplish it (e.g.
extend AbstractDefaultAjaxBehavior)?

Many Thanks,
Jamie
-- 
View this message in context: 
http://www.nabble.com/Correct-way-to-implement-ajax-event-not-tied-to-a-direct-javascript-event--tf3448858.html#a9619123
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket and Error messages

2007-03-22 Thread Gennadiy . Vasilevskiy

Thanks Guys for your help.
Gennadiy


   
 "Peter Thomas"
 <[EMAIL PROTECTED] 
 com>   To 
 Sent by:  wicket-user@lists.sourceforge.net   
 wicket-user-bounc 
 [EMAIL PROTECTED]  cc 
 rge.net   
   
   Subject 
 03/22/2007 10:52  Re: [Wicket-user] Wicket and Error  
 AMmessages
   
   
 Please respond to 
 [EMAIL PROTECTED] 
 .sourceforge.net  
   
   




Regarding filtering of messages, I had asked this earlier which Igor
answered.

http://www.nabble.com/-Wicket-user--Removing-messages-from-FeedBackPanel-tf3058081.html#a8502575


So I created a filter like this:

public class MyFeedbackMessageFilter implements IFeedbackMessageFilter {

private Set previous = new HashSet();

public void reset() {
previous.clear();
}

public boolean accept(FeedbackMessage fm) {
if(!previous.contains(fm.getMessage())) {
previous.add(fm.getMessage());
return true;
}
return false;
}

}

Add this to the FeedbackPanel using setfilter()

You have to "reset" this everytime the form bind-validation cycle happens
else else previous errors will persist, so I override validate() on the
Form to do this:

@Override
protected void validate() {
filter.reset();
super.validate();
}

Hope this helps.

- Peter.

On 3/22/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
  On 3/22/07, [EMAIL PROTECTED]
  < [EMAIL PROTECTED]> wrote:
  > The other question is how do we make the error messages dynamic.. For
  > example I have 2 address components on the page and both of the
  components
  > have address 1 and address 2 fields. Still one address shows the
  address of
  > the person, while the other address shows the address of the person's
  > child. When I have the error message I would have liked to see
  something
  > like "Member address 1 us missing", not just "address 1 is missing". In
  > other words my messages need to be parameterized based not only on the
  > field name, but also on some property that is stored in Model for the
  panel
  > that holds other elements.

  Use field.setLabel() to set your dynamic text.

  Martijn

  --
  Learn Wicket at ApacheCon Europe: http://apachecon.com
  Join the wicket community at irc.freenode.net: ##wicket
  Wicket 1.2.5 will keep your server alive. Download Wicket now!
  http://wicketframework.org

  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net 's Techsay panel and you'll get the chance to share
  your
  opinions on IT & business topics through brief surveys-and earn cash
  http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



To:wicket-user@lists.sourceforge.net
cc:
From:  [EMAIL PROTECTED]


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket

Re: [Wicket-user] Wicket and Error messages

2007-03-22 Thread Peter Thomas

Regarding filtering of messages, I had asked this earlier which Igor
answered.

http://www.nabble.com/-Wicket-user--Removing-messages-from-FeedBackPanel-tf3058081.html#a8502575


So I created a filter like this:

public class MyFeedbackMessageFilter implements IFeedbackMessageFilter {

   private Set previous = new HashSet();

   public void reset() {
   previous.clear();
   }

   public boolean accept(FeedbackMessage fm) {
   if(!previous.contains(fm.getMessage())) {
   previous.add(fm.getMessage());
   return true;
   }
   return false;
   }

}

Add this to the FeedbackPanel using setfilter()

You have to "reset" this everytime the form bind-validation cycle happens
else else previous errors will persist, so I override validate() on the Form
to do this:

@Override
protected void validate() {
   filter.reset();
   super.validate();
}

Hope this helps.

- Peter.

On 3/22/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:


On 3/22/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> The other question is how do we make the error messages dynamic.. For
> example I have 2 address components on the page and both of the
components
> have address 1 and address 2 fields. Still one address shows the address
of
> the person, while the other address shows the address of the person's
> child. When I have the error message I would have liked to see something
> like "Member address 1 us missing", not just "address 1 is missing". In
> other words my messages need to be parameterized based not only on the
> field name, but also on some property that is stored in Model for the
panel
> that holds other elements.

Use field.setLabel() to set your dynamic text.

Martijn

--
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net 's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket and Error messages

2007-03-22 Thread Martijn Dashorst
On 3/22/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> The other question is how do we make the error messages dynamic.. For
> example I have 2 address components on the page and both of the components
> have address 1 and address 2 fields. Still one address shows the address of
> the person, while the other address shows the address of the person's
> child. When I have the error message I would have liked to see something
> like "Member address 1 us missing", not just "address 1 is missing". In
> other words my messages need to be parameterized based not only on the
> field name, but also on some property that is stored in Model for the panel
> that holds other elements.

Use field.setLabel() to set your dynamic text.

Martijn

-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket and Error messages

2007-03-22 Thread Gennadiy . Vasilevskiy

Hello Guys,
We have the following problem: based on client requirements we have to
break the ssn fields into 3 separate text fields. But even if all 3 of them
are incorrect we should see just one error message and to have all 3 of
them highlighted, since for a client logically it is one field. How can we
do it using wicket. What we have seen until now, was that for every field
that failed  validation there was an error message appearing. In our case
while we have to highlight a group of fields, we also have to show only one
error message for the group.

The other question is how do we make the error messages dynamic.. For
example I have 2 address components on the page and both of the components
have address 1 and address 2 fields. Still one address shows the address of
the person, while the other address shows the address of the person's
child. When I have the error message I would have liked to see something
like "Member address 1 us missing", not just "address 1 is missing". In
other words my messages need to be parameterized based not only on the
field name, but also on some property that is stored in Model for the panel
that holds other elements.


Thank you
Gennadiy

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Working with Tree - onClick() different frame target?

2007-03-22 Thread Michel Wichers
Hi Igor & all,

i implemented it the suggested way by using BookmarkablePageLink + 
attribute modifier.
For this i havee sub classed the extension tree and have overwritten the 
populateTreeItem as followed:


// 
 @Override
protected void populateTreeItem(WebMarkupContainer item, int level)
{
if ((item.getModelObject() instanceof 
DefaultMutableTreeNode) &&
((DefaultMutableTreeNode) 
item.getModelObject()).getUserObject() instanceof IConfigurationPage){
populateMyTreeItem(item, level);
return;
} else
{
super.populateTreeItem(item, level);
return;
}
}


 protected void populateMyTreeItem(WebMarkupContainer item, int level)
{
final DefaultMutableTreeNode mutableTreeNode = 
(DefaultMutableTreeNode) item.getModelObject();

item.add(newIndentation(item, "indent", (TreeNode) 
item.getModelObject(), level));

item.add(newJunctionLink(item, "link", "image", 
mutableTreeNode));
MarkupContainer nodeLink = newCustomNodeLink(item, 
"nodeLink", (IConfigurationPage) mutableTreeNode.getUserObject());
item.add(nodeLink);

nodeLink.add(newNodeIcon(nodeLink, "icon", mutableTreeNode));

nodeLink.add(new Label("label", new AbstractReadOnlyModel() {
private static final long serialVersionUID = 1L;

public Object getObject(Component c)
{
return renderNode(mutableTreeNode);
}
}));

item.add(new AttributeModifier("class", true, new 
Model("row")));
}

   protected MarkupContainer newCustomNodeLink(MarkupContainer parent, 
String id,
IConfigurationPage page)
{
PageParameters param  = new PageParameters();
param.put("configPage", page.getID());
BookmarkablePageLink pLink = new BookmarkablePageLink(id, 
ConfigMainPage.class, param);
pLink.add(new AttributeModifier("target", true, new 
Model("main")));
return pLink;
}


//

So in this case only the IConfigurationPage nodes will get a different 
nodeLink -> newCustomNodeLink.

This works so far pretty good - the only problem is now when i click on 
a custom link and afterwards on a plus or minus i receive the following 
exception:

//-
WicketMessage: component border:configOutliner:i:1:nodeLink not found on 
page de.ponton.box.core.ui.config.tree.ConfigTreePage[id = 18], listener 
interface = [RequestListenerInterface name=ILinkListener, method=public 
abstract void wicket.markup.html.link.ILinkListener.onLinkClicked()]

Root cause:

wicket.WicketRuntimeException: component 
border:configOutliner:i:1:nodeLink not found on page 
de.ponton.box.core.ui.config.tree.ConfigTreePage[id = 18], listener 
interface = [RequestListenerInterface name=ILinkListener, method=public 
abstract void wicket.markup.html.link.ILinkListener.onLinkClicked()]
at 
wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:384)
at 
wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:430)
at 
wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:131)
at wicket.RequestCycle.step(RequestCycle.java:1037)
at wicket.RequestCycle.steps(RequestCycle.java:1138)
at wicket.RequestCycle.request(RequestCycle.java:474)
at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:256)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:281)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.j

Re: [Wicket-user] Hibernate/Spring and Wicket architecture "request for validation" (was Wicket's questions)

2007-03-22 Thread Ryan Holmes
I know I wasn't asked ;) but we had to revisit this question recently  
in converting a Tapestry app over to Wicket. We started off trying to  
use Hibernate objects directly for the usual reasons (avoid code  
duplication, more elegant, etc.) but ran into a few problems.

A small but important problem was that we had to alter domain objects  
in less than ideal ways to account for the fact than any setter could  
be called at any time. This meant making some private setters public  
and adding redundant validation and logic that would normally go into  
a dedicated, multi-parameter "update..." method meant for public use.

The biggest problems were related to transaction rollbacks after save 
()-ing or reattaching Hibernate objects. Once you save a new object,  
Hibernate marks it as persistent but, if it didn't actually get  
committed to the database because your transaction rolled back, it's  
in an invalid state and Hibernate won't let you reattach it.  
Similarly, if you reattach an edited object and then the transaction  
rolls back, that object will be invalid. To solve this, we ended up  
reloading or recreating domain objects after transaction rollbacks  
and copying user-supplied values from the old object to the new one.  
Needless to say, that code looks a lot like what you have to do with  
form beans, except uglier.

We avoided lazy load issues and transaction scope problems by using a  
read-only session per view and transactional service methods (a  
pretty standard architecture). Those parts worked fine.

In the end we decided to go with form beans only because it ends up  
being a little simpler, keeps UI and domain needs separated and was  
actually slightly less code if you don't count the auto-created  
getters and setters on the form beans.

I still think using Hibernate objects directly can be a nice way to  
go, and if you don't mind the inconsistency you might find that some  
forms can do that while others use beans.

These model classes (based on an old post of Igor's) helped me  
immensely with Wicket/Hibernate integration. We still use them to  
back our DataTables and most of our view pages (which use Hibernate  
objects directly). The first is a superclass for any Hibernate  
entity. The second is an example subclass for use with a domain  
supertype.

public class EntityModel extends LoadableDetachableModel {

   private final Class clazz;
   private final Serializable id;

   public EntityModel(Class clazz, Serializable id) {
 this.clazz = clazz;
 this.id = id;
   }

  public EntityModel(Class clazz, Serializable id, Object object) {
 super( object );
 this.clazz = clazz;
 this.id = id;
   }

   @Override
   protected Object load() {
 return HibernateSessionLocator.getSession().get( this.clazz,  
this.id );
   }
}

public class DomainSupertypeModel extends EntityModel {

   public DomainSupertypeModel(DomainSupertype object) {
 super( object.getClass(), object.getId(), object );
   }

   // If the object is a proxy, its runtime type might not be the actual
   // persistent class, so sometimes you need to specify it.
   public DomainSupertypeModel(DomainSupertype object, Class clazz) {
 super( clazz, object.getId(), object );
   }
}

hth,
-Ryan

On Mar 20, 2007, at 9:51 AM, ZedroS Schwart wrote:

> That's was a really instructive post, thanks Eelco.
>
> In fact I'm actually struggling with this kind of issue. I've model
> objects and then on my presentation layer the data are quite often a
> bit different, and thus I wonder which way is the best.
>
> Igor had spoken about "form beans", but then I've to map them
> somewhere with my actual domain objects, which can be quite annoying.
> Merge and VO object may be a good way to avoid some part of this pain.
>
> However, you said you weren't a fan of this pattern, could you please
> explain which approach you use ? I would really like it because I find
> it really important for ease of development and maintainability.  And
> up to now I've found a way which fully pleases me.
>
> Thanks in advance
> ZedroS
>
> -- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___

[Wicket-user] cerebral palsy

2007-03-22 Thread Vinson Andy

All Things Beautiful TrackBack Islamberg In New York Fri Feb 17, 04:13:00 AM 
PST   TonyGuitar said.
What about chemical burns? "The noise level has been growing there, too," said 
Small.
Certainly most prostitutes would prefer to find safer, more rewarding jobs with 
better long-term prospects, but that's not the same as "slavery".
With this augmented version of SLES, uses will have the choice of using either 
Virtuozzo or Xen for their virtualization needs.
This group also has a presence in Canada, so should you have an interest in 
exploring that further, feel free or contact me and we'll talk about it.
The  institutional sign graphic  is  interesting but  the  context  you provide 
 around  it  is priceless.
Perhaps the CSIS and RCMP are, as it's their responsibility to be aware of any 
such groups threatening national security. News reports say he operated a booth 
outside the Z Market in Lynchburg selling some of the bootlegged items.
I think "kinky" implies a specific fetish or taste, whereas I'm thinking more 
about general enthusiasm and interest in variety.
In order to achieve optimal performance on the latest hardware in this 
paravirtualized mode of use, NetWare has been enhanced to recognize that it's 
running as a virtual machine, according to Novell. html', 'pageTitle': 'The 
Politics of CP: Muslims of the Americas tied to Muslim Brotherhood?
and North American markets. He could be considered Gilani's consigliere. ) a 
term for people who like sex as much as "foodies" like dining, cooking, etc. 
His business was also involved in the sale of counterfeit goods and I have been 
told he may have been involved in illegal drug activity as well. We who care 
about our country and its constitution must all become vigilant and 
knowledgeable about the enemy in our midst.
His business was also involved in the sale of counterfeit goods and I have been 
told he may have been involved in illegal drug activity as well. First off, 
there was a streaker.
I didn't know anything was different about me until I was fifteen.
" That would be fantastic. Pair your sofa up with a loveseat or a second sofa. 
I'll be posting on this. From here, they planned attacks and surveilled 
numerous targets, both infrastructure and military-related.

red-eye.gif
Description: GIF image
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user