Re: Notifications

2009-06-01 Thread Alex Objelean

I did something similar, using jquery notice plugin (also known as jgrowl).

The implementation of this behavior can be found at this link:

http://pastebin.com/f6db2ec0e http://pastebin.com/f6db2ec0e 

And the usage is pretty simple, all you have to do is to add the behavior to
your form like this::
add(new JGrowlBehavior());

Alex Objelean


Null kühl wrote:
 
 Hi all,
 
   I was doing a small social application using wicket, and i would
 like
 to provide the user with a list of notifications once he logs in, how ever
 i
 would like to display them to the user in a way that is .. notifying:)
 more
 like that of facebook floating notifications, any ideas .. ?
 
 Also is there some sorta wicket component that would be able to float on a
 web page and gets dismissed when the user closes it or so, having the
 ability to call a certain method or so when closed.
 
 Regards,
 Null Kuhl
 
 

-- 
View this message in context: 
http://www.nabble.com/Notifications-tp23808267p23810811.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



A bit confused, please suggest

2009-06-01 Thread Eyal Golan
Hi,
We have a situation as follows:
There's a page that holds (besides other things) two charts that are
generated by JFreechart.
The chart is in a styled panel. Everything is OK.
The chart may take some time to be generated so I put it in
AjaxLazyLoadPanel.
We also let the user decide if to show the chart when entering the page
(it's our portal page).

My question is, after this long introduction, about replacing panels.
Here's what I did:
This is the link:
final AjaxLink enableDisableLink = new AjaxLink(enableDisableLink)
{
private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
sageDal.setPreference(PortalSession.get().getPersonId(),
ChartSectionPanel,
ChartSectionPanel.this.titleKey, new String[] {
String.valueOf(!chartEnabled()) });
target.addComponent(enableDisableImage);
/ Why is that working ?
final Panel chartArea = newChartAreaPanel(chartArea);
ChartSectionPanel.this.replace(chartArea);
target.addComponent(chartArea);
 replacing and refreshing the same component?

}

And this is the method for creating the chart:
private Panel newChartAreaPanel(String id) {
final Panel chartArea;
if (chartEnabled()) {
chartArea = new AjaxLazyLoadPanel(id) {
private static final long serialVersionUID = 1L;

@Override
public Component getLazyLoadComponent(String markupId) {
return (new ChartPanel(markupId, chartCreator,
ChartSectionPanel.this.titleKey));
}

};
} else {
chartArea = new EmptyPanel(id);
}
chartArea.setOutputMarkupId(true);
return chartArea;

}

Everything works OK.
Please take a look at the remarks above I made .///
I just want to be sure that this is the correct / better way.

Thanks

Eyal Golan
egola...@gmail.com

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

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


Re: Copy Form Fields

2009-06-01 Thread Eyal Golan
I'm not sure, but give it a try:
In the onClick, set the property address2 to be the same as property
address1.
Add myAddress2 to the target.

If you use compoundpropertymodel, it should work.

Eyal Golan
egola...@gmail.com

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

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


On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote:

 I have looked through the archives and there were a couple references to
 this question but no examples and I was hoping for some help.

 I have a form with Address One and Address Two,

 I have a link that I just want to copy the data over.  I am thinking it
 should use Javascript, but I am new to wicket and not sure how to implement.

 The textfields are a compound property model which is hitting a hibernate
 POJO.


 private static class AddressPanel extends Panel
  {

public AddressPanel(String id, Form f,final AssociateDB a)
{
  super(id);
  final TextField myAddress1 = new TextField(Address1); //
 First Address
  add(myAddress1);
final TextField myAddress2 = new TextField(Address2); //
 First Address
 myAddress2.setOutputMarkupId(true);
add(myAddress2);


Link link = new Link(copyAddress){
@Override
//TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA
public void onClick() {

}

};



add(link);
}

  };

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




Re: Notifications

2009-06-01 Thread Martin Grigorov
I've contributed a JGrowlFeedbackPanel as well some time ago:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent/jquery-examples/src/main/java/org/wicketstuff/jquery/demo/Page4JGrowl.java
 

El lun, 01-06-2009 a las 00:11 -0700, Alex Objelean escribió:
 I did something similar, using jquery notice plugin (also known as jgrowl).
 
 The implementation of this behavior can be found at this link:
 
 http://pastebin.com/f6db2ec0e http://pastebin.com/f6db2ec0e 
 
 And the usage is pretty simple, all you have to do is to add the behavior to
 your form like this::
 add(new JGrowlBehavior());
 
 Alex Objelean
 
 
 Null kühl wrote:
  
  Hi all,
  
I was doing a small social application using wicket, and i would
  like
  to provide the user with a list of notifications once he logs in, how ever
  i
  would like to display them to the user in a way that is .. notifying:)
  more
  like that of facebook floating notifications, any ideas .. ?
  
  Also is there some sorta wicket component that would be able to float on a
  web page and gets dismissed when the user closes it or so, having the
  ability to call a certain method or so when closed.
  
  Regards,
  Null Kuhl
  
  
 


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



Re: Cancelling pending Ajax requests

2009-06-01 Thread Antti Mattila

What kind of behavior do you have now and what kind do you want?

When there is 500ms throttle and handling each throttled request takes  
few seconds, you end up queuing and handling each request. If you are  
interested in only the last request, this solution clears the pending  
requests so server gets less requests and the last request gets  
handled faster.


If your throttled request gets handled before the next request, this  
solution doesn't bring any new behavior.


Quoting JohannesK johannes.kuus...@eficode.fi:


Does this solution actually work though? I tried it and I don't see any
behaviour I wouldn't get from just the throttle delay. Is there something I
need to change in this to use it? Possibly the channel names?


Antti Mattila wrote:


Problem:
I want to validate input as user types it, but validation takes a long
time
on the server. When validation result for the first input is returned,
user
might have caused several more input events to be validated. These
validation requests are pending execution on Wicket Ajax Channel. At this
point I'm only interested in validating the latest input, but before this
happens, all pending validation requests are processed. This is
unnecessary
and takes a lot of time so I want to cancel all the pending requests.

Solution:
I did this by using named Channel and clearing all pending requests before
requesting the latest validation. I couldn't find a solution for this
problem, so I'm posting it here. Hopefully this might help someone else
and
please give me some feedback if this solution was not a good one.

Thanks,
Antti Mattila

Here's the code:

public class ClearPendingAjaxRequests extends AjaxCallDecorator {
private final String clearPendingRequestsScript;

public ClearPendingAjaxRequests(final String channel) {
clearPendingRequestsScript = if (typeof
Wicket.channelManager.channels[' + channel + '] != 'undefined')
Wicket.channelManager.channels[' + channel + '].callbacks = new
Array();;
}

@Override
public CharSequence decorateScript(final CharSequence script) {
return clearPendingRequestsScript + script;
}
}

public class UsersInputFieldOnChangeAjaxBehavior extends
AjaxFormComponentUpdatingBehavior {
public UsersInputFieldOnChangeAjaxBehavior() {
super(onkeyup);
setThrottleDelay(Duration.milliseconds(500));
}

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new ClearPendingAjaxRequests(getChannelName());
}

@Override
protected String getChannelName() {
return ChannelForValidatingThisSpecificInput;
}

@Override
protected void onUpdate(final AjaxRequestTarget target) {
// Validate user's input, this takes a long time.
// Update UI.
}
}


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





--
View this message in context:   
http://www.nabble.com/Cancelling-pending-Ajax-requests-tp23523655p23810657.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: Cancelling pending Ajax requests

2009-06-01 Thread JohannesK

Ideally, I would want to add a small wait period after each key stroke before
the event is actually triggered and throttle the last event if another one
comes in before the time period expires. 


Antti Mattila wrote:
 
 Problem:
 I want to validate input as user types it, but validation takes a long
 time
 on the server. When validation result for the first input is returned,
 user
 might have caused several more input events to be validated. These
 validation requests are pending execution on Wicket Ajax Channel. At this
 point I'm only interested in validating the latest input, but before this
 happens, all pending validation requests are processed. This is
 unnecessary
 and takes a lot of time so I want to cancel all the pending requests.
 
 Solution:
 I did this by using named Channel and clearing all pending requests before
 requesting the latest validation. I couldn't find a solution for this
 problem, so I'm posting it here. Hopefully this might help someone else
 and
 please give me some feedback if this solution was not a good one.
 
 Thanks,
 Antti Mattila
 
 Here's the code:
 
 public class ClearPendingAjaxRequests extends AjaxCallDecorator {
 private final String clearPendingRequestsScript;
 
 public ClearPendingAjaxRequests(final String channel) {
 clearPendingRequestsScript = if (typeof
 Wicket.channelManager.channels[' + channel + '] != 'undefined')
 Wicket.channelManager.channels[' + channel + '].callbacks = new
 Array();;
 }
 
 @Override
 public CharSequence decorateScript(final CharSequence script) {
 return clearPendingRequestsScript + script;
 }
 }
 
 public class UsersInputFieldOnChangeAjaxBehavior extends
 AjaxFormComponentUpdatingBehavior {
 public UsersInputFieldOnChangeAjaxBehavior() {
 super(onkeyup);
 setThrottleDelay(Duration.milliseconds(500));
 }
 
 @Override
 protected IAjaxCallDecorator getAjaxCallDecorator() {
 return new ClearPendingAjaxRequests(getChannelName());
 }
 
 @Override
 protected String getChannelName() {
 return ChannelForValidatingThisSpecificInput;
 }
 
 @Override
 protected void onUpdate(final AjaxRequestTarget target) {
 // Validate user's input, this takes a long time.
 // Update UI.
 }
 }
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Cancelling-pending-Ajax-requests-tp23523655p23813842.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: OutOfMemory on certain combinations of controls

2009-06-01 Thread Marcin Palka

Should it be considered a bad design to use callbacks from a modal window? I
use modal windows to edit rows from a grid. On save action I close the modal
window and then call a callback method back in the the calling panel which
makes the grid refresh. Does this approach carry any risk? What approach do
you guys suggest to solve this?

Marcin
-- 
View this message in context: 
http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23814865.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



Grizzly + Wicket integration

2009-06-01 Thread Eman Nollase
Hello,

Is there a Wicket + Grizzly integration?

Thanks a lot.
Cheers.


Re: Wizard Custom Layout example

2009-06-01 Thread shmicket

Hi John,

Did you ever figure this out? I'm also looking to override layout markup,
but can't find the components that output table markup (which we want to
change to divs, etc). Overriding newForm() looks promising, but I don't know
where to start (and I certainly don't want to rewrite the functionally
that's already working very well).

Thanks,

- Nathan


John Armstrong-3 wrote:
 
 I am already subclassing the wizard so that I can dynamically add
 steps based on entities in the object. I also have overridden the
 newButton(string) etc but the more subtle interactions are not clear
 to me.
 

-- 
View this message in context: 
http://www.nabble.com/Wizard-Custom-Layout-example-tp21991811p23815530.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: Wizard Custom Layout example

2009-06-01 Thread John Armstrong
I did and have been meaning to post to the wiki on it. I'll follow-up to the 
list later today with some info. Its a fantastic component.

I don't use maven yet so I can't send a quickstart but I will make some code 
available as well.

John
--Original Message--
From: shmicket
To: users@wicket.apache.org
ReplyTo: users@wicket.apache.org
Sent: Jun 1, 2009 7:06 AM
Subject: Re: Wizard Custom Layout example


Hi John,

Did you ever figure this out? I'm also looking to override layout markup,
but can't find the components that output table markup (which we want to
change to divs, etc). Overriding newForm() looks promising, but I don't know
where to start (and I certainly don't want to rewrite the functionally
that's already working very well).

Thanks,

- Nathan


John Armstrong-3 wrote:
 
 I am already subclassing the wizard so that I can dynamically add
 steps based on entities in the object. I also have overridden the
 newButton(string) etc but the more subtle interactions are not clear
 to me.
 

-- 
View this message in context: 
http://www.nabble.com/Wizard-Custom-Layout-example-tp21991811p23815530.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



Sent via BlackBerry by ATT

Re: Copy Form Fields

2009-06-01 Thread hill180

AjaxLink link = new AjaxLink(copyAddress){


@Override
public void onClick(AjaxRequestTarget target) {
myAddress2.setModelObject(myAddress1.getValue());
   target.addComponent(myAddress2);
}
};//end of Link


This kinda works.  It does update the MyAddress2 Field, but if I  
change myAddress1 and click on the click, it will get the original  
value of myAddress1, not the value inside of the forms textfield.



-jose

On Jun 1, 2009, at 1:48 AM, Eyal Golan wrote:


I'm not sure, but give it a try:
In the onClick, set the property address2 to be the same as property
address1.
Add myAddress2 to the target.

If you use compoundpropertymodel, it should work.

Eyal Golan
egola...@gmail.com

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

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



On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote:

I have looked through the archives and there were a couple  
references to

this question but no examples and I was hoping for some help.

I have a form with Address One and Address Two,

I have a link that I just want to copy the data over.  I am  
thinking it
should use Javascript, but I am new to wicket and not sure how to  
implement.


The textfields are a compound property model which is hitting a  
hibernate

POJO.


private static class AddressPanel extends Panel
{

  public AddressPanel(String id, Form f,final AssociateDB a)
  {
super(id);
final TextField myAddress1 = new  
TextField(Address1); //

First Address
add(myAddress1);
  final TextField myAddress2 = new  
TextField(Address2); //

First Address
   myAddress2.setOutputMarkupId(true);
  add(myAddress2);


  Link link = new Link(copyAddress){
  @Override
  //TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF  
DATA

  public void onClick() {

  }

  };



  add(link);
  }

};

-
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: Help debugging why a component is not showing up...

2009-06-01 Thread Ryan McKinley
yup that helps!  Also just found:
WicketTesterHelper.getComponentData( getPage() )

thanks


On Sat, May 30, 2009 at 3:06 PM, jWeekend jweekend_for...@cabouge.com wrote:

 Ryan,

 Is PageView what you're looking for?

 Regards - Cemal
 http://jWeekend.com jWeekend




 ryantxu wrote:

 Hello-

 I am pulling my hair out trying to figure out why a component is not
 showing up within a page.  When I run the app from eclipse in
 development or deployment mode, it shows up just fine.  When I build a
 package run that... no luck.  However it does include javascript
 libraries added from the (not visible) components.

 Is there an easy way to debug the component hierarchy on the page?

 Perhaps some way to dump the current page tree to text or something?

 Any pointers would be great!

 thanks
 ryan

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




 --
 View this message in context: 
 http://www.nabble.com/Help-debugging-why-a-component-is-not-showing-up...-tp23796086p23796445.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: Copy Form Fields

2009-06-01 Thread Eyal Golan
I though more something like this:
AjaxLink link = new AjaxLink(copyAddress){
   @Override
   public void onClick(AjaxRequestTarget target) {
   this.address2 = this.address1;
  target.addComponent(myAddress2);
   }
   };//end of Link

wouldn't that work?

Eyal Golan
egola...@gmail.com

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

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


On Mon, Jun 1, 2009 at 5:31 PM, hill180 hill...@gmail.com wrote:

 AjaxLink link = new AjaxLink(copyAddress){


@Override
public void onClick(AjaxRequestTarget target) {
myAddress2.setModelObject(myAddress1.getValue());
   target.addComponent(myAddress2);
}
};//end of Link


 This kinda works.  It does update the MyAddress2 Field, but if I change
 myAddress1 and click on the click, it will get the original value of
 myAddress1, not the value inside of the forms textfield.


 -jose


 On Jun 1, 2009, at 1:48 AM, Eyal Golan wrote:

  I'm not sure, but give it a try:
 In the onClick, set the property address2 to be the same as property
 address1.
 Add myAddress2 to the target.

 If you use compoundpropertymodel, it should work.

 Eyal Golan
 egola...@gmail.com

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

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


 On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote:

  I have looked through the archives and there were a couple references to
 this question but no examples and I was hoping for some help.

 I have a form with Address One and Address Two,

 I have a link that I just want to copy the data over.  I am thinking it
 should use Javascript, but I am new to wicket and not sure how to
 implement.

 The textfields are a compound property model which is hitting a hibernate
 POJO.


 private static class AddressPanel extends Panel
{

  public AddressPanel(String id, Form f,final AssociateDB a)
  {
super(id);
final TextField myAddress1 = new TextField(Address1); //
 First Address
add(myAddress1);
  final TextField myAddress2 = new TextField(Address2); //
 First Address
   myAddress2.setOutputMarkupId(true);
  add(myAddress2);


  Link link = new Link(copyAddress){
  @Override
  //TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA
  public void onClick() {

  }

  };



  add(link);
  }

};

 -
 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: Long content

2009-06-01 Thread Jeremy Thomerson
Label is correct. It's exactly what you are looking for functionally.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-
From: Luther Baker lutherba...@gmail.com
Sent: Sunday, May 31, 2009 11:38 PM
To: users@wicket.apache.org
Subject: Re: Long content

Ah, thanks for the suggestion Vasu.

I looked at this component and don't think I'm looking to have '\n' replaced
or br/'s and p/'s automatically generated.

In my case, most cases, Post content might include some paragraphs,
blockquotes, pictures and a few more paragraphs. After a blog entry, there
might be a few comments - maybe someone will post some code examples ... so
Post.content and Post.comments[n] might just be somewhat long
strings/database fields.

For what it's worth, *Label* works just fine in my little mock up - but
again, Post.content doesn't really *feel* like a Label so it gave me room
for pause.

Thanks for the quick response Vasu.

-Luther



On Sun, May 31, 2009 at 10:49 PM, Vasu Srinivasan vasy...@gmail.com wrote:

 How about MultiLineLabel ?

 On Sun, May 31, 2009 at 10:43 PM, Luther Baker lutherba...@gmail.com
 wrote:

  I'm working on an application something akin to blog posts. A 'Post' has
 a
  title, date, tags, a category ... and *content*.
 
  For most of the 'smaller' properties in a 'Post', I use a Label as the
  component and that works just fine - but for much larger datasets, say,
  content, I feel odd using something called 'Label'.
 
  Is there a more precise Wicket Component for, what could amount to
 hundreds
  of words or lines? (see below)
 
  (By the way, kudos on the DateLabel and everything else in wicket-date
  project - I just came across that ...)
 
  Thanks,
 
  -Luther
 
 
 final Post post = postService.findPostById(postId);
 final IModelPost postModel = new
  CompoundPropertyModelPost(post);
 final WebMarkupContainer outer = new WebMarkupContainer(post,
  postModel);
 outer.add(new Label(title));
 outer.add(new BookmarkablePageLinkVoid(category,
  CategoryPage.class));
  *outer.add(new Label(content));*
 outer.add(new DateLabel(publishedOn, new
 StyleDateConverter(M-,
  true)));
 add(outer);
 



 --
 Regards,
 Vasu Srinivasan



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



Re: Grizzly + Wicket integration

2009-06-01 Thread Scott Swank
Not that I'm aware of.  What specifically do you want to do with nio?

Scott


On Mon, Jun 1, 2009 at 7:01 AM, Eman Nollase eman.noll...@gmail.com wrote:
 Hello,

 Is there a Wicket + Grizzly integration?

 Thanks a lot.
 Cheers.


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



Re: How to hyperlink the validation or error messages to the respective fields on a large form

2009-06-01 Thread Igor Vaynberg
this is an interesting idea. i do not think currently it is possible.
what we can do is tweak wicket to always add the markup id or input
name of the form component as a veriable to every error message
generated, that way you can use it in your error messages to generate
the javascript/anchor url to go to the right component

-igor

On Sun, May 31, 2009 at 6:33 PM, Deepesh Mathur
deepesh.mat...@gmail.com wrote:
 How to hyperlink the validation or error messages to the respective fields
 on a large form ?
 Like for example we have validation error for a field x on a form then
 clicking on the message should take to the respective field.

 Thanks and Regards
 Deepesh


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



Re: CheckGroup and AjaxPagingNavigator

2009-06-01 Thread JulianS

Thanks Igor

However, I'm not seeing any such factory methods in 1.4-rc2. The only
subclass of PagingNavigationLink is AjaxPagingNavigationLink; there's no
submit version. As I see it, my best option is to create my own
AjaxPagingNavigationSubmitLink by cloning the code in AjaxSubmitLink. I have
to do this because AjaxPagingNavigationLink extends PagingNavigationLink. Or
is there a better way?


igor.vaynberg wrote:
 
 you need to change the links to be ajaxsubmitlinks instead of just
 ajaxlinks, there are factory methods on the navigator.
 

-- 
View this message in context: 
http://www.nabble.com/CheckGroup-and-AjaxPagingNavigator-tp2375p23817894.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



Style and variant

2009-06-01 Thread Carlos Pita
Hi all,

we have a site where some pages/components implement variant V. Now
there is a requirement to sell a mainly reskinned version S of this
site to a customer. So my first thought was to implement this
site-wide variant S as a style. But soon I realised that _V wouldn't
match variant V for site S. That is, that there is no default site for
variations of a component. So, if I had:

MyComponent
MyComponent_V

I'm now forced to duplicate MyComponent_V in MyComponent_S_V even if
there is no difference at all for that component in both sites (which
is the common case).

Also, as ComponentStringResourceLoader directly instantiates
ResourceNameIterator, there is no simple hook to customise the
resolution sequence. One should reimplement
ComponentStringResourceLoader and its subclass
ClassStringResourceLoader in order to get such simple change in the
resolution algorithm. This is done mostly by copypaste.

I think that:

  i. style and variations are not treated very orthogonally,
MyComponent above matches both the default style and S, but
MyComponent_V matches only the default site. IMO this violates the
rule of least surprise, I would expected: MyComponent_V_S then
MyComponent_V then MyComponent_S then MyComponent. Anyway, I agree
this is arguable, because of the ambiguity between MyComponent_V and
MyComponent_S: it's not very clear which should go first. But in this
case, the impossibility to define a sequence that is good for everyone
reinforces next point (ii).

  ii. ResourceNameIterator should be configurable (that is, I expect
some ioc here). Also style and variation shouldn't be merged at one
single parameter at this point; this falls under ResourceNameIterator
responsability instead.

What do you think?

Kind regards
-Carlos

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



Re: Style and variant

2009-06-01 Thread Igor Vaynberg
yeah, this is a problem with the design of the resource resolution.
unfortunately we cannot fix until 1.5. here is an email thread where
some possible future solutions were discussed.

http://markmail.org/thread/lj3luznjnvbun72r

i didnt notice a jira issue for this so i will add one.

-igor

On Mon, Jun 1, 2009 at 11:08 AM, Carlos Pita carlosjosep...@gmail.com wrote:
 Hi all,

 we have a site where some pages/components implement variant V. Now
 there is a requirement to sell a mainly reskinned version S of this
 site to a customer. So my first thought was to implement this
 site-wide variant S as a style. But soon I realised that _V wouldn't
 match variant V for site S. That is, that there is no default site for
 variations of a component. So, if I had:

 MyComponent
 MyComponent_V

 I'm now forced to duplicate MyComponent_V in MyComponent_S_V even if
 there is no difference at all for that component in both sites (which
 is the common case).

 Also, as ComponentStringResourceLoader directly instantiates
 ResourceNameIterator, there is no simple hook to customise the
 resolution sequence. One should reimplement
 ComponentStringResourceLoader and its subclass
 ClassStringResourceLoader in order to get such simple change in the
 resolution algorithm. This is done mostly by copypaste.

 I think that:

  i. style and variations are not treated very orthogonally,
 MyComponent above matches both the default style and S, but
 MyComponent_V matches only the default site. IMO this violates the
 rule of least surprise, I would expected: MyComponent_V_S then
 MyComponent_V then MyComponent_S then MyComponent. Anyway, I agree
 this is arguable, because of the ambiguity between MyComponent_V and
 MyComponent_S: it's not very clear which should go first. But in this
 case, the impossibility to define a sequence that is good for everyone
 reinforces next point (ii).

  ii. ResourceNameIterator should be configurable (that is, I expect
 some ioc here). Also style and variation shouldn't be merged at one
 single parameter at this point; this falls under ResourceNameIterator
 responsability instead.

 What do you think?

 Kind regards
 -Carlos

 -
 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: Style and variant

2009-06-01 Thread Igor Vaynberg
https://issues.apache.org/jira/browse/WICKET-2298

-igor

On Mon, Jun 1, 2009 at 11:45 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 yeah, this is a problem with the design of the resource resolution.
 unfortunately we cannot fix until 1.5. here is an email thread where
 some possible future solutions were discussed.

 http://markmail.org/thread/lj3luznjnvbun72r

 i didnt notice a jira issue for this so i will add one.

 -igor

 On Mon, Jun 1, 2009 at 11:08 AM, Carlos Pita carlosjosep...@gmail.com wrote:
 Hi all,

 we have a site where some pages/components implement variant V. Now
 there is a requirement to sell a mainly reskinned version S of this
 site to a customer. So my first thought was to implement this
 site-wide variant S as a style. But soon I realised that _V wouldn't
 match variant V for site S. That is, that there is no default site for
 variations of a component. So, if I had:

 MyComponent
 MyComponent_V

 I'm now forced to duplicate MyComponent_V in MyComponent_S_V even if
 there is no difference at all for that component in both sites (which
 is the common case).

 Also, as ComponentStringResourceLoader directly instantiates
 ResourceNameIterator, there is no simple hook to customise the
 resolution sequence. One should reimplement
 ComponentStringResourceLoader and its subclass
 ClassStringResourceLoader in order to get such simple change in the
 resolution algorithm. This is done mostly by copypaste.

 I think that:

  i. style and variations are not treated very orthogonally,
 MyComponent above matches both the default style and S, but
 MyComponent_V matches only the default site. IMO this violates the
 rule of least surprise, I would expected: MyComponent_V_S then
 MyComponent_V then MyComponent_S then MyComponent. Anyway, I agree
 this is arguable, because of the ambiguity between MyComponent_V and
 MyComponent_S: it's not very clear which should go first. But in this
 case, the impossibility to define a sequence that is good for everyone
 reinforces next point (ii).

  ii. ResourceNameIterator should be configurable (that is, I expect
 some ioc here). Also style and variation shouldn't be merged at one
 single parameter at this point; this falls under ResourceNameIterator
 responsability instead.

 What do you think?

 Kind regards
 -Carlos

 -
 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



can't build Elephas

2009-06-01 Thread danisevsky
hi, I would like to try Elephas but I can't build it with maven. Does anyone
have actual pom.xml file? Or am I doing somethig wrong?

mvn install -Dmaven.test.skip=true


[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-surefire-plugin

Reason: POM 'org.apache.maven.plugins:maven-surefire-plugin' not found in
reposi
tory: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-surefire-plugin:pom:2.4-SNAPSHOT

from the specified remote repositories:
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/),
  elephas-repository (http://elephas.googlecode.com/svn/misc/maven/),
  wicket-stuff-repository (http://www.wicketstuff.org/maven/repository/),
  central (http://repo1.maven.org/maven2),
  temp-repository (
http://people.apache.org/~frankbille/releases/apache-wicket-1
.4-m1/m2-repo/)

 for project org.apache.maven.plugins:maven-surefire-plugin

[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 4 seconds
[INFO] Finished at: Mon Jun 01 20:35:22 CEST 2009
[INFO] Final Memory: 2M/6M
[INFO]



Re: can't build Elephas

2009-06-01 Thread Ryan Gravener
It's unlikely the SNAPSHOT for surefire will linger around.  Change that to
2.4.3

Ryan Gravener
http://isithotinhereorisitjust.me | http://twitter.com/ryangravener


On Mon, Jun 1, 2009 at 2:47 PM, danisevsky danisev...@gmail.com wrote:

 hi, I would like to try Elephas but I can't build it with maven. Does
 anyone
 have actual pom.xml file? Or am I doing somethig wrong?

 mvn install -Dmaven.test.skip=true


 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Error building POM (may not be this project's POM).


 Project ID: org.apache.maven.plugins:maven-surefire-plugin

 Reason: POM 'org.apache.maven.plugins:maven-surefire-plugin' not found in
 reposi
 tory: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-surefire-plugin:pom:2.4-SNAPSHOT

 from the specified remote repositories:
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/),
  elephas-repository (http://elephas.googlecode.com/svn/misc/maven/),
  wicket-stuff-repository (http://www.wicketstuff.org/maven/repository/),
  central (http://repo1.maven.org/maven2),
  temp-repository (
 http://people.apache.org/~frankbille/releases/apache-wicket-1
 .4-m1/m2-repo/http://people.apache.org/%7Efrankbille/releases/apache-wicket-1%0A.4-m1/m2-repo/
 )

  for project org.apache.maven.plugins:maven-surefire-plugin

 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time: 4 seconds
 [INFO] Finished at: Mon Jun 01 20:35:22 CEST 2009
 [INFO] Final Memory: 2M/6M
 [INFO]
 



Re: Ajax Request Security

2009-06-01 Thread Jeremy Thomerson
I received the following question in my personal email regarding this
thread.  I decided to respond here.

First, let me add this:
Remember that there is NO additional security given to you by POST as
it relates to GET.  Both are insecure if you pass the action (ie
delete), the key (ie entity ID) in the request and you perform the
request without authentication.


 Hey Jeremy, I saw your post on users-wicket.apache.org
 regarding Ajax security. One of your comments was regarding
 ajax state-changing calls and how they should be POSTs
 (which I absolutely agree with). I've noticed though that some
 of the Wicket Ajax classes use GETs for such operations.
 Do you think it's worth raising a bug or change request
 regarding this? Regards, Brendan

No - I don't think this is a bug.  I think that it was actually a
misunderstanding of what I said.  The point of my response was that
you need to validate the request no matter what kind it is - link
clicked - form submit - bookmarkable page requested - ajax request.
For security, you should not expose edit / delete actions via
bookmarkable pages (like you unfortunately must do in most PHP sites,
etc, where you pass the ID to a delete page...)  Instead, with Wicket,
the model is held in the session and referred to by the link - which
has NO data that could be fiddled with to modify the results.

Now, what I was saying when I said typically your normal Ajax
behavior should not be deleting / editing unless it is a form post is
that typically you are not going to have an AjaxUpdatingBehavior or an
ajax link that edits / deletes data (disclaimer: yes, there are
reasons to have an ajax delete link).  What I meant was not HTTP POST
- I just meant form submission - which in ajax actually happens via
GET.

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




On Fri, May 8, 2009 at 12:14 AM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 If you have someone's session ID (within the lifetime of the session)
 you can break into any application - java, php, etc.  That's just how
 it is.  But if you have that level of information on them while the
 session is still live, then you are either already pulling off a man
 in the middle attack, sniffing their packets, or have compromised
 their machine or the server.

 It's not obfuscation - the links are relative to the path that you
 took through the application.  When your session expires, they can't
 be used any more.  But if you sent the link to someone else, in their
 session, the link wouldn't even work unless they took a path so
 similar to yours that their page map was the same (i.e. the fifth page
 in the page map was the edit users page, and they could click the
 sixth editFoo link on that page).

 Just look at the URLs that are generated when you add(new Link(foo)
 { public void onClick() {}};  - Now copy those to another computer and
 try them - no bueno.  Now, dump your cookies and get a new session -
 try the link - no bueno.

 And then, you should have action-level security anyway - so it should
 protect from unauthorized users completing actions that they should
 not be.  And typically your normal Ajax behavior should not be
 deleting / editing unless it is a form post (which you need to verify
 ajax or not) or a link (which again, needs to be subject to your
 role-based security).

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




 On Thu, May 7, 2009 at 6:29 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 How is this session relative security implemented?

 Is this really just security through obfuscation?

 I.E. If you know the session id could you make valid Ajax Requests?

 Douglas

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Thursday, May 07, 2009 5:26 PM
 To: users@wicket.apache.org
 Subject: Re: Ajax Request Security

 Ajax requests, like non-bookmarkable links within Wicket, are
 inherently secure through the fact that they are session-relative.
 That is, unless you specifically try to make it less secure, it is
 secure by default in that I can not just twiddle with an ID field in
 the request URL to edit an entity with a different ID.

 However, many ajax requests may submit form data.  And, of course, all
 such data DOES need to be checked - which should be accomplished
 automatically if you have added validation to your form fields.
 Again, the URL is session-relative, and can't be emailed to someone
 else for them to use or fiddled with to create an unexpected request.
 But the data itself that is submitted must always be verified.

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




 On Thu, May 7, 2009 at 5:22 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 It just dawned on me that most users will protect their url parameters to 
 make sure that end users can't fiddle with parameters and see inappropriate 
 data, however, is it conceivable to issue ajax requests to get an app to do 
 something it shouldn't?

 If so, 

A button like BookmarkablePageLink

2009-06-01 Thread Eyal Golan
Hi,
It may be newbie question.
How do I create a button that opens a new web page in a different window /
tab?
The same as BookmarkablePageLink with PopupSettings etc.

Thanks,


Eyal Golan
egola...@gmail.com

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

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


Re: A button like BookmarkablePageLink

2009-06-01 Thread James Carman
Try attaching your link to a button

On Mon, Jun 1, 2009 at 5:39 PM, Eyal Golan egola...@gmail.com wrote:
 Hi,
 It may be newbie question.
 How do I create a button that opens a new web page in a different window /
 tab?
 The same as BookmarkablePageLink with PopupSettings etc.

 Thanks,


 Eyal Golan
 egola...@gmail.com

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

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


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



London Wicket event on Wednesday

2009-06-01 Thread Alastair Maw
Hi, folks.
Quick reminder that there's a London Wicket Users Group meet-up on Wednesday
evening at Google UK in Victoria.

It's rather late in the day for me to be announcing the topic of my talk,
but it's going to be interesting:

*Bookmarkable Everything*

Wicket is great at managing server side state for you, but you still write a
lot of boilerplate code for users to easily bookmark your pages.
AJAX makes the problem ten times harder. Come along on Wednesday for instant
parameterised pain relief.

Sign up here: http://jweekend.co.uk/dev/LWUGReg

Alastair


Re: Grizzly + Wicket integration

2009-06-01 Thread freak182


Actually, we had a requirements like sending a request to a remote pc.Just
like wicket-push-examples but my colleague said it would be better if
grizzly use.

Thanks a lot.
Cheers.


Scott Swank wrote:
 
 Not that I'm aware of.  What specifically do you want to do with nio?
 
 Scott
 
 
 On Mon, Jun 1, 2009 at 7:01 AM, Eman Nollase eman.noll...@gmail.com
 wrote:
 Hello,

 Is there a Wicket + Grizzly integration?

 Thanks a lot.
 Cheers.

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

-- 
View this message in context: 
http://www.nabble.com/Grizzly-%2B-Wicket-integration-tp23815476p23824515.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: How to hyperlink the validation or error messages to the respective fields on a large form

2009-06-01 Thread deepeshmathur

This wasn't my original idea... I worked in a project where we had home grown
wicket like framework (and thats why I liked wicket as well) and we already
had this functionality there. 
I shall have a look at the mechanism we used there (don't remember at the
moment).
Regards
Deepesh


igor.vaynberg wrote:
 
 this is an interesting idea. i do not think currently it is possible.
 what we can do is tweak wicket to always add the markup id or input
 name of the form component as a veriable to every error message
 generated, that way you can use it in your error messages to generate
 the javascript/anchor url to go to the right component
 
 -igor
 
 On Sun, May 31, 2009 at 6:33 PM, Deepesh Mathur
 deepesh.mat...@gmail.com wrote:
 How to hyperlink the validation or error messages to the respective
 fields
 on a large form ?
 Like for example we have validation error for a field x on a form then
 clicking on the message should take to the respective field.

 Thanks and Regards
 Deepesh

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

-- 
View this message in context: 
http://www.nabble.com/How-to-hyperlink-the-validation-or-error-messages-to-the-respective--fields-on-a-large-form-tp23808846p23824710.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



WIA ch 13 DAO creation (just a lot of cheese?)

2009-06-01 Thread David Brown
Hello wicket bunch, I have a curious situation using the WIA ch13 DAO/hibernate 
code. When I try to introduce a third class aptly named: Test in the domain and 
a DAO interface named: TestDao and then a class: TestDaoImpl I get the 
unresolvable Error:



***
Bound mismatch: The type Test is not a valid substitute for the bounded 
parameter T extends DomainObject of the type AbstractHibernateDaoImplT



Yet, this is perfectly valid for the existing class: Cheese and CheeseDaoImpl.


Any ideas?



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



Re: WIA ch 13 DAO creation (just a lot of cheese?)

2009-06-01 Thread James Carman
Does Test extend DomainObject?

On Mon, Jun 1, 2009 at 10:32 PM, David Brown
dbr...@sexingtechnologies.com wrote:
 Hello wicket bunch, I have a curious situation using the WIA ch13 
 DAO/hibernate code. When I try to introduce a third class aptly named: Test 
 in the domain and a DAO interface named: TestDao and then a class: 
 TestDaoImpl I get the unresolvable Error:



 ***
 Bound mismatch: The type Test is not a valid substitute for the bounded 
 parameter T extends DomainObject of the type AbstractHibernateDaoImplT



 Yet, this is perfectly valid for the existing class: Cheese and CheeseDaoImpl.


 Any ideas?



 -
 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: Wicketeer Available for Hire...

2009-06-01 Thread Jeremy Levy
James (and list...)
We are hiring, send me your resume.

jer...@meetmoi.com
http://meetmoi.com
http://m.meetmoi.com

Jeremy


On Sun, May 31, 2009 at 8:53 AM, James Carman ja...@carmanconsulting.comwrote:

 All,

 It looks like my current client engagement is winding down here soon.
 So, it looks like I'm on the market.  If anyone knows of any
 Wicket-related work located near Cincinnati, OH USA or that could be
 done off-site, I would be interested in hearing about it.  Please
 reply off-list.

 Thank you,

 James Carman

 p.s. I hope sending these type of emails on here isn't considered rude
 or anything.

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




-- 
Jeremy Levy

See my location in real-time:
http://seemywhere.com/jeremy


Modal Window and Forms

2009-06-01 Thread Ayodeji Aladejebi
Hi,Please does anyone has an example on how a modal window should be used to
collect information using a Form component because in my use, clicking on an
AjaxSubmitLink does not
invoke the Links.onSubmit.

Any examples on using Forms with ModalWindow?


Re: Modal Window and Forms

2009-06-01 Thread Ayodeji Aladejebi
no need solved!..simply moved the AjaxSubmitLink outside the form container
and used ModalWindow,closeCurrent

On Tue, Jun 2, 2009 at 4:38 AM, Ayodeji Aladejebi aladej...@gmail.comwrote:

 Hi,Please does anyone has an example on how a modal window should be used
 to collect information using a Form component because in my use, clicking on
 an AjaxSubmitLink does not
 invoke the Links.onSubmit.

 Any examples on using Forms with ModalWindow?






-


Re: Modal Window and Forms

2009-06-01 Thread Ayodeji Aladejebi
Also 2 Forms were mistakenly nested which resulted into the onSubmit of the
outer form getting called as well.
form wicket:id=mainForm
!-- this was the problem --
div wicket:id=modalDialog
/div

/form

therefore ModalWindow.add(new InputForm) was causing 2 nested forms which
affected the expected onSubmit behavior



On Tue, Jun 2, 2009 at 5:34 AM, Ayodeji Aladejebi aladej...@gmail.comwrote:

 no need solved!..simply moved the AjaxSubmitLink outside the form container
 and used ModalWindow,closeCurrent


 On Tue, Jun 2, 2009 at 4:38 AM, Ayodeji Aladejebi aladej...@gmail.comwrote:

 Hi,Please does anyone has an example on how a modal window should be used
 to collect information using a Form component because in my use, clicking on
 an AjaxSubmitLink does not
 invoke the Links.onSubmit.

 Any examples on using Forms with ModalWindow?






 -




-