Author: ivaynberg
Date: Sun Aug 31 00:36:45 2008
New Revision: 690652
URL: http://svn.apache.org/viewvc?rev=690652&view=rev
Log:
WICKET-1801
Modified:
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
Modified:
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
URL:
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java?rev=690652&r1=690651&r2=690652&view=diff
==============================================================================
---
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
(original)
+++
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
Sun Aug 31 00:36:45 2008
@@ -123,9 +123,12 @@
*/
protected CharSequence getPreconditionScript()
{
- if (getComponent() instanceof Page) {
- return "return true;";
- } else {
+ if (getComponent() instanceof Page)
+ {
+ return "return true;";
+ }
+ else
+ {
return "return Wicket.$('" +
getComponent().getMarkupId() + "') != null;";
}
}
@@ -154,8 +157,7 @@
* @param partialCall
* Javascript of a partial call to the function performing
the actual ajax callback.
* Must be in format <code>function(params,</code> with
signature
- * <code>function(params, onSuccessHandler,
onFailureHandler</code>. Example:
- * <code>wicketAjaxGet('callbackurl'</code>
+ * <code>function(params, onSuccessHandler,
onFailureHandler</code>. Example: <code>wicketAjaxGet('callbackurl'</code>
*
* @return script that performs ajax callback to this behavior
*/
@@ -255,10 +257,12 @@
}
/**
+ * Finds the markup id of the indicator. The default search order is:
component, behavior,
+ * component's parent hieararchy.
*
- * @return String
+ * @return markup id or <code>null</code> if no indicator found
*/
- private String findIndicatorId()
+ protected String findIndicatorId()
{
if (getComponent() instanceof IAjaxIndicatorAware)
{