using iframe to manage upload of schemas - allows for calling an action listener once the upload is complete to validate the schema and present an error message inside the form in a pretty way.

added a small helper library for managing uploads without using a page reload.  modified uploadfileservlet to return a javascript snippet in the response body if the return-page parameter starts with javascript:

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4578 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2006-12-12 09:51:27 +00:00
parent cb80c75014
commit b89434674c
5 changed files with 159 additions and 51 deletions

View File

@@ -75,29 +75,29 @@ public class ActionLinkRenderer extends BaseRenderer
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
{
// always check for this flag - as per the spec
if (component.isRendered() == true)
if (!component.isRendered())
{
Writer out = context.getResponseWriter();
return;
}
Writer out = context.getResponseWriter();
UIActionLink link = (UIActionLink)component;
UIActionLink link = (UIActionLink)component;
UIComponent verticalContiner = getVerticalContainer(link);
if (verticalContiner != null)
{
int padding = link.getPadding();
UIComponent verticalContiner = getVerticalContainer(link);
if (verticalContiner != null)
{
int padding = link.getPadding();
if (verticalContiner instanceof UIActions)
{
padding = ((UIActions)verticalContiner).getVerticalSpacing();
}
// render as menu item style action link
out.write( renderMenuAction(context, link, padding) );
}
else
if (verticalContiner instanceof UIActions)
{
// render as action link
out.write( renderActionLink(context, link) );
padding = ((UIActions)verticalContiner).getVerticalSpacing();
}
// render as menu item style action link
out.write( renderMenuAction(context, link, padding) );
}
else
{
// render as action link
out.write( renderActionLink(context, link) );
}
}
@@ -190,6 +190,12 @@ public class ActionLinkRenderer extends BaseRenderer
}
}
if (attrs.get("id") != null)
{
linkBuf.append(" id=\"")
.append(attrs.get("id"))
.append("\"");
}
if (attrs.get("style") != null)
{
linkBuf.append(" style=\"")