If the hibernate-annotations patch I submitted is incorporated, here is the 
patch to seam for this fix:

Index: ValidationInterceptor.java
  | ===================================================================
  | RCS file: 
/cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/ValidationInterceptor.java,v
  | retrieving revision 1.10
  | diff -r1.10 ValidationInterceptor.java
  | 5a6,8
  | > import java.util.StringTokenizer;
  | > import java.util.regex.Matcher;
  | > import java.util.regex.Pattern;
  | 36a40
  | >    @SuppressWarnings("unchecked")
  | 92c96,162
  | <       String clientId = getClientId( facesContext.getViewRoot(), 
iv.getPropertyName(), facesContext);
  | ---
  | >       Pattern indexPattern = Pattern.compile("([^\\.]+?)\\[(\\d)\\]");
  | >       boolean hasIndexes = false;
  | >
  | >       UIComponent comp = facesContext.getViewRoot();
  | >       StringTokenizer tokens = new StringTokenizer(iv.getPropertyPath(), 
".");
  | >
  | >       boolean first = true;
  | >       while (tokens.hasMoreTokens())
  | >       {
  | >               String property = tokens.nextToken();
  | >               Matcher match = indexPattern.matcher(property);
  | >
  | >               if (match.find())
  | >               {
  | >                       hasIndexes = true;
  | >                       property = match.group(1);
  | >               }
  | >
  | >                       comp = findComponent(comp, property, facesContext);
  | >
  | >               if (comp == null && first)
  | >               {
  | >                       // if the first wasn't found, don't sweat it, it 
just means the bean wasn't found
  | >                       // (Usually the JSF content will not have a 
component for the bean)
  | >                       if (tokens.hasMoreTokens())
  | >                               comp = facesContext.getViewRoot();
  | >                       else
  | >                               break;
  | >               }
  | >               else if (comp == null)
  | >                       break;
  | >
  | >               first = false;
  | >       }
  | >
  | >       String clientId = (comp == null) ?
  | >               null : comp.getClientId(facesContext);
  | >
  | >       if (clientId != null && hasIndexes)
  | >       {
  | >             // apply the indexes
  | >             StringBuilder indexedId = new StringBuilder();
  | >             Matcher match = indexPattern.matcher(iv.getPropertyPath());
  | >             int previousIndex = 0;
  | >             while (match.find())
  | >             {
  | >               String propName = match.group(1);
  | >               String index = match.group(2);
  | >               int idIndex = clientId.indexOf(":" + propName + ":", 
previousIndex);
  | >               if (idIndex == -1)
  | >               {
  | >                       indexedId = null;
  | >                       break;
  | >               }
  | >               indexedId.append(clientId.substring(previousIndex, idIndex 
+ propName.length() + 2));
  | >               indexedId.append(index);
  | >               indexedId.append(":");
  | >               previousIndex = idIndex + propName.length() + 2;
  | >             }
  | >
  | >             if (indexedId != null)
  | >             {
  | >               indexedId.append(clientId.substring(previousIndex));
  | >               clientId = indexedId.toString();
  | >             }
  | >       }
  | >
  | 97c167
  | <    private static String getClientId(UIComponent component, String id, 
FacesContext facesContext)
  | ---
  | >    private static UIComponent findComponent(UIComponent parent, String 
id, FacesContext facesContext)
  | 99c169
  | <       String componentId = component.getId();
  | ---
  | >       String componentId = parent.getId();
  | 102c172
  | <          return component.getClientId(facesContext);
  | ---
  | >          return parent;
  | 106c176
  | <          Iterator iter = component.getFacetsAndChildren();
  | ---
  | >          Iterator iter = parent.getFacetsAndChildren();
  | 110,111c180,181
  | <             String clientId = getClientId(child, id, facesContext);
  | <             if (clientId!=null) return clientId;
  | ---
  | >             UIComponent result = findComponent(child, id, facesContext);
  | >             if (result != null) return result;
  | 116,117d185
  | <
  | <
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926310#3926310

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3926310


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to