You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2007/03/25 12:36:19 UTC
svn commit: r522189 - in
/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component:
AbstractOptions.java Choices.java Selection.java
Author: jdonnerstag
Date: Sun Mar 25 03:36:18 2007
New Revision: 522189
URL: http://svn.apache.org/viewvc?view=rev&rev=522189
Log:
backported XmlPullParser changes
Modified:
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Choices.java
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Selection.java
Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java?view=diff&rev=522189&r1=522188&r2=522189
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java Sun Mar 25 03:36:18 2007
@@ -24,7 +24,7 @@
import wicket.markup.html.form.FormComponent;
import wicket.markup.html.form.IChoiceRenderer;
import wicket.util.string.AppendingStringBuffer;
-import wicket.util.value.ValueMap;
+import wicket.util.value.IValueMap;
/**
* Generats html option elements based on iterator specified by
@@ -82,12 +82,16 @@
replaceComponentTagBody(markupStream, openTag, buffer);
}
+ /**
+ *
+ * @param tag
+ */
protected void onComponentTag(ComponentTag tag)
{
checkComponentTag(tag, "select");
super.onComponentTag(tag);
- ValueMap attrs = tag.getAttributes();
+ IValueMap attrs = tag.getAttributes();
attrs.put("multiple", null);
attrs.put("size", new Integer(getPalette().getRows()));
@@ -95,7 +99,6 @@
if (!palette.isPaletteEnabled()) {
attrs.put("disabled","disabled");
}
-
}
/**
@@ -104,5 +107,4 @@
public void updateModel()
{
}
-
}
Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Choices.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Choices.java?view=diff&rev=522189&r1=522188&r2=522189
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Choices.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Choices.java Sun Mar 25 03:36:18 2007
@@ -20,7 +20,7 @@
import wicket.extensions.markup.html.form.palette.Palette;
import wicket.markup.ComponentTag;
-import wicket.util.value.ValueMap;
+import wicket.util.value.IValueMap;
/**
* select box containg all available choices of the palette
@@ -45,7 +45,7 @@
protected void onComponentTag(ComponentTag tag)
{
super.onComponentTag(tag);
- ValueMap attrs = tag.getAttributes();
+ IValueMap attrs = tag.getAttributes();
String onFocus = getPalette().getChoicesOnFocusJS();
if (onFocus != null)
{
Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Selection.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Selection.java?view=diff&rev=522189&r1=522188&r2=522189
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Selection.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket-extensions/src/main/java/wicket/extensions/markup/html/form/palette/component/Selection.java Sun Mar 25 03:36:18 2007
@@ -20,7 +20,7 @@
import wicket.extensions.markup.html.form.palette.Palette;
import wicket.markup.ComponentTag;
-import wicket.util.value.ValueMap;
+import wicket.util.value.IValueMap;
/**
* select box containg selected choices of the palette
@@ -36,8 +36,10 @@
private static final long serialVersionUID = 1L;
/**
- * @param id component id
- * @param palette parent palette
+ * @param id
+ * component id
+ * @param palette
+ * parent palette
*/
public Selection(String id, Palette palette)
{
@@ -47,19 +49,20 @@
protected void onComponentTag(ComponentTag tag)
{
super.onComponentTag(tag);
- ValueMap attrs=tag.getAttributes();
-
- String onFocus=getPalette().getSelectionOnFocusJS();
- if (onFocus!=null) {
+ IValueMap attrs = tag.getAttributes();
+
+ String onFocus = getPalette().getSelectionOnFocusJS();
+ if (onFocus != null)
+ {
attrs.put("onFocus", onFocus);
}
-
- tag.getAttributes().put("ondblclick", getPalette().getRemoveOnClickJS());
+
+ tag.getAttributes().put("ondblclick", getPalette().getRemoveOnClickJS());
}
-
+
protected Iterator getOptionsIterator()
{
return getPalette().getSelectedChoices();
}
-
+
}