Re: RadioChoice - what's wrong?

2010-10-08 Thread Zeldor

186 is System.out.println(_numbers);
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.html
Sent from the Users forum 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: RadioChoice - what's wrong?

2010-10-08 Thread Igor Vaynberg
in that case either your System or your System.out is null :)

-igor

On Thu, Oct 7, 2010 at 11:35 PM, Zeldor pgronkiew...@gmail.com wrote:

 186 is System.out.println(_numbers);
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.html
 Sent from the Users forum 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: RadioChoice - what's wrong?

2010-10-08 Thread Zeldor

Well, _numbers is null :) That's why I wonder what's wrong with getting the
ObjectModel - I must be doing smth wrong there :)

On Fri, Oct 8, 2010 at 8:43 AM, Igor Vaynberg-2 [via Apache Wicket] 
ml-node+2967914-1064517663-152...@n4.nabble.comml-node%2b2967914-1064517663-152...@n4.nabble.com
 wrote:

 in that case either your System or your System.out is null :)

 -igor

 On Thu, Oct 7, 2010 at 11:35 PM, Zeldor [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967914i=0
 wrote:

 
  186 is System.out.println(_numbers);
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.htmlhttp://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.html?by-user=t

  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2967914i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2967914i=2
 
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967914i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967914i=4



 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967914.html
 To unsubscribe from RadioChoice - what's wrong?, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=2967576code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwyOTY3NTc2fC0xMTUwMjA4NDM=.




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967920.html
Sent from the Users forum 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: RadioChoice - what's wrong?

2010-10-08 Thread Igor Vaynberg
if number is null it will just print null

-igor

On Thu, Oct 7, 2010 at 11:49 PM, Zeldor pgronkiew...@gmail.com wrote:

 Well, _numbers is null :) That's why I wonder what's wrong with getting the
 ObjectModel - I must be doing smth wrong there :)

 On Fri, Oct 8, 2010 at 8:43 AM, Igor Vaynberg-2 [via Apache Wicket] 
 ml-node+2967914-1064517663-152...@n4.nabble.comml-node%2b2967914-1064517663-152...@n4.nabble.com
 wrote:

 in that case either your System or your System.out is null :)

 -igor

 On Thu, Oct 7, 2010 at 11:35 PM, Zeldor [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967914i=0
 wrote:

 
  186 is System.out.println(_numbers);
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.htmlhttp://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.html?by-user=t

  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2967914i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2967914i=2
 
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967914i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967914i=4



 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967914.html
 To unsubscribe from RadioChoice - what's wrong?, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=2967576code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwyOTY3NTc2fC0xMTUwMjA4NDM=.




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967920.html
 Sent from the Users forum 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



Testing concurrant updates on database

2010-10-08 Thread CREMONINI Daniele
Hi everybody,

My problem is I have to test a Page that should prevent lost updates via 
optimistic lock checking.

I resolved the problem using JPA optimistic lock and if I use two different 
browsers then the Page works in the desired way.

The problem comes in the test phase: to emulate two concurrent sessions I would 
instantiate two pages accessing to the same object (record) on the database 
this way having two sessions that I will call A and B.
Then on the session A I update and save (everything is expected to be correct), 
then on session B I update and save (an exception is expected to be thrown).

My approach might be

final WicketTester.DummyWebApplication testWebApplication1 = new 
WicketTester.DummyWebApplication() ...
final WicketTester.DummyWebApplication testWebApplication2 = new 
WicketTester.DummyWebApplication() ...

...

tester1 = new MyAppWicketTester(testWebApplication);
tester2 = new MyAppWicketTester(testWebApplication);

tester1.startPage(new ITestPageSource() ...
tester2.startPage(new ITestPageSource() ...

but as soon as run the complete set of test anything blow up.

Do you have any suggestion?
Thanks
Daniele Cremonini


Customizing the Datepicker for a background mask

2010-10-08 Thread amigo

Hi,

I have used the datepicker component in my application and it works great.
But currently when I click the icon attached with the datetextfield, it
opens up the datepicker, and if I click on a text box or anyother form
element outside the calendar, the popup remains opens still open and allows
the user to do operations on the background elements in the page.  I would
seriously like to solve this issue, by either using any functions already
available in the jar or by customizing it to a new class. Any pointers on
how to achieve this would be greatly appreciated.  My requirement would be
either to mask the background as in a modal window, or close the datepicker
upon clicking outside it.
Please help.

Thanks in advance,
Amigo

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customizing-the-Datepicker-for-a-background-mask-tp2967939p2967939.html
Sent from the Users forum 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



Nice URL for non-bookmarkable page

2010-10-08 Thread fadeyev

In my onSubmit handler I have a statement:

setResponsePage(new AfterPaymentPage(payment));

Where payment is an object of the Payment class, so AfterPaymentPage is
non-bookmarkable

AfterPaymentPage opens with url looking like this: 
applicationcontext/?wicket:interface=:3::

Is there any way (by fiddling with url coding strategies or smth like that)
to insert the word thankyou in the url?
applicationcontext/thankyou?wicket:interface=:3::
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nice-URL-for-non-bookmarkable-page-tp2967886p2967886.html
Sent from the Users forum 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



displaying error messages on respective panel

2010-10-08 Thread Ben

I have 3 panels on a page, all 3 panels also have form in them. 
And I have a wicket form wrapping all 3 panels. 
On panel3 I have a submit button and in that submit logic I am validating
panel 1 and panel 2 components. As I have the submit logic in panel3 the
error messages are being displayed in panel3. 
But I want the error messages on the corresponding panels. 
eg. when I click the submit button on panel 3, if there are any validation
errors on panel 1 then the error message should be displayed on the panel 1. 
How can i achieve this. 

Thanks, 
Ben 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/displaying-error-messages-on-respective-panel-tp2967989p2967989.html
Sent from the Users forum 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: Bean injection

2010-10-08 Thread Daniel Stoch
On Thu, Oct 7, 2010 at 5:47 PM, Mauro Ciancio maurocian...@gmail.com wrote:

 It's not so important, but I can't figure out why I have the same bean
 instance, taking into account that the page is serialized at the end
 of the request and the inyected bean is actually a proxy of the bean,
 so no real bean is in the serialization.

 I've double checked it, and the _same_ bean instance is holded in my
 page en each request to the same page.

 Shouldn't the bean get relocated after serialization?


Yes: after deserialization :). And yes: after deserialization of
yout page version this bean is relocated from Spring again. You can
chcek this: go to the previous page version by clicking back button
and press refresh button (if page is cached in a browser). Then you
can see that a new bean instance is created. When you stays on the
same page and clicking statefull links this page is not deserialized
(correct me if I am wrong).

--
Daniel

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



RE: Wicket site on Android phone

2010-10-08 Thread Chris Colman
The Android market is going through spectacular growth at the moment.
It's going bezerk!

http://blogs.wsj.com/digits/2010/10/05/the-rise-of-android-what-does-it-
mean-for-apple-users/

The fact that it supports Flash and that its apps are written in Java
instead of Objective C like the iPhone (last I heard of that language
was in 1989!) made it extremely attractive to me but even without
writing specific Android apps the fact that it has a proper browser
means that wicket powered sites around the world will start to get
visited, a lot, by yet another browser type. They've also found that
Andtroid users, on average, pull down 25% more data per month on their
iPhone cousins - apparently they're a lot more tech savvy crowd - less
'Angry Birds' and more ServerSide etc.,

Coming from Java world my knowledge of JavaScript is very limited so I
don't know how helpful I'll be in debugging the Javascript as executed
on a Webkit/Android browser.

If anyone else out there has a wicket website and an Android phone I'd
like to know if you experience some of the problem I did. It only
appears to affect JavaScript - standard HTML form submission seems fine
- as expected.

- Chris

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Friday, 8 October 2010 12:06 AM
To: users@wicket.apache.org
Subject: Re: Wicket site on Android phone

I guess it is some WebKit related Javascript issues.
Don't know how hard is to debug them but if you manage - send us a
patch ;-
)

On Thu, Oct 7, 2010 at 2:03 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 I've just picked up a new Android phone (HTC Desire - awesome phone
BTW)
 and most of our wicket powered site works well. There are two issues
 which maybe just me not knowing how to use the phone properly or they
 may be issues with the Webkit based browser on those things:
 1.  I haven't been able to grab the caption on modal windows in
 order to drag them around on the screen. Being a 'touch' based
paradigm
 maybe there is no such thing as a 'grab'.
 2.  Clicking the OK button on a modal window doesn't seem to have
 any effect - the modal stays open.
 I have only had the phone for a couple of days so the issues could be
 all me - not knowing how to perform the above operations - if anyone
has
 some enlightenment, please let me know.



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



Re: displaying error messages on respective panel

2010-10-08 Thread vov

new FeedbackPanel(feedback, new ContainerFeedbackMessageFilter(form)
{
  @Override
  public boolean accept(FeedbackMessage message)
  {
return {Your code};
  }
});
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/displaying-error-messages-on-respective-panel-tp2967989p2968037.html
Sent from the Users forum 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: Wicket 1.5 Ajax issue?

2010-10-08 Thread nino martinez wael
ticket with quickstart :

https://issues.apache.org/jira/browse/WICKET-3101

2010/10/5 Martin Grigorov mgrigo...@apache.org

 Hi Nino,

 If there is an error then Wicket will show either the configured
 InternalErrorPage in DEPLOYMENT mode or the developer friendly page with
 the
 details for the error. This is valid for both Ajax and non-Ajax requests.
 If this is not the case then please create a ticket.

 On Tue, Oct 5, 2010 at 2:52 PM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

  Dug some deeper, and it turns out that there was something different
  that threw an exception causing problems..
 
  I guess it would be nice if the user was somehow alerted that he had a
  broken session somehow, but cant figure out if it's wickets
  responsibility or the applications..
 
  -Nino
 
  2010/10/2 nino martinez wael nino.martinez.w...@gmail.com:
   Im trying to reproduce atm, but so far not having any luck with a
   clean archetype.. I'll dig some more into it monday..
  
   2010/10/1 Martin Grigorov mgrigo...@apache.org:
   ticket please
+ quckstart ;-)
  
   On Fri, Oct 1, 2010 at 11:59 AM, nino martinez wael 
   nino.martinez.w...@gmail.com wrote:
  
   Forgot to show that I of course did set these:
  
  webMarkupContainer.setOutputMarkupId(true);
  
  webMarkupContainer.setOutputMarkupPlaceholderTag(true);
  
  
   2010/10/1 nino martinez wael nino.martinez.w...@gmail.com:
Hi
   
I've possibly encountered an issue with the
AjaxSelfUpdatingTimerBehavior. Suddently Ajax stops working, a
  browser
refresh fixes the problem. If you need more details please tell.
   
Snip from code:
   webMarkupContainer.add(new
   AjaxSelfUpdatingTimerBehavior(Duration
   .seconds(2)));
   
   
Cut from Console:
   
11:24:36.561 [31116...@qtp-11596093-2 -
   
  /wicket/page?0-1.IBehaviorListener.0-containerrandom=0.5862126137481692]
DEBUG o.a.w.page.PageAccessSynchronizer - 31116...@qtp-11596093-2-
   
  /wicket/page?0-1.IBehaviorListener.0-containerrandom=0.5862126137481692
acquired lock to page 11
11:24:36.561 [31116...@qtp-11596093-2 -
   
  /wicket/page?0-1.IBehaviorListener.0-containerrandom=0.5862126137481692]
ERROR o.a.w.request.cycle.RequestCycle - Error during processing
  error
message
java.lang.IllegalStateException: Header was already written to
  response!
   at
  
 
 org.apache.wicket.protocol.http.HeaderBufferingWebResponse.checkHeader(HeaderBufferingWebResponse.java:62)
   at
  
 
 org.apache.wicket.protocol.http.HeaderBufferingWebResponse.setDateHeader(HeaderBufferingWebResponse.java:131)
   at
  
 
 org.apache.wicket.protocol.http.BufferedWebResponse$SetDateHeaderAction.invoke(BufferedWebResponse.java:193)
   at
  
 
 org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:439)
   at
  
 
 org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:203)
   at
  
 
 org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:147)
   at
  
 
 org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:279)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:288)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:232)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:259)
   at
  
 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:131)
   at
  
 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:184)
   

page over HTTP with sign in panel over HTTPs

2010-10-08 Thread Melinda Dweer
Hi,

I has the following use case: I have some public pages (should be served
over HTTP)  containing a sign in panel which must be submitted over HTTPs.
I have though of doing this as follows:

-use an iframe to host the sign in panel: actually it would be a page
served over HTTPs to the iframe.
-once the user signs in serve a page to the iframe that contains JavaScript
to get parent page to be redirected to the private area (served over HTTPs).

I do not tried the above but I assume it might work. My question is if there
is a cleaner/cleverer way to do this in wicket?

Thanks in advance,

Melinda


Re: wicket 1.5, css resourcereference from string?

2010-10-08 Thread nino martinez wael
Has someone an idea?

I am just trying to read a custom css from a string and render it as a
reference on the page.

Do I need to register the reference somewhere or sormething?

2010/10/7 nino martinez wael nino.martinez.w...@gmail.com

 Hi

 I cant get below working:

 public void renderHead(IHeaderResponse response) {
  super.renderHead(response);
 if (wallboardConfigurationModel.getObject().hasCustomCss()) {
  final StringResourceStream stringResourceStream = new
 StringResourceStream(
 wallboardConfigurationModel.getObject().getCustomCss(),
  text/css);

 ResourceReference resourceReference = new ResourceReference(
  wallboardConfigurationModel.getObject().getId()) {
 @Override
 public IResource getResource() {
  return new ResourceStreamResource(stringResourceStream);
 }
 };
  response.renderCSSReference(resourceReference);

 }
 }

 I get this out put in the log:

 010-10-07 15:33:57,555 WARN
  [org.apache.wicket.request.resource.ResourceReferenceRegistry]  - Asked to
 auto-create a ResourceReference, but
 ResourceReferenceRegistry.createDefaultResourceReference() return null.
  [scope: org.apache.wicket.Application; name: test1; locale: null; style:
 null; variation: null]
 2010-10-07 15:33:57,555 ERROR
 [org.apache.wicket.request.cycle.RequestCycle]  - Unable to execute request.
 No suitable RequestHandler found.
 URL=wicket/resource/org.apache.wicket.Application/test1




Re: Bean injection

2010-10-08 Thread James Carman
On Fri, Oct 8, 2010 at 4:30 AM, Daniel Stoch daniel.st...@gmail.com wrote:

 Yes: after deserialization :). And yes: after deserialization of
 yout page version this bean is relocated from Spring again. You can
 chcek this: go to the previous page version by clicking back button
 and press refresh button (if page is cached in a browser). Then you
 can see that a new bean instance is created. When you stays on the
 same page and clicking statefull links this page is not deserialized
 (correct me if I am wrong).


Yes, the most recent version of the page is kept in the session
(in-memory most likely).

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



Re: Testing concurrant updates on database

2010-10-08 Thread James Carman
What exactly are you trying to test?  Are you trying to test the
optimistic locking?  You didn't write that.  If you want to test that
you actually have optimistic locking turned on, then you can do that
by checking the metadata.

On Fri, Oct 8, 2010 at 3:27 AM, CREMONINI Daniele
daniele.cremon...@ext.efsa.europa.eu wrote:
 Hi everybody,

 My problem is I have to test a Page that should prevent lost updates via 
 optimistic lock checking.

 I resolved the problem using JPA optimistic lock and if I use two different 
 browsers then the Page works in the desired way.

 The problem comes in the test phase: to emulate two concurrent sessions I 
 would instantiate two pages accessing to the same object (record) on the 
 database this way having two sessions that I will call A and B.
 Then on the session A I update and save (everything is expected to be 
 correct), then on session B I update and save (an exception is expected to be 
 thrown).

 My approach might be

 final WicketTester.DummyWebApplication testWebApplication1 = new 
 WicketTester.DummyWebApplication() ...
 final WicketTester.DummyWebApplication testWebApplication2 = new 
 WicketTester.DummyWebApplication() ...

 ...

 tester1 = new MyAppWicketTester(testWebApplication);
 tester2 = new MyAppWicketTester(testWebApplication);

 tester1.startPage(new ITestPageSource() ...
 tester2.startPage(new ITestPageSource() ...

 but as soon as run the complete set of test anything blow up.

 Do you have any suggestion?
 Thanks
 Daniele Cremonini


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



calculated columns in a pivot table

2010-10-08 Thread Ivana Cace
Hi list,
This isnt so much a question, it's more that i'd like to hear your
thoughts on the following.
I'm making an webapp that shows a number of pivot tables or
crosstables. Most repeaters are made for showing a list of objects,
where each row is one object. While in a crosstab there is no
connection between the values in one row except that they have the
same y-coordinate.
So to make things easier for myself and to have the webcomponents
better reflect the nature of my data, i have used Loop() drawing on
this: 
https://cwiki.apache.org/WICKET/how-to-work-with-excel-in-wicket-using-jexcel-api.html.
The object that holds my data has methods to add a value (put(Pair
coordinates, Number value)), to retrieve a value given the coordinates
and to get the domain (= the rows and columns or distinct x and y
values if you will).

So now in addition to the raw data i want some tables to show totals,
averages, and some other computed columns.
I'm wondering what would be a good place to do this. Add them to the
modelobject (the dataobject) in the panel that shows the table? Only
add the extra columns to the table? I'm thinking that in the future i
might give users the option to show or hide these computed columns.

cheers

Ivana

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



Re: displaying error messages on respective panel

2010-10-08 Thread Ben

Thanks for your reply.

But I am displaying my own custom error messages reading from some other
file.
In this case how can i achieve that.

Thanks,
Ben

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/displaying-error-messages-on-respective-panel-tp2967989p2968235.html
Sent from the Users forum 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: wicket and ext-js

2010-10-08 Thread Fabio Fioretti
Hi Frank,

Sorry for the late reply. We are currently migrating our main
application from Wicket 1.3 to 1.4 and contextually upgrading
ext-wicket. This might eventually be the right occasion to update the
project, though we are still targetting Ext 2.2.

With regard to behaviors and components, we felt it was useful to keep
them separate in spite of a small overhead, as it is always easy to
merge them but much more complicated to extract a behavior from a
component. Anyway, ext-wicket was born to help up support Ext-JS
components we found interesting for our applications, and not to
provide a clean and complete mapping of Ext features into Wicket.
Therefore, its architecture is far from perfect!

Is your integration effort moving forward?

Kind regards,
Fabio


On Wed, Sep 29, 2010 at 4:43 PM, Frank van Lankvelt
f.vanlankv...@onehippo.com wrote:
 hi Fabio,

 good to hear it is in active use and development!  There might be more users
 than you think; perhaps you can get them to voice their enthousiasm.  Might
 help to find the time to publish the changes?

 Concerning your example, some behaviors are definitively offered best as
 actual wicket behaviors.  Tooltips, data stores, other services you need
 from the client.  But I still wonder whether that justifies the overhead,
 considering the large number of components.  Are there other motivations
 like, I could imagine, needing to subclass the FormComponent to be able to
 participate in form processing?

 thanks, Frank

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



Re: multiple html pages to 1 class

2010-10-08 Thread Altuğ Bilgin Altıntaş
Thanks...

2010/10/8 Jeremy Thomerson jer...@wickettraining.com

 I forgot to include the URLs you should try in that quickstart:

 http://localhost:8080/example1
 http://localhost:8080/example1?template=red
 http://localhost:8080/example2
 http://localhost:8080/example2?template=red

 Here's the link to the quickstart again:

 http://apache-wicket.1842946.n4.nabble.com/file/n2967852/multitemplates.tar.gz

 Best regards,

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

 On Thu, Oct 7, 2010 at 11:26 PM, jer...@wickettraining.com 
 jer...@wickettraining.com wrote:

 
  Here is a quickstart that demonstrates two ways of accomplishing this.
   These
  are the ways that were previously suggested on this thread.  Please open
 it
  and try the following links, and submit the form on each to prove that
 the
  HTML template choice is persisted even after the url becomes unusable:
 
 
 
 http://apache-wicket.1842946.n4.nabble.com/file/n2967852/multitemplates.tar.gz
  multitemplates.tar.gz
 
  Jeremy Thomerson
  http://www.wickettraining.com
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/multiple-html-pages-to-1-class-tp2717304p2967852.html
  Sent from the Users forum 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: RadioChoice - what's wrong?

2010-10-08 Thread Zilvinas Vilutis
Oh come on! no one will want to steal your non-working code!

Use http://pastebin.com/ to show your code if you want someone's help ;)

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Thu, Oct 7, 2010 at 11:35 PM, Zeldor pgronkiew...@gmail.com wrote:

 186 is System.out.println(_numbers);
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.html
 Sent from the Users forum 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: Bean injection

2010-10-08 Thread Mauro Ciancio
Hi,

 Yes: after deserialization :). And yes: after deserialization of
 yout page version this bean is relocated from Spring again. You can
 chcek this: go to the previous page version by clicking back button
 and press refresh button (if page is cached in a browser). Then you
 can see that a new bean instance is created. When you stays on the
 same page and clicking statefull links this page is not deserialized
 (correct me if I am wrong).


 Yes, the most recent version of the page is kept in the session
 (in-memory most likely).

Wel, that explains the whole issue. If only if had known it before. :)
Thanks to all for the replies.
Regards.
-- 
Mauro Ciancio

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



Re: Bean injection

2010-10-08 Thread James Carman
On Fri, Oct 8, 2010 at 10:42 AM, Mauro Ciancio maurocian...@gmail.com wrote:

 Wel, that explains the whole issue. If only if had known it before. :)
 Thanks to all for the replies.
 Regards.
 -

For this particular use case (the current date), I would suggest you
just calculate that on-the-fly, not at bean creation time.  It's not
that expensive to calculate.

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



Re: page over HTTP with sign in panel over HTTPs

2010-10-08 Thread Martin Grigorov
See org.apache.wicket.protocol.https.HttpsRequestCycleProcessor

On Fri, Oct 8, 2010 at 11:44 AM, Melinda Dweer melinda.dw...@gmail.comwrote:

 Hi,

 I has the following use case: I have some public pages (should be served
 over HTTP)  containing a sign in panel which must be submitted over
 HTTPs.
 I have though of doing this as follows:

 -use an iframe to host the sign in panel: actually it would be a page
 served over HTTPs to the iframe.
 -once the user signs in serve a page to the iframe that contains JavaScript
 to get parent page to be redirected to the private area (served over
 HTTPs).

 I do not tried the above but I assume it might work. My question is if
 there
 is a cleaner/cleverer way to do this in wicket?

 Thanks in advance,

 Melinda



Re: Nice URL for non-bookmarkable page

2010-10-08 Thread Igor Vaynberg
make the page bookmarkable and mount it onto /thankyou url

-igor

On Thu, Oct 7, 2010 at 11:04 PM, fadeyev fade...@yandex.ru wrote:

 In my onSubmit handler I have a statement:

 setResponsePage(new AfterPaymentPage(payment));

 Where payment is an object of the Payment class, so AfterPaymentPage is
 non-bookmarkable

 AfterPaymentPage opens with url looking like this:
 applicationcontext/?wicket:interface=:3::

 Is there any way (by fiddling with url coding strategies or smth like that)
 to insert the word thankyou in the url?
 applicationcontext/thankyou?wicket:interface=:3::
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Nice-URL-for-non-bookmarkable-page-tp2967886p2967886.html
 Sent from the Users forum 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: displaying error messages on respective panel

2010-10-08 Thread Igor Vaynberg
see ContainerFeedbackMessageFilter, baically each panel has its own
feedback panel and they each use the filter to only display messages
from their respective children.

-igor

On Fri, Oct 8, 2010 at 1:09 AM, Ben benarje...@yahoo.com wrote:

 I have 3 panels on a page, all 3 panels also have form in them.
 And I have a wicket form wrapping all 3 panels.
 On panel3 I have a submit button and in that submit logic I am validating
 panel 1 and panel 2 components. As I have the submit logic in panel3 the
 error messages are being displayed in panel3.
 But I want the error messages on the corresponding panels.
 eg. when I click the submit button on panel 3, if there are any validation
 errors on panel 1 then the error message should be displayed on the panel 1.
 How can i achieve this.

 Thanks,
 Ben
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/displaying-error-messages-on-respective-panel-tp2967989p2967989.html
 Sent from the Users forum 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: wicket 1.5, css resourcereference from string?

2010-10-08 Thread Igor Vaynberg
what you are trying to do doesnt make sense, think about it.

how is wicket supposed to build a url to your anonymous reference instance?

you have two options, use renderCssReference(String url) to output the
url to your custom css or if you need to stream it from somewhere
inaccessible by the browser you can create a shared resource or a
servlet

-igor

On Fri, Oct 8, 2010 at 2:44 AM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Has someone an idea?

 I am just trying to read a custom css from a string and render it as a
 reference on the page.

 Do I need to register the reference somewhere or sormething?

 2010/10/7 nino martinez wael nino.martinez.w...@gmail.com

 Hi

 I cant get below working:

 public void renderHead(IHeaderResponse response) {
  super.renderHead(response);
 if (wallboardConfigurationModel.getObject().hasCustomCss()) {
  final StringResourceStream stringResourceStream = new
 StringResourceStream(
 wallboardConfigurationModel.getObject().getCustomCss(),
  text/css);

 ResourceReference resourceReference = new ResourceReference(
  wallboardConfigurationModel.getObject().getId()) {
 @Override
 public IResource getResource() {
  return new ResourceStreamResource(stringResourceStream);
 }
 };
  response.renderCSSReference(resourceReference);

 }
 }

 I get this out put in the log:

 010-10-07 15:33:57,555 WARN
  [org.apache.wicket.request.resource.ResourceReferenceRegistry]  - Asked to
 auto-create a ResourceReference, but
 ResourceReferenceRegistry.createDefaultResourceReference() return null.
  [scope: org.apache.wicket.Application; name: test1; locale: null; style:
 null; variation: null]
 2010-10-07 15:33:57,555 ERROR
 [org.apache.wicket.request.cycle.RequestCycle]  - Unable to execute request.
 No suitable RequestHandler found.
 URL=wicket/resource/org.apache.wicket.Application/test1




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



Re: page over HTTP with sign in panel over HTTPs

2010-10-08 Thread Igor Vaynberg
you can try tweaking the form so that its action is https, so

class httpsform extens form {
  oncomponenttag(tag) {
 super.oncomponenttag(tag);
 string action=tag.get(action);
 action=requestutils.toabsoluteurl(action);
 action=https+action.substring(4);
 tag.put(action, action);
  }}

-igor

On Fri, Oct 8, 2010 at 2:44 AM, Melinda Dweer melinda.dw...@gmail.com wrote:
 Hi,

 I has the following use case: I have some public pages (should be served
 over HTTP)  containing a sign in panel which must be submitted over HTTPs.
 I have though of doing this as follows:

 -use an iframe to host the sign in panel: actually it would be a page
 served over HTTPs to the iframe.
 -once the user signs in serve a page to the iframe that contains JavaScript
 to get parent page to be redirected to the private area (served over HTTPs).

 I do not tried the above but I assume it might work. My question is if there
 is a cleaner/cleverer way to do this in wicket?

 Thanks in advance,

 Melinda


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



RE: PropertyModel Not Refreshing

2010-10-08 Thread Shelli Orton
Hi,

I have been trying different things to see if I could get my code to work (and 
understand Wicket models better), but am still stuck.  I have a attached the 
(latest) panel class code which I hope is sufficient to help.

I was reading about different models (both online and the Wicket in Action 
book) and thought that perhaps using a CompoundPropertyModel was more 
appropriate and may help with my issues.  Originally, I only declared 
selectedRecordA (line 40) but didn't instantiate it.  The select group 
displayed properly but when I chose a record from the list and tried to edit 
it, this exception was thrown:

WicketMessage: Attempted to set property value on a null object. Property 
expression: recordA Value: Name=A-One
Root cause:

org.apache.wicket.WicketRuntimeException: Attempted to set property value 
on a null object. Property expression: recordA Value: Name=A-One
at 
org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:125)
at 
org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169)
at 
org.apache.wicket.Component.setDefaultModelObject(Component.java:3125)


I set breakpoints on the getSelectedRecordA and setSelectedRecordA methods, but 
these aren't called when during the request cycle when the edit button is 
clicked.

I then changed the class so that selectedRecordA is initialized to an empty 
instance of RecordA. This got rid of the above error.  However, I cannot save 
the edit changes because the selectedRecordA is still the empty instance that 
was created in the initialization and the persistence layer throws an 
exception.  This same problem exists if I try to add a new RecordA or try to 
delete an existing one.

If I choose to cancel the edit and then select another record to edit, I get 
the message You must select a record to edit (line 131).  This is because the 
cancel onSubmit sets selectedRecordA to null and choosing the record from the 
DDC is not setting it to the chosen record.

Clearly I am not setting up this CompoundPropertyModel properly so that the 
selectedARecord is set by the model.  Can someone tell me what I'm doing wrong?

All help is greatly appreciated,

Shelli


-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Thursday, October 07, 2010 11:27 AM
To: users@wicket.apache.org
Subject: Re: PropertyModel Not Refreshing

you have posted an incomplete piece of code and somehow from that we
are supposed to guess what is not working? create a quickstart and
provide that.

-igor

On Thu, Oct 7, 2010 at 10:15 AM, Shelli Orton shelli.or...@sjrb.ca wrote:
 Does nobody have any suggestions?  If I can't get this fixed, I'm going
 to have to write the app in another framework (possibly GWT) and I'd
 really rather not have to do that.

 Shelli

 -Original Message-
 From: Shelli Orton
 Sent: Wednesday, October 06, 2010 3:52 PM
 To: users@wicket.apache.org
 Subject: PropertyModel Not Refreshing

 Hi,

 First, thanks to all who have been helping me as I am new to Wicket.  I
 am splitting out two issues I am dealing with to try to keep things
 clear.

 I am trying to write a simple app that does CRUD operations on database
 records.  The goal is for the app to make use of a tab panel where each
 tab encapsulates one table from the database.  Each tab panel has two
 groups (WebMarkupContainer).  The first, selectGroup, displays a list
 (DDC) of the current items, and three buttons, add, edit and delete.
 The second, editGroup, is displayed when either the add or edit button
 was clicked on the select group, displays the record attributes and save
 and cancel buttons.  The tab panel has a selectedRecord which is used
 by both groups' components via PropertyModels. Very basic stuff.

 When I choose a record and click the edit button, the record is
 displayed in the edit group properly.  If I then choose cancel, the edit
 group is no longer displayed and the select group DDC selection is null
 as expected. I then choose another record from the list and click the
 edit button and the previous record information is displayed in the edit
 group even though the select group DDC shows the correct/selected
 record.

 This problem also occurs if I first choose to add a new record and then
 cancel the add and then choose to edit a different record.  The DDC
 shows the correct/selected record, but all the attributes in the edit
 group are null/defaults for a new record.

 If I remove the call to setDefaultFormProcessing(false) on the cancel
 button, selecting other records for edit works correctly, but I can't
 cancel a creating a new record if I use a RequiredTextField because the
 form validation fails.

 If I select a record for editing or save the newly created record, I can
 select a different record for edit or create another one correctly.  So
 I must be doing something wrong in the cancel logic. My editForm
 (created in the EditGroup 

Re: wicket 1.5, css resourcereference from string?

2010-10-08 Thread nino martinez wael
hmm right, could I just embed it in the html page then, I guess the answer
is yes?

I guess the reason I took this path was because of the
texttemplateresourcereference which seems to do something much like this.

regards Nino

2010/10/8 Igor Vaynberg igor.vaynb...@gmail.com

 what you are trying to do doesnt make sense, think about it.

 how is wicket supposed to build a url to your anonymous reference instance?

 you have two options, use renderCssReference(String url) to output the
 url to your custom css or if you need to stream it from somewhere
 inaccessible by the browser you can create a shared resource or a
 servlet

 -igor

 On Fri, Oct 8, 2010 at 2:44 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
  Has someone an idea?
 
  I am just trying to read a custom css from a string and render it as a
  reference on the page.
 
  Do I need to register the reference somewhere or sormething?
 
  2010/10/7 nino martinez wael nino.martinez.w...@gmail.com
 
  Hi
 
  I cant get below working:
 
  public void renderHead(IHeaderResponse response) {
   super.renderHead(response);
  if (wallboardConfigurationModel.getObject().hasCustomCss()) {
   final StringResourceStream stringResourceStream = new
  StringResourceStream(
  wallboardConfigurationModel.getObject().getCustomCss(),
   text/css);
 
  ResourceReference resourceReference = new ResourceReference(
   wallboardConfigurationModel.getObject().getId()) {
  @Override
  public IResource getResource() {
   return new ResourceStreamResource(stringResourceStream);
  }
  };
   response.renderCSSReference(resourceReference);
 
  }
  }
 
  I get this out put in the log:
 
  010-10-07 15:33:57,555 WARN
   [org.apache.wicket.request.resource.ResourceReferenceRegistry]  - Asked
 to
  auto-create a ResourceReference, but
  ResourceReferenceRegistry.createDefaultResourceReference() return null.
   [scope: org.apache.wicket.Application; name: test1; locale: null;
 style:
  null; variation: null]
  2010-10-07 15:33:57,555 ERROR
  [org.apache.wicket.request.cycle.RequestCycle]  - Unable to execute
 request.
  No suitable RequestHandler found.
  URL=wicket/resource/org.apache.wicket.Application/test1
 
 
 

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




Re: GridView for A-Symmetric tables - issues

2010-10-08 Thread Arjun Dhar

Hi,
 I've solved this problem by writing a new implementation of DataViewBase.
GridView did not seem appropriate to simply extend due to a few reasons. (It
assumes Symmetry for the most in its code).

This Code can merge areas within the GRID and extract data from the data
model accordingly and can be further customized for Assymetric Grids.

I want to sumit this code for review and then into the code base. What is
the process?
Note: This code was over 1.4.9 so I'll take the latest update to see if
there are any changes I need to factor in, but in the mean time lemme know!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-tp2953859p2968709.html
Sent from the Users forum 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: Integrating Separate Different Wicket Applications Into One

2010-10-08 Thread kugaprakash

Hi,
I am trying to solve similar problem as the Original Post.
Can you please share some details of your ideas that you done?
Much appreciated.
Best Regards

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Integrating-Separate-Different-Wicket-Applications-Into-One-tp1889319p2968802.html
Sent from the Users forum 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: GridView for A-Symmetric tables - issues

2010-10-08 Thread Igor Vaynberg
attach it to a jira issue, post the url back here

-igor

On Fri, Oct 8, 2010 at 9:57 AM, Arjun Dhar dhar...@yahoo.com wrote:

 Hi,
  I've solved this problem by writing a new implementation of DataViewBase.
 GridView did not seem appropriate to simply extend due to a few reasons. (It
 assumes Symmetry for the most in its code).

 This Code can merge areas within the GRID and extract data from the data
 model accordingly and can be further customized for Assymetric Grids.

 I want to sumit this code for review and then into the code base. What is
 the process?
 Note: This code was over 1.4.9 so I'll take the latest update to see if
 there are any changes I need to factor in, but in the mean time lemme know!
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-tp2953859p2968709.html
 Sent from the Users forum 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



Catching maxSize of fileUpload error

2010-10-08 Thread meduolis

Hello, is it possible to handle validation of maxSize of file upload
(FileUploadField)? I need something like this

onFileMaxSizeError() {
 someOtherField.error(someValidationMessage);
}

I hope someone understand what I want :D, if not, please let me know, i will
try to describe more accuretly.

Thanks in advance
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Catching-maxSize-of-fileUpload-error-tp2968831p2968831.html
Sent from the Users forum 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: RadioChoice - what's wrong?

2010-10-08 Thread Zeldor

Sure, but I posted pretty much everything related to radiochoice :) So I am
just not doing some obvious important steps for making RadioChoice work :)

Code, with all non-related parts removed, looks like that:

public class Registration extends WebPage {
public Registration() {
add(new FeedbackPanel(errorMsg));
   //New user registration form
FormString regForm = new FormString(registrationForm,
new ModelString()) {
static final ListString NUMBERS =
Arrays.asList(new String[] { 1, 2, 3 });

private RadioChoiceString rc;

{
RadioChoiceString rc = new
RadioChoiceString(numberRadioChoice, new ModelString(),
NUMBERS).setSuffix();
add(rc.setRequired(true));
}

@Override
public void onSubmit() {
   String _numbers = rc.getModelObject();
 System.out.println(_numbers);
 }
};
add(regForm);
}
}





On Fri, Oct 8, 2010 at 3:58 PM, Zilvinas Vilutis [via Apache Wicket] 
ml-node+2968370-862341428-152...@n4.nabble.comml-node%2b2968370-862341428-152...@n4.nabble.com
 wrote:

 Oh come on! no one will want to steal your non-working code!

 Use http://pastebin.com/ to show your code if you want someone's help ;)

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   [hidden email]http://user/SendEmail.jtp?type=nodenode=2968370i=0



 On Thu, Oct 7, 2010 at 11:35 PM, Zeldor [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2968370i=1
 wrote:

 
  186 is System.out.println(_numbers);
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.htmlhttp://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967903.html?by-user=t

  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2968370i=2
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2968370i=3
 
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2968370i=4
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2968370i=5

 
 nothing is impossible


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2968370.html
 To unsubscribe from RadioChoice - what's wrong?, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=2967576code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwyOTY3NTc2fC0xMTUwMjA4NDM=.




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2968833.html
Sent from the Users forum 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: Bean injection

2010-10-08 Thread Mauro Ciancio
 For this particular use case (the current date), I would suggest you
 just calculate that on-the-fly, not at bean creation time.  It's not
 that expensive to calculate.

Yes, I appreciate your suggestion. :)
Thanks James.
Regards.
-- 
Mauro Ciancio

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



Re: PropertyModel Not Refreshing

2010-10-08 Thread jcgarciam

The attachment didn't make it,

Can you try to extract out the relevant part and creates a quickstart
project that actually reproduces your issue?


On Fri, Oct 8, 2010 at 1:41 PM, Shelli Orton [via Apache Wicket] 
ml-node+2968688-305091622-65...@n4.nabble.comml-node%2b2968688-305091622-65...@n4.nabble.com
 wrote:

 Hi,

 I have been trying different things to see if I could get my code to work
 (and understand Wicket models better), but am still stuck.  I have a
 attached the (latest) panel class code which I hope is sufficient to help.

 I was reading about different models (both online and the Wicket in Action
 book) and thought that perhaps using a CompoundPropertyModel was more
 appropriate and may help with my issues.  Originally, I only declared
 selectedRecordA (line 40) but didn't instantiate it.  The select group
 displayed properly but when I chose a record from the list and tried to edit
 it, this exception was thrown:

 WicketMessage: Attempted to set property value on a null object.
 Property expression: recordA Value: Name=A-One
 Root cause:

 org.apache.wicket.WicketRuntimeException: Attempted to set property
 value on a null object. Property expression: recordA Value: Name=A-One
 at
 org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:125)

 at
 org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169)

 at
 org.apache.wicket.Component.setDefaultModelObject(Component.java:3125)
 

 I set breakpoints on the getSelectedRecordA and setSelectedRecordA methods,
 but these aren't called when during the request cycle when the edit button
 is clicked.

 I then changed the class so that selectedRecordA is initialized to an empty
 instance of RecordA. This got rid of the above error.  However, I cannot
 save the edit changes because the selectedRecordA is still the empty
 instance that was created in the initialization and the persistence layer
 throws an exception.  This same problem exists if I try to add a new RecordA
 or try to delete an existing one.

 If I choose to cancel the edit and then select another record to edit, I
 get the message You must select a record to edit (line 131).  This is
 because the cancel onSubmit sets selectedRecordA to null and choosing the
 record from the DDC is not setting it to the chosen record.

 Clearly I am not setting up this CompoundPropertyModel properly so that the
 selectedARecord is set by the model.  Can someone tell me what I'm doing
 wrong?

 All help is greatly appreciated,

 Shelli


 -Original Message-
 From: Igor Vaynberg [mailto:[hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2968688i=0]

 Sent: Thursday, October 07, 2010 11:27 AM
 To: [hidden email] http://user/SendEmail.jtp?type=nodenode=2968688i=1
 Subject: Re: PropertyModel Not Refreshing

 you have posted an incomplete piece of code and somehow from that we
 are supposed to guess what is not working? create a quickstart and
 provide that.

 -igor

 On Thu, Oct 7, 2010 at 10:15 AM, Shelli Orton [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2968688i=2
 wrote:

  Does nobody have any suggestions?  If I can't get this fixed, I'm going
  to have to write the app in another framework (possibly GWT) and I'd
  really rather not have to do that.
 
  Shelli
 
  -Original Message-
  From: Shelli Orton
  Sent: Wednesday, October 06, 2010 3:52 PM
  To: [hidden email]http://user/SendEmail.jtp?type=nodenode=2968688i=3
  Subject: PropertyModel Not Refreshing
 
  Hi,
 
  First, thanks to all who have been helping me as I am new to Wicket.  I
  am splitting out two issues I am dealing with to try to keep things
  clear.
 
  I am trying to write a simple app that does CRUD operations on database
  records.  The goal is for the app to make use of a tab panel where each
  tab encapsulates one table from the database.  Each tab panel has two
  groups (WebMarkupContainer).  The first, selectGroup, displays a list
  (DDC) of the current items, and three buttons, add, edit and delete.
  The second, editGroup, is displayed when either the add or edit button
  was clicked on the select group, displays the record attributes and save
  and cancel buttons.  The tab panel has a selectedRecord which is used
  by both groups' components via PropertyModels. Very basic stuff.
 
  When I choose a record and click the edit button, the record is
  displayed in the edit group properly.  If I then choose cancel, the edit
  group is no longer displayed and the select group DDC selection is null
  as expected. I then choose another record from the list and click the
  edit button and the previous record information is displayed in the edit
  group even though the select group DDC shows the correct/selected
  record.
 
  This problem also occurs if I first choose to add a new record and then
  cancel the add and then choose to edit a different record.  The DDC
  shows the correct/selected record, 

Re: Help with custom component that implements IOnChangeListener

2010-10-08 Thread Igor Vaynberg
easiest way to help you is if you create a quickstart and attach it to
a jira issue

-igor

On Thu, Oct 7, 2010 at 7:08 AM, Rut Bastoni rut.bast...@poste.it wrote:
 Hi everyone,
 i'm trying to implement a  custom TextField that fires onchange event
 without using Ajax (it is a requirement of my project - i have good reasons
 not to use Ajax).

 Looking at the source files of DropDownChoice, CheckBox etc. (they all
 implement the wantOnSelectionChangedNotifications() mechanism) i created a
 class:

 class OnChangeTextFieldT extends TextFieldT implements IOnChangeListener
 {

   // . my stuff

   @Override
   public void onSelectionChanged()
   {
           updateModel();
           onSelectionChanged(getModelObject());
   }

   protected void onSelectionChanged(final Object newSelection)
    {
           System.out.println(Event fired);
    }

   /**
 * Processes the component tag - This is like DropDownChoice and other
 default FormComponents di
    */
   @Override
   protected void onComponentTag(final ComponentTag tag)
   {
       // url that points to this components IOnChangeListener method
       CharSequence url = urlFor(IOnChangeListener.INTERFACE);

       Form? form = findParent(Form.class);
       if (form != null)
       {
           tag.put(onchange, form.getJsForInterfaceUrl(url));
       }
           super.onComponentTag(tag);
   }

 but that doesn't work. When i type into my textfield, i get an error page
 saying:

 WicketMessage: Attempt to access unknown request listener interface
 IRedirectListener

 Root cause:

 org.apache.wicket.WicketRuntimeException: Attempt to access unknown request
 listener interface IRedirectListener
 at org.apache.wicket.markup.html.form.Form.dispatchEvent(Form.java:1320)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:870)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
 at
 org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)

  etc. etc.

 I looked into the sources, in particular Form.java, it seems like the url of
 my listener (obtained by urlFor(IOnChangeListener.INTERFACE)) is wrong,
 because this is the value that get stored in the hidden fild of the form,
 and when the form dispatches events, it does not cause the correct
 IListenerInterfaceRequestTarget be created.

 I wonder, why does this mechanism work on DropDownChoice and others, and not
 on my component?
 Is this a bug? Or am I doing some mistake?

 Thanks a Lot

 Rut Bastoni


 -
 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: page over HTTP with sign in panel over HTTPs

2010-10-08 Thread Melinda Dweer
Martin,

Thanks for your answer! Yes, I know about that class: my questions was more
how to have a form submitted over HTTPs on a page served over HTTP.

Regards,

Ernesto

On Fri, Oct 8, 2010 at 5:34 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 See org.apache.wicket.protocol.https.HttpsRequestCycleProcessor

 On Fri, Oct 8, 2010 at 11:44 AM, Melinda Dweer melinda.dw...@gmail.com
 wrote:

  Hi,
 
  I has the following use case: I have some public pages (should be served
  over HTTP)  containing a sign in panel which must be submitted over
  HTTPs.
  I have though of doing this as follows:
 
  -use an iframe to host the sign in panel: actually it would be a page
  served over HTTPs to the iframe.
  -once the user signs in serve a page to the iframe that contains
 JavaScript
  to get parent page to be redirected to the private area (served over
  HTTPs).
 
  I do not tried the above but I assume it might work. My question is if
  there
  is a cleaner/cleverer way to do this in wicket?
 
  Thanks in advance,
 
  Melinda
 



Re: page over HTTP with sign in panel over HTTPs

2010-10-08 Thread Melinda Dweer
I will give it a try. Thanks!

Melinda

On Fri, Oct 8, 2010 at 5:51 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you can try tweaking the form so that its action is https, so

 class httpsform extens form {
  oncomponenttag(tag) {
 super.oncomponenttag(tag);
 string action=tag.get(action);
 action=requestutils.toabsoluteurl(action);
 action=https+action.substring(4);
 tag.put(action, action);
  }}

 -igor

 On Fri, Oct 8, 2010 at 2:44 AM, Melinda Dweer melinda.dw...@gmail.com
 wrote:
  Hi,
 
  I has the following use case: I have some public pages (should be served
  over HTTP)  containing a sign in panel which must be submitted over
 HTTPs.
  I have though of doing this as follows:
 
  -use an iframe to host the sign in panel: actually it would be a page
  served over HTTPs to the iframe.
  -once the user signs in serve a page to the iframe that contains
 JavaScript
  to get parent page to be redirected to the private area (served over
 HTTPs).
 
  I do not tried the above but I assume it might work. My question is if
 there
  is a cleaner/cleverer way to do this in wicket?
 
  Thanks in advance,
 
  Melinda
 

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




Re: AjaxFormComponentUpdatingBehavior Question

2010-10-08 Thread meduolis

I dont know if it works, but you can try to make a hack :)

endDateDropDown = new DropDownChoiceDate(endDateDropDown, new
PropertyModel(viewHistoryCriteria, endDate),
ProcessDateContext.getSixtyDayRange());
endDateDropDown.add(new AjaxFormComponentUpdatingBehavior(onchange) {
protected void onUpdate(AjaxRequestTarget target) {
if (criteriaDropDown.isEnabled()) {
populateCriteriaDropdown(target);
}
}
});
endDateDropDown.add(new AjaxFormComponentUpdatingBehavior(onblur) {
protected void onUpdate(AjaxRequestTarget target) {
// do nothing
}
});  
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-Question-tp2968982p2969013.html
Sent from the Users forum 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: AjaxFormComponentUpdatingBehavior Question

2010-10-08 Thread pjacobsma


meduolis wrote:
 
 I dont know if it works, but you can try to make a hack :)
 
 endDateDropDown = new DropDownChoiceDate(endDateDropDown, new
 PropertyModel(viewHistoryCriteria, endDate),
 ProcessDateContext.getSixtyDayRange());
 endDateDropDown.add(new AjaxFormComponentUpdatingBehavior(onchange) {
 protected void onUpdate(AjaxRequestTarget target) {
 if (criteriaDropDown.isEnabled()) {
 populateCriteriaDropdown(target);
 }
 }
 });
 endDateDropDown.add(new AjaxFormComponentUpdatingBehavior(onblur) {
 protected void onUpdate(AjaxRequestTarget target) {
 // do nothing
 }
 });  
 
 

Thanks for your reply.  I tried your suggestion, but Wicket still wrote an
Ajax call for the onblur event.  I would like to eliminate that call.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-Question-tp2968982p2969030.html
Sent from the Users forum 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: AjaxFormComponentUpdatingBehavior Question

2010-10-08 Thread meduolis

Again, I can offer a hack :D

public class DoSomeHackBehavior extends AbstractBehavior {

private static final long serialVersionUID = 3554634545756435367L;

@Override
public void onComponentTag(Component component, ComponentTag tag) {
FormComponent? comp = (FormComponent?) component;
tag.getAttributes().remove(onblur);
}
}

}

after that, you can add this behaviour to any component

component.add(new DoSomeHackBehaviour());

:D
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-Question-tp2968982p2969053.html
Sent from the Users forum 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