RE: Exception while rendering button in a component

"Rajesh Poddar" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Jake,
 
I don't want to change button type from 'button' to 'submit' on the fly because I want only one button of submit type per page and rest of buttons should be 'button' type so that when user hits enter key on the page then submit button should be fired.
I am using  RenderStrategy.NEVER_SCRIPT  to create button of type 'button' and am calling customized javascript to submit the page. Perhaps Barracuda needs a new RenderStrategry.CUSTOM_SCRIPT that could be used in 'manipulateActionElement' to bypass the automatic javascript creation.
 
Creation of button:
 
public Object getItem(String key)
{
      ...
if (key.equals("SelectAddressButton"))
        {
            BAction selectAddressBtn = new BAction();
            String  parameters = this.getParameters(key) + "&jobId=" + Long.toString(jobId);
            String  action   = "GetAddressBook.event?" + parameters;
            selectAddressBtn.setRenderStrategy(RenderStrategy.NEVER_SCRIPT);
            selectAddressBtn.setAttr("onClick", "submitPage('" + action + "')");
            selectAddressBtn.setEnabled(true);
            return(selectAddressBtn);
        }
      ...
 
}
Thanks.
Rajesh
 
 
 
 
 

-----Original Message-----
From: Jacob Kjome [mailto:[email protected]]
Sent: Monday, June 23, 2003 11:49 PM
To: [email protected]
Subject: RE: [Barracuda] Exception while rendering button in a component



Hi Rajesh,

Ok, I fixed up some stuff that might help you out.  I made the code go one step further before throwing the exception when the <input> element is not of type "submit" when javascript is not enabled/allowed.  Basically, I just check if the type if "button" and, if so, modify the type on-the-fly to type "submit" so that form submital is possible in a non-javascript environment.  I still throw an exception if the type is anything other than "button" (or "submit", of course) though because that is overstepping the bounds of what the framework should do, I think.  Update from CVS to get the latest changes.

So, that part is fixed (hopefully), but there is still the issue of how detecting whether javascript, in a browser that normally supports javascript, is disabled.  Currently, we still render as if javascript is enabled becuse we only check that the client, theoretically, supports javascript, not whether it is currently enabled.


Christian, what should we add to the following method to account for javascript being disabled on the client?

    private static boolean clientScriptingAllowed(BAction comp, ViewContext vc) {
        return vc.getViewCapabilities().getScriptingType() instanceof ScriptingType.JavaScript1x
            && comp.getRenderStrategy() != RenderStrategy.NEVER_SCRIPT;
    }

I tested specificaly returning "false", and the BConfig app works just fine with javascript disabled with my latest changes.  Cool!  Now we just have to make it detect it automatically.

Jake

At 11:36 PM 6/23/2003 -0500, you wrote:



Hi Rajesh,

Based on the error that is occurring, it is apparent that you are using a browser that isn't recognized as supporting javascript by Barracuda or you are using a render strategy equal to RenderStrategy.NEVER_SCRIPT, otherwise that block of code would never be reached.  Notice...

//if the client supports Javascript...
if (vc.getViewCapabilities().getScriptingType() instanceof ScriptingType.JavaScript1x
    && comp.getRenderStrategy() != RenderStrategy.NEVER_SCRIPT) {
    ...
    ...
} else { //else do it the manual way
    //make sure the button type is submit
    if (!"submit".equalsIgnoreCase(el.getType())) {
        String errmsg = "Cannot render Input action listener; input type is not 'submit': "+el;
         logger.warn(errmsg);
         throw new NoSuitableRendererException(errmsg);
    }

    //rename the button appropriately (don't encode)
    el.setName(FormGateway.FORM_TARGET+comp.getAction(vc, true));

    //redirect the form to event forwarding servlet (encode)
    fel.setAction(URLRewriter.encodeURL(vc, NamingHelper.getName(fel)+FormGateway.FORM_EXT));
}

So, that's one issue.  What browser are you using?  The other issue is that, currently, if any browser recognized by Barracuda as supporting javascript has javascript turned off, we still render as if the browser has javascript turned on.  That is, we run the "if" block rather than the "else" block no matter what (except, of course for the case where Barracuda doesn't recognize the browser as supporting javascript in the first place or scripting is explicitly turned off by the developer).

Those issues aside, the reason why it is coded this way is that your <input type="button"> element is useless unless javascript is enabled.  How will an <input type="button"> submit a form except via javascript?  That said, it might be worth considering how we might treat this as a non-fatal situation or maybe switch the <input type="button"> to <input type="submit"> on the fly.  Of course, first we have to actually detect that the browser's javascript is currently enabled or not, not just that the browser of this type theoretically supports javascript.  And again, Rajesh, what browser are you using?  I'm not even sure how to test the current code to enter into the "else" block except for forcing the browser to send a bogus user agent header.

And then there is the question about where exactly that null pointer exception is coming from?  I have a hunch, but can't test it unless I tweak some code to force the "if" block to be run. Hmmm....

Jake

At 05:25 PM 6/23/2003 -0700, you wrote:


Hello Jake,
 
I have changed 'HTMLActionRenderer.java' file to support button of type 'button' -- other than sumbit button( see line# 246). Otherwise the code throws an exception 'NoSuitableRendererException'. I have attached the changed java file.
Let me know if there is any other way to support button of type 'button'.
 
Thanks.
Rajesh
 
 
 
Stack Trace:
17:13:45,527 INFO [BComponent] adding in temp views [@56acfa]

17:13:45,527 INFO [BComponent] rendering view: View:@768dc8 (bound to Node:)

17:13:45,527 INFO [AbstractBComponent] Looking up renderer factory for comp:class org.enhydra.barracuda.core.comp.BAction fo

r dom:class org.enhydra.xml.lazydom.html.HTMLInputElementImpl

17:13:45,527 INFO [HTMLActionRenderer] Rendering based on HTMLInputElement interface...

17:13:45,527 ERROR [STDERR] java.lang.NullPointerException

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.html.HTMLActionRenderer.manipulateActionElement(HTMLActionRenderer.java:246)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.html.HTMLActionRenderer.manipulateActionElement(HTMLActionRenderer.java:122)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.html.HTMLActionRenderer.renderComponent(HTMLActionRenderer.java:99)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.BComponent.renderView(BComponent.java:567)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:462)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:480)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:388)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.getNode(TemplateHelper.java:462)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.copyChildNodes(TemplateHelper.java:131)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.getNode(TemplateHelper.java:618)

17:13:45,527 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.copyChildNodes(TemplateHelper.java:131)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.getNode(TemplateHelper.java:618)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.copyChildNodes(TemplateHelper.java:131)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.getNode(TemplateHelper.java:618)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.copyChildNodes(TemplateHelper.java:131)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.getNode(TemplateHelper.java:618)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.copyChildNodes(TemplateHelper.java:131)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.TemplateHelper.render(TemplateHelper.java:109)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.renderer.html.HTMLTemplateRenderer.renderComponent(HTMLTemplateRenderer.java:114)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.BComponent.renderView(BComponent.java:567)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:462)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:388)

17:13:45,543 ERROR [STDERR] at com.efi.apps.mayfly.presentation.screens.QuickTicketLiteScreen$RenderQuickTicketLiteHandler.handleViewEventQuickTicketLiteScreen.java:912)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.DefaultBaseEventListener.handleEvent(DefaultBaseEventListener.java:66)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.DefaultEventDispatcher.notifyListeners(DefaultEventDispatcher.java:421)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.DefaultEventDispatcher.dispatch(DefaultEventDispatcher.java:185)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.DefaultEventDispatcher.dispatchEvent(DefaultEventDispatcher.java:122)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.DefaultEventBroker.dispatchEvent(DefaultEventBroker.java:494)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.ApplicationGateway.handleDefaultExt(ApplicationGateway.java:404)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.ApplicationGateway.handleDefault(ApplicationGateway.java:234)

17:13:45,543 ERROR [STDERR] at com.efi.apps.mayfly.PrintMeProGateway.handleDefault(PrintMeProGateway.java:117)

17:13:45,543 ERROR [STDERR] at org.enhydra.barracuda.core.event.ApplicationGateway.doGet(ApplicationGateway.java:717)

17:13:45,543 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

17:13:45,543 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

17:13:45,543 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

17:13:45,543 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

17:13:45,543 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)

17:13:45,543 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

17:13:45,543 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

17:13:45,543 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)

17:13:45,558 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)

17:13:45,558 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)

17:13:45,558 INFO [DefaultEventBroker] Dispatch complete!

17:13:45,558 INFO [ApplicationGateway] Dispatching complete! (handled in 8702 of 8702 millis)

17:13:45,558 INFO [DefaultEventPool] Releasing event com.efi.modules.pmpro.presentation.events.GetQuickTicketLite@11050be

17:13:45,558 INFO [ObjectRepository] Removed session repository: SessionOR_HttpProcessor[80][1]

17:13:45,558 INFO [ObjectRepository] Removed local repository: LocalOR_HttpProcessor[80][1]

 
 
  

-----Original Message----- 

From: Jacob Kjome [ mailto:[email protected]] 

Sent: Monday, June 23, 2003 3:16 PM 

To: [email protected] 

Subject: Re: [Barracuda] Exception while rendering button in a component



Hi Rajesh,


I will look at this later tonight.  Hopefully have a fix for you by early tomorrow.


Can you help me out a bit by providing the full stack trace that you see either in the logs or from the console?  That would help immensely.


thanks,


Jake


At 11:42 AM 6/23/2003 -0700, you wrote: 


Hi, 

As we know that we can insert any component into a page. e.g. I have a page which contains several component. 

Html details is given below. 





<html id="XyzPage"> 

<head> 

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 

  <link rel="stylesheet" href="../../../../../resources/style/q_style.css" type="text/css"> 



  <script type="text/javascript" language="JavaScript" src="../../../../../resources/js/common_vx.js" ></script> 

  </head> 



  <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" > 

  <form name="vxform" method="POST" > 

         ... 

         ... 

<td class="list-content-reg Dir::Get_Data.Shipping.DeliveryComponent" width="300" valign="top"> 

         <table summary="" id="Delivery_Component" class="list-content" width="300" border="0" cellspacing="0" cellpadding="0"> 

            <tr ID="delivery_edit_comp"> 

              <td class="list-content-col" width="20">&nbsp;</td> 

              <td class="section-title" width="100">&nbsp;</td> 

              <td class="section-title" width="160"> 

                <div align="right">  Delivery 

                </div> 

              </td> 

              <td class="list-content-col" width="20">&nbsp;</td> 

            </tr> 

            <tr valign="middle"> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

              <td width="100" height="18" class="list-content-label">To:</td> 

              <td width="160" height="18" class="list-content"> 

                <span class="Dir::Get_Data.Shipping.PersonFullName_TEXT"> 

                &nbsp;Mike McKenzie 

                </span> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

            </tr> 

            <tr valign="middle"> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

              <td width="100" height="18" class="list-content-label">Attn:</td> 

              <td width="160" height="18" class="list-content"> 

                <input type="text" class="Dir::Get_Data.Shipping.DeliveryAttn_TEXT" 

                         name="shipAttention" maxlength="16" size="12" value="Daisy"> 

              </td> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

            </tr> 

            <tr valign="middle"> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

              <td width="100" height="18" class="list-content-label">Deliver:</td> 

              <td width="160" height="18" class="list-content"> 

                <select class="Dir::Get_Data.Shipping.DeliveryDeliver_SELECT" name="deliverWhat"> 

                   <option value="originals">Originals</option> 

                   <option value="copies">Copies</option> 

                   <option>Everything</option> 

                   <option value=" " selected>&lt; what &gt;</option> 

                </select> 

              </td> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

            </tr> 

            <tr valign="middle"> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

              <td width="100" height="18" class="list-content-label">Method:</td> 

              <td width="160" height="18" class="list-content"> 

                <select class="Dir::Get_Data.Shipping.DeliveryMethod_SELECT" name="deliverMethod"> 

                  <option value="S1">Delivery</option> 

                  <option value="S2">Pick-up</option> 

                  <option value="S3">UPS</option> 

                  <option value="S4">FedEx</option> 

                  <option value="S5">DHL</option> 

                  <option value="S6">US Post</option> 

                  <option value="S7">Inter-office</option> 

                  <option value="S8">Best Way</option> 

                   <option selected>&lt; select &gt;</option> 

                </select> 

              </td> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

            </tr> 

            <tr> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

              <td width="100" height="18" class="list-content-label">&nbsp; </td> 

              <td align="left" height="18" width="160" class="list-content"> 

                <input class="Dir::Get_Data.QuickTicket.SelectShipToButton" type="button" value="Contacts..." name="SelectReceiver" onClick="document.vxform.action='overview.html';document.vxform.submit(); return false;"> 

              </td> 

              <td width="20" height="18" class="list-content">&nbsp;</td> 

            </tr> 

          </table> 

</td> 

       ... 

       ... 

</form> 

</html> 





Component details: 



<html> 

<head> 

  <title>Delivery Edit Component</title> 

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 

  <link rel="stylesheet" href="../../../../../../resources/style/q_style.css" type="text/css"> 

</head> 

  <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> 



<table summary="" id="Delivery_Component" class="list-content" width="300" border="0" cellspacing="0" cellpadding="0"> 

  <tr ID="delivery_edit_comp"> 

    <td class="list-content-col" width="20">&nbsp;</td> 

    <td class="section-title" width="100">&nbsp;</td> 

    <td class="section-title" width="160"><div align="right">Delivery</div></td> 

    <td class="list-content-col" width="20">&nbsp;</td> 

  </tr> 

  <tr valign="middle"> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

    <td width="100" height="18" class="list-content-label">To:</td> 

    <td width="160" height="18" class="list-content"> <span class="Dir::Get_Data.Shipping.PersonFullName_TEXT"> 

      &nbsp;Mike McKenzie </span> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

  </tr> 

  <tr valign="middle"> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

    <td width="100" height="18" class="list-content-label">Attn:</td> 

    <td width="160" height="18" class="list-content"> <input type="text" class="Dir::Get_Data.Shipping.DeliveryAttn_TEXT" 

                  name="shipAttention" maxlength="16" size="12" value="Daisy"> 

    </td> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

  </tr> 

  <tr valign="middle"> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

    <td width="100" height="18" class="list-content-label">Deliver:</td> 

    <td width="160" height="18" class="list-content"> <select class="Dir::Get_Data.Shipping.DeliveryDeliver_SELECT" name="deliverWhat"> 

        <option value="originals">Originals</option> 

        <option value="copies">Copies</option> 

        <option>Everything</option> 

        <option value=" " selected>&lt; what &gt;</option> 

      </select> </td> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

  </tr> 

  <tr valign="middle"> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

    <td width="100" height="18" class="list-content-label">Method:</td> 

    <td width="160" height="18" class="list-content"> <select class="Dir::Get_Data.Shipping.DeliveryMethod_SELECT" name="deliverMethod"> 

        <option value="S1">Delivery</option> 

        <option value="S2">Pick-up</option> 

        <option value="S3">UPS</option> 

        <option value="S4">FedEx</option> 

        <option value="S5">DHL</option> 

        <option value="S6">US Post</option> 

        <option value="S7">Inter-office</option> 

        <option value="S8">Best Way</option> 

        <option selected>&lt; select &gt;</option> 

      </select> </td> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

  </tr> 

  <tr> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

    <td width="100" height="18" class="list-content-label">&nbsp; </td> 

    <td align="left" height="18" width="160" class="list-content"> <input class="Dir::Get_Data.QuickTicket.SelectShipToButton" type="button" value="Contacts..." name="SelectReceiver"> 

    </td> 

    <td width="20" height="18" class="list-content">&nbsp;</td> 

  </tr> 

</table> 

  </body> 

</html> 

Processing component directive in the model. 



    public Object getItem(String key) 

    { 

        if (key.equals("DeliveryComponent")) 

        { 

            try 

            { 

                String compClassName = "classname"; 

                ViewContext vc   = getViewContext(); 

                Document    comp = DefaultDOMLoader.getGlobalInstance().getDOM( compClassName); 

                Node  specCompNode = comp.getElementById("Document_Component"); 

                return( vc.getElementFactory().getDocument().importNode( specCompNode, true ) ); 

            } 

            catch (IOException ioe) 

            { 

               ... 

            } 

            return(null); 

        } 

        ... 

        ... 



Here I am inserting a delivery component into the main page which has a form whereas component does not have any form. 

This code was working with xmlc2.1 with xerces-1.4.4-xmlc2.1.jar. Now I am try to use latest Barracuda code and I am getting NullPointerException while rendering the button. I have gone through 'HTMLActionRenderer' code and it fails in manipulateActionElement function  



//redirect the form to event forwarding servlet (encode) 

            fel.setAction(URLRewriter.encodeURL(vc, NamingHelper.getName(fel)+FormGateway.FORM_EXT)); 



Let me know if you need more clarification. 

Please, help me. 





Thanks, 

Rajesh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.