Re: Exception while rendering button in a component

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
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.