svn commit: r646660 - /wicket/trunk/archetypes/quickstart/pom.xml

2008-04-09 Thread ivaynberg
Author: ivaynberg
Date: Wed Apr  9 23:07:23 2008
New Revision: 646660

URL: http://svn.apache.org/viewvc?rev=646660&view=rev
Log:
fixing archetype pom

Modified:
wicket/trunk/archetypes/quickstart/pom.xml

Modified: wicket/trunk/archetypes/quickstart/pom.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/pom.xml?rev=646660&r1=646659&r2=646660&view=diff
==
--- wicket/trunk/archetypes/quickstart/pom.xml (original)
+++ wicket/trunk/archetypes/quickstart/pom.xml Wed Apr  9 23:07:23 2008
@@ -4,7 +4,7 @@
org.apache.wicket
wicket-jdk14
1.4-SNAPSHOT
-   ../../pom.xml
+   ../../jdk14/pom.xml
   
   
   wicket-archetype-quickstart




svn commit: r646658 - /wicket/trunk/archetypes/quickstart/pom.xml

2008-04-09 Thread ivaynberg
Author: ivaynberg
Date: Wed Apr  9 22:58:07 2008
New Revision: 646658

URL: http://svn.apache.org/viewvc?rev=646658&view=rev
Log:
update version

Modified:
wicket/trunk/archetypes/quickstart/pom.xml

Modified: wicket/trunk/archetypes/quickstart/pom.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/pom.xml?rev=646658&r1=646657&r2=646658&view=diff
==
--- wicket/trunk/archetypes/quickstart/pom.xml (original)
+++ wicket/trunk/archetypes/quickstart/pom.xml Wed Apr  9 22:58:07 2008
@@ -3,7 +3,7 @@
   
org.apache.wicket
wicket-jdk14
-   1.3-SNAPSHOT
+   1.4-SNAPSHOT
../../pom.xml
   
   




[jira] Reopened: (WICKET-1448) SubmitLink bypass jquery submit eventhandler

2008-04-09 Thread xiefei (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xiefei reopened WICKET-1448:



Reopening an issue indicates that it has not been completed, and should be 
looked at again.

> SubmitLink bypass jquery submit eventhandler
> 
>
> Key: WICKET-1448
> URL: https://issues.apache.org/jira/browse/WICKET-1448
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.2
>Reporter: xiefei
>Assignee: Matej Knopp
>
> submit
> if:
> 
> response.renderOnDomReadyJavascript("jQuery('#"+component.getMarkupId()+"').submit(function(){alert('x');return
>  false;})");
> the alert will not show when submitLink is clicked, and the form is submitted
> if: 
> 
> response.renderOnDomReadyJavascript("document.getElementById('"+component.getMarkupId()+"').onsubmit
>  = function(){alert('x');return false;}");
> the alert will show and the form is not submmitted

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



[jira] Commented: (WICKET-1322) NormalUrlCodingStrategy: It does not append / to the end of the url before the parameters

2008-04-09 Thread Igor Vaynberg (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587455#action_12587455
 ] 

Igor Vaynberg commented on WICKET-1322:
---

erm, wdym no objections??? why would we have something like this in core when 
we also have something 99% similar. i find that this one is the one that makes 
more sense, so why not just change how our default one works?

> NormalUrlCodingStrategy: It does not append / to the end of the url before 
> the parameters
> -
>
> Key: WICKET-1322
> URL: https://issues.apache.org/jira/browse/WICKET-1322
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 1.3.0-final
>Reporter: Daniel Kaplan
>Assignee: Johan Compagner
> Attachments: NormalUrlCodingStrategy.java
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> For some reason that I cannot understand, QueryStringUrlCodingStrategy will 
> code urls like this:
> www.example.com/a/path/?var=val  That last slash is abnormal from what I've 
> seen.  I've included a class called NormalUrlCodingStrategy that does the 
> same thing as QueryStringUrlCodingStrategy but does not add this extra slash.

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



[jira] Created: (WICKET-1510) FormDispatcherRequest creates invalid parameter map

2008-04-09 Thread Matej Knopp (JIRA)
FormDispatcherRequest creates invalid parameter map
---

 Key: WICKET-1510
 URL: https://issues.apache.org/jira/browse/WICKET-1510
 Project: Wicket
  Issue Type: Bug
Affects Versions: 1.3.3
Reporter: Matej Knopp
Assignee: Matej Knopp
 Fix For: 1.3.4




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



[jira] Closed: (WICKET-1510) FormDispatcherRequest creates invalid parameter map

2008-04-09 Thread Matej Knopp (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matej Knopp closed WICKET-1510.
---


> FormDispatcherRequest creates invalid parameter map
> ---
>
> Key: WICKET-1510
> URL: https://issues.apache.org/jira/browse/WICKET-1510
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 1.3.3
>Reporter: Matej Knopp
>Assignee: Matej Knopp
> Fix For: 1.3.4
>
>


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



[jira] Resolved: (WICKET-1509) Add QueryString property to RequestParameters and Request

2008-04-09 Thread Matej Knopp (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matej Knopp resolved WICKET-1509.
-

Resolution: Fixed

> Add QueryString property to RequestParameters and Request 
> --
>
> Key: WICKET-1509
> URL: https://issues.apache.org/jira/browse/WICKET-1509
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Matej Knopp
>Assignee: Matej Knopp
> Fix For: 1.4-M1
>
>


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



[jira] Closed: (WICKET-1509) Add QueryString property to RequestParameters and Request

2008-04-09 Thread Matej Knopp (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matej Knopp closed WICKET-1509.
---


> Add QueryString property to RequestParameters and Request 
> --
>
> Key: WICKET-1509
> URL: https://issues.apache.org/jira/browse/WICKET-1509
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Matej Knopp
>Assignee: Matej Knopp
> Fix For: 1.4-M1
>
>


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



[jira] Resolved: (WICKET-1510) FormDispatcherRequest creates invalid parameter map

2008-04-09 Thread Matej Knopp (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matej Knopp resolved WICKET-1510.
-

Resolution: Fixed

> FormDispatcherRequest creates invalid parameter map
> ---
>
> Key: WICKET-1510
> URL: https://issues.apache.org/jira/browse/WICKET-1510
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 1.3.3
>Reporter: Matej Knopp
>Assignee: Matej Knopp
> Fix For: 1.3.4
>
>


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



svn commit: r646600 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: markup/html/form/ protocol/http/ protocol/http/request/

2008-04-09 Thread knopp
Author: knopp
Date: Wed Apr  9 16:56:12 2008
New Revision: 646600

URL: http://svn.apache.org/viewvc?rev=646600&view=rev
Log:
WICKET-1510

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java?rev=646600&r1=646599&r2=646600&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java
 Wed Apr  9 16:56:12 2008
@@ -186,7 +186,7 @@
 */
class FormDispatchRequest extends Request
{
-   private final ValueMap params = new ValueMap();
+   private final Map params = new HashMap();
 
private final Request realRequest;
 
@@ -204,7 +204,7 @@
this.url = realRequest.decodeURL(url);
 
String queryString = 
this.url.substring(this.url.indexOf("?") + 1);
-   RequestUtils.decodeParameters(queryString, params);
+   RequestUtils.decodeUrlParameters(queryString, params);
}
 
/**
@@ -277,6 +277,12 @@
{
return url;
}
+   
+   @Override
+   public String getQueryString()
+   {
+   return realRequest.getQueryString();
+   }
}
 
/**
@@ -1577,7 +1583,7 @@
String method = getMethod().toLowerCase();
tag.put("method", method);
String url = 
urlFor(IFormSubmitListener.INTERFACE).toString();
-   if (method.equals("get"))
+   if (encodeUrlInHiddenFields())
{
int i = url.indexOf('?');
String action = (i > -1) ? url.substring(0, i) 
: "";
@@ -1617,6 +1623,12 @@
}
}
 
+   protected boolean encodeUrlInHiddenFields()
+   {
+   String method = getMethod().toLowerCase();
+   return method.equals("get");
+   }
+
/**
 * Append an additional hidden input tag to support anchor tags that 
can submit a form.
 * 
@@ -1639,20 +1651,16 @@
.append("\" id=\"")
.append(nameAndId)
.append("\" />");
-   String method = getMethod().toLowerCase();
+
// if it's a get, did put the parameters in the action 
attribute,
// and have to write the url parameters as hidden fields
-   if (method.equals("get"))
+   if (encodeUrlInHiddenFields())
{
String url = 
urlFor(IFormSubmitListener.INTERFACE).toString();
int i = url.indexOf('?');
String[] params = ((i > -1) ? url.substring(i + 
1) : url).split("&");
-   for (int j = 0; j < params.length; j++)
-   {
-   String[] pair = params[j].split("=");
-   buffer.append(" 1 ? pair[1] : "").append("\" />");
-   }
+
+   writeParamsAsHiddenFields(params, buffer);
}
buffer.append("");
getResponse().write(buffer);
@@ -1670,6 +1678,17 @@
 
// do the rest of the processing
super.onComponentTagBody(markupStream, openTag);
+   }
+
+   protected void writeParamsAsHiddenFields(String[] params, 
AppendingStringBuffer buffer)
+   {
+   for (int j = 0; j < params.length; j++)
+   {
+   String[] pair = params[j].split("=");
+
+   buffer.append(" 1 ? pair[1] 
: "").append("\" />");
+   }
}
 
/**

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestUtils

[jira] Created: (WICKET-1509) Add QueryString property to RequestParameters and Request

2008-04-09 Thread Matej Knopp (JIRA)
Add QueryString property to RequestParameters and Request 
--

 Key: WICKET-1509
 URL: https://issues.apache.org/jira/browse/WICKET-1509
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.3.3
Reporter: Matej Knopp
Assignee: Matej Knopp
 Fix For: 1.4-M1




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



svn commit: r646599 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: Request.java protocol/http/servlet/ServletWebRequest.java request/RequestParameters.java

2008-04-09 Thread knopp
Author: knopp
Date: Wed Apr  9 16:54:25 2008
New Revision: 646599

URL: http://svn.apache.org/viewvc?rev=646599&view=rev
Log:
WICKET-1509

Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Request.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/RequestParameters.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Request.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Request.java?rev=646599&r1=646598&r2=646599&view=diff
==
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Request.java 
(original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Request.java 
Wed Apr  9 16:54:25 2008
@@ -224,4 +224,11 @@
{
return "Request[url=" + getURL() + "]";
}
+   
+   /**
+* Returns the query string (part after ?) of this request.
+* 
+* @return request query string 
+*/
+   public abstract String getQueryString(); 
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java?rev=646599&r1=646598&r2=646599&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
 Wed Apr  9 16:54:25 2008
@@ -491,4 +491,10 @@
}
 
}
+   
+   @Override
+   public String getQueryString()
+   {
+   return httpServletRequest.getQueryString();
+   }
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/RequestParameters.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/RequestParameters.java?rev=646599&r1=646598&r2=646599&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/RequestParameters.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/RequestParameters.java
 Wed Apr  9 16:54:25 2008
@@ -83,6 +83,9 @@
 
/** depth of the page for relative URLs. */
private int urlDepth = -1;
+   
+   /* the request query string */
+   private String queryString;
 
/**
 * Construct.
@@ -427,6 +430,22 @@
 
b.append("]");
return b.toString();
+   }
+   
+   /**
+* @return request query string
+*/
+   public String getQueryString()
+   {
+   return queryString;
+   }
+   
+   /**
+* @param queryString
+*/
+   public void setQueryString(String queryString)
+   {
+   this.queryString = queryString;
}
 
 }




[jira] Assigned: (WICKET-1322) NormalUrlCodingStrategy: It does not append / to the end of the url before the parameters

2008-04-09 Thread Matej Knopp (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matej Knopp reassigned WICKET-1322:
---

Assignee: Johan Compagner  (was: Matej Knopp)

> NormalUrlCodingStrategy: It does not append / to the end of the url before 
> the parameters
> -
>
> Key: WICKET-1322
> URL: https://issues.apache.org/jira/browse/WICKET-1322
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 1.3.0-final
>Reporter: Daniel Kaplan
>Assignee: Johan Compagner
> Attachments: NormalUrlCodingStrategy.java
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> For some reason that I cannot understand, QueryStringUrlCodingStrategy will 
> code urls like this:
> www.example.com/a/path/?var=val  That last slash is abnormal from what I've 
> seen.  I've included a class called NormalUrlCodingStrategy that does the 
> same thing as QueryStringUrlCodingStrategy but does not add this extra slash.

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



[jira] Commented: (WICKET-1322) NormalUrlCodingStrategy: It does not append / to the end of the url before the parameters

2008-04-09 Thread Matej Knopp (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587430#action_12587430
 ] 

Matej Knopp commented on WICKET-1322:
-

No objections.

> NormalUrlCodingStrategy: It does not append / to the end of the url before 
> the parameters
> -
>
> Key: WICKET-1322
> URL: https://issues.apache.org/jira/browse/WICKET-1322
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 1.3.0-final
>Reporter: Daniel Kaplan
>Assignee: Matej Knopp
> Attachments: NormalUrlCodingStrategy.java
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> For some reason that I cannot understand, QueryStringUrlCodingStrategy will 
> code urls like this:
> www.example.com/a/path/?var=val  That last slash is abnormal from what I've 
> seen.  I've included a class called NormalUrlCodingStrategy that does the 
> same thing as QueryStringUrlCodingStrategy but does not add this extra slash.

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



[CONF] Apache Wicket: Wicket 1.5 Wish List (page edited)

2008-04-09 Thread confluence










Page Edited :
WICKET :
Wicket 1.5 Wish List



 
Wicket 1.5 Wish List
has been edited by Jonathan Locke
(Apr 09, 2008).
 

 
 (View changes)
 

Content:
create abstraction for content types

currently, wicket has a concept of "markup type" that is actually the markup extension. in doing work on wml support for "mobile wicket", i'm discovering a need for full mime type support.  if it doesn't break too many people, it would ideally be best to introduce a formal MarkupType class with a getExtension() and getContentType(), where ContentType includes mime type information. there quite a bit to think through here in terms of request/response markup type mappings, but i'd be up for working on this.  this problem is definitely generic to problems outside mobile wicket. – jonathan

multiply child/extend inheritance

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

improve ajax support of _javascript_

i still think we should be doing something more object oriented in terms of composing _javascript_ for ajax purposes.  i'd like to see us adopt something like that _javascript_ class i was promoting a while back.  one thing that occurs to me today is that not only could you easily compose _javascript_ this way, but there might be a whole host of reusable _javascript_ behaviors we could all leverage.  for example, instead of having bits of _javascript_ code hacked into strings all over projects to accomplish deletion confirmation on link/button clicks, we could have ConfirmJavaScript extends _javascript_ and take care of the gory details in there (string resources for localization, whatever).  as hunks of _javascript_ get more complex and prevalent, creating this abstraction could really serve us nicely as a community.  i personally would have loved to reuse things like FadeComponentJavaScript or DisableComponentJavaScript.  the subclasses will all take a lot of work to create, but let's make an abstraction for JS code so we can do this work at all. – jonathan

A few advantages to making our _javascript_ more OO:

	conform to Yahoo recommendations on page rendering performance by putting _javascript_ just before 
	more component oriented development through object literals (JSON)
	separate _javascript_ from markup




ListView users = new ListView("users", usersModel);
users.setOutputMarkupId(true);

Event e = new ClickEvent("a[class=deleteLink]"); // DomQuery-esque selector (http://extjs.com/learn/Tutorial:DomQuery_v1.1_Basics)... selector could be turned into a Builder object instead of string
e.addHandler(new ConfirmDialog("Are you sure you want to delete?"));

users.addEvent(e); // can be shortened to new ClickEvent("...", new ConfirmDialog("..."))

serializes to:

{ element: "{usersMarkupId}:", // generated by Component
  events: [
  { event: "click", [  // generated by ClickEvent
  { selector: "a[class=deleteLink]",
handlers: [
  function() { // generated by ConfirmDialog
if(confirm("Are you sure you want to delete?") {
  // Wicket.ajax...
}
  }
]
  }
]
  }
]
}

Wrap the above in an 'ondomready' event and we have unobtrusive _javascript_ that should be easier to abstract going forward.

– brian

New Inspectors

Add inspector to look for empty src=""  attrs which cause extra requests to the server

Remove Change and possibly VersionManager

no longer needed since we serialize the entire page. Downside - makes HttpSessionStore not as space efficient
(possibly move these implementation details down into the session store package? - jonathan)
(this is already pushed to the store package i guess, version manager and pagemap are created by the httpsession store already,
the problem with removing this is that it will break all stuff that cant depend on the file based store are really need to be in mem,
the disk based store already doesn't do anything with Change and also the version manager, it only uses the version number from the vm, johan)

Cleanup component visibility

Currently we have Component.set/isVisible, Component.isRenderAllowed, Component.set/isVisibilityAllowed

The reason for Component.set/isVisible is simply - allow users to control visibility of their component

The reason for Component.isRenderAllowed is for security strategy to be able to force component to be invisible

Now if i am a user and want to test if the component will be rendered or not I need to do

boolean visible=component.isVisible()&&component.isRenderAllowed()

 This is ugly as I have to remember both checks all the time. Because of this I have introduced Component.determineVisibility() in 1.3.3 which encapsulates all necessary checks.
Now, what if I want to write a component that controls visibility of its children or other components. It can call chi

[jira] Created: (WICKET-1508) EmptyStackException parsing HTML

2008-04-09 Thread Jonathan Locke (JIRA)
EmptyStackException parsing HTML


 Key: WICKET-1508
 URL: https://issues.apache.org/jira/browse/WICKET-1508
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.3
Reporter: Jonathan Locke



I do not have an easy repro case for this, but it might be worth looking at 
whether the code should be more defensive.

java.util.EmptyStackException
at 
org.apache.wicket.util.collections.ArrayListStack.peek(ArrayListStack.java:101)
at 
org.apache.wicket.util.collections.ArrayListStack.pop(ArrayListStack.java:84)
at 
org.apache.wicket.markup.parser.filter.HtmlHandler.nextTag(HtmlHandler.java:134)
at 
org.apache.wicket.markup.parser.filter.WicketRemoveTagHandler.nextTag(WicketRemoveTagHandler.java:60)
at 
org.apache.wicket.markup.parser.filter.WicketLinkTagHandler.nextTag(WicketLinkTagHandler.java:94)
at 
org.apache.wicket.markup.parser.AbstractMarkupFilter.nextComponentTag(AbstractMarkupFilter.java:82)
at 
org.apache.wicket.markup.parser.filter.WicketNamespaceHandler.nextTag(WicketNamespaceHandler.java:72)
at 
org.apache.wicket.markup.parser.AbstractMarkupFilter.nextComponentTag(AbstractMarkupFilter.java:82)
at 
org.apache.wicket.markup.parser.filter.WicketMessageTagHandler.nextTag(WicketMessageTagHandler.java:81)
at 
org.apache.wicket.markup.parser.AbstractMarkupFilter.nextComponentTag(AbstractMarkupFilter.java:82)
at 
org.apache.wicket.markup.parser.filter.HtmlHeaderSectionHandler.nextTag(HtmlHeaderSectionHandler.java:77)
at 
org.apache.wicket.markup.parser.filter.HeadForceTagIdHandler.nextTag(HeadForceTagIdHandler.java:77)
at 
org.apache.wicket.markup.parser.AbstractMarkupFilter.nextComponentTag(AbstractMarkupFilter.java:82)
at 
org.apache.wicket.markup.parser.filter.OpenCloseTagExpander.nextTag(OpenCloseTagExpander.java:51)
at 
org.apache.wicket.markup.parser.AbstractMarkupFilter.nextComponentTag(AbstractMarkupFilter.java:82)
at 
org.apache.wicket.markup.parser.filter.EnclosureHandler.nextTag(EnclosureHandler.java:76)
at 
org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler.nextTag(RelativePathPrefixHandler.java:116)
at 
org.apache.wicket.markup.MarkupParser.getNextTag(MarkupParser.java:302)
at 
org.apache.wicket.markup.MarkupParser.parseMarkup(MarkupParser.java:322)
at org.apache.wicket.markup.MarkupParser.parse(MarkupParser.java:270)
at 
org.apache.wicket.markup.loader.SimpleMarkupLoader.loadMarkup(SimpleMarkupLoader.java:52)
at 
org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:62)
at 
org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:433)
at 
org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:523)
at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:319)
at 
org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215)
at 
org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:343)
at org.apache.wicket.Page.onRender(Page.java:1453)
at org.apache.wicket.Component.render(Component.java:2315)
at org.apache.wicket.Page.renderPage(Page.java:906)
at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:291)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpCon

svn commit: r646577 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java

2008-04-09 Thread jdonnerstag
Author: jdonnerstag
Date: Wed Apr  9 15:35:00 2008
New Revision: 646577

URL: http://svn.apache.org/viewvc?rev=646577&view=rev
Log:
generics

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java?rev=646577&r1=646576&r2=646577&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java
 Wed Apr  9 15:35:00 2008
@@ -19,7 +19,6 @@
 import java.lang.ref.WeakReference;
 import java.util.Locale;
 
-import org.apache.wicket.Application;
 import org.apache.wicket.Component;
 import org.apache.wicket.Session;
 
@@ -38,7 +37,7 @@
 public class ClassStringResourceLoader extends ComponentStringResourceLoader
 {
/** The application we are loading for. */
-   private final WeakReference> clazzRef;
+   private final WeakReference> clazzRef;
 
/**
 * Create and initialize the resource loader.
@@ -46,13 +45,13 @@
 * @param clazz
 *The class that this resource loader is associated with
 */
-   public ClassStringResourceLoader(final Class< ? extends Application> 
clazz)
+   public ClassStringResourceLoader(final Class< ? > clazz)
{
if (clazz == null)
{
throw new IllegalArgumentException("Parameter 'clazz' 
must not be null");
}
-   clazzRef = new WeakReference>(clazz);
+   clazzRef = new WeakReference>(clazz);
}
 
/**




[jira] Resolved: (WICKET-1500) WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-09 Thread Maurice Marrink (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maurice Marrink resolved WICKET-1500.
-

Resolution: Invalid

Matej, i assumed this one slipped through, so i took the liberty of resolving 
it.

> WebMarkupContainer multiplicated markup when using AjaxLink
> ---
>
> Key: WICKET-1500
> URL: https://issues.apache.org/jira/browse/WICKET-1500
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.1, 1.3.3
>Reporter: Daniel Stoch
>Assignee: Matej Knopp
> Attachments: ajax-container-test.zip
>
>
> There is a strange behaviour when I'm trying refresh WebMarkupContainer 
> component using AjaxLink. I have attached quickstart-app 
> (ajax-container-test.zip) where you can see this problem. There is a simple 
> HomePage with one WebMarkupContainer and one AjaxLink. This 
> WebMarkupContainer is refreshed upon AjaxLink click.
> For the first time page is rendered as follows:
> Header A
> Ajax request
> When I click "Ajax request" link the onClick metod is called to refresh 
> container component (which is WebMarkupContainer). But instead of refreshing 
> (repainting) of "container" markup (... markup), 
> it is dupliacted below the original paragraph. Each click on this ajax link 
> causes this paragraph multiplication and after eg. 4 clicks the page looks 
> like:
> Header A
> Header A
> Header A
> Header A
> Header A
> Ajax request

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



[jira] Resolved: (WICKET-1468) Add downloadSources option to quickstart page

2008-04-09 Thread Gerolf Seitz (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerolf Seitz resolved WICKET-1468.
--

   Resolution: Fixed
Fix Version/s: (was: 1.3.4)
   1.3.3

added the eclipse-plugin configuration to the pom.xml in archetype-resources

> Add downloadSources option to quickstart page
> -
>
> Key: WICKET-1468
> URL: https://issues.apache.org/jira/browse/WICKET-1468
> Project: Wicket
>  Issue Type: Improvement
>  Components: site
>Affects Versions: 1.3.2
>Reporter: Igor Vaynberg
>Assignee: Gerolf Seitz
> Fix For: 1.3.3
>
>
> would be cool to have a checkbox or a radio[yes/no] that will control 
> -DdownloadSources=true param at http://wicket.apache.org/quickstart.html

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



[jira] Commented: (WICKET-1506) More Generics (IBookmarkablePageRequestTarget)

2008-04-09 Thread Johan Compagner (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587283#action_12587283
 ] 

Johan Compagner commented on WICKET-1506:
-

make patches!

Not all generics are done yet!
it was just the first cut

> More Generics (IBookmarkablePageRequestTarget)
> --
>
> Key: WICKET-1506
> URL: https://issues.apache.org/jira/browse/WICKET-1506
> Project: Wicket
>  Issue Type: Wish
>  Components: wicket
>Affects Versions: 1.4-M1
>Reporter: Roy van Rijn
>Priority: Trivial
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> With the current movement to Java 5 some more generics can be added.
> For example:
> IBookmarkablePageRequestTarget.getPageClass could return Class Page> instead of just Class. This all helps the users and removes some casts.

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



[jira] Commented: (WICKET-1506) More Generics (IBookmarkablePageRequestTarget)

2008-04-09 Thread Roy van Rijn (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587281#action_12587281
 ] 

Roy van Rijn commented on WICKET-1506:
--

The same thing goes for: 
Class WebApplication.getHomePage()

And maybe some static String could be changed into enums? For example 
WebApplication.getConfigurationType(), only limited String alowed there, enums 
could make the code a bit safer.

> More Generics (IBookmarkablePageRequestTarget)
> --
>
> Key: WICKET-1506
> URL: https://issues.apache.org/jira/browse/WICKET-1506
> Project: Wicket
>  Issue Type: Wish
>  Components: wicket
>Affects Versions: 1.4-M1
>Reporter: Roy van Rijn
>Priority: Trivial
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> With the current movement to Java 5 some more generics can be added.
> For example:
> IBookmarkablePageRequestTarget.getPageClass could return Class Page> instead of just Class. This all helps the users and removes some casts.

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



[jira] Created: (WICKET-1507) MarkupCache style/variation/locale support broken

2008-04-09 Thread Meetesh Karia (JIRA)
MarkupCache style/variation/locale support broken
-

 Key: WICKET-1507
 URL: https://issues.apache.org/jira/browse/WICKET-1507
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.2
Reporter: Meetesh Karia
Priority: Critical


We're running into a problem with the change made for this issue: WICKET-1370

Basically, if you have a situation like this where the Login page extends 
DefaultPage and uses :

Login.html
DefaultPage.html
DefaultPage_style1.html
DefaultPage_style2.html

The markup for DefaultPage will always be based on the first style the site is 
hit with.  This is because the location string ("Login.html") hasn't changed 
with the style change.

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



[CONF] Apache Wicket: Validating related fields (page edited)

2008-04-09 Thread confluence










Page Edited :
WICKET :
Validating related fields



 
Validating related fields
has been edited by Michael Laccetti
(Apr 09, 2008).
 

 
 (View changes)
 

Content:
This whole page may be deprecated due to the EqualInputValidator or EqualPasswordInputValidator. (See the JavaDocs 1 2 for more information.)

Sometimes a field cannot be validated in isolation, but instead two or more fields must be validated together. In this case validation takes place at the form level. Subclass AbstractFormValidator, using a constructor that takes as parameters the form components to be validated. When instances of the form are created, add an instance of the validator to the form instance.

Here's an example (cortesy of Ivailo Bardarov) that validates that two given fields in the form are not both empty.

First, the form validator class:


import java.util.Collections;

import wicket.markup.html.form.Form;
import wicket.markup.html.form.FormComponent;
import wicket.markup.html.form.validation.AbstractFormValidator;
import wicket.util.lang.Objects;

/**
 * Validates that one of the input of two form components is not empty. Errors
 * are reported on the second form component with key 'OrInputValidator' and the
 * variables:
 * 
 * ${input(n)}: the user's input
 * ${name}: the name of the component
 * ${label(n)}: the label of the component - either comes from
 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
 * that order
 * 
 * 
 * @author Ivailo Bardarov
 * @see wicket.markup.html.form.validation.EqualInputValidator by Igor Vaynberg
 * 
 */
public class OrInputValidator extends AbstractFormValidator {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** form components to be checked. */
	private final FormComponent[] components;

	/**
	 * Construct.
	 * 
	 * @param formComponent1
	 *a form component
	 * @param formComponent2
	 *a form component
	 */
	public OrInputValidator(FormComponent formComponent1,
			FormComponent formComponent2) {
		if (formComponent1 == null) {
			throw new IllegalArgumentException(
	"argument formComponent1 cannot be null");
		}
		if (formComponent2 == null) {
			throw new IllegalArgumentException(
	"argument formComponent2 cannot be null");
		}
		components = new FormComponent[] { formComponent1, formComponent2 };
	}

	/**
	 * @see wicket.markup.html.form.validation.IFormValidator#getDependentFormComponents()
	 */
	public FormComponent[] getDependentFormComponents() {
		return components;
	}

	/**
	 * @see wicket.markup.html.form.validation.IFormValidator#validate(wicket.markup.html.form.Form)
	 */
	public void validate(Form form) {
		// we have a choice to validate the type converted values or the raw
		// input values, we validate the raw input
		final FormComponent formComponent1 = components[0];
		final FormComponent formComponent2 = components[1];

		if (
			"".equals(Objects.stringValue(formComponent1.getInput(), true)) &&
			"".equals(Objects.stringValue(formComponent2.getInput(), true))
		   ) {
			final String key = resourceKey(components);
			formComponent2.error(Collections.singletonList(key), messageModel());
		}
	}
}

Note that the validate method calls FormComponent.getInput to get the values to be validated, rather than getting the associated models. This is because the models are not updated until after validation.

And here's the use of validator (with irrelevant details of the form creation omitted here):

Form myForm = new Form("aForm");

FormComponent f1 = new TextField("f1");
myForm.add(f1);
FormComponent f2 = new TextField("f2");
myForm.add(f2);

myForm.add(new OrInputValidator(f1, f2));


Finally, define a property for the error message:

OrInputValidator=One of '${input0}' from ${label0} or '${input1}' from ${label1} must have a non-empty value













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

Unsubscribe or edit your notifications preferences








[jira] Created: (WICKET-1506) More Generics (IBookmarkablePageRequestTarget)

2008-04-09 Thread Roy van Rijn (JIRA)
More Generics (IBookmarkablePageRequestTarget)
--

 Key: WICKET-1506
 URL: https://issues.apache.org/jira/browse/WICKET-1506
 Project: Wicket
  Issue Type: Wish
  Components: wicket
Affects Versions: 1.4-M1
Reporter: Roy van Rijn
Priority: Trivial


With the current movement to Java 5 some more generics can be added.

For example:

IBookmarkablePageRequestTarget.getPageClass could return Class 
instead of just Class. This all helps the users and removes some casts.

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



[jira] Commented: (WICKET-1426) URL creation in wicket-ajax.js -> Wicket.Ajax.Call.doGet produces broken URLs for Gecko

2008-04-09 Thread Meetesh Karia (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587245#action_12587245
 ] 

Meetesh Karia commented on WICKET-1426:
---

The overall fix still has problems when there is an absolute path in the 
header, etc.  The following patch to wicket-ajax.js (1.3.2 released version) 
works for us and avoids the problem with slashes in the query string:

826,831c826,841
<   var lastIndexOf = href.lastIndexOf('/');
<   if (lastIndexOf > 0)
<   {
<   url = 
href.substring(0,lastIndexOf+1) + url;
<   }
<   }
---
> var hostIdx = href.indexOf(document.location.host);
> if (hostIdx >= 0) {
> href = href.substring(0, hostIdx + 
> document.location.host.length);
> }
>
> if (url.length > 0 && url.charAt(0) != '/') {
> var pathname = document.location.pathname;
> var lastIdx = pathname.lastIndexOf('/');
> if (lastIdx >= 0) {
> pathname = pathname.substring(0, lastIdx + 1)
> }
> href += pathname;
> }
>
> url = href + url;
> }

> URL creation in wicket-ajax.js -> Wicket.Ajax.Call.doGet produces broken URLs 
> for Gecko
> ---
>
> Key: WICKET-1426
> URL: https://issues.apache.org/jira/browse/WICKET-1426
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.2
> Environment: Firefox 2
>Reporter: Martin Grigorov
>Assignee: Matej Knopp
>
> With r628015 (Wicket 1.3.2) creation of full URL for Gecko browsers creates 
> broken URLs when there is a slash ('/') in the http parameter values.
> For example when a page with this URL is loaded: 
> http://localhost/app?key=value/ 
>  wicketAjaxGet will issue a query with this content:
> http://localhost/app?key=value/../?wicket:interface=:
> By RFC2396 the query part of URL could be:
>  query = *uric
>  uric  = reserved | unreserved | escaped
>  reserved  = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
>   "$" | ","
>  unreserved= alphanum | mark
> So '/' is allowed.
> Here is a quick patch:
> --- wicket-ajax.js  (revision 637425)
> +++ wicket-ajax.js  (working copy)
> @@ -823,6 +823,10 @@
> if (t != null) {
> if (Wicket.Browser.isGecko()) {
> var href = document.location.href;
> +   var lastIndexOfQuestionMark = 
> href.lastIndexOf('?');
> +   if (lastIndexOfQuestionMark > -1) {
> +   href = href.substring(0, 
> lastIndexOfQuestionMark);
> +   }
> var lastIndexOf = 
> href.lastIndexOf('/');
> if (lastIndexOf > 0)
> {

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



svn commit: r646399 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: behavior/ markup/ markup/loader/ markup/parser/ markup/parser/filter/

2008-04-09 Thread jdonnerstag
Author: jdonnerstag
Date: Wed Apr  9 08:12:01 2008
New Revision: 646399

URL: http://svn.apache.org/viewvc?rev=646399&view=rev
Log:
generics

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/IMarkupCache.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/loader/DefaultMarkupLoader.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/loader/IMarkupLoader.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/loader/InheritedMarkupMarkupLoader.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/loader/SimpleMarkupLoader.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/XmlTag.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/EnclosureHandler.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/HeadForceTagIdHandler.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/HtmlProblemFinder.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/RelativePathPrefixHandler.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/TagTypeHandler.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketMessageTagHandler.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketTagIdentifier.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java?rev=646399&r1=646398&r2=646399&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
 Wed Apr  9 08:12:01 2008
@@ -46,14 +46,14 @@
/**
 * @see 
org.apache.wicket.behavior.IBehavior#beforeRender(org.apache.wicket.Component)
 */
-   public void beforeRender(Component component)
+   public void beforeRender(Component< ? > component)
{
}
 
/**
 * @see 
org.apache.wicket.behavior.IBehavior#bind(org.apache.wicket.Component)
 */
-   public void bind(final Component component)
+   public void bind(final Component< ? > component)
{
}
 
@@ -69,16 +69,15 @@
/**
 * @see org.apache.wicket.behavior.IBehavior#detach(Component)
 */
-   public void detach(Component component)
+   public void detach(Component< ? > component)
{
-
}
 
/**
 * @see 
org.apache.wicket.behavior.IBehavior#exception(org.apache.wicket.Component,
 *  java.lang.RuntimeException)
 */
-   public final void exception(Component component, RuntimeException 
exception)
+   public final void exception(Component< ? > component, RuntimeException 
exception)
{
try
{
@@ -93,7 +92,7 @@
/**
 * @see 
org.apache.wicket.behavior.IBehavior#getStatelessHint(org.apache.wicket.Component)
 */
-   public boolean getStatelessHint(Component component)
+   public boolean getStatelessHint(Component< ? > component)
{
return true;
}
@@ -102,7 +101,7 @@
 * @see 
org.apache.wicket.behavior.IBehavior#onComponentTag(org.apache.wicket.Component,
 *  org.apache.wicket.markup.ComponentTag)
 */
-   public void onComponentTag(final Component component, final 
ComponentTag tag)
+   public void onComponentTag(final Component< ? > component, final 
ComponentTag tag)
{
}
 
@@ -116,7 +115,7 @@
 * @param exception
 *the unexpected exception
 */
-   public void onException(Component component, RuntimeException exception)
+   public void onException(Component< ? > component, RuntimeException 
exception)
{
}
 
@@ -126,14 +125,14 @@
 * @param component
 *the component that has this behavior coupled
 */
-   publi

svn commit: r646374 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: IComponentBorder.java IComponentSource.java IResourceListener.java Localizer.java MarkupFragmentFinder.java Reque

2008-04-09 Thread jdonnerstag
Author: jdonnerstag
Date: Wed Apr  9 07:18:13 2008
New Revision: 646374

URL: http://svn.apache.org/viewvc?rev=646374&view=rev
Log:
generics

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentBorder.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentSource.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IResourceListener.java
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Localizer.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestListenerInterface.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentBorder.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentBorder.java?rev=646374&r1=646373&r2=646374&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentBorder.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentBorder.java
 Wed Apr  9 07:18:13 2008
@@ -32,13 +32,13 @@
 * 
 * @param component
 */
-   public void renderBefore(Component component);
+   public void renderBefore(Component< ? > component);
 
/**
 * Called after the component is renderd.
 * 
 * @param component
 */
-   public void renderAfter(Component component);
+   public void renderAfter(Component< ? > component);
 
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentSource.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentSource.java?rev=646374&r1=646373&r2=646374&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentSource.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IComponentSource.java
 Wed Apr  9 07:18:13 2008
@@ -39,5 +39,5 @@
 * @param id
 * @return
 */
-   public Component restoreComponent(String id);
+   public Component< ? > restoreComponent(String id);
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IResourceListener.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IResourceListener.java?rev=646374&r1=646373&r2=646374&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IResourceListener.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IResourceListener.java
 Wed Apr  9 07:18:13 2008
@@ -37,10 +37,10 @@
 {
/** Resource listener interface object */
public static final RequestListenerInterface INTERFACE = new 
RequestListenerInterface(
-   IResourceListener.class)
+   IResourceListener.class)
{
-   public IRequestTarget newRequestTarget(Page page, Component 
component,
-   RequestListenerInterface listener, 
RequestParameters requestParameters)
+   public IRequestTarget newRequestTarget(Page page, Component< ? 
> component,
+   RequestListenerInterface listener, RequestParameters 
requestParameters)
{
return new ComponentResourceRequestTarget(page, 
component, listener);
}

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Localizer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Localizer.java?rev=646374&r1=646373&r2=646374&view=diff
==
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Localizer.java 
(original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Localizer.java 
Wed Apr  9 07:18:13 2008
@@ -55,7 +55,7 @@
private static final String NULL_VALUE = "";
 
/** Cache properties */
-   private Map cache = newCache();
+   private Map cache = newCache();
 
/**
 * Create the utils instance class backed by the configuration 
information contained within the
@@ -72,7 +72,7 @@
{
if (cache != null)
{
-   cache = new ConcurrentHashMap();
+   cache = newCache();
}
}
 
@@ -87,7 +87,7 @@
 * @throws MissingResourceException
 * If resource not found and configuration dictates that 
exception should be thrown
 */
-   public String getString(final String key, final Component component)
+   publ

[jira] Closed: (WICKET-1344) BigDecimalConverter is not precise

2008-04-09 Thread Johan Compagner (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johan Compagner closed WICKET-1344.
---

Resolution: Fixed

patch applied

> BigDecimalConverter is not precise
> --
>
> Key: WICKET-1344
> URL: https://issues.apache.org/jira/browse/WICKET-1344
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.3.1
>Reporter: Andri Saar
>Assignee: Johan Compagner
>Priority: Minor
> Fix For: 1.4-M1
>
> Attachments: BigDecimalConverter.patch
>
>
> Currently, if we use the BigDecimalConverter class, it converts the values by 
> first letting the NumberFormat to parse the value into a Double, which the 
> BigDecimalConverter class in turn turns into a BigDecimal.
> Unfortunately such an implementation loses precision, for example if we enter 
> "123.45" in a form, it can be converted to "123.450001" or 
> "123.44999" thanks to the conversion to a Double.
> Fixing the issue is rather simple: check if the NumberFormat you get is a 
> DecimalFormat, and if yes, simply call format.setParseBigDecimal(true) and 
> the NumberFormat will interpret the values correctly.

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



svn commit: r646372 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/AbstractDecimalConverter.java

2008-04-09 Thread jcompagner
Author: jcompagner
Date: Wed Apr  9 07:14:39 2008
New Revision: 646372

URL: http://svn.apache.org/viewvc?rev=646372&view=rev
Log:
WICKET-1344 parse it to a bigdecimal by default so we dont loose precision.

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/AbstractDecimalConverter.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/AbstractDecimalConverter.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/AbstractDecimalConverter.java?rev=646372&r1=646371&r2=646372&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/AbstractDecimalConverter.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/AbstractDecimalConverter.java
 Wed Apr  9 07:14:39 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.wicket.util.convert.converters;
 
+import java.text.DecimalFormat;
 import java.text.NumberFormat;
 import java.util.Locale;
 import java.util.Map;
@@ -44,6 +45,9 @@
if (numberFormat == null)
{
numberFormat = NumberFormat.getInstance(locale);
+   if (numberFormat instanceof DecimalFormat)
+   
((DecimalFormat)numberFormat).setParseBigDecimal(true);
+
numberFormats.put(locale, numberFormat);
}
return (NumberFormat)numberFormat.clone();




[jira] Closed: (WICKET-1427) make setAfter/BeforeDisabledLink return "this" for chaining

2008-04-09 Thread Johan Compagner (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johan Compagner closed WICKET-1427.
---

Resolution: Fixed

> make setAfter/BeforeDisabledLink return "this" for chaining
> ---
>
> Key: WICKET-1427
> URL: https://issues.apache.org/jira/browse/WICKET-1427
> Project: Wicket
>  Issue Type: Improvement
>Affects Versions: 1.3.2
>Reporter: Sebastiaan van Erk
>Assignee: Johan Compagner
>Priority: Minor
> Fix For: 1.4-M1
>
>
> Is it possible to make setAfterDisabledLink on AbstractLink return "this" so 
> that chaining is possible. Now I have somthing similar to the following:
> fragment.add(new BookmarkablePageLink("season2Link", ProgramsPage.class, 
> new PageParameters("0=2008")) {
> {
> setAfterDisabledLink("");
> setBeforeDisabledLink("");
> }
> @Override
> public boolean isEnabled() {
> return "2008".equals(season);
> }
> });
> But it would be nice if I could do:
> fragment.add(new BookmarkablePageLink("season2Link", ProgramsPage.class, 
> new PageParameters("0=2008")) {
> @Override
> public boolean isEnabled() {
> return "2008".equals(season);
> }
> }.setBeforeDisabledLink("").setAfterDisabledLink("")); 

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



svn commit: r646347 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/AbstractLink.java

2008-04-09 Thread jcompagner
Author: jcompagner
Date: Wed Apr  9 06:45:31 2008
New Revision: 646347

URL: http://svn.apache.org/viewvc?rev=646347&view=rev
Log:
WICKET-1427

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/AbstractLink.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/AbstractLink.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/AbstractLink.java?rev=646347&r1=646346&r2=646347&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/AbstractLink.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/AbstractLink.java
 Wed Apr  9 06:45:31 2008
@@ -76,8 +76,9 @@
 * 
 * @param afterDisabledLink
 *The insertion string
+* @return this
 */
-   public void setAfterDisabledLink(final String afterDisabledLink)
+   public AbstractLink setAfterDisabledLink(final String 
afterDisabledLink)
{
if (afterDisabledLink == null)
{
@@ -85,6 +86,7 @@
"Value cannot be null.  For no text, specify an 
empty String instead.");
}
this.afterDisabledLink = afterDisabledLink;
+   return this;
}
 
/**
@@ -102,8 +104,9 @@
 * 
 * @param beforeDisabledLink
 *The insertion string
+* @return this
 */
-   public void setBeforeDisabledLink(final String beforeDisabledLink)
+   public AbstractLink setBeforeDisabledLink(final String 
beforeDisabledLink)
{
if (beforeDisabledLink == null)
{
@@ -111,6 +114,7 @@
"Value cannot be null.  For no text, specify an 
empty String instead.");
}
this.beforeDisabledLink = beforeDisabledLink;
+   return this;
}
 
@Override




[jira] Closed: (WICKET-1371) wicket.properties cannot be found in OSGi

2008-04-09 Thread Johan Compagner (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johan Compagner closed WICKET-1371.
---

Resolution: Fixed

applied the patch

> wicket.properties cannot be found in OSGi
> -
>
> Key: WICKET-1371
> URL: https://issues.apache.org/jira/browse/WICKET-1371
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.1
> Environment: Windows XP, Java 5, Wicket 1.3.1, Equinox OSGi 3.3.1
>Reporter: Adam Harris
>Assignee: Johan Compagner
> Fix For: 1.4-M1
>
> Attachments: classresolverpatch.txt
>
>
> The wicket.properties file is not being loaded by the Application class due 
> to exclusive use of the thread context classloader in Wicket 1.3.1 when used 
> in an OSGi environment.
> From looking at Wicket's Application code, it appears that multiple 
> wicket.properties files can exist, and it will load them all.  So, the 
> wicket.properties in wicket.jar should always be loaded as well as any other  
> wicket.properties that are application specific.  This will work in a 
> traditional WAR file.
> However, in OSGi, each bundle has its own classloader.  So, if Wicket is in 
> its own bundle and my web application is in its own bundle, the current 
> implementation of Application will not work.  Using only the thread context 
> classloader will not accomodate loading multiple wicket.properties.  Multiple 
> classloaders must be checked.  
> Here's a reference to an mail list thread:  
> http://www.nabble.com/NPE-in-PropertyResolver.getGetAndSetter%28%29-td11194510.html#a15647641
> I've put together and tested a modified Application.java which works in OSGi. 
>  Would something like this be acceptable?
> public final void initializeComponents()
> {
> // Load any wicket properties files we can find
> try
> {
> Set loadedFiles = new HashSet();
> // Load properties files used by all libraries
>
> // Try the classloader for the wicket jar/bundle
> Enumeration resources = Application.class.getClassLoader()
> .getResources("wicket.properties");
> loadResources(resources, loadedFiles);
> // Try the classloader for the user's application jar/bundle
> resources = getClass().getClassLoader()
> .getResources("wicket.properties");
> loadResources(resources, loadedFiles);
> // Try the context class loader
> resources = Thread.currentThread()
> .getContextClassLoader()
> .getResources("wicket.properties");
> loadResources(resources, loadedFiles);
> }
> catch (IOException e)
> {
> throw new WicketRuntimeException("Unable to load 
> initializers file", e);
> }
> // now call any initializers we read
> callInitializers();
> }
> private void loadResources(Enumeration resources, Set loadedFiles) throws 
> IOException
> {
> if (resources != null)
> {
> while (resources.hasMoreElements())
> {
> InputStream in = null;
> try
> {
> final URL url = (URL)resources.nextElement();
> if (!loadedFiles.contains(url))
> {
>   log.info("resource url: {} ", url);
>   final Properties properties = new 
> Properties();
>   in = url.openStream();
>   properties.load(in);
>   load(properties);
>   loadedFiles.add(url);
> }
> }
> finally
> {
> if (in != null)
> {
> in.close();
> }
> }
> }
> }
> } 

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



[jira] Closed: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Johan Compagner (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johan Compagner closed WICKET-1501.
---

Resolution: Fixed

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Johan Compagner
>Priority: Critical
> Fix For: 1.3.4, 1.4-M1
>
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



svn commit: r646331 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket: markup/MarkupCache.java protocol/http/WicketFilter.java

2008-04-09 Thread jcompagner
Author: jcompagner
Date: Wed Apr  9 06:18:38 2008
New Revision: 646331

URL: http://svn.apache.org/viewvc?rev=646331&view=rev
Log:
try catch around close in WicketFilter.doGet()
fix WICKET-1501 loadMarkup shouldn't call put into cache if the cache string is 
null

Modified:

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

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.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=646331&r1=646330&r2=646331&view=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
 Wed Apr  9 06:18:38 2008
@@ -437,8 +437,9 @@
{
// add the markup to the cache.
markupKeyCache.put(cacheKey, locationString);
+   return putIntoCache(locationString, markup);
}
-   return putIntoCache(locationString, markup);
+   return markup;
}
catch (ResourceStreamNotFoundException e)
{

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=646331&r1=646330&r2=646331&view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 Wed Apr  9 06:18:38 2008
@@ -385,7 +385,16 @@
{
// Close response
if (response != null)
-   response.close();
+   {
+   try
+   {
+   response.close();
+   }
+   catch (Exception e)
+   {
+   log.error("closing the buffer 
error", e);
+   }
+   }
 
// Clean up thread local session
Session.unset();




[jira] Updated: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Johan Compagner (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johan Compagner updated WICKET-1501:


Fix Version/s: 1.4-M1
   1.3.4
 Assignee: Johan Compagner  (was: Juergen Donnerstag)

ahh ok so loadMarkup is the method that is incorrect.

I will fix that that putInCache is not called when cache key == null

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Johan Compagner
>Priority: Critical
> Fix For: 1.3.4, 1.4-M1
>
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



svn commit: r646327 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java

2008-04-09 Thread jcompagner
Author: jcompagner
Date: Wed Apr  9 06:11:57 2008
New Revision: 646327

URL: http://svn.apache.org/viewvc?rev=646327&view=rev
Log:
WICKET-1501, dont call put into cache if cache key is null

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java?rev=646327&r1=646326&r2=646327&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java
 Wed Apr  9 06:11:57 2008
@@ -437,8 +437,9 @@
{
// add the markup to the cache.
markupKeyCache.put(cacheKey, locationString);
+   return putIntoCache(locationString, markup);
}
-   return putIntoCache(locationString, markup);
+   return markup;
}
catch (ResourceStreamNotFoundException e)
{




[jira] Commented: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Jan Kriesten (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587179#action_12587179
 ] 

Jan Kriesten commented on WICKET-1501:
--

That's what I was trying to say:

Even though cacheKey is 'null' - the markup is still cached under 
locationString.

Since the resulting Markup is always returned from 'putIntoCache' - the 
originally updated markup in the parameter to 'putIntoCache' is thrown away and 
replaced by the old cached one...

Regards, --- Jan.

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Juergen Donnerstag
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



svn commit: r646316 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java

2008-04-09 Thread jcompagner
Author: jcompagner
Date: Wed Apr  9 05:52:02 2008
New Revision: 646316

URL: http://svn.apache.org/viewvc?rev=646316&view=rev
Log:
try catch around close
If it throws an exception then the finally block is not completely executed

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=646316&r1=646315&r2=646316&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 Wed Apr  9 05:52:02 2008
@@ -385,7 +385,16 @@
{
// Close response
if (response != null)
-   response.close();
+   {
+   try
+   {
+   response.close();
+   }
+   catch (Exception e)
+   {
+   log.error("closing the buffer 
error", e);
+   }
+   }
 
// Clean up thread local session
Session.unset();




[jira] Commented: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Johan Compagner (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587172#action_12587172
 ] 

Johan Compagner commented on WICKET-1501:
-

if you have a null cache key then markup cache should ignore it completely
Where is i still put into the cache even if the cache key is null?

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Juergen Donnerstag
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



svn commit: r646306 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: MarkupContainer.java markup/html/form/FormComponent.java

2008-04-09 Thread jcompagner
Author: jcompagner
Date: Wed Apr  9 05:41:13 2008
New Revision: 646306

URL: http://svn.apache.org/viewvc?rev=646306&view=rev
Log:
generics

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=646306&r1=646305&r2=646306&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
 Wed Apr  9 05:41:13 2008
@@ -111,7 +111,7 @@
/**
 * @see org.apache.wicket.Component#Component(String, IModel)
 */
-   public MarkupContainer(final String id, IModel model)
+   public MarkupContainer(final String id, IModel model)
{
super(id, model);
}
@@ -125,7 +125,7 @@
 * Thrown if a child with the same id is replaced by the 
add operation.
 * @return This
 */
-   public final MarkupContainer add(final Component child)
+   public final MarkupContainer add(final Component child)
{
checkHierarchyChange(child);
 
@@ -158,7 +158,7 @@
 *The child
 * @return This
 */
-   public final MarkupContainer addOrReplace(final Component child)
+   public final MarkupContainer addOrReplace(final Component child)
{
checkHierarchyChange(child);
 
@@ -670,7 +670,7 @@
 * Thrown if there was no child with the same id.
 * @return This
 */
-   public final MarkupContainer replace(final Component child)
+   public final MarkupContainer replace(final Component child)
{
checkHierarchyChange(child);
 

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java?rev=646306&r1=646305&r2=646306&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
 Wed Apr  9 05:41:13 2008
@@ -480,7 +480,7 @@
 * @see IValidator
 * @see IValidatorAddListener
 */
-   public final FormComponent add(final IValidator validator)
+   public final FormComponent add(final IValidator validator)
{
if (validator == null)
{
@@ -771,16 +771,16 @@
 * 
 * @return List of validators
 */
-   public final List getValidators()
+   public final List getValidators()
{
final int size = validators_size();
if (size == 0)
{
-   return Collections.EMPTY_LIST;
+   return Collections.emptyList();
}
else
{
-   final List list = new ArrayList(size);
+   final List list = new 
ArrayList(size);
for (int i = 0; i < size; i++)
{
list.add(validators_get(i));
@@ -964,7 +964,7 @@
 * @param labelModel
 * @return this for chaining
 */
-   public FormComponent setLabel(IModel labelModel)
+   public FormComponent setLabel(IModel labelModel)
{
setLabelInternal(labelModel);
return this;
@@ -1004,7 +1004,7 @@
 *True if this component is to be persisted.
 * @return this for chaining
 */
-   public final FormComponent setPersistent(final boolean persistent)
+   public final FormComponent setPersistent(final boolean persistent)
{
if (supportsPersistence())
{
@@ -1024,7 +1024,7 @@
 * @param required
 * @return this for chaining
 */
-   public final FormComponent setRequired(final boolean required)
+   public final FormComponent setRequired(final boolean required)
{
if (!required && getType() != null && getType().isPrimitive())
{
@@ -1046,7 +1046,7 @@
 * @param type
 * @return this for chaining
 */
-   public final FormComponent setType(Class type)
+   public final FormComponent setType(Class type)
{
typeName = type == null ? null : type.getN

svn commit: r646300 - /wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java

2008-04-09 Thread jcompagner
Author: jcompagner
Date: Wed Apr  9 05:35:43 2008
New Revision: 646300

URL: http://svn.apache.org/viewvc?rev=646300&view=rev
Log:
generified

Modified:

wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java

Modified: 
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java?rev=646300&r1=646299&r2=646300&view=diff
==
--- 
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java
 (original)
+++ 
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java
 Wed Apr  9 05:35:43 2008
@@ -62,7 +62,7 @@
/**
 * Form for collecting input.
 */
-   private class InputForm extends Form
+   private class InputForm extends Form
{
/**
 * Construct.
@@ -72,7 +72,7 @@
 */
public InputForm(String name)
{
-   super(name, new CompoundPropertyModel(new 
FormInputModel()));
+   super(name, new 
CompoundPropertyModel(new FormInputModel()));
 
// Dropdown for selecting locale
add(new LocaleDropDownChoice("localeSelect"));
@@ -80,6 +80,7 @@
// Link to return to default locale
add(new Link("defaultLocaleLink")
{
+   @Override
public void onClick()
{
WebRequest request = 
(WebRequest)getRequest();
@@ -87,19 +88,22 @@
}
});
 
-   RequiredTextField stringTextField = new 
RequiredTextField("stringProperty");
-   stringTextField.setLabel(new Model("String"));
+   RequiredTextField stringTextField = new 
RequiredTextField(
+   "stringProperty");
+   stringTextField.setLabel(new Model("String"));
add(stringTextField);
-   RequiredTextField integerTextField = new 
RequiredTextField("integerProperty");
+   RequiredTextField integerTextField = new 
RequiredTextField(
+   "integerProperty");
add(integerTextField.add(NumberValidator.POSITIVE));
-   add(new RequiredTextField("doubleProperty"));
+   add(new RequiredTextField("doubleProperty"));
 
-   add(new 
RequiredTextField("integerInRangeProperty").add(NumberValidator.range(0, 100)));
+   add(new 
RequiredTextField("integerInRangeProperty").add(NumberValidator.range(
+   0, 100)));
add(new CheckBox("booleanProperty"));
add(new Multiply("multiply"));
// display the multiply result
Label multiplyLabel = new Label("multiplyLabel", new 
PropertyModel(getModel(),
-   "multiply"));
+   "multiply"));
// just for fun, add a border so that our result will 
be displayed
// as '[ x ]'
multiplyLabel.setComponentBorder(new 
BeforeAndAfterBorder());
@@ -113,6 +117,7 @@
add(group);
ListView persons = new ListView("numbers", NUMBERS)
{
+   @Override
protected void populateItem(ListItem item)
{
item.add(new Radio("radio", 
item.getModel()));
@@ -125,6 +130,7 @@
add(checks);
ListView checksList = new ListView("numbers", NUMBERS)
{
+   @Override
protected void populateItem(ListItem item)
{
item.add(new Check("check", 
item.getModel()));
@@ -138,6 +144,7 @@
// TextField using a custom converter.
add(new TextField("urlProperty", URL.class)
{
+   @Override
public IConverter getConverter(final Class type)
{
return new IConverter()
@@ -165,6 +172,7 @@
// TextField using a mask conver

[jira] Commented: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Jan Kriesten (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587163#action_12587163
 ] 

Jan Kriesten commented on WICKET-1501:
--

hi johan,

huh?? i have no cache key for the template - it just shall not be handled by 
wicket's cache system (it's already cached by freemarker and changes every 
request)

so - not having a cache key means i can't lookup the locationString in the 
first map, right?

regards, --- jan.

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Juergen Donnerstag
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



[jira] Commented: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Johan Compagner (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587160#action_12587160
 ] 

Johan Compagner commented on WICKET-1501:
-

cache keys shouldn't be the keys that go into the markpuCache
they should only go into the markupKeyCache map

Where is a cache key going into the markupCache?

it is now 2 fold you have:

Map
Map

that is how it should work now.



> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Juergen Donnerstag
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



svn commit: r646296 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html: AjaxEditableChoiceLabel.java AjaxEditableMultiLineLabel.ja

2008-04-09 Thread gseitz
Author: gseitz
Date: Wed Apr  9 05:08:28 2008
New Revision: 646296

URL: http://svn.apache.org/viewvc?rev=646296&view=rev
Log:
fixed javadoc typo

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=646296&r1=646295&r2=646296&view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
 Wed Apr  9 05:08:28 2008
@@ -31,7 +31,7 @@
 
 
 /**
- * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but 
instead of a [EMAIL PROTECTED] TextField} a
+ * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but 
instead of a [EMAIL PROTECTED] TextField} a
  * [EMAIL PROTECTED] DropDownChoice} is displayed.
  * 
  * @author Eelco Hillenius

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=646296&r1=646295&r2=646296&view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 Wed Apr  9 05:08:28 2008
@@ -28,7 +28,7 @@
 import org.apache.wicket.model.IModel;
 
 /**
- * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now 
with support for multi line
+ * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now 
with support for multi line
  * content and a [EMAIL PROTECTED] TextArea text area} as its editor.
  * 
  * @author eelcohillenius




svn commit: r646297 - in /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html: AjaxEditableChoiceLabel.java AjaxEditableMultiLineLabel.java

2008-04-09 Thread gseitz
Author: gseitz
Date: Wed Apr  9 05:08:30 2008
New Revision: 646297

URL: http://svn.apache.org/viewvc?rev=646297&view=rev
Log:
fixed javadoc typo

Modified:

wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java

wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java

Modified: 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=646297&r1=646296&r2=646297&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
 Wed Apr  9 05:08:30 2008
@@ -31,7 +31,7 @@
 
 
 /**
- * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but 
instead of a [EMAIL PROTECTED] TextField} a
+ * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but 
instead of a [EMAIL PROTECTED] TextField} a
  * [EMAIL PROTECTED] DropDownChoice} is displayed.
  * 
  * @author Eelco Hillenius
@@ -155,6 +155,7 @@
 * @see 
org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#newEditor(org.apache.wicket.MarkupContainer,
 *  java.lang.String, org.apache.wicket.model.IModel)
 */
+   @Override
protected FormComponent newEditor(MarkupContainer parent, String 
componentId, IModel model)
{
IModel choiceModel = new AbstractReadOnlyModel()
@@ -162,6 +163,7 @@
 
private static final long serialVersionUID = 1L;
 
+   @Override
public Object getObject()
{
return choices.getObject();
@@ -172,11 +174,13 @@
{
private static final long serialVersionUID = 1L;
 
+   @Override
protected void onModelChanged()
{
AjaxEditableChoiceLabel.this.onModelChanged();
}
 
+   @Override
protected void onModelChanging()
{
AjaxEditableChoiceLabel.this.onModelChanging();
@@ -189,6 +193,7 @@
{
private static final long serialVersionUID = 1L;
 
+   @Override
protected void onComponentTag(ComponentTag tag)
{
super.onComponentTag(tag);
@@ -204,11 +209,13 @@
return editor;
}
 
+   @Override
protected void onModelChanged()
{
super.onModelChanged();
}
 
+   @Override
protected void onModelChanging()
{
super.onModelChanging();

Modified: 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=646297&r1=646296&r2=646297&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 Wed Apr  9 05:08:30 2008
@@ -27,7 +27,7 @@
 import org.apache.wicket.model.IModel;
 
 /**
- * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now 
with support for multi line
+ * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now 
with support for multi line
  * content and a [EMAIL PROTECTED] TextArea text area} as its editor.
  * 
  * @author eelcohillenius




[jira] Created: (WICKET-1505) Package level properties file

2008-04-09 Thread Juergen Donnerstag (JIRA)
Package level properties file
-

 Key: WICKET-1505
 URL: https://issues.apache.org/jira/browse/WICKET-1505
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Reporter: Juergen Donnerstag
Assignee: Juergen Donnerstag
Priority: Minor


I've implemented a PackageLevelPropertiesLoader which looks for 
package.properties file in addtion to the extisting *.properties files for 
Components and Application derived classes.

Juergen

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



[jira] Resolved: (WICKET-1505) Package level properties file

2008-04-09 Thread Juergen Donnerstag (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juergen Donnerstag resolved WICKET-1505.


   Resolution: Fixed
Fix Version/s: 1.4-M1

done

> Package level properties file
> -
>
> Key: WICKET-1505
> URL: https://issues.apache.org/jira/browse/WICKET-1505
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Reporter: Juergen Donnerstag
>Assignee: Juergen Donnerstag
>Priority: Minor
> Fix For: 1.4-M1
>
>
> I've implemented a PackageLevelPropertiesLoader which looks for 
> package.properties file in addtion to the extisting *.properties files for 
> Components and Application derived classes.
> Juergen

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



[jira] Commented: (WICKET-1436) Unable to use properties file when generating XML files

2008-04-09 Thread Juergen Donnerstag (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587157#action_12587157
 ] 

Juergen Donnerstag commented on WICKET-1436:


Added a partial solution to 1.4. It is now more easily possible to remove the 
XmlFilePropertiesLoader from the list of loaders. But it not yet using 
MarkupContainer.getmarkupType() to automatically exclude such extension from 
the properties search for that component. For that reason I leave that case 
open.

Juergen

> Unable to use properties file when generating XML files
> ---
>
> Key: WICKET-1436
> URL: https://issues.apache.org/jira/browse/WICKET-1436
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.1
> Environment: OSX, Jetty
>Reporter: Nick Heudecker
>Assignee: Juergen Donnerstag
>Priority: Minor
> Fix For: 1.5-M1
>
>
> Please refer to this thread: 
> http://www.nabble.com/Unable-to-use-wicket:message-when-generating-XML-files-td15779276.html

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



[jira] Commented: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Jan Kriesten (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587155#action_12587155
 ] 

Jan Kriesten commented on WICKET-1501:
--

Johan -

I return 'null' for the cacheKey of my template. That's fine. The Markup isn't 
cached _under_this_ key.

The problem arises because wicket caches the Markup in putIntoCache also under 
the locationString - which has nothing to do with the cacheKey. So, markup is 
cached under two keys by wicket, which leads to the problem. 

Regards, --- Jan.

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Juergen Donnerstag
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



svn commit: r646287 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: authorization/ settings/

2008-04-09 Thread jdonnerstag
Author: jdonnerstag
Date: Wed Apr  9 04:50:43 2008
New Revision: 646287

URL: http://svn.apache.org/viewvc?rev=646287&view=rev
Log:
generics

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/authorization/IUnauthorizedComponentInstantiationListener.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IApplicationSettings.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IRequestCycleSettings.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/authorization/IUnauthorizedComponentInstantiationListener.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/authorization/IUnauthorizedComponentInstantiationListener.java?rev=646287&r1=646286&r2=646287&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/authorization/IUnauthorizedComponentInstantiationListener.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/authorization/IUnauthorizedComponentInstantiationListener.java
 Wed Apr  9 04:50:43 2008
@@ -33,5 +33,5 @@
 *The partially constructed component (only the id is 
guaranteed to be valid).
 * @see org.apache.wicket.application.IComponentInstantiationListener
 */
-   void onUnauthorizedInstantiation(Component component);
+   void onUnauthorizedInstantiation(Component< ? > component);
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IApplicationSettings.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IApplicationSettings.java?rev=646287&r1=646286&r2=646287&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IApplicationSettings.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IApplicationSettings.java
 Wed Apr  9 04:50:43 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.wicket.settings;
 
+import org.apache.wicket.Page;
 import org.apache.wicket.application.IClassResolver;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.util.lang.Bytes;
@@ -43,7 +44,7 @@
 * @return Returns the accessDeniedPage.
 * @see IApplicationSettings#setAccessDeniedPage(Class)
 */
-   Class getAccessDeniedPage();
+   Class< ? extends Page> getAccessDeniedPage();
 
/**
 * Gets the default resolver to use when finding classes and resources
@@ -66,7 +67,7 @@
 * @return Returns the internalErrorPage.
 * @see IApplicationSettings#setInternalErrorPage(Class)
 */
-   Class getInternalErrorPage();
+   Class< ? extends Page> getInternalErrorPage();
 
/**
 * Gets the page expired page class.
@@ -74,7 +75,7 @@
 * @return Returns the pageExpiredErrorPage.
 * @see IApplicationSettings#setPageExpiredErrorPage(Class)
 */
-   Class getPageExpiredErrorPage();
+   Class< ? extends Page> getPageExpiredErrorPage();
 
/**
 * Sets the access denied page class. The class must be bookmarkable 
and must extend Page.
@@ -82,7 +83,7 @@
 * @param accessDeniedPage
 *The accessDeniedPage to set.
 */
-   void setAccessDeniedPage(final Class accessDeniedPage);
+   void setAccessDeniedPage(final Class< ? extends Page> accessDeniedPage);
 
/**
 * Sets the default class resolver to use when finding classes and 
resources
@@ -107,7 +108,7 @@
 * @param internalErrorPage
 *The internalErrorPage to set.
 */
-   void setInternalErrorPage(final Class internalErrorPage);
+   void setInternalErrorPage(final Class< ? extends Page> 
internalErrorPage);
 
/**
 * Sets the page expired page class. The class must be bookmarkable and 
must extend Page.
@@ -115,5 +116,5 @@
 * @param pageExpiredErrorPage
 *The pageExpiredErrorPage to set.
 */
-   void setPageExpiredErrorPage(final Class pageExpiredErrorPage);
+   void setPageExpiredErrorPage(final Class< ? extends Page> 
pageExpiredErrorPage);
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IRequestCycleSettings.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IRequestCycleSettings.java?rev=646287&r1=646286&r2=646287&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/se

[jira] Resolved: (WICKET-1499) AjaxEditableMultiLineLabel + race condition /

2008-04-09 Thread Gerolf Seitz (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerolf Seitz resolved WICKET-1499.
--

   Resolution: Fixed
Fix Version/s: 1.4-M1
   1.3.4

fixed. thx.

> AjaxEditableMultiLineLabel + race condition / 
> --
>
> Key: WICKET-1499
> URL: https://issues.apache.org/jira/browse/WICKET-1499
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Gerolf Seitz
> Fix For: 1.3.4, 1.4-M1
>
>
> There are two issues concerning AjaxEditableMultiLineLabel:
> a) Race condition cancel editing
> Using 'Esc' to cancel editing might lead to two events to be fired: first 
> onKeypress is executed - which leads to bluring the component in Opera. This 
> results in the onblur-event firing and the input is submitted!
> Changing the code in onComponentTag to
> protected void onComponentTag(ComponentTag tag)
> {   
> super.onComponentTag(tag);
> final String saveCall = "{wicketAjaxGet('" + 
> getCallbackUrl() +
> 
> "&save=true&'+this.name+'='+wicketEncode(this.value)); return false;}";
> 
> final String cancelCall = "{wicketAjaxGet('" 
> + getCallbackUrl() +
> "&save=false'); this.onblur=''; 
> return false;}";
> 
> final String keypress = "var 
> kc=wicketKeyCode(event); if (kc==27) " + cancelCall +
> "; ";
> 
> tag.put("onblur", saveCall);
> tag.put("onkeypress", keypress);
> }
> stops onblur being fired.
> This might also apply for AjaxEditableLabel - though I haven't seen this 
> happening there yet.
> b) Displaying defaultNullLabel on empty String Model:
> Should behave like AjaxEditableLabel, i.e.:
> protected void onComponentTagBody(MarkupStream markupStream, 
> ComponentTag openTag)
> {
> Object modelObject = getModelObject();
> if (modelObject == null || "".equals(modelObject))
> {
> replaceComponentTagBody(markupStream, openTag, 
> defaultNullLabel());
> }
> else
> {
> super.onComponentTagBody(markupStream, openTag);
> }
> } 

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



svn commit: r646282 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java

2008-04-09 Thread gseitz
Author: gseitz
Date: Wed Apr  9 04:43:00 2008
New Revision: 646282

URL: http://svn.apache.org/viewvc?rev=646282&view=rev
Log:
WICKET-1499: race-condition in AjaxEditableMultiLineLabel

Modified:

wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java

Modified: 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=646282&r1=646281&r2=646282&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 Wed Apr  9 04:43:00 2008
@@ -83,7 +83,8 @@
@Override
protected void onComponentTagBody(MarkupStream 
markupStream, ComponentTag openTag)
{
-   if (getModelObject() == null)
+   Object modelObject = getModelObject();
+   if (modelObject == null || 
"".equals(modelObject))
{
replaceComponentTagBody(markupStream, 
openTag, defaultNullLabel());
}
@@ -170,7 +171,7 @@

"&save=true&'+this.name+'='+wicketEncode(this.value)); return true;}";
 
final String cancelCall = "{wicketAjaxGet('" + 
getCallbackUrl() +
-   "&save=false'); return false;}";
+   "&save=false');this.onblur='';return 
false;}";
 
final String keypress = "var 
kc=wicketKeyCode(event); if (kc==27) " + cancelCall +
"; ";




svn commit: r646279 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java

2008-04-09 Thread gseitz
Author: gseitz
Date: Wed Apr  9 04:36:23 2008
New Revision: 646279

URL: http://svn.apache.org/viewvc?rev=646279&view=rev
Log:
WICKET-1499

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=646279&r1=646278&r2=646279&view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
 Wed Apr  9 04:36:23 2008
@@ -79,7 +79,8 @@
 
protected void onComponentTagBody(MarkupStream 
markupStream, ComponentTag openTag)
{
-   if (getModelObject() == null)
+   Object modelObject = getModelObject();
+   if (modelObject == null || 
"".equals(modelObject))
{
replaceComponentTagBody(markupStream, 
openTag, defaultNullLabel());
}
@@ -159,7 +160,7 @@

"&save=true&'+this.name+'='+wicketEncode(this.value)); return true;}";
 
final String cancelCall = "{wicketAjaxGet('" + 
getCallbackUrl() +
-   "&save=false'); return false;}";
+   "&save=false');this.onblur='';return 
false;}";
 
final String keypress = "var 
kc=wicketKeyCode(event); if (kc==27) " + cancelCall +
"; ";




[jira] Resolved: (WICKET-1486) Allow child components inside of wicket:message

2008-04-09 Thread Juergen Donnerstag (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juergen Donnerstag resolved WICKET-1486.


Resolution: Fixed

fixed svn rev 646277

> Allow child components inside of wicket:message
> ---
>
> Key: WICKET-1486
> URL: https://issues.apache.org/jira/browse/WICKET-1486
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 1.3.2
>Reporter: John Ray
>Assignee: Juergen Donnerstag
> Fix For: 1.4-M1
>
> Attachments: Message.diff, MessageQuickStart.zip
>
>
> Currently you can't put a link or text in the middle of a wicket:message. You 
> need to break up the message into 2 parts as text before the link and text 
> after the link. 
> I've made a modification to the WicketMessageResolver class that allows you 
> to nest child components inside a wicket:message and then reference them from 
> the properties file. For example in the html
>
>   This text will be replaced with text from the properties file.
>   [amount].
>   
>   
>   
>
>
> Then in the properties file have a variable with a name that matches the 
> wicket:id for each child component. The variables can be in any order, they 
> do NOT have to match the order in the HTML file.
>myKey=Your balance is ${amount}. Click ${link} to view the details.
>linkText=here
>
> And in the java
>add(new Label("amount",new Model("$5.00")));
>add(new BookmarkablePageLink("link",DetailsPage.class));
>
> In the browser this will output
>Your balance is $5.00. Click -here- to view the details.
> I'll attach a quick start as well as an svn diff.
>

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



svn commit: r646277 - in /wicket/trunk/jdk-1.4/wicket/src: main/java/org/apache/wicket/markup/resolver/ main/java/org/apache/wicket/util/string/interpolator/ test/java/org/apache/wicket/markup/resolve

2008-04-09 Thread jdonnerstag
Author: jdonnerstag
Date: Wed Apr  9 04:34:38 2008
New Revision: 646277

URL: http://svn.apache.org/viewvc?rev=646277&view=rev
Log:
implemented new feature wicket-1486: Allow child components inside of 
wicket:message

Added:
wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_1.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_2.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_2a.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_3.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_4.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.java

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.properties

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_2.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_2.java

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_2.properties

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_3.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_3.java

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_3.properties

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_4.html

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_4.java

wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/resolver/WicketMessageResolverTest.java
Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/IComponentResolver.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/MapVariableInterpolator.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/IComponentResolver.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/IComponentResolver.java?rev=646277&r1=646276&r2=646277&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/IComponentResolver.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/IComponentResolver.java
 Wed Apr  9 04:34:38 2008
@@ -40,6 +40,6 @@
 *The current component tag while parsing the markup
 * @return True if component-id was handled by the resolver, false 
otherwise.
 */
-   public boolean resolve(final MarkupContainer container, final 
MarkupStream markupStream,
-   final ComponentTag tag);
+   public boolean resolve(final MarkupContainer< ? > container, final 
MarkupStream markupStream,
+   final ComponentTag tag);
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java?rev=646277&r1=646276&r2=646277&view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java
 Wed Apr  9 04:34:38 2008
@@ -16,33 +16,91 @@
  */
 package org.apache.wicket.markup.resolver;
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.Response;
+import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupElement;
 import org.apache.wicket.markup.MarkupException;
 import org.apache.wicket.markup.MarkupStream;
-import org.apache.wicket.markup.RawMarkup;
 import org.apache.wicket.markup.WicketTag;
-import org.apache.wicket.markup.html.WebComponent;
 import org.apache.wicket.markup.parser.XmlTag;
 import org.apache.wicket.markup.parser.filter.WicketTagIdentifier;
 import org.apache.wicket.model.Model;
+import org.apache.wicket.response.

[jira] Commented: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Johan Compagner (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587143#action_12587143
 ] 

Johan Compagner commented on WICKET-1501:
-

i dont get it, the method putIntoCache SHOULD check for the location string. 
Because that is the one that goes into the markupCache
the cacheKey doesn't go into that markupCache at all anymore that only goes 
into the markupKeyCache

So as far as i can see the putIntoCache method is fine. 
And why it also can return it is this:

// We don't lock the cache while loading a markup. Thus it may
// happen that the very same markup gets loaded 
twice (the first
// markup being loaded, but not yet in the 
cache, and another
// request requesting the very same markup). 
Since markup
// loading in avg takes less than 100ms, it is 
not really an
// issue. For consistency reasons however, we 
should always use
// the markup loaded first which is why it gets 
returned.
markup = 
(Markup)markupCache.get(locationString);

So thats threadding.
putIntoCache puts the markup into the cache if not there or if it is there 
returns the one that is in there (the first one parsed)
If you have new stuff then that is not the place to overwrite markup. You first 
have to call 
public final Markup removeMarkup(final String cacheKey)



> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Juergen Donnerstag
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



[jira] Assigned: (WICKET-1504) AutoCompleteTextField - javascript error "type mismatch" in line 227 in IE

2008-04-09 Thread Gerolf Seitz (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerolf Seitz reassigned WICKET-1504:


Assignee: Gerolf Seitz

> AutoCompleteTextField - javascript error "type mismatch" in line 227 in IE
> --
>
> Key: WICKET-1504
> URL: https://issues.apache.org/jira/browse/WICKET-1504
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 1.3.3
> Environment: IE 6.0
>Reporter: Niels Bo
>Assignee: Gerolf Seitz
>
> I just swithed from 1.3.2 to 1.3.3 and that resultet in a javascript error 
> "type mismatch" in line 227, 
> wich is this line in wicket-autocomplete.js: 
> menu.style.zIndex=index=="auto"?index:Number(index)+1;
> Only in IE (6.0) - firefox works fine. 

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



[jira] Created: (WICKET-1504) AutoCompleteTextField - javascript error "type mismatch" in line 227 in IE

2008-04-09 Thread Niels Bo (JIRA)
AutoCompleteTextField - javascript error "type mismatch" in line 227 in IE
--

 Key: WICKET-1504
 URL: https://issues.apache.org/jira/browse/WICKET-1504
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.3.3
 Environment: IE 6.0
Reporter: Niels Bo


I just swithed from 1.3.2 to 1.3.3 and that resultet in a javascript error 
"type mismatch" in line 227, 
wich is this line in wicket-autocomplete.js: 

menu.style.zIndex=index=="auto"?index:Number(index)+1;

Only in IE (6.0) - firefox works fine. 


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



[jira] Updated: (WICKET-1503) AutoCompleteTextField encoding bug

2008-04-09 Thread Edmund Urbani (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Edmund Urbani updated WICKET-1503:
--

Description: 
Texts with non-ascii characters are not correctly en-/decoded. Eg. when I enter 
"ö" in the AutoCompleteTextField it gets encoded in the request as q=%C3%B6 
which is the correct UTF-8 encoding. However in the getChoices(String) method I 
see "ö" instead of "ö" (decoded as ISO-8859-1 or similar). 

I did not alter any encoding settings in Tomcat - not yet anyway.

EDIT: Tested with Firefox 2.0.0.13


  was:
Texts with non-ascii characters are not correctly en-/decoded. Eg. when I enter 
"ö" in the AutoCompleteTextField it gets encoded in the request as q=%C3%B6 
which is the correct UTF-8 encoding. However in the getChoices(String) method I 
see "ö" instead of "ö" (decoded as ISO-8859-1 or similar). 

I did not alter any encoding settings in Tomcat - not yet anyway.



> AutoCompleteTextField encoding bug
> --
>
> Key: WICKET-1503
> URL: https://issues.apache.org/jira/browse/WICKET-1503
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 1.3.2, 1.3.3
> Environment: Tomcat 6.0.16 
> java version "1.6.0_01"
> running on Linux
>Reporter: Edmund Urbani
>
> Texts with non-ascii characters are not correctly en-/decoded. Eg. when I 
> enter "ö" in the AutoCompleteTextField it gets encoded in the request as 
> q=%C3%B6 which is the correct UTF-8 encoding. However in the 
> getChoices(String) method I see "ö" instead of "ö" (decoded as ISO-8859-1 or 
> similar). 
> I did not alter any encoding settings in Tomcat - not yet anyway.
> EDIT: Tested with Firefox 2.0.0.13

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



[jira] Created: (WICKET-1503) AutoCompleteTextField encoding bug

2008-04-09 Thread Edmund Urbani (JIRA)
AutoCompleteTextField encoding bug
--

 Key: WICKET-1503
 URL: https://issues.apache.org/jira/browse/WICKET-1503
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.3.3, 1.3.2
 Environment: Tomcat 6.0.16 
java version "1.6.0_01"
running on Linux
Reporter: Edmund Urbani


Texts with non-ascii characters are not correctly en-/decoded. Eg. when I enter 
"ö" in the AutoCompleteTextField it gets encoded in the request as q=%C3%B6 
which is the correct UTF-8 encoding. However in the getChoices(String) method I 
see "ö" instead of "ö" (decoded as ISO-8859-1 or similar). 

I did not alter any encoding settings in Tomcat - not yet anyway.


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



[jira] Commented: (WICKET-1500) WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-09 Thread Daniel Stoch (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587122#action_12587122
 ] 

Daniel Stoch commented on WICKET-1500:
--

Oh my...! You are right, it is my mistake. Sorry to bother you.
You can of course close (or even delete) this issue.

> WebMarkupContainer multiplicated markup when using AjaxLink
> ---
>
> Key: WICKET-1500
> URL: https://issues.apache.org/jira/browse/WICKET-1500
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.1, 1.3.3
>Reporter: Daniel Stoch
>Assignee: Matej Knopp
> Attachments: ajax-container-test.zip
>
>
> There is a strange behaviour when I'm trying refresh WebMarkupContainer 
> component using AjaxLink. I have attached quickstart-app 
> (ajax-container-test.zip) where you can see this problem. There is a simple 
> HomePage with one WebMarkupContainer and one AjaxLink. This 
> WebMarkupContainer is refreshed upon AjaxLink click.
> For the first time page is rendered as follows:
> Header A
> Ajax request
> When I click "Ajax request" link the onClick metod is called to refresh 
> container component (which is WebMarkupContainer). But instead of refreshing 
> (repainting) of "container" markup (... markup), 
> it is dupliacted below the original paragraph. Each click on this ajax link 
> causes this paragraph multiplication and after eg. 4 clicks the page looks 
> like:
> Header A
> Header A
> Header A
> Header A
> Header A
> Ajax request

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



[jira] Closed: (WICKET-1493) The migration from wicket 1.2 to wicket 1.3.2

2008-04-09 Thread Gerolf Seitz (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerolf Seitz closed WICKET-1493.


Resolution: Invalid

please ask questions like these on the mailinglist [EMAIL PROTECTED]
use jira only to report actual bugs, feature requests, improvements

> The migration from wicket 1.2 to wicket 1.3.2
> -
>
> Key: WICKET-1493
> URL: https://issues.apache.org/jira/browse/WICKET-1493
> Project: Wicket
>  Issue Type: Bug
>Reporter: fallout
>
> Hi.
> I have some problems with migration from wicket 1.2 to wicket 1.3.
> Tell me please what I can use instead of the IExceptionResponseStrategy 
> interface?
> What I can call instead of the IPageMap.lastAccessedEntry() method?
> What I can call instead of the Request.getContextPath() method?
> Thanks.

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



[jira] Closed: (WICKET-1498) The migration from wicket 1.2 to wicket 1.3

2008-04-09 Thread Gerolf Seitz (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerolf Seitz closed WICKET-1498.


Resolution: Invalid

please ask questions like these on the mailinglist [EMAIL PROTECTED]
use jira only to report actual bugs, feature requests, improvements

> The migration from wicket 1.2 to wicket 1.3
> ---
>
> Key: WICKET-1498
> URL: https://issues.apache.org/jira/browse/WICKET-1498
> Project: Wicket
>  Issue Type: Task
>  Components: wicket
>Affects Versions: 1.3.2
>Reporter: fallout
>
> Hi.
> I have some problems with migration from wicket 1.2 to wicket 1.3.
> These problems are not described into the migration guide.
> Tell me please what I can use instead of the IExceptionResponseStrategy 
> interface in wicket 1.3.2?
> What I can call instead of the IPageMap.lastAccessedEntry() method in wicket 
> 1.3.2?
> What I can call instead of the Request.getContextPath() method in wicket 
> 1.3.2?
> Thanks.

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



[jira] Commented: (WICKET-1500) WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-09 Thread Gerolf Seitz (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587110#action_12587110
 ] 

Gerolf Seitz commented on WICKET-1500:
--

if the markup is like:

Header A

it works as expected.

> WebMarkupContainer multiplicated markup when using AjaxLink
> ---
>
> Key: WICKET-1500
> URL: https://issues.apache.org/jira/browse/WICKET-1500
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.1, 1.3.3
>Reporter: Daniel Stoch
>Assignee: Matej Knopp
> Attachments: ajax-container-test.zip
>
>
> There is a strange behaviour when I'm trying refresh WebMarkupContainer 
> component using AjaxLink. I have attached quickstart-app 
> (ajax-container-test.zip) where you can see this problem. There is a simple 
> HomePage with one WebMarkupContainer and one AjaxLink. This 
> WebMarkupContainer is refreshed upon AjaxLink click.
> For the first time page is rendered as follows:
> Header A
> Ajax request
> When I click "Ajax request" link the onClick metod is called to refresh 
> container component (which is WebMarkupContainer). But instead of refreshing 
> (repainting) of "container" markup (... markup), 
> it is dupliacted below the original paragraph. Each click on this ajax link 
> causes this paragraph multiplication and after eg. 4 clicks the page looks 
> like:
> Header A
> Header A
> Header A
> Header A
> Header A
> Ajax request

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



[jira] Commented: (WICKET-1500) WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-09 Thread Gerolf Seitz (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587107#action_12587107
 ] 

Gerolf Seitz commented on WICKET-1500:
--

i see that your markup is like:
  Header A 

isn't that considered invalid html?
also see http://htmlhelp.com/reference/html40/block/h1.html

> WebMarkupContainer multiplicated markup when using AjaxLink
> ---
>
> Key: WICKET-1500
> URL: https://issues.apache.org/jira/browse/WICKET-1500
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.1, 1.3.3
>Reporter: Daniel Stoch
>Assignee: Matej Knopp
> Attachments: ajax-container-test.zip
>
>
> There is a strange behaviour when I'm trying refresh WebMarkupContainer 
> component using AjaxLink. I have attached quickstart-app 
> (ajax-container-test.zip) where you can see this problem. There is a simple 
> HomePage with one WebMarkupContainer and one AjaxLink. This 
> WebMarkupContainer is refreshed upon AjaxLink click.
> For the first time page is rendered as follows:
> Header A
> Ajax request
> When I click "Ajax request" link the onClick metod is called to refresh 
> container component (which is WebMarkupContainer). But instead of refreshing 
> (repainting) of "container" markup (... markup), 
> it is dupliacted below the original paragraph. Each click on this ajax link 
> causes this paragraph multiplication and after eg. 4 clicks the page looks 
> like:
> Header A
> Header A
> Header A
> Header A
> Header A
> Ajax request

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



[jira] Assigned: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Juergen Donnerstag (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juergen Donnerstag reassigned WICKET-1501:
--

Assignee: Juergen Donnerstag

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Assignee: Juergen Donnerstag
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



[jira] Created: (WICKET-1502) Slow opening of ModalWindow for complex pages

2008-04-09 Thread Martin Grigorov (JIRA)
Slow opening of ModalWindow for complex pages
-

 Key: WICKET-1502
 URL: https://issues.apache.org/jira/browse/WICKET-1502
 Project: Wicket
  Issue Type: Improvement
  Components: wicket-extensions
Affects Versions: 1.3.2
 Environment: Firefox 2
Reporter: Martin Grigorov
Priority: Minor


I'm experiencing bad performance when opening a ModalWindow. Profiling it with 
Firebug I found that the hot spot is modal.js -> disableFocus() ->  
disableFocusElement() (which is recursive and iterates over all children of 
).
I have a (relatively) complex page with a modal window and Firebug profiler 
shows these results:
disableFocusElement 982381.72%  1379.189ms  1379.189ms  0.14ms  
0.014ms 768.042ms   modal.js (line 1373)
bind9   2.9%48.908ms49.861ms5.54ms  0.098ms 
45.192msmodal.js (line 408)


As you see there are ~1 calls to disableFocusElement (i.e. there are ~1 
sub-elements of ).

The following patch improves the performance and still remains the 
functionality:

Index: 
src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
===
--- 
src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js  
(revision 646196)
+++ 
src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js  
(working copy)
@@ -1251,9 +1251,9 @@
this.document = doc;
 
// disable user interaction
-   this.hideSelectBoxes();
-   this.disableTabs();
-   this.disableFocus();
+   setTimeout(function() {this.hideSelectBoxes()}.bind(this), 300);
+   setTimeout(function() {this.disableTabs()}.bind(this), 400);
+   setTimeout(function() {this.disableFocus()}.bind(this), 1000);
},


Note: calling "setTimeout(function() {this.disableFocus()}.bind(this), *500*);" 
didn't help in my case. It needs to be bigger. 
The user experience is good and I don't see any drawbacks of this modification.


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



[jira] Commented: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Jan Kriesten (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587093#action_12587093
 ] 

Jan Kriesten commented on WICKET-1501:
--

I don't actually understand why the markup is loaded from the markupCache in 
putIntoCache at all - it's already provided as a method argument...

> MarkupCache.putIntoCache doesn't behave correctly!!
> ---
>
> Key: WICKET-1501
> URL: https://issues.apache.org/jira/browse/WICKET-1501
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3.3
>Reporter: Jan Kriesten
>Priority: Critical
>
> 'putIntoCache' checks for the locationString not to be null instead of the 
> cacheKey!
> This way you always get old markup returned instead of the freshly supplied 
> markup which shouldn't be cached at all.

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



[jira] Created: (WICKET-1501) MarkupCache.putIntoCache doesn't behave correctly!!

2008-04-09 Thread Jan Kriesten (JIRA)
MarkupCache.putIntoCache doesn't behave correctly!!
---

 Key: WICKET-1501
 URL: https://issues.apache.org/jira/browse/WICKET-1501
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.3
Reporter: Jan Kriesten
Priority: Critical


'putIntoCache' checks for the locationString not to be null instead of the 
cacheKey!

This way you always get old markup returned instead of the freshly supplied 
markup which shouldn't be cached at all.

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