I have been using the Display tag for quite a while, but now I am trying 
to implement the "dynamic columns" feature, meaning passing an array of 
column names so the <display:table> shows only those columns. Does anyone 
else have this working? 

The Display TableTag is using the 
org.apache.taglibs.display.TableTag.lookup() method, which keeps throwing 
a null pointer exception. Using System.out statements, I know that the 
lookup() is not getting nulls for pageContext, columnsToDisplay, property, 
and scope. And putting the lookup() in a try/catch block picks up the 
thrown exception. Although I am passing values/objects to lookup(), I am 
wondering if I am passing the *right* values/objects? I think (hope) it 
will work, if I can just get past this. 

My jsp contains (in part) ...

  <bean:define id="columnArray">
     <bean:write name="myForm" property="columns"/>
  </bean:define>

  <display:table name="myForm" property="myObjectArrayToDisplay" 
columnsToDisplay="<%= columnArray %>" scope="request" >

The TableTag source code contains the following (in part)  ...

public int doStartTag() throws JspException {

  Object obj = null;
   if (this.columnsToDisplay != null) {
     obj = (String[]) lookup(this.pageContext,
                                this.columnsToDisplay,
                        this.property, this.scope, false);
   }
   if (obj != null) {
     this.columnsDisplayArray = (String[]) obj;
   }

  HttpServletRequest req = (HttpServletRequest)this.pageContext.getRequest();

  this.loadDefaultProperties();

<snip>
 
}

Can anyone shed some light on this?

Susan Bradeen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to