[CONF] Apache Wicket: Community meetups (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Community meetups



 
Community meetups
has been edited by Nino Martinez
(Aug 19, 2008).
 

 
 (View changes)
 

Content:
Bookmarkable link

If you're thinking about organizing a local meetup, don't hesitate to add your initiative to this list
Pictures of past Wicket meetings can be found here: http://flickr.com/photos/tags/wicketmeeting/

There are already efforts to organize meetups in the following countries:


  United Kingdom
  Belgium
  The Netherlands
  Denmark
  Sweden
  Brazil
  Argentina
  United States
  Austria
  Canada


United Kingdom

Location: London
Regular meetups: The first Wednesday of every other month
To register, go here: http://jweekend.co.uk/dev/LWUGReg

Belgium

Last meetup: JavaPolis'07 (dec 12th-14th)

Martijn Dashorst will give a Wicket presentation at the conference. We are interested in a Birds of a Feather (BoF) meeting, and interest can be registered here.
When you want to attend, you need to be registered at the conference too. The presentation and BoF will be in English.


 Name 
 Interested 
 Will come 
 BoF? 


 Martijn Dashorst 
 x 
 x 
 x 


 Per Ejeklint 
 x 
 x 
 yeah 


 Xavier Hanin 
 x 
 x 
 x 


 Francis De Brabandere 
 x 
 ? 
 x 



The Netherlands

The excitement in the Netherlands keeps growing check it out: Wicket Community meetups  Amsterdam.

Denmark

Location: Copenhagen
Last meetup: 23 april 16 hrs
Next meetup: TBD/Novemberish

Speakers/ areas of interest? Write what you want to hear about here.. Then people can add themselves as speakers


 content 
 speaker? 


 Wicket-Spring-JPA-Hibernate (only if theres interest in it)
 Nino 


 Testing Wicket experiences 
 Nino


 Creating behaviors (only if theres interest in it)
 Nino


 Selling wicket (to your company, and customers) 
 Discussion 





 Name 
 Interested 
 Will come 
 Language 
 Comments 
 Cant Come Dates 


 Frank Bille 
 x 

 Danish,English 




 Nino Martinez 
 x 

 Danish,English 

 29.nov - 06 dec 


 Jan Mikkelsen 
 x 

 Danish,English 




 Flemming Boller 
 x 

 Danish,English 




 Guðmundur Bjarni 
 x 

 Danish,English,Icelandic 




 Henrik Eiriksson 
   
 ?  
 Danish,English,Icelandic 



 Finn Bock 
 x 

 Danish,English 



 Kristian Jensen 
 x 

 Danish,English 




Sweden

Location: Stockholm
Next meetup: TBD (no meetups during the summer)

Web page: http://wicket.jalbum.net

Please also join the google group (at the web page) to receive invitations to the meetups.


Location: Malmø / øredev
Next meetup: 19-21nov one of the days..

Speakers/ areas of interest? Write what you want to hear about here.. Then people can add themselves as speakers


 content 
 speaker? 


 Wicket-Spring-JPA-Hibernate
 Nino 


 TDD/BDD  Wicket! 
 Nino


 Wicket Performance
 Discusssion Nino starts it with some tips


 Creating behaviors/integrating _javascript_
 Nino


 Selling wicket (to your company, and customers) 
 Discussion 


 "something about integrating with some google goodness" 
 Martjin Dashorst 







Brazil

Location: Rio de Janeiro
Next meetup: to be scheduled

Register here or send an e-mail to Alexandre Bairos (alexandre.bairos at gmail.com) and let us know you are interested.


 Name 
 Interested 
 Will come 
 Language 
 Comments 


 Alexandre Bairos 
 x 
 x 
 Portuguese,English,P 


 Bruno Borges 
 x 
 x 
 Portuguese,English,P 


 João Antonio 
 x 
 x 
 Portuguese,English,P 



Argentina

Location: Buenos Aires
Next meetup: to be scheduled

Register here or send an e-mail to  (fernando.wermus at gmail.com) and let us know you are interested.


 Name 
 Interested 
 Will come 
 Language 
 Comments 


 Fernando Wermus 
 x 
 x 
 Portuguese,English,Spanish,P 


 Juan G. Arias 
 x 
 x 
 English,Spanish,P 


 Eduardo Constantin 
 x 
 x 
 Portuguese,English,Spanish,P 




United States

Wicket Users Group - Twin Cities
Location: Minneapolis, MN
Next meetup: to be scheduled (see group website)

http://groups.google.com/group/wicket-user-group-twincities

Location: Seattle
Next meetup: to be scheduled

Send an e-mail to Eelco Hillenius (eelco.hillenius at gmail.com) if you'd like to see this happen



 Name 
 Interested 
 Comments 


 Eelco Hillenius 
 x 



 Jonathan Locke 
 x 



 Eric Crampton 
 x 



 Jose Collas 
 x 




Location: San Francisco
Next meetup: to be scheduled

Send an email to Orion Letizi ([EMAIL PROTECTED]) and let us know if you are interested


 Name 
 Interested 
 Will come 
 Dec. 6 
 Dec. 14 
 Comments 


 Orion Letizi 
 x 
 x 
 x 
 x 



 Nick Johnson 
 x 
 x 
 x 
 x 



 Al Maw 
 x 



 Can only make it if between 28th Nov and 12th Dec 


 Julian Sinai  
 x  






 Sehyo Chang 
 x 






 David Pollak 
 x 
 x 





 Enrique Rodriguez 
 x 
 x 





 David Sean Taylor 







 Sean Sullivan 
 x 
 x 


 December 2 through December 6 


 Niels van Kampenhout 
 x 







Austria

Location: Linz 

[CONF] Apache Wicket: Community meetups (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Community meetups



 
Community meetups
has been edited by Nino Martinez
(Aug 19, 2008).
 

 
 (View changes)
 

Content:
Bookmarkable link

If you're thinking about organizing a local meetup, don't hesitate to add your initiative to this list
Pictures of past Wicket meetings can be found here: http://flickr.com/photos/tags/wicketmeeting/

There are already efforts to organize meetups in the following countries:


  United Kingdom
  Belgium
  The Netherlands
  Denmark
  Sweden
  Brazil
  Argentina
  United States
  Austria
  Canada


United Kingdom

Location: London
Regular meetups: The first Wednesday of every other month
To register, go here: http://jweekend.co.uk/dev/LWUGReg

Belgium

Last meetup: JavaPolis'07 (dec 12th-14th)

Martijn Dashorst will give a Wicket presentation at the conference. We are interested in a Birds of a Feather (BoF) meeting, and interest can be registered here.
When you want to attend, you need to be registered at the conference too. The presentation and BoF will be in English.


 Name 
 Interested 
 Will come 
 BoF? 


 Martijn Dashorst 
 x 
 x 
 x 


 Per Ejeklint 
 x 
 x 
 yeah 


 Xavier Hanin 
 x 
 x 
 x 


 Francis De Brabandere 
 x 
 ? 
 x 



The Netherlands

The excitement in the Netherlands keeps growing check it out: Wicket Community meetups  Amsterdam.

Denmark

Location: Copenhagen
Last meetup: 23 april 16 hrs
Next meetup: TBD/Novemberish

Speakers/ areas of interest? Write what you want to hear about here.. Then people can add themselves as speakers


 content 
 speaker? 


 Wicket-Spring-JPA-Hibernate (only if theres interest in it)
 Nino 


 Testing Wicket experiences 
 Nino


 Creating behaviors (only if theres interest in it)
 Nino


 Selling wicket (to your company, and customers) 
 Discussion 





 Name 
 Interested 
 Will come 
 Language 
 Comments 
 Cant Come Dates 


 Frank Bille 
 x 

 Danish,English 




 Nino Martinez 
 x 

 Danish,English 

 29.nov - 06 dec 


 Jan Mikkelsen 
 x 

 Danish,English 




 Flemming Boller 
 x 

 Danish,English 




 Guðmundur Bjarni 
 x 

 Danish,English,Icelandic 




 Henrik Eiriksson 
   
 ?  
 Danish,English,Icelandic 



 Finn Bock 
 x 

 Danish,English 



 Kristian Jensen 
 x 

 Danish,English 




Sweden

Location: Stockholm
Next meetup: TBD (no meetups during the summer)

Web page: http://wicket.jalbum.net

Please also join the google group (at the web page) to receive invitations to the meetups.


Location: Malmø / øredev
Next meetup: 19-21nov one of the days..

Speakers/ areas of interest? Write what you want to hear about here.. Then people can add themselves as speakers


 content 
 speaker? 


 Wicket-Spring-JPA-Hibernate
 Nino 


 TDD/BDD  Wicket! 
 Nino


 Wicket Performance
 Discusssion Nino starts it with some tips


 Creating behaviors/integrating _javascript_
 Nino


 Selling wicket (to your company, and customers) 
 Discussion 


 "something about integrating with some google goodness" 
 Martjin Dashorst 





 Name 
 Interested 
 Will come 
 Language 
 Comments


 Nino Martinez 

 x 
 Danish,English 









Brazil

Location: Rio de Janeiro
Next meetup: to be scheduled

Register here or send an e-mail to Alexandre Bairos (alexandre.bairos at gmail.com) and let us know you are interested.


 Name 
 Interested 
 Will come 
 Language 
 Comments 


 Alexandre Bairos 
 x 
 x 
 Portuguese,English,P 


 Bruno Borges 
 x 
 x 
 Portuguese,English,P 


 João Antonio 
 x 
 x 
 Portuguese,English,P 



Argentina

Location: Buenos Aires
Next meetup: to be scheduled

Register here or send an e-mail to  (fernando.wermus at gmail.com) and let us know you are interested.


 Name 
 Interested 
 Will come 
 Language 
 Comments 


 Fernando Wermus 
 x 
 x 
 Portuguese,English,Spanish,P 


 Juan G. Arias 
 x 
 x 
 English,Spanish,P 


 Eduardo Constantin 
 x 
 x 
 Portuguese,English,Spanish,P 




United States

Wicket Users Group - Twin Cities
Location: Minneapolis, MN
Next meetup: to be scheduled (see group website)

http://groups.google.com/group/wicket-user-group-twincities

Location: Seattle
Next meetup: to be scheduled

Send an e-mail to Eelco Hillenius (eelco.hillenius at gmail.com) if you'd like to see this happen



 Name 
 Interested 
 Comments 


 Eelco Hillenius 
 x 



 Jonathan Locke 
 x 



 Eric Crampton 
 x 



 Jose Collas 
 x 




Location: San Francisco
Next meetup: to be scheduled

Send an email to Orion Letizi ([EMAIL PROTECTED]) and let us know if you are interested


 Name 
 Interested 
 Will come 
 Dec. 6 
 Dec. 14 
 Comments 


 Orion Letizi 
 x 
 x 
 x 
 x 



 Nick Johnson 
 x 
 x 
 x 
 x 



 Al Maw 
 x 



 Can only make it if between 28th Nov and 12th Dec 


 Julian Sinai  
 x  






 Sehyo Chang 
 x 






 David Pollak 
 x 
 x 





 Enrique Rodriguez 
 x 
 x 





 David Sean Taylor 







 Sean Sullivan 
 x 

[jira] Commented: (WICKET-1648) AbstractRequestTargetUrlCodingStrategy(line 174) throws confusing exception. It would be better redirect to 404-page in this case.

2008-08-19 Thread Marat Radchenko (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12623596#action_12623596
 ] 

Marat Radchenko commented on WICKET-1648:
-

Still present in 1.4-M3

 AbstractRequestTargetUrlCodingStrategy(line 174) throws confusing exception. 
 It would be better redirect to 404-page in this case. 
 ---

 Key: WICKET-1648
 URL: https://issues.apache.org/jira/browse/WICKET-1648
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.4-M1
Reporter: Andrey Tuzhikov
Assignee: Gerolf Seitz
 Fix For: 1.3.5

   Original Estimate: 48h
  Remaining Estimate: 48h

 Steps to reproduce: 
 When user manually types incorrect URL, this confusing exception will be 
 thrown.
 SEVERE: Internal error for /eshop/profile/p
 java.lang.IllegalStateException: URL fragment has unmatched key/value pair: p
   at 
 org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:174)
   at 
 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76)
   at 
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:476)
   at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r687009 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java

2008-08-19 Thread knopp
Author: knopp
Date: Tue Aug 19 02:57:46 2008
New Revision: 687009

URL: http://svn.apache.org/viewvc?rev=687009view=rev
Log:
Render component border around behavior's renderBefore/renderAfter

Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java?rev=687009r1=687008r2=687009view=diff
==
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java 
(original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Tue Aug 
19 02:57:46 2008
@@ -2388,20 +2388,21 @@
 
try
{
-   // Call implementation to render component
-   notifyBehaviorsComponentBeforeRender();
+   // Call implementation to render component  

final IComponentBorder border = 
getComponentBorder();
if (border != null)
{
border.renderBefore(this);
}
+   notifyBehaviorsComponentBeforeRender();
onRender(markupStream);
+   notifyBehaviorsComponentRendered();
if (border != null)
{
border.renderAfter(this);
}
// Component has been rendered
-   rendered();
+   rendered(); 
}
catch (RuntimeException ex)
{
@@ -2609,8 +2610,7 @@
 * rendered, and in development mode this would result in a runtime 
exception.
 */
public final void rendered()
-   {
-   notifyBehaviorsComponentRendered();
+   {   
// Tell the page that the component rendered
getPage().componentRendered(this);
}




[jira] Created: (WICKET-1792) wicket-1.3.x uses class from java 1.5, therefore doesn't compile on java 1.4 as it should

2008-08-19 Thread Peter Ertl (JIRA)
wicket-1.3.x uses class from java 1.5, therefore doesn't compile on java 1.4 as 
it should
-

 Key: WICKET-1792
 URL: https://issues.apache.org/jira/browse/WICKET-1792
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Reporter: Peter Ertl


current wicket 1.3.x does not compile with jdk 1.4

class 

  org.apache.wicket.util.crypt.KeyInSessionSunJceCryptFactory 

uses the class 

  java.util.UUID

which exist @since 1.5

this should be fixed as wicket-1.3 requires a minimum jdk of 1.4

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[CONF] Apache Wicket: Request Focus on a Specific Form Component (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Request Focus on a Specific Form Component



 
Request Focus on a Specific Form Component
has been edited by bugmenot
(Aug 19, 2008).
 

  Change summary:
  Better solution

 
 (View changes)
 

Content:

	To request focus for a component, we need to use a little _javascript_, we can do so using a behavior:

public class FocusOnLoadBehavior extends AbstractBehavior
{
private Component component;

public void bind( Component component )
{
this.component = component;
component.setOutputMarkupId(true);
}

public void renderHead( IHeaderResponse iHeaderResponse )
{
super.renderHead(iHeaderResponse);
iHeaderResponse.renderOnLoadJavascript("document.getElementById('" + component.getMarkupId() + "').focus()");
}

public boolean isTemporary()
{
// remove the behavior after component has been rendered   
return true;
}
}

	Now, to use that behavior, all we have to do is:

public class MyPage extends WebPage
{
  public MyPage()
  {
Form form = new Form("form");
TextField field1 = new TextField("field1");
field1.add(new FocusOnLoadBehavior());
form.add(field1);
add(form);
  }
}

	!!! Please, never focus a component in "onload" event. It's very annoying if page is not loaded yet but user already scrolling/editing controls and suddenly browser jumps him to some other control. More sensible put the focus() code just after component tag. I introduce other code, seems works for me:

public class FocusOnLoadBehavior extends AbstractBehavior
{
	@Override
	public void bind(Component component) {
		super.bind(component);
		component.setOutputMarkupId(true);
		component.setComponentBorder(new IComponentBorder() {
			public void renderBefore(Component component) {
			}

			public void renderAfter(Component component) {
final Response response = component.getResponse();
response.write(
		"script type=\"text/_javascript_\" language=\"_javascript_\"document.getElementById(\"" +
		component.getMarkupId() +
		"\").focus()/script");
			}
		});
	}

	@Override
	public boolean isTemporary() {
		return true;
	}
}














Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request

Unsubscribe or edit your notifications preferences








[CONF] Apache Wicket: Conditional Validation (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Conditional Validation



 
Conditional Validation
has been edited by John Krasnay
(Aug 19, 2008).
 

  Change summary:
  Will's approach is just an alternative way to implement submit button-sensitive validation, so I made it a subsection of that section.

 
 (View changes)
 

Content:
Flagging a form field as "required" is the most common kind of validation. In most cases, this can be specified statically as follows:

add(new TextField("foo").setRequired(true));

In some cases, however, whether or not the field is required cannot be determined when the form is created. Like many properties in Wicket, we can override the property setter (isRequired, in this case) to defer the evaluation of the property until the last possible moment:

add(new TextField("foo") {
public boolean isRequired() {
// return true if the field is required
}
}

That's the simple part. Unfortunately, implementing isRequired can be tricky, since it's called very early in the form processing cycle, before values are converted and models are updated. Below we provide a few recipes that cover some common scenarios.

Submit Button

In this recipe, the field is in a form with multiple submit buttons. We only want to require the field when one of the buttons is clicked:

Button submit = new Button("submit") {
public void onSubmit() {
// handle form submission
}
}
form.add(submit);

TextField foo = new TextField("foo") {
public boolean isRequired() {
Form form = (Form) findParent(Form.class);
return form.getRootForm().findSubmittingButton() == submitButton;
}
}
form.add(foo);

Note the call to getRootForm. Technically, this is only required in nested forms.

If you would like to bypass validation altogether you can do so by:

new Button("submit").setDefaultFormProcessing(false);



Alternative Approach

Another approach to enabling validation based on which submit button was used is to take over the form processing workflow as follows.

Say we have four form components within the same form:

	name A
	description A
	name B
	description B



Sometimes we want the whole form to validate/process (Button C), but sometimes we only want "A" form components to validate/process (Button A). One way to accomplish this is to:

final TextField nameA = new TextField("name", ...);
final TextField descriptionA = new TextField("descriptionA", ...);
final TextField nameB = new TextField("nameB", ...);
final TextField descriptionB = new TextField("descriptionB", ...);

// the validators can be anything, but for simplicity we just use required
nameA.setRequired(true);
descriptionA.setRequired(true);
nameB.setRequired(true);
descriptionB.setRequired(true);

final Button buttonA = new Button(id) {
public boolean onSubmit() {
// because we overrode the form processing we need to handle validation/processing on the components ourselves
nameA.validate();
descriptionA.validate();
if(!nameA.isValid() || !descriptionA.isValid()){
// didn't validate so we stop processing (validation errors will be displayed provided we are using a FeedbackPanel or similar)
return;
}
// TODO : now we have the updated values/models so we can perform whatever button A is supposed to do
}
});
// set the form processing to false so that no validation/processing will occur on the form when button A is clicked
buttonA.setDefaultFormProcessing(false);

// we can do the same thing for B components
final Button buttonB = new Button(id) {
public boolean onSubmit() {
// because we overrode the form processing we need to handle validation/processing on the components ourselves
nameB.validate();
descriptionB.validate();
if(!nameB.isValid() || !descriptionB.isValid()){
// didn't validate so we stop processing (validation errors will be displayed provided we are using a FeedbackPanel or similar)
return;
}
// TODO : now we have the updated values/models so we can perform whatever button B is supposed to do
}
});
// set the form processing to false so that no validation/processing will occur on the form when button B is clicked
buttonB.setDefaultFormProcessing(false);

final Button buttonC = new Button(id) {
public boolean onSubmit() {
// TODO : all validation passed because form processing is true so we can perform whatever button C is supposed to do
}
});




CheckBox

In this recipe, the field is only required when a checkbox on the form is checked:

final CheckBox checkBox = new CheckBox("cb");
form.add(checkBox);

TextField foo = new TextField("foo") {
public boolean isRequired() {
return Strings.isTrue(checkBox.getValue());
}
}
form.add(foo);


Radio 

[CONF] Apache Wicket: Conditional Validation (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Conditional Validation



 
Conditional Validation
has been edited by John Krasnay
(Aug 19, 2008).
 

 
 (View changes)
 

Content:
Flagging a form field as "required" is the most common kind of validation. In most cases, this can be specified statically as follows:

add(new TextField("foo").setRequired(true));

In some cases, however, whether or not the field is required cannot be determined when the form is created. Like many properties in Wicket, we can override the property setter (isRequired, in this case) to defer the evaluation of the property until the last possible moment:

add(new TextField("foo") {
public boolean isRequired() {
// return true if the field is required
}
}

That's the simple part. Unfortunately, implementing isRequired can be tricky, since it's called very early in the form processing cycle, before values are converted and models are updated. Below we provide a few recipes that cover some common scenarios.

Submit Button

In this recipe, the field is in a form with multiple submit buttons. We only want to require the field when one of the buttons is clicked:

Button submit = new Button("submit") {
public void onSubmit() {
// handle form submission
}
}
form.add(submit);

TextField foo = new TextField("foo") {
public boolean isRequired() {
Form form = (Form) findParent(Form.class);
return form.getRootForm().findSubmittingButton() == submitButton;
}
}
form.add(foo);

Note the call to getRootForm. Technically, this is only required in nested forms.

If you would like to bypass validation altogether you can do so by:

new Button("submit").setDefaultFormProcessing(false);



Alternative Approach

Another approach to enabling validation based on which submit button was used is to take over the form processing workflow as follows.

Say we have four form components within the same form:

	name A
	description A
	name B
	description B



Sometimes we want the whole form to validate/process (Button C), but sometimes we only want "A" form components to validate/process (Button A). One way to accomplish this is to:

final TextField nameA = new TextField("name", ...);
final TextField descriptionA = new TextField("descriptionA", ...);
final TextField nameB = new TextField("nameB", ...);
final TextField descriptionB = new TextField("descriptionB", ...);

// the validators can be anything, but for simplicity we just use required
nameA.setRequired(true);
descriptionA.setRequired(true);
nameB.setRequired(true);
descriptionB.setRequired(true);

final Button buttonA = new Button(id) {
public boolean onSubmit() {
// because we overrode the form processing we need to handle validation/processing on the components ourselves
nameA.validate();
descriptionA.validate();
if(!nameA.isValid() || !descriptionA.isValid()){
// didn't validate so we stop processing (validation errors will be displayed provided we are using a FeedbackPanel or similar)
return;
}
// TODO : now we have the updated values/models so we can perform whatever button A is supposed to do
}
});
// set the form processing to false so that no validation/processing will occur on the form when button A is clicked
buttonA.setDefaultFormProcessing(false);

// we can do the same thing for B components
final Button buttonB = new Button(id) {
public boolean onSubmit() {
// because we overrode the form processing we need to handle validation/processing on the components ourselves
nameB.validate();
descriptionB.validate();
if(!nameB.isValid() || !descriptionB.isValid()){
// didn't validate so we stop processing (validation errors will be displayed provided we are using a FeedbackPanel or similar)
return;
}
// TODO : now we have the updated values/models so we can perform whatever button B is supposed to do
}
});
// set the form processing to false so that no validation/processing will occur on the form when button B is clicked
buttonB.setDefaultFormProcessing(false);

final Button buttonC = new Button(id) {
public boolean onSubmit() {
// TODO : all validation passed because form processing is true so we can perform whatever button C is supposed to do
}
});




CheckBox

In this recipe, the field is only required when a checkbox on the form is checked:

final CheckBox checkBox = new CheckBox("cb");
form.add(checkBox);

TextField foo = new TextField("foo") {
public boolean isRequired() {
return Strings.isTrue(checkBox.getValue());
}
}
form.add(foo);


Radio Button

Here the field is only required when a particular radio button on the form is selected:

final RadioGroup radioGroup = new RadioGroup("radioGroup");

[CONF] Apache Wicket: Nested Forms (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Nested Forms



 
Nested Forms
has been edited by John Krasnay
(Aug 19, 2008).
 

 
 (View changes)
 

Content:
This page should serve as a "specification" (aka nominal state, not the current state) on nested form handling.
Please review the various situations and correct any mistakes or add new situations if necessary.
Thanks, Gerolf


The Conditional Validation page contains some practical examples regarding nested forms and validation.

Markup
form wicket:id="outer"
  form wicket:id="middle"
form wicket:id="inner"
/form
  /form
/form


Legend
form...enabled
form...disabled

form...submitted form with no errors
form...form with errors

E...onError called
S...onSubmit called
_...nothing called, but input is preserved


Notice
When submitting a nested form, the entire form is submitted (including fileuploads), but processed according to the rules below.


all forms enabled
outer form submitted


Outer
Middle
Inner


S
S
S



all forms enabled
middle form submitted


Outer
Middle
Inner


_
S
S



all forms enabled
inner form submitted


Outer
Middle
Inner


_
_
S



middle form disabled
outer form submitted


Outer
Middle
Inner


S
_
_



inner form disabled
outer form submitted


Outer
Middle
Inner


S
S
_



outer form disabled
outer form submitted


Outer
Middle
Inner


_
_
_



all forms enabled
middle form has error
outer form submitted


Outer
Middle
Inner


E
E
_



all forms enabled
middle form has errors
middle form submitted


Outer
Middle
Inner


_
E
_



all forms enabled
inner form has errors
middle form submitted


Outer
Middle
Inner


_
E
E



middle form disabled
outer form has errors
outer form submitted


Outer
Middle
Inner


E
_
_



all forms enabled
inner form has errors
outer form submitted


Outer
Middle
Inner


E
E
E



middle form disabled
inner form has (*potential) errors
outer form submitted


Outer
Middle
Inner*


S
_
_













Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request

Unsubscribe or edit your notifications preferences








[CONF] Apache Wicket: Nested Forms (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Nested Forms



 
Nested Forms
has been edited by John Krasnay
(Aug 19, 2008).
 

 
 (View changes)
 

Content:
This page should serve as a "specification" (aka nominal state, not the current state) on nested form handling.
Please review the various situations and correct any mistakes or add new situations if necessary.
Thanks, Gerolf

The Conditional Validation page contains some practical examples regarding nested forms and validation.

Markup
form wicket:id="outer"
  form wicket:id="middle"
form wicket:id="inner"
/form
  /form
/form


Legend
form...enabled
form...disabled

form...submitted form with no errors
form...form with errors

E...onError called
S...onSubmit called
_...nothing called, but input is preserved


Notice
When submitting a nested form, the entire form is submitted (including fileuploads), but processed according to the rules below.


all forms enabled
outer form submitted


Outer
Middle
Inner


S
S
S



all forms enabled
middle form submitted


Outer
Middle
Inner


_
S
S



all forms enabled
inner form submitted


Outer
Middle
Inner


_
_
S



middle form disabled
outer form submitted


Outer
Middle
Inner


S
_
_



inner form disabled
outer form submitted


Outer
Middle
Inner


S
S
_



outer form disabled
outer form submitted


Outer
Middle
Inner


_
_
_



all forms enabled
middle form has error
outer form submitted


Outer
Middle
Inner


E
E
_



all forms enabled
middle form has errors
middle form submitted


Outer
Middle
Inner


_
E
_



all forms enabled
inner form has errors
middle form submitted


Outer
Middle
Inner


_
E
E



middle form disabled
outer form has errors
outer form submitted


Outer
Middle
Inner


E
_
_



all forms enabled
inner form has errors
outer form submitted


Outer
Middle
Inner


E
E
E



middle form disabled
inner form has (*potential) errors
outer form submitted


Outer
Middle
Inner*


S
_
_













Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request

Unsubscribe or edit your notifications preferences








svn commit: r687144 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/crypt/KeyInSessionSunJceCryptFactory.java

2008-08-19 Thread jcompagner
Author: jcompagner
Date: Tue Aug 19 13:27:18 2008
New Revision: 687144

URL: http://svn.apache.org/viewvc?rev=687144view=rev
Log:
bad bad igor, going on vacation with a broken build!

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/crypt/KeyInSessionSunJceCryptFactory.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/crypt/KeyInSessionSunJceCryptFactory.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/crypt/KeyInSessionSunJceCryptFactory.java?rev=687144r1=687143r2=687144view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/crypt/KeyInSessionSunJceCryptFactory.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/crypt/KeyInSessionSunJceCryptFactory.java
 Tue Aug 19 13:27:18 2008
@@ -16,7 +16,7 @@
  */
 package org.apache.wicket.util.crypt;
 
-import java.util.UUID;
+import java.security.SecureRandom;
 
 import javax.servlet.http.HttpSession;
 
@@ -34,6 +34,8 @@
  */
 public class KeyInSessionSunJceCryptFactory implements ICryptFactory
 {
+   private static SecureRandom numberGenerator;
+
public ICrypt newCrypt()
{
WebRequestCycle rc = (WebRequestCycle)RequestCycle.get();
@@ -47,7 +49,7 @@
if (key == null)
{
// generate new key
-   key = session.getId() + . + 
UUID.randomUUID().toString();
+   key = session.getId() + . + randomUUIDString();
session.setAttribute(keyAttr, key);
}
 
@@ -56,4 +58,38 @@
crypt.setKey(key);
return crypt;
}
+
+   private static String randomUUIDString()
+   {
+   SecureRandom ng = numberGenerator;
+   if (ng == null)
+   {
+   numberGenerator = ng = new SecureRandom();
+   }
+
+   byte[] randomBytes = new byte[16];
+   ng.nextBytes(randomBytes);
+   randomBytes[6] = 0x0f; /* clear version */
+   randomBytes[6] |= 0x40; /* set to version 4 */
+   randomBytes[8] = 0x3f; /* clear variant */
+   randomBytes[8] |= 0x80; /* set to IETF variant */
+
+   long mostSigBits = 0;
+   long leastSigBits = 0;
+   for (int i = 0; i  8; i++)
+   mostSigBits = (mostSigBits  8) | (randomBytes[i]  
0xff);
+   for (int i = 8; i  16; i++)
+   leastSigBits = (leastSigBits  8) | (randomBytes[i]  
0xff);
+
+
+   return (digits(mostSigBits  32, 8) + - + digits(mostSigBits 
 16, 4) + - +
+   digits(mostSigBits, 4) + - + digits(leastSigBits  
48, 4) + - + digits(
+   leastSigBits, 12));
+   }
+
+   private static String digits(long val, int digits)
+   {
+   long hi = 1L  (digits * 4);
+   return Long.toHexString(hi | (val  (hi - 1))).substring(1);
+   }
 }




svn commit: r687145 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java

2008-08-19 Thread jcompagner
Author: jcompagner
Date: Tue Aug 19 13:28:05 2008
New Revision: 687145

URL: http://svn.apache.org/viewvc?rev=687145view=rev
Log:
some api upgrades so that caching can be better done differently if somebody 
wants it 

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java?rev=687145r1=687144r2=687145view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java
 Tue Aug 19 13:28:05 2008
@@ -346,7 +346,7 @@
}
 
// flag markup as non-existent
-   return putIntoCache(cacheKey, Markup.NO_MARKUP);
+   return putIntoCache(cacheKey, container, Markup.NO_MARKUP);
}
 
/**
@@ -358,6 +358,8 @@
 * @param markup
 * @return markup The markup provided, except if the cacheKey already 
existed in the cache, than
 * the markup from the cache is provided.
+* 
+* @deprecated see
 */
protected Markup putIntoCache(final String locationString, Markup 
markup)
{
@@ -383,6 +385,27 @@
}
 
/**
+* Put the markup into the cache if cacheKey is not null and the cache 
does not yet contain the
+* cacheKey. Return the markup stored in the cache if cacheKey is 
present already.
+* 
+* More sophisticated implementations may call a container method to 
e.g. cache it per container
+* instance.
+* 
+* @param locationString
+*If null, than ignore the cache
+* @param container
+*The container this markup is for.
+* @param markup
+* @return markup The markup provided, except if the cacheKey already 
existed in the cache, than
+* the markup from the cache is provided.
+*/
+   protected Markup putIntoCache(final String locationString, 
MarkupContainer container,
+   Markup markup)
+   {
+   return putIntoCache(locationString, markup);
+   }
+
+   /**
 * Wicket's default implementation just uses the cacheKey to retrieve 
the markup from the cache.
 * More sophisticated implementations may call a container method to 
e.g. ignore the cached
 * markup under certain situations.
@@ -435,12 +458,13 @@
 
if (cacheKey != null)
{
-   if (markup.locationAsString() != null) {
+   if (markup.locationAsString() != null)
+   {
locationString = 
markup.locationAsString();
}
// add the markup to the cache.
markupKeyCache.put(cacheKey, locationString);
-   return putIntoCache(locationString, markup);
+   return putIntoCache(locationString, container, 
markup);
}
return markup;
}




[jira] Commented: (WICKET-1784) Enhance IDataProvider to support applications using the Transfer Object J2EE pattern

2008-08-19 Thread R. Goodwin (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12623790#action_12623790
 ] 

R. Goodwin commented on WICKET-1784:


I did find that creating the replacement DataView and DataProvider was pretty 
straightforward.

But going down the path of subclassing higher up the hierarchy (i.e. 
RefreshingView) still concerns me:

* The PagingNavigationLink classes are trying to get the data provider size 
before data is loaded, so a full solution would seem to require writing 
alternatives to those classes and PagingNavigator too. Until then, my version 
of DataView is flawed.
* We lose out on functionality added lower down in the hierarchy, i.e. the 
change management code in AbstractPageeableView, and anything else added in 
future

Unless I'm missing a trick here ...

---
By the way, every other aspect of Wicket development has been perfect by 
comparison. So thanks.
Can't believe how quick it is to put together web apps.

 Enhance IDataProvider to support applications using the Transfer Object J2EE 
 pattern
 

 Key: WICKET-1784
 URL: https://issues.apache.org/jira/browse/WICKET-1784
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.3.3, 1.4-M3
 Environment: Wicket 1.3.3 and 1.4-M3
Reporter: R. Goodwin
Assignee: Igor Vaynberg
 Attachments: wicket-paging-experiment.zip


 In some environments searches are performed in 'single call' fashion, using a 
 transfer object.
 E.g. two queries performed by the data services tier before returning 
 combined results to the UI tier:
 i. Query for paged search results
 ii. Query for a 'count' value representing total possible results
 The contract between DataView and IDataProvider does not support a 'single 
 call' environment as the give/take relationship between these classes is 
 biased towards DataView.
 DataView expects IDataProvider to provide it's size before providing 
 IDataProvider with its offset and count.
 * DataView may have good reasons for needing size before it can provide 
 offset/count.
 * But IDataProvider has equally good reasons for needing offset/count before 
 it can provide size.
 The circular dependency:
 1. DataView calls IDataProvider.size()
 2. IDataProvider cannot return size as it cannot start a query until it 
 receives offset/count from DataView
 3. These it does not receive until DataView calls IDataProvider.iterator() 
 later on
 Others who experienced this problem (with CODE examples):
 * http://www.nabble.com/IDataProvider-and-Hibernate-Search-td15546101.html
 * http://www.mail-archive.com/[EMAIL PROTECTED]/msg14266.html
 ---
 The suggested solution of caching the combined search results and count value 
 does not work if the search cannot begin until offset and count are 
 available. And writing a custom DataView is not feasible either time wise as 
 I understand that it cannot be done without needing to write a number of 
 other classes too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r687197 - /wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-ng.js

2008-08-19 Thread knopp
Author: knopp
Date: Tue Aug 19 16:44:17 2008
New Revision: 687197

URL: http://svn.apache.org/viewvc?rev=687197view=rev
Log:
yui 3

Modified:

wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-ng.js

Modified: 
wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-ng.js
URL: 
http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-ng.js?rev=687197r1=687196r2=687197view=diff
==
--- 
wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-ng.js
 (original)
+++ 
wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-ng.js
 Tue Aug 19 16:44:17 2008
@@ -1,22 +1,25 @@
 (function() {
+
+YUI().use('*', function(Y) {

/*
 * YUI Shortcuts 
 */
-   var D = YAHOO.util.Dom;
-   var E = YAHOO.util.Event;
-   var L = YAHOO.lang;
+   var E = Y.Event;
+   var L = Y.Lang;
var UA = YAHOO.env.ua;

-   var oldWicket = window.Wicket;  
-   
-   Wicket = { };
+   var W = { };
 
+   // Publish the current YUI instance.
+   // Creating new YUI instance every time is needed can be quite expensive
+   W.Y = Y;
+   
/*
-* Wicket.$, Wicket.$$
+* W.$, W.$$
 */

-   Wicket.$ = function(arg) 
+   W.$ = function(arg) 
{
if (arg == null || typeof(arg) == undefined) 
{
@@ -27,7 +30,7 @@
var e=[];
for (var i=0; iarguments.length; i++) 
{
-   e.push(Wicket.$(arguments[i]));
+   e.push(W.$(arguments[i]));
}
return e;
} 
@@ -54,15 +57,15 @@
 * If the argument is a string, returns whether the document contains 
element with given id.
 * If the argument is neither element nor a string function returns 
true.
 */
-   Wicket.$$ = function(element) 
-   {   
+   W.$$ = function(element) 
+   {   
if (L.isString(element)) 
-   {
-   return Wicket.$(element) != null;
+   {   
+   return W.$(element) != null;
}
else 
{   
-   return D.inDocument(element);
+   return Y.get(element).inDoc();
}
}

@@ -152,7 +155,7 @@

var logConfig = { trace: true, debug: true, info: true, error: true, 
trace:GarbageCollector: false };

-   Wicket.Log  = 
+   W.Log  = 
{
trace: function()
{
@@ -193,7 +196,7 @@
};

// convenience shortcut
-   var log = Wicket.Log;
+   var log = W.Log;

/*
 * Garbage Collection (for removing event listeners from elements 
removed from DOM)
@@ -260,7 +263,7 @@
if (e != null)
{
++done;
-   if (!Wicket.$$(e)) {
+   if (!W.$$(e)) {
E.purgeElement(e);
++this.purgedCount;
} else {
@@ -288,25 +291,48 @@
}

var garbageCollector = new GarbageCollector(5000);
+
+   // We need to intercept addListener for current YUI instance as well as 
for all subsequent instances

-   var oldAddListener = E.addListener;
-   
+   var oldAddListener = Y.Event.addListener;   
/**
 * Intercept the YAHOO.util.Event.addListener method and append the 
element
 * to elementsWithListeners array so that we can purge it once it get 
removed from DOM;
 */
-   E.addListener = function(el)
+   Y.Event.addListener = function(el)
{   
log.trace(Events, Adding event listeners, arguments);
oldAddListener.apply(this, arguments);
if (el !== window  el !== document)
{
var a = garbageCollector.elementsWithListeners;
-   a.push(Wicket.$(el));   
+   a.push(W.$(el));
}
};
+
+   // This intercepts addListener in other YUI instances
+   YUI.add(event-dom-fix, function(YY) 
+   {   
+   var oldAddListener = 

[CONF] Apache Wicket: Wicket Employers (page edited)

2008-08-19 Thread confluence










Page Edited :
WICKET :
Wicket Employers



 
Wicket Employers
has been edited by Christopher Crook
(Aug 19, 2008).
 

 
 (View changes)
 

Content:
List of employers who are interested in developers with Wicket experience.


Wicket Employers


	BlueXML BlueXML is hiring for a RD project which mixes models, specifications and components to create a new paradigm to develop web applications in a more "sustainable" way. People with strong java and web skills are more than welcome.




	Cataphora is a leading e-discovery and legal review software company located in Silicon Valley and is using Wicket for its web applications.  Its careers page can be found here.




	Curalia provides web applications and system integrations based on Wicket, Spring, Hibernate, ServiceMix and internal solutions.




	Func. Internet Integration is a Dutch company providing web applications and system integrations on a Wicket - Hibernate - XFire - Spring stack, mainly for the educational market.




	Hippo ECMS Hippo, supplier of Enterprise Content Management and Portal software based on Wicket, Lucene, Jackrabbit and Jetspeed.




	Inertia Beverage Group is a Software-as-Service platform for the wine industry. (Wicket-based platform is currently under development.)




	Koodaripalvelut.com Finland a Finnish ICT consulting company.




	MeetMoi.com Location based real time dating on mobile phones




	MX Telecom is a major player in the international mobile telecoms industry, and uses Wicket for various internal and client-facing systems.




	Reaktor Innovations is a Finnish consulting company.




	Syncron Tech is a Finnish industrial consulting company.




	Teachscape provides professional learning tools through a platform that uses Wicket.




	Topicus Zorg is a Dutch company (located in Deventer) that is specialised in the realisation of innovative web-based applications in the care sector.




	Topicus Onderwijs is a Dutch company (located in Deventer) that is specialised in the realisation of innovative web-based applications in the education sector: amongst others we have created Parnassys for primary schools, and Vocus for high schools. Some slides for Vocus can be found here.




	Vegas.com is a travel/entertainment retailer (hotel reservations, tickets to shows, etc), focused on the Las Vegas market.




	WorldEvolved Services, a young startup based in New York City, is hiring talented developers to design and implement a web framework based on Wicket. The company is in stealth mode, and hence further information will be given after an initial screening. To apply please contact [EMAIL PROTECTED]




	Genuco Systems is a leading edge software development company specializing in financial applications.













Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request

Unsubscribe or edit your notifications preferences