Conditional validation without overriding isRequired

2012-06-05 Thread Schlärmann , Bob
Hello,

A question about form processing: is it possible to do conditional form 
validation without overriding FormComponent#isRequired?

I have a form with about 5 different form components (e.g. textfields, 
dropdown, radiobutton). These fields are only required if a RadioGroup has a 
certain value.

I've read the solution given in 
https://cwiki.apache.org/WICKET/conditional-validation.html. But this means I 
have to subclass all form components  and override isRequired. Is there an 
easier solution?

Currently I'm using an Ajax call and disable the container of the optional 
components, however that doesn't work if Javascript is disabled (also not safe 
presumably).

Best regards,

Bob



Think green - keep it on the screen.

This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.



Re: restfb json object

2012-06-05 Thread Dror
reply... thanks

On Tue, Jun 5, 2012 at 11:05 AM, Dror [via Apache Wicket] 
ml-node+s1842946n4649734...@n4.nabble.com wrote:

 Hi, i'm a fresh developer, i run into a problem while fetching jsonobjects
 from the facebook using restfb API:

  JsonObject facebookUser = facebookClient.fetchObject(1674441058,
 JsonObject.class)

 there should be a field named type that old information about the object
 type, in this case type = user.

 but it dose not exists, facebookUser.getString(type) returns an error.

 when i fetch it on the graph API explorer it appears as the last field,

 System.out.println(facebookUser.toString()) gives all the fields except
 this one

 any idea how to get the type of a json object?

 thanks in adv...

 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/restfb-json-object-tp4649734.html
  To start a new topic under Users forum, email
 ml-node+s1842946n1842947...@n4.nabble.com
 To unsubscribe from Users forum, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842947code=ZHJvcmdvbmVuQGdtYWlsLmNvbXwxODQyOTQ3fDE4OTg5MDc1OTc=
 .
 NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/restfb-json-object-tp4649734p4649735.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



restfb json object

2012-06-05 Thread Dror
Hi, i'm a fresh developer, i run into a problem while fetching jsonobjects
from the facebook using restfb API:

 JsonObject facebookUser = facebookClient.fetchObject(1674441058,
JsonObject.class)

there should be a field named type that old information about the object
type, in this case type = user.

but it dose not exists, facebookUser.getString(type) returns an error.

when i fetch it on the graph API explorer it appears as the last field, 

System.out.println(facebookUser.toString()) gives all the fields except this
one

any idea how to get the type of a json object?

thanks in adv...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/restfb-json-object-tp4649734.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.6

2012-06-05 Thread Douglas Ferguson
I would be deploying my app in a couple months. Is that too aggressive for 1.6?

On Jun 4, 2012, at 10:32 AM, Martin Grigorov wrote:

 On Mon, Jun 4, 2012 at 6:25 PM, Dan Tran dant...@gmail.com wrote:
 totally agree with Vineet here.
 
 The problem is that once we release the first Release Candidate it is
 not possible (recommended) to make fixes in the APIs.
 As far as I know there are no open tickets for bugs in Wicket
 6.0.0-beta2 (released in less than a week).
 If there are no major problems I guess next release will be RC1. We
 will vote about this at dev@ mailing list. Feel free to participate!
 
 
 -D
 
 On Mon, Jun 4, 2012 at 7:59 AM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
 as soon as it will be released,people will start using it ;)
 
 On Mon, Jun 4, 2012 at 8:03 PM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 As soon as people start using it and send feedback ...
 
 On Mon, Jun 4, 2012 at 5:29 PM, Douglas Ferguson the...@gmail.com wrote:
 Is there a projected release date for wicket 1.6?
 
 Just curious because I'm starting a new project and am trying to decide 
 if I should start it using 1.6.
 
 Douglas
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 thank you,
 
 regards,
 Vineet Semwal
 
 -
 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
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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.6

2012-06-05 Thread Martin Grigorov
Hi,

I think 6.0.0-beta2 is good enough for production.
If you find any problems I promise I'll try to solve them as soon as possible.
If there are no workarounds you may need to use 6.0-SNAPSHOT for your
development until the next RC is released.

On Tue, Jun 5, 2012 at 7:07 PM, Douglas Ferguson the...@gmail.com wrote:
 I would be deploying my app in a couple months. Is that too aggressive for 
 1.6?

 On Jun 4, 2012, at 10:32 AM, Martin Grigorov wrote:

 On Mon, Jun 4, 2012 at 6:25 PM, Dan Tran dant...@gmail.com wrote:
 totally agree with Vineet here.

 The problem is that once we release the first Release Candidate it is
 not possible (recommended) to make fixes in the APIs.
 As far as I know there are no open tickets for bugs in Wicket
 6.0.0-beta2 (released in less than a week).
 If there are no major problems I guess next release will be RC1. We
 will vote about this at dev@ mailing list. Feel free to participate!


 -D

 On Mon, Jun 4, 2012 at 7:59 AM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
 as soon as it will be released,people will start using it ;)

 On Mon, Jun 4, 2012 at 8:03 PM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 As soon as people start using it and send feedback ...

 On Mon, Jun 4, 2012 at 5:29 PM, Douglas Ferguson the...@gmail.com wrote:
 Is there a projected release date for wicket 1.6?

 Just curious because I'm starting a new project and am trying to decide 
 if I should start it using 1.6.

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




 --
 thank you,

 regards,
 Vineet Semwal

 -
 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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Conditional validation without overriding isRequired

2012-06-05 Thread Thomas Götz
Yes, you can also push the state instead of pulling it, which besides is 
preferrable in terms of efficiency (as onConfigure() is only called once per 
request whereas isVisible() is potentially called many time):

TextFieldString textField = new TextFieldString(textField) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(condition);
}
};

You can also call textField.setVisible(...) in the Page's or Panel's 
onConfigure(), but then you need a reference to the textField (property of the 
page or panel). Or - if possible - you can group your FormComponents into a 
WebMarkupContainer an set the visibility there.

   -Tom



On 05.06.2012 at 16:51 Bob Schlärmann wrote:

 Hello,
 
 A question about form processing: is it possible to do conditional form 
 validation without overriding FormComponent#isRequired?
 
 I have a form with about 5 different form components (e.g. textfields, 
 dropdown, radiobutton). These fields are only required if a RadioGroup has a 
 certain value.
 
 I've read the solution given in 
 https://cwiki.apache.org/WICKET/conditional-validation.html. But this means I 
 have to subclass all form components  and override isRequired. Is there an 
 easier solution?
 
 Currently I'm using an Ajax call and disable the container of the optional 
 components, however that doesn't work if Javascript is disabled (also not 
 safe presumably).
 
 Best regards,
 
 Bob


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



Re: Conditional validation without overriding isRequired

2012-06-05 Thread Thomas Götz
Argh, confused setVisible() with setRequired, my bad ;-)
But nevertheless: call setRequiered(condition) in onConfigure().

   -Tom 


Thomas Götz wrote:

 Yes, you can also push the state instead of pulling it, which besides is 
 preferrable in terms of efficiency (as onConfigure() is only called once per 
 request whereas isVisible() is potentially called many time):
 
 TextFieldString textField = new TextFieldString(textField) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(condition);
}
 };
 
 You can also call textField.setVisible(...) in the Page's or Panel's 
 onConfigure(), but then you need a reference to the textField (property of 
 the page or panel). Or - if possible - you can group your FormComponents into 
 a WebMarkupContainer an set the visibility there.
 
   -Tom


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



wicket job opportunity, we are hiring

2012-06-05 Thread Igor Vaynberg
the company i work for ( 42lines.net ) is growing and we are looking
for a few good devs.

about our approach:

* we are a distributed company with employees based predominantly in
the usa, there are 27 of us now
* everyone telecommutes either from home or a coworking space of your
choice (paid for by the company)
* we use a variation of agile methodology (daily scrums, iterations,
peer code reviews, etc)

tech stack:

* wicket
* jpa/hibernate/querydsl
* cdi/weld
* resteasy
* jquery / jquery mobile

what we want from you:

* first and foremost you are smart and you know how to apply those
smarts to writing code
* you work on PST/EST +- 2 hours
* you have a decent internet connection capable of skype (we can help
you get one)
* you understand (not just know) java and oop
* you are comfortable in sql, hibernate, and wicket

there is lots more info, including how to apply, available here:

https://www.42lines.net/2012/05/29/now-hiring-2-new-java-engineers-and-2-new-qa-engineers/

cheers,
-igor

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



Re: wicket job opportunity, we are hiring

2012-06-05 Thread Cedric Gatay
Hi Igor,
this is an interesting opportunity, too bad it is time zone limited. I hope
you'll find somebody.


__
Cedric Gatay
http://www.bloggure.info | http://cedric.gatay.fr |
@Cedric_Gatayhttp://twitter.com/Cedric_Gatay


On Tue, Jun 5, 2012 at 10:37 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 the company i work for ( 42lines.net ) is growing and we are looking
 for a few good devs.

 about our approach:

 * we are a distributed company with employees based predominantly in
 the usa, there are 27 of us now
 * everyone telecommutes either from home or a coworking space of your
 choice (paid for by the company)
 * we use a variation of agile methodology (daily scrums, iterations,
 peer code reviews, etc)

 tech stack:

 * wicket
 * jpa/hibernate/querydsl
 * cdi/weld
 * resteasy
 * jquery / jquery mobile

 what we want from you:

 * first and foremost you are smart and you know how to apply those
 smarts to writing code
 * you work on PST/EST +- 2 hours
 * you have a decent internet connection capable of skype (we can help
 you get one)
 * you understand (not just know) java and oop
 * you are comfortable in sql, hibernate, and wicket

 there is lots more info, including how to apply, available here:


 https://www.42lines.net/2012/05/29/now-hiring-2-new-java-engineers-and-2-new-qa-engineers/

 cheers,
 -igor

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




Re: Wicket page has a redirect loop

2012-06-05 Thread paulstar
You are right.  I found out the 'markupProvider' is null by debugging, thanks
to Tom to fores me to do it.

In Wicket 1.3  1.4, I overrided 'getAssociatedMarkupStream(boolean
throwException)' so that the class extends from Fragment doesn't have to
provide 'markupProvider'.  After upgraded to Wicket 1.5, I simply set the
'markupProvider' to null so that it compiled, but ran into NPE.

So I changed my code from:
public static class FormField extends Fragment {
public FormField(String markupId, Component c, IModel label, 
IModel m) {
super(fragmentId, markupId, null, m);
this.labelModel = label;
this.c = c;
}
..
}

to:
public static class FormField extends Fragment {
public FormField(String markupId, Component c, IModel label, 
IModel m,
MarkupContainer markupProvider) {
super(fragmentId, markupId, markupProvider, m);
this.labelModel = label;
this.c = c;
}
..
}

The problem is there are many 'new FormField()' codes, a big changes.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-page-has-a-redirect-loop-tp4649664p4649746.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