You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Igor Couto <co...@gmail.com> on 2006/10/05 23:34:13 UTC

Rebound Component properties

Hi everyone,

For partial page loads, im redirecting the jsf rendering at the
INVOKE_APPLICATION phase:

        HttpServletResponse response;
        response =
(HttpServletResponse)context.getExternalContext().getResponse();
               //r.cloneWithWriter(aw);

        ResponseWriter rsys = context.getRenderKit
().createResponseWriter(aw,response.getContentType(),
response.getCharacterEncoding());
        context.setResponseWriter(rsys);
        try {

            component.encodeBegin(context);
            component.encodeChildren(context);
            component.encodeEnd(context);


        }
        catch (IOException e) {
            e.printStackTrace();
        }
        op = aw.toString();

        op = op.replaceAll("\n","").replaceAll("\r","").replaceAll("\"","
\\\\\"");

        script = script +
            "       top.trocarTag(\"" + component.getClientId(context) +
"\", \"" + op + "\"" + ");\n";


and send the result to an IFRAME. Ok this works on almost cases.

When the component is previously disabled and i reenable it using the iframe
(after the render), the next request cannot read the new state.

My question is: Could anyone know how can i rebound the component ?

I have tried : component.decode;component.processDecodes;processUpdates;etc
Another try:
recursivelyHandleComponentReferencesAndSetValid(context,component) (as is in
the source)

bot nothing works.

Thank you!!!

Igor