You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/02/16 12:49:19 UTC

svn commit: r378231 - in /myfaces/tomahawk/trunk: core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/ examples/simple/src/main/webapp/ sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/ sandbox/core/src/main/resources-face...

Author: mmarinschek
Date: Thu Feb 16 03:49:14 2006
New Revision: 378231

URL: http://svn.apache.org/viewcvs?rev=378231&view=rev
Log:
Bugfix for expandAll
additional Attributes for SelectOneRow

Added:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowRenderer.java
Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java
    myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml
    myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld
    myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java Thu Feb 16 03:49:14 2006
@@ -111,10 +111,29 @@
         return true;
     }
 
+    private HtmlPanelNavigationMenu getParentPanelNavigation()
+    {
+        UIComponent parent = getParent();
+
+            // search HtmlPanelNavigation
+            UIComponent p = parent;
+            while (p != null && !(p instanceof HtmlPanelNavigationMenu))
+            {
+                p = p.getParent();
+            }
+            // p is now the HtmlPanelNavigation
+           if (!(p instanceof HtmlPanelNavigationMenu))
+                {
+                    log.error("HtmlCommandNavigation without parent HtmlPanelNavigation ?!");
+                    return null;
+                }
+        return (HtmlPanelNavigationMenu) p;
+    }
 
     public void toggleOpen()
     {
-        if (isOpen())
+        HtmlPanelNavigationMenu menu = getParentPanelNavigation();
+        if (isOpen() && menu != null && ! menu.isExpandAll() )
         {
             if (getChildCount() > 0)
             {
@@ -140,27 +159,27 @@
                 p = p.getParent();
             }
             // p is now the HtmlPanelNavigation
-
-            if (!hasCommandNavigationChildren())
-            {
-                //item is an end node --> deactivate all other nodes, and then...
-                if (!(p instanceof HtmlPanelNavigationMenu))
+           if (!(p instanceof HtmlPanelNavigationMenu))
                 {
                     log.error("HtmlCommandNavigation without parent HtmlPanelNavigation ?!");
                 }
                 else
                 {
-                    //deactivate all other items
-                    deactivateAllChildren(p.getChildren().iterator());
+                    if (!hasCommandNavigationChildren() || ((HtmlPanelNavigationMenu) p).isExpandAll())
+                    {
+                        //item is an end node or Menu always expanded --> deactivate all other nodes, and then...
+
+                        //deactivate all other items
+                        deactivateAllChildren(p.getChildren().iterator());
+                        //...activate this item
+                        setActive(true);
+                    }
+                    else
+                    {
+                        //open item
+                        setOpen(true);
+                    }
                 }
-                //...activate this item
-                setActive(true);
-            }
-            else
-            {
-                //open item
-                setOpen(true);
-            }
         }
     }
 

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java Thu Feb 16 03:49:14 2006
@@ -162,6 +162,7 @@
                             item.setActive(prevItem.isActive());
                         if (!copyValueBinding(prevItem, item, "open"))
                             item.setOpen(prevItem.isOpen());
+                        if(!panelNav.isExpandAll() || prevItem.isActive() )
                         item.toggleOpen();
                         if (prevItem.isOpen())
                             restoreOpenActiveStates(facesContext, panelNav, prevItem.getChildren());
@@ -311,9 +312,33 @@
         }
     }
 
+    private HtmlPanelNavigationMenu getParentPanelNavigation(UIComponent uiComponent)
+    {
+        if(uiComponent instanceof HtmlPanelNavigationMenu)
+        {
+            return (HtmlPanelNavigationMenu) uiComponent;
+        }
+        UIComponent parent = uiComponent.getParent();
+
+            // search HtmlPanelNavigation
+            UIComponent p = parent;
+            while (p != null && !(p instanceof HtmlPanelNavigationMenu))
+            {
+                p = p.getParent();
+            }
+            // p is now the HtmlPanelNavigation
+           if (!(p instanceof HtmlPanelNavigationMenu))
+                {
+                    log.error("HtmlCommandNavigation without parent HtmlPanelNavigation ?!");
+                    return null;
+                }
+        return (HtmlPanelNavigationMenu) p;
+    }
+
     private void createHtmlCommandNavigationItem(FacesContext facesContext, UIComponent parent, int i,
                                                  UINavigationMenuItem uiNavMenuItem, UniqueId uniqueId)
     {
+        HtmlPanelNavigationMenu menu = getParentPanelNavigation(parent);
         // Create HtmlCommandNavigationItem
         HtmlCommandNavigationItem newItem = (HtmlCommandNavigationItem)
             facesContext.getApplication().createComponent(HtmlCommandNavigationItem.COMPONENT_TYPE);
@@ -344,7 +369,7 @@
         if (!copyValueBinding(uiNavMenuItem, newItem, "rendered"))
             newItem.setRendered(uiNavMenuItem.isRendered());
 
-        if (uiNavMenuItem.isOpen()) newItem.toggleOpen();
+        if (uiNavMenuItem.isOpen() && ! menu.isExpandAll()) newItem.toggleOpen();
         newItem.setActive(uiNavMenuItem.isActive());
 
         if (!copyValueBinding(uiNavMenuItem, newItem, "target"))

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp Thu Feb 16 03:49:14 2006
@@ -34,7 +34,7 @@
     <t:div id="subnavigation_outer">
     <t:div id="subnavigation">
     <t:panelNavigation2 id="nav1" layout="list" itemClass="mypage" activeItemClass="selected"
-                        openItemClass="selected" expandAll="true" disabledStyle="color:red;padding: 2px 20px 2px 25px">
+                         expandAll="true" disabledStyle="color:red;padding: 2px 20px 2px 25px">
         <t:navigationMenuItems id="navitems" value="#{navigationMenu.panelNavigationItems}" />
     </t:panelNavigation2>
     </t:div>

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java Thu Feb 16 03:49:14 2006
@@ -4,9 +4,6 @@
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIData;
 import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import java.util.Map;
-import java.io.IOException;
 
 /**
  * Created by IntelliJ IDEA.
@@ -23,9 +20,10 @@
 
  public static final String COMPONENT_FAMILY = "org.apache.myfaces.SelectOneRow";
 
- public SelectOneRow() {
-  setRendererType(null);
+ private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.SelectOneRow";
 
+ public SelectOneRow() {
+  setRendererType(DEFAULT_RENDERER_TYPE);
  }
 
  public String getFamily() {
@@ -54,86 +52,5 @@
   values[1] = groupName;
   return values;
  }
-
- public void encodeBegin(FacesContext context) throws IOException {
-
-  if (!isRendered()) {
-   return;
-  }
-
-  ResponseWriter writer = context.getResponseWriter();
-
-  writer.write("<input class=\"selectOneRadio\" type=\"radio\" name=\"");
-  writer.write(getGroupName());
-  writer.write("\"");
-
-  writer.write(" id=\"");
-  String clientId = getClientId(context);
-  writer.write(clientId);
-  writer.write("\"");
-
-  writer.write(" value=\"");
-  writer.write(clientId);
-  writer.write("\"");
-
-  if (isRowSelected(this)) {
-   writer.write(" checked");
-  }
-
-  writer.write(" \\>");
-
- }
-
- private boolean isRowSelected(UIComponent component) {
-  UIInput input = (UIInput) component;
-  Object value = input.getValue();
-
-  int currentRowIndex = getCurrentRowIndex();
-
-  return (value != null)
-    && (currentRowIndex == ((Integer) value).intValue());
-
- }
-
- private int getCurrentRowIndex() {
-  UIData uidata = findUIData(this);
-  if (uidata == null)
-   return -1;
-  else
-   return uidata.getRowIndex();
- }
-
- protected UIData findUIData(UIComponent uicomponent) {
-  if (uicomponent == null)
-   return null;
-  if (uicomponent instanceof UIData)
-   return (UIData) uicomponent;
-  else
-   return findUIData(uicomponent.getParent());
- }
-
- public void decode(FacesContext context) {
-
-  if (!isRendered()) {
-   return;
-  }
-
-  Map requestMap = context.getExternalContext().getRequestParameterMap();
-  String postedValue;
-
-  if (requestMap.containsKey(getGroupName())) {
-   postedValue = (String) requestMap.get(getGroupName());
-   String clientId = getClientId(context);
-   if (clientId.equals(postedValue)) {
-
-    String[] postedValueArray = postedValue.split(":");
-    String rowIndex = postedValueArray[postedValueArray.length - 2];
-
-    Integer newValue = Integer.valueOf(rowIndex);
-    //the value to go in conversion&validation
-    setSubmittedValue(newValue);
-    setValid(true);
-   }
-  }
- }
+ 
 }

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowRenderer.java?rev=378231&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowRenderer.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowRenderer.java Thu Feb 16 03:49:14 2006
@@ -0,0 +1,115 @@
+package org.apache.myfaces.custom.selectOneRow;
+
+import org.apache.myfaces.renderkit.html.HtmlRenderer;
+import org.apache.myfaces.renderkit.html.HTML;
+import org.apache.myfaces.renderkit.html.HtmlRendererUtils;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Ernst
+ * Date: 15.02.2006
+ * Time: 15:01:48
+ * To change this template use File | Settings | File Templates.
+ */
+public class SelectOneRowRenderer extends HtmlRenderer
+{
+    private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.SelectOneRow";
+
+    public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException
+    {
+        if ((component instanceof SelectOneRow) && component.isRendered())
+        {
+            SelectOneRow row = (SelectOneRow) component;
+            String clientId = row.getClientId(facesContext);
+
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        writer.startElement(HTML.INPUT_ELEM, row);
+        writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_RADIO, null);
+        writer.writeAttribute(HTML.NAME_ATTR, row.getGroupName(), null);
+
+        if (false) { // todo: disabled Attribute
+            writer.writeAttribute(HTML.DISABLED_ATTR, HTML.DISABLED_ATTR, null);
+        }
+
+        writer.writeAttribute(HTML.ID_ATTR, clientId, null);
+
+        if (isRowSelected(row))
+        {
+            writer.writeAttribute(HTML.CHECKED_ATTR, HTML.CHECKED_ATTR, null);
+        }
+
+            writer.writeAttribute(HTML.VALUE_ATTR, clientId, null);
+
+        HtmlRendererUtils.renderHTMLAttributes(writer, row, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
+
+        writer.endElement(HTML.INPUT_ELEM);
+        }
+    }
+
+ private boolean isRowSelected(UIComponent component) {
+  UIInput input = (UIInput) component;
+  Object value = input.getValue();
+
+  int currentRowIndex = getCurrentRowIndex(component);
+
+  return (value != null)
+    && (currentRowIndex == ((Long) value).intValue());
+
+ }
+
+ private int getCurrentRowIndex(UIComponent component) {
+  UIData uidata = findUIData(component);
+  if (uidata == null)
+   return -1;
+  else
+   return uidata.getRowIndex();
+ }
+
+ protected UIData findUIData(UIComponent uicomponent) {
+  if (uicomponent == null)
+   return null;
+  if (uicomponent instanceof UIData)
+   return (UIData) uicomponent;
+  else
+   return findUIData(uicomponent.getParent());
+ }
+
+ public void decode(FacesContext context, UIComponent uiComponent) {
+  if(! (uiComponent instanceof SelectOneRow) )
+  {
+      return;
+  }
+
+  if (!uiComponent.isRendered()) {
+   return;
+  }
+  SelectOneRow row = (SelectOneRow) uiComponent;
+
+  Map requestMap = context.getExternalContext().getRequestParameterMap();
+  String postedValue;
+
+  if (requestMap.containsKey(row.getGroupName())) {
+   postedValue = (String) requestMap.get(row.getGroupName());
+   String clientId = row.getClientId(context);
+   if (clientId.equals(postedValue)) {
+
+    String[] postedValueArray = postedValue.split(":");
+    String rowIndex = postedValueArray[postedValueArray.length - 2];
+
+    Long newValue = Long.valueOf(rowIndex);
+    //the value to go in conversion&validation
+    row.setSubmittedValue(newValue);
+    row.setValid(true);
+   }
+  }
+ }
+}

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java Thu Feb 16 03:49:14 2006
@@ -1,11 +1,14 @@
 package org.apache.myfaces.custom.selectOneRow;
 
-import javax.faces.webapp.UIComponentTag;
+import org.apache.myfaces.taglib.html.HtmlInputTagBase;
+
+import org.apache.myfaces.renderkit.JSFAttr;
+import org.apache.myfaces.renderkit.html.HTML;
+import javax.faces.application.Application;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIInput;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
-import javax.faces.application.Application;
 
 /**
  * Created by IntelliJ IDEA.
@@ -14,9 +17,174 @@
  * Time: 15:49:56
  * To change this template use File | Settings | File Templates.
  */
-public class SelectOneRowTag extends UIComponentTag
+public class SelectOneRowTag extends HtmlInputTagBase
 {
-    private String groupName;
+    private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.SelectOneRow";
+// UIComponent attributes --> already implemented in UIComponentTagBase
+
+    // user role attributes --> already implemented in UIComponentTagBase
+
+    // HTML universal attributes --> already implemented in HtmlComponentTagBase
+
+    // HTML event handler attributes --> already implemented in HtmlComponentTagBase
+
+    // HTML input attributes relevant for password-input
+    private String _accesskey;
+    private String _align;
+    private String _alt;
+    private String _datafld;
+    private String _datasrc;
+    private String _dataformatas;
+    private String _disabled;
+    private String _maxlength;
+    private String _onblur;
+    private String _onchange;
+    private String _onfocus;
+    private String _onselect;
+    private String _readonly;
+    private String _size;
+    private String _tabindex;
+
+    // UIOutput attributes
+    // value and converterId --> already implemented in UIComponentTagBase
+
+    // UIInput attributes
+    // --> already implemented in HtmlInputTagBase
+
+    // HTMLInputSecret attributes
+    private String _groupName;
+
+    public void release() {
+        super.release();
+        _accesskey=null;
+        _align=null;
+        _alt=null;
+        _datafld=null;
+        _datasrc=null;
+        _dataformatas=null;
+        _disabled=null;
+        _maxlength=null;
+        _onblur=null;
+        _onchange=null;
+        _onfocus=null;
+        _onselect=null;
+        _readonly=null;
+        _size=null;
+        _tabindex=null;
+        _groupName = null;
+    }
+
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);
+
+        setStringProperty(component, HTML.ACCESSKEY_ATTR, _accesskey);
+        setStringProperty(component, HTML.ALIGN_ATTR, _align);
+        setStringProperty(component, HTML.ALT_ATTR, _alt);
+        setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
+        setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
+        setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
+        setBooleanProperty(component, HTML.DISABLED_ATTR, _disabled);
+        setIntegerProperty(component, HTML.MAXLENGTH_ATTR, _maxlength);
+        setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
+        setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
+        setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
+        setStringProperty(component, HTML.ONSELECT_ATTR, _onselect);
+        setBooleanProperty(component, HTML.READONLY_ATTR, _readonly);
+        setIntegerProperty(component, HTML.SIZE_ATTR, _size);
+        setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex);
+
+            UIInput singleInputRowSelect = (UIInput) component;
+          singleInputRowSelect.getAttributes().put("groupName", _groupName);
+
+          if (getValue() != null) {
+
+           if (isValueReference(getValue())) {
+            FacesContext context = FacesContext.getCurrentInstance();
+            Application app = context.getApplication();
+            ValueBinding binding = app.createValueBinding(getValue());
+            singleInputRowSelect.setValueBinding("value",binding);
+
+           }
+
+          }
+   }
+
+    public void setAccesskey(String accesskey)
+    {
+        _accesskey = accesskey;
+    }
+
+    public void setAlign(String align)
+    {
+        _align = align;
+    }
+
+    public void setAlt(String alt)
+    {
+        _alt = alt;
+    }
+
+    public void setDatafld(String datafld)
+    {
+        _datafld = datafld;
+    }
+
+    public void setDatasrc(String datasrc)
+    {
+        _datasrc = datasrc;
+    }
+
+    public void setDataformatas(String dataformatas)
+    {
+        _dataformatas = dataformatas;
+    }
+
+    public void setDisabled(String disabled)
+    {
+        _disabled = disabled;
+    }
+
+    public void setMaxlength(String maxlength)
+    {
+        _maxlength = maxlength;
+    }
+
+    public void setOnblur(String onblur)
+    {
+        _onblur = onblur;
+    }
+
+    public void setOnchange(String onchange)
+    {
+        _onchange = onchange;
+    }
+
+    public void setOnfocus(String onfocus)
+    {
+        _onfocus = onfocus;
+    }
+
+    public void setOnselect(String onselect)
+    {
+        _onselect = onselect;
+    }
+
+    public void setReadonly(String readonly)
+    {
+        _readonly = readonly;
+    }
+
+    public void setSize(String size)
+    {
+        _size = size;
+    }
+
+    public void setTabindex(String tabindex)
+    {
+        _tabindex = tabindex;
+    }
+
 
 
  public String getValue() {
@@ -35,39 +203,16 @@
  }
 
  public String getRendererType() {
-  return null;
+  return DEFAULT_RENDERER_TYPE;
  }
 
  public String getGroupName() {
-  return groupName;
+  return _groupName;
  }
 
  public void setGroupName(String groupName) {
-  this.groupName = groupName;
- }
-
- public void release() {
-  super.release();
-  groupName = null;
+  this._groupName = groupName;
  }
 
- protected void setProperties(UIComponent component) {
-
-  super.setProperties(component);
-  UIInput singleInputRowSelect = (UIInput) component;
-  singleInputRowSelect.getAttributes().put("groupName", groupName);
-
-  if (getValue() != null) {
 
-   if (isValueReference(getValue())) {
-    FacesContext context = FacesContext.getCurrentInstance();
-    Application app = context.getApplication();
-    ValueBinding binding = app.createValueBinding(getValue());
-    singleInputRowSelect.setValueBinding("value",binding);
-
-   }
-
-  }
-
- }
 }

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml Thu Feb 16 03:49:14 2006
@@ -185,6 +185,12 @@
     </renderer>
 
     <renderer>
+      <component-family>org.apache.myfaces.SelectOneRow</component-family>
+      <renderer-type>org.apache.myfaces.SelectOneRow</renderer-type>
+      <renderer-class>org.apache.myfaces.custom.selectOneRow.SelectOneRowRenderer</renderer-class>
+    </renderer>
+
+    <renderer>
       <component-family>javax.faces.Input</component-family>
       <renderer-type>org.apache.myfaces.InputTextAjax</renderer-type>
       <renderer-class>org.apache.myfaces.custom.inputAjax.HtmlInputTextAjaxRenderer</renderer-class>

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld Thu Feb 16 03:49:14 2006
@@ -825,23 +825,14 @@
 			<type>java.lang.String</type>
 			<description>The Name of the radio-button-group to use</description>
 		</attribute>
-		<attribute>
-			<name>id</name>
-			<required>false</required>
-			<rtexprvalue>false</rtexprvalue>
-		</attribute>
-		<attribute>
-			<name>rendered</name>
-			<required>false</required>
-			<rtexprvalue>false</rtexprvalue>
-		</attribute>
-		<attribute>
-			<name>value</name>
-			<required>false</required>
-			<rtexprvalue>false</rtexprvalue>
-			<description>the Value-Binding to store/retrive the selected Row Index</description>
-		</attribute>
-	</tag>
+        &html_align_attribute;
+        &html_disabled_attribute;
+        &html_focus_blur_attributes;
+        &html_onchange_attribute;
+        &html_onselect_attribute;
+        &html_readonly_attribute;
+        &ui_input_attributes;
+    </tag>
 
 	<tag>
 		<name>dojoInitializer</name>

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java Thu Feb 16 03:49:14 2006
@@ -20,6 +20,7 @@
 
 import javax.faces.context.FacesContext;
 import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
 
 import org.apache.myfaces.custom.datascroller.ScrollerActionEvent;
 
@@ -32,14 +33,14 @@
 {
     private List _list = new ArrayList();
 
-    private Integer _selectedRowIndex;
+    private Long _selectedRowIndex;
 
-    public Integer getSelectedRowIndex()
+    public Long getSelectedRowIndex()
     {
         return _selectedRowIndex;
     }
 
-    public void setSelectedRowIndex(Integer selectedRowIndex)
+    public void setSelectedRowIndex(Long selectedRowIndex)
     {
         _selectedRowIndex = selectedRowIndex;
     }
@@ -82,4 +83,10 @@
                                         + ", pageindex: "
                                         + scrollerEvent.getPageIndex());
     }
+
+    public void processRowSelection(ValueChangeEvent event)
+    {
+        Long newVal = (Long) event.getNewValue();
+    }
+
 }

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp?rev=378231&r1=378230&r2=378231&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp Thu Feb 16 03:49:14 2006
@@ -49,7 +49,9 @@
                <f:facet name="header">
                    <h:outputText value="Select"/>
                </f:facet>
-               <s:selectOneRow  groupName="selection" id="hugo" value="#{selectOneRowList.selectedRowIndex}"/>
+               <s:selectOneRow  groupName="selection" id="hugo" value="#{selectOneRowList.selectedRowIndex}"
+                       onchange="submit();" immediate="true" 
+                       valueChangeListener="#{selectOneRowList.processRowSelection}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
@@ -125,7 +127,6 @@
                 </h:outputFormat>
             </t:dataScroller>
             <h:outputText value="#{selectOneRowList.selectionMessage}" />
-            <h:commandButton value="Select" />
         </h:panelGrid>
 
     </h:panelGroup>