fixing some bugs with setting repeat indices. tinymce was blocking capture of click events so it was never setting repeat indexes so that was causing issues. secondly, for nested repeats, now setting the full hierarchy of repeats in order to avoid any blocking issues when events aren't being properly propogated. a bit brute force, but does seem to make things more stable.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4778 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-01-10 06:21:20 +00:00
parent b57f548014
commit f5e16dfcd0
2 changed files with 72 additions and 26 deletions

View File

@@ -320,18 +320,20 @@ public class XFormsBean
* @param value the new value
* @return the list of events that may result through this action
*/
public void setRepeatIndex()
public void setRepeatIndeces()
throws XFormsException, IOException
{
final FacesContext context = FacesContext.getCurrentInstance();
final Map requestParameters = context.getExternalContext().getRequestParameterMap();
final String id = (String)requestParameters.get("id");
final int index = Integer.parseInt((String)requestParameters.get("index"));
LOGGER.debug(this + ".setRepeatIndex(" + id + ", " + index + ")");
final ChibaBean chibaBean = this.xformsSession.chibaBean;
chibaBean.updateRepeatIndex(id, index);
final String repeatIds = (String)requestParameters.get("repeatIds");
LOGGER.debug(this + ".setRepeatIndeces(" + repeatIds + ")");
for (String id : repeatIds.split(","))
{
final int index = Integer.parseInt((String)requestParameters.get(id));
LOGGER.debug(this + ".setRepeatIndex(" + id + ", " + index + ")");
final ChibaBean chibaBean = this.xformsSession.chibaBean;
chibaBean.updateRepeatIndex(id, index);
}
final ResponseWriter out = context.getResponseWriter();
XMLUtil.print(this.getEventLog(), out);
out.close();