TextFilteredPropertyColumn[T] and getFilterModel

2008-12-28 Thread Jan Kriesten

Hi,

I'm trying to work out how to handle TextFilteredPropertyColumn with wicket 1.4.

I'm trying to do the following:

tf = new TextFilteredPropertyColumnM( new Model( Name ), COL_NAME, name ){
  protected IModelString getFilterModel( FilterForm form ) {
return new PropertyModelString(
getDataProvider.getFilterState.getFilterMap( FilterMaps.LIKE ), getSortProperty 
)
  }
}

COL_NAME (= sort property) / Filter value are organized in a simple
HashMapString,String.

This worked fine with Wicket 1.3.x - Wicket 1.4 insists that getFilterModel
returns an IModelM - which is obscure, since the filter doesn't have to match
the Model of the Column.

Am I missing something?

Best regards, --- Jan.

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



[GMAP2] how to add float Panel

2008-12-28 Thread NHSoft.YHW

my requirement desc:
1.add a float panel component at top left corner of the GMAP2, when the map
zoom in or zoom out, the panel alway show at top left corner.
2.adjust panel transparency,  so user can see map image behind the panel.

so i want to know how to code in GMAP2. thanks.



-- 
View this message in context: 
http://www.nabble.com/-GMAP2--how-to-add-float-Panel-tp21193180p21193180.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: Using the org.apache.wicket.jmx MBeans with WebSphere

2008-12-28 Thread shetc

Hi Phil,

Are you using WebSphere?

Steve
-- 
View this message in context: 
http://www.nabble.com/Using-the-org.apache.wicket.jmx-MBeans-with-WebSphere-tp21188288p21193228.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: What is your experience on the time of development ?

2008-12-28 Thread Jonathan Locke


I think it depends on several things:

 - How complex is your UI?
 - How good are you with objects?
 - How many reusable pieces do you have from old Wicket projects?

On a very complex project where I can reuse old code, I think I can get as
much as 4-5x over something like Struts (which, I admittedly have never
used, but do roughly understand). That means that on the right project I
think I could out-code a small team of Struts programmers (and I think the
other core devs and a lot of others on this list could do similarly). 

I've been wondering for a while how one might be able to arbitrage this
advantage in the markets for web development. In theory, if you really can
get 4-5x leverage against the right set of requirements and you produce
something that is also highly maintainable, it would be a bargain to the
client to pay 2-3x $/hr because the total cost would be lower.


Martin Sachs wrote:
 
 pI'm looking for a little comparison of the development-time for
 Applications in Wicket against other Technologies. /p
 p
 I think the development with Wicket is two times faster than Struts. But
 what are your experiences on JSF, Rails/Grails, SpringMVC/SpringWebFlow.
 /p
 Anyone you know the development-time from experience ?
 br
 
 (P.S.: The applications must use AJAX and many custom components or tags
 in JSP, not just a hello world sample)
 

-- 
View this message in context: 
http://www.nabble.com/What-is-your-experience-on-the-time-of-development---tp20971605p21193436.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: Modal Window height

2008-12-28 Thread David Ojeda
Thanks Matej, that did it

On Sun, Dec 28, 2008 at 9:30 PM, Matej Knopp matej.kn...@gmail.com wrote:

 Hi,

 try modalwindow.setUseInitialHeight(false);

 -Matej

 On Sat, Dec 27, 2008 at 9:39 PM, David Ojeda dojeda-l...@integra.la
 wrote:
  Hello all,
 
  I am using a modal window with a panel inside. I would like the modal
 window
  to have the same height of my panel, so I was wondering if anyone has
 been
  able to do this. Apparently, I can only set the height to specific
  int-values, rather than auto.
  I am using wicket and wicket-extensions 1.3.5
 
  Best regards,
  David
 



Checkboxes validator

2008-12-28 Thread Eyal Golan
Hi,
I created a small validator and would like to share it with you all.
If there is already something like that, I will appreciate if someone direct
me to it.
This is a From Validator.
If you have several checkboxes in a form and you want that *at least* one
checkbox to be selected, you can use this validator.

Here is the code:

public class CheckboxesSelectValidator extends AbstractFormValidator {

private static final long serialVersionUID = -5475763159946590330L;
/** form components to be checked. */
private final CheckBox[] components;
private final String optionsMessage;

public CheckboxesSelectValidator(CheckBox[] components, String
optionsMessage) {
this.components = components;
this.optionsMessage = optionsMessage;
}

public FormComponent[] getDependentFormComponents() {
return components;
}

/**
 * At least one check box should be checked
 */
public void validate(Form form) {
for (CheckBox component : components) {
if (((Boolean) component.getConvertedInput()).booleanValue()) {
return;
}
}
error(components[0]);
}

@SuppressWarnings(unchecked)
@Override
protected Map variablesMap() {
Map args = new HashMap(1);
args.put(options, optionsMessage);
return args;
}
}

Here is a sample usage:
masterConfCheckbox.getForm().add(
new CheckboxesSelectValidator(new CheckBox[] {
masterConfCheckbox,
modelconfCheckbox },
getString(Reports.Parameters.validator.configuration)));

And this is the error message (taken from the properties file):

CheckboxesSelectValidator = Please select at least one option from
${options}.

Any remarks will be appreciated as well.


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: Default Focus Behavior?

2008-12-28 Thread Jonathan Locke


I have a really elegant solution to this problem that is general enough to
go in core or extensions eventually (solves all of the above problems).

Actually, I'm putting together a short, but action-packed book called
Twenty-Six Wicket Tricks and the code for this problem is going to be
trick F (i'm halfway through the alphabet already). If anyone really
desperately wants this and they promise to give me feedback on it, they can
email me.


Antony Stubbs wrote:
 
 Why not put this code into Wicket?
 
 
 jwcarman wrote:
 
 On 3/11/08, Martijn Dashorst martijn.dasho...@gmail.com wrote:
 I suggest wiki.

 
 Done:
 
 http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component
 
 I'm happy now.  My work (no matter how trivial) may help someone
 someday! :)  I don't have time to do so now, but I might add in some
 examples on how to do focus on errors, etc.
 
 -
 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/Default-Focus-Behavior--tp15934889p21194288.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: Using the org.apache.wicket.jmx MBeans with WebSphere

2008-12-28 Thread shetc

OK, finally figured it out. As it is explained in the
org.apache.wicket.jmx.Initializer Java API doc,
I need to set either one of these 2 JVM system properties:

wicket.mbean.server.agentid=WebSphere

or

wicket.mbean.server.class=com.ibm.ws.management.PlatformMBeanServer
-- 
View this message in context: 
http://www.nabble.com/Using-the-org.apache.wicket.jmx-MBeans-with-WebSphere-tp21188288p21194860.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: InstanceAlreadyExistsException when Redeploying in Websphere

2008-12-28 Thread shetc

Was a JIRA ever opened for this issue? I'm seeing the same problem in my
WebSphere setup.
Plus, it appears that my app then fails with 

WicketRuntimeException: signin is already mounted for
BookmarkablePageEncoder
-- 
View this message in context: 
http://www.nabble.com/InstanceAlreadyExistsException-when-Redeploying-in-Websphere-tp15617038p21195105.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: extra 'onclick' is generated for an image wrapped by a link

2008-12-28 Thread Doug Donohoe

This behavior is in 1.4-m3 and is new.  I was running 1.4-m2 and a
wicket:link around an a/img combo did the expected thing (see the current
http://online.ddpoker.com/ for an example - the rss image links).

I agree that this is wrong.

-Doug


Trent Larson wrote:
 
 I have the following plain HTML where I want an image to be a link to
 another Wicket-managed page:
 
 wicket:link ProductPage.html  ../images/products_welcome.jpg 
 /wicket:link
 
 
 The link for that page is generated fine, but then Wicket adds an
 'onclick'
 event to the 'img' tag that takes the user directly to the image:
 
 wicket:link ?wicket:bookmarkablePage=:com.max.web.page.ProductPage 
 ../images/products_welcome.jpg  /wicket:link
 
 This seems absolutely wrong.  The result is that a click on the image will
 take users to directly to that image; sometimes it will then continue on
 to
 the right (ProductPage) page, so users see the image by itself before
 going
 to the right page, but often it just stops at the image.
 
 There is no Java code associated with this.  I get it in 1.4-rc1 (as well
 as
 1.4-m3).
 
 What is happening, and how can I stop it from generating the 'onclick'
 javascript?  Thanks!
 
 Trent
 
 

-- 
View this message in context: 
http://www.nabble.com/extra-%27onclick%27-is-generated-for-an-image-wrapped-by-a-link-tp20980894p21195414.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: [GMAP2] how to add float Panel

2008-12-28 Thread Sven Meier
Use absolute CSS positioning to let your panel float over the GMap2 
component.||

|
|Sven

NHSoft.YHW schrieb:

my requirement desc:
1.add a float panel component at top left corner of the GMAP2, when the map
zoom in or zoom out, the panel alway show at top left corner.
2.adjust panel transparency,  so user can see map image behind the panel.

so i want to know how to code in GMAP2. thanks.



  



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



FormComponent cookie persistent issue

2008-12-28 Thread Murat YĆ¼cel
Hi All

I have a strange problem with persisting form component values.

In my project i have a SignInPanel. The SignInPanel has a rememberMe
checkbox. If the checkbox is
checked then the values will get persisted in a cookie. This part is working
very well if the user doesnt
login from a mounted bookmarkable page.
If the user login from a mounted bookmarkable page, then i can see that the
value is saved by calling
the CookieValuePersister, but on load the values are gone again.

I have made a simple quickstart project and i am seing the same behaviour
here. Am I missing something?
Why doesnt cookie persist work for a mounted bookmarkable page?

Hope that you can help.

Kind regards

/Murat


Dynamically show and edit a textarea in a table

2008-12-28 Thread Claudio Miranda

I need to dynamically show a textarea in a row of a table. 
The textarea should only be displayed if the user wants to, as he needs to
click at some link.
I developed 2 tests using an AjaxEditableMultiLineLabel and a not visible
textarea. See the runnable code below, to take a look at.

The wicket id is: rejectComment1 and rejectComment2

HTML Code (lines 53 and 60,61)
http://pastebin.com/m2492afac

Java Code (lines 33 and 48)
http://pastebin.com/m490aa72b

But none of them works!

If I click at any of them, the textarea is not displayed.

Are there issues to use them inside a table ?

My system: 
Wicket 1.4 RC1
Firefox 3.0.4
Glassfish v2 ur2
Java 6 u11


Thanks !

Claudio Miranda

-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Dynamically-show-and-edit-a-textarea-in-a-table-tp21197799p21197799.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: Dynamically show and edit a textarea in a table

2008-12-28 Thread Claudio Miranda

To let you know, the AjaxEditableMultiLineLabel.onEdit and
AjaxFallbackLink.onClick are called and debug messages logged.

Tried with wicket 1.3.5, same results, no textarea displayed.



Claudio Miranda wrote:
 
 I need to dynamically show a textarea in a row of a table. 
 The textarea should only be displayed if the user wants to, as he needs to
 click at some link.
 I developed 2 tests using an AjaxEditableMultiLineLabel and a not visible
 textarea. See the runnable code below, to take a look at.
 
 The wicket id is: rejectComment1 and rejectComment2
 
 HTML Code (lines 53 and 60,61)
 http://pastebin.com/m2492afac
 
 Java Code (lines 33 and 48)
 http://pastebin.com/m490aa72b
 
 But none of them works!
 
 If I click at any of them, the textarea is not displayed.
 
 Are there issues to use them inside a table ?
 
 My system: 
 Wicket 1.4 RC1
 Firefox 3.0.4
 Glassfish v2 ur2
 Java 6 u11
 


-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Dynamically-show-and-edit-a-textarea-in-a-table-tp21197799p21198096.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: extra 'onclick' is generated for an image wrapped by a link

2008-12-28 Thread Jeremy Thomerson
This is not a real great idea for refactoring, etc, but it's your call.

On Fri, Dec 12, 2008 at 5:12 PM, Trent Larson tr...@trentlarson.com wrote:

 BTW, I don't want our UI team to have to add a component every time they
 add
 a link, so I'll try to avoid Wicket links altogether and have them use raw
 links like ?wicket:bookmarkablePage=:Page (or maybe play with URL
 mounting).




 On Fri, Dec 12, 2008 at 11:23 AM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:

   dont use wicket:link, use bookmarkablepagelink component instead.
 
  -igor
 
  On Fri, Dec 12, 2008 at 10:19 AM, Trent Larson larsontr...@gmail.com
  wrote:
   I have the following plain HTML where I want an image to be a link to
   another Wicket-managed page:
  
   wicket:linka href=ProductPage.htmlimg
   src=../images/products_welcome.jpg border=0/a/wicket:link
  
  
   The link for that page is generated fine, but then Wicket adds an
  'onclick'
   event to the 'img' tag that takes the user directly to the image:
  
   wicket:linka
   href=?wicket:bookmarkablePage=:com.max.web.page.ProductPageimg
   src=../images/products_welcome.jpg border=0
   onclick=window.location.href='../images/products_welcome.jpg';return
   false;/a/wicket:link
  
   This seems absolutely wrong.  The result is that a click on the image
  will
   take users to directly to that image; sometimes it will then continue
 on
  to
   the right (ProductPage) page, so users see the image by itself before
  going
   to the right page, but often it just stops at the image.
  
   There is no Java code associated with this.  I get it in 1.4-rc1 (as
 well
  as
   1.4-m3).
  
   What is happening, and how can I stop it from generating the 'onclick'
   javascript?  Thanks!
  
   Trent
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 




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


Re: Dynamically generating an img tag

2008-12-28 Thread Jeremy Thomerson
Or use a WebMarkupContainer and an AttributeModifier.  Wrap this in your own
class so you're not writing HTML in your Java code.  Then your links are
actually in your HTML (except the SRC which gets generated in code) and your
designers can stylize the links etc.  Much better IMHO.

Something like:
 public class MyLink extends WebMarkupContainer {
private static final long serialVersionUID = 1L;
public MyLink(String id, IModelString model) {
super(id);
add(new AttributeModifier(src, true, model));
}
}
In your HTML:
a href=# class=yourClass wicket:id=yourIDyour text/a

It doesn't abuse Label this way, and is much more in line with the standard
Wicket way.

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




On Sun, Dec 28, 2008 at 12:07 AM, Jan Kriesten
kries...@mail.footprint.dewrote:


 Hi Cristina,

  Java:
 
  // prefix and sufix hold the start and end of the img tag
  String imgTag = prefix + getImgURL() + sufix;
  add(new Label(imgDisplay, imgTag));

 try:

 add(new Label(imgDisplay, imgTag).setEscapeModelStrings(false));

 Best regards, --- Jan.


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




Re: Dynamically generating an img tag

2008-12-28 Thread Cristina

Thanks Jeremy, Jonathan and Jan.

Jan, I've tried your suggestion and it works as expected... :-) Still,
Jeremy is right when he defends a cleaner solution. I'll try his suggestion
as well.

The Wicket API for Google Charts seems very interesting, Jonathan. I'm
already using charts4j to encode the chart... It's an interesting project,
too. Please see:

 http://code.google.com/p/charts4j/

Best regards,

Cristina



Jeremy Thomerson-5 wrote:
 
 Or use a WebMarkupContainer and an AttributeModifier.  Wrap this in your
 own
 class so you're not writing HTML in your Java code.  Then your links are
 actually in your HTML (except the SRC which gets generated in code) and
 your
 designers can stylize the links etc.  Much better IMHO.
 
 [...]
 

-- 
View this message in context: 
http://www.nabble.com/Dynamically-generating-an-img-tag-tp21190259p21199079.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: Dynamically show and edit a textarea in a table

2008-12-28 Thread Heikki Uotinen
Hi,

if you put extra div around textarea and add it to the target it should work


final TextArea rejectComment2 = new TextArea(rejectComment2, new 
Model(aaa));
rejectComment2.setEnabled(false);
rejectComment2.setVisible(false);
rejectComment2.setOutputMarkupId(true);

final WebMarkupContainer rejectComment2Div = new 
WebMarkupContainer(rejectComment2Div);
rejectComment2.setOutputMarkupId(true);

final AjaxFallbackLink enableRejectComment = new 
AjaxFallbackLink(enableRejectComment, new Model(
Enable comment textarea )) {

@Override
public void onClick(AjaxRequestTarget target)
{
rejectComment2.setEnabled(true);
rejectComment2.setVisible(true);
target.addComponent(rejectComment2Div);
log.debug(AjaxFallbackLink  onClick);
}
};

item.add(rejectComment1);

rejectComment2Div.add(rejectComment2);
item.add(rejectComment2Div);



-Heikki


-Original Message-
From: Claudio Miranda [mailto:clau...@claudius.com.br] 
Sent: 29. joulukuuta 2008 3:50
To: users@wicket.apache.org
Subject: Re: Dynamically show and edit a textarea in a table


To let you know, the AjaxEditableMultiLineLabel.onEdit and
AjaxFallbackLink.onClick are called and debug messages logged.

Tried with wicket 1.3.5, same results, no textarea displayed.



Claudio Miranda wrote:
 
 I need to dynamically show a textarea in a row of a table. 
 The textarea should only be displayed if the user wants to, as he needs to
 click at some link.
 I developed 2 tests using an AjaxEditableMultiLineLabel and a not visible
 textarea. See the runnable code below, to take a look at.
 
 The wicket id is: rejectComment1 and rejectComment2
 
 HTML Code (lines 53 and 60,61)
 http://pastebin.com/m2492afac
 
 Java Code (lines 33 and 48)
 http://pastebin.com/m490aa72b
 
 But none of them works!
 
 If I click at any of them, the textarea is not displayed.
 
 Are there issues to use them inside a table ?
 
 My system: 
 Wicket 1.4 RC1
 Firefox 3.0.4
 Glassfish v2 ur2
 Java 6 u11
 


-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Dynamically-show-and-edit-a-textarea-in-a-table-tp21197799p21198096.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