Home > Software design >  CaptainCasa framework: DOF export not working
CaptainCasa framework: DOF export not working

Time:11-02

We have a DOF grid defined programmatically where the export doesn't work for some reason.

Clipboard export works fine, but CSV, XML and PDF show the right number of rows/columns but empty data inside. I debugged far enough to get to

org.eclnt.jsfserver.util.ExpressionManagerV#getValueForExpressionString(javax.faces.context.FacesContext, java.lang.String)

For some reason it returns empty string for all values in the broken scenarios, and returns the proper values for the clipboard export. The expressionString passed is the same both times. It seems that the dispatcher cannot be resolved properly in the broken scenarios.

The export functionality works find across the rest of the DOF grids in our project.

CodePudding user response:

Very difficult to guess for the reason, based on the current information. All the exports are using method "List<List> exportToStringListWholeGrid()" (class FIXGRIDBinding, inner class Exporter), so this is both used by Clipboard export and by other exports as well. - Could you maybe debug inside this method once for the clipboard export and once for the csv export and then check if you recognize any difference?

CodePudding user response:

Ok, so my issue was that i had an expression like this:

d.d_3.SomePageUI.dofGrid.puis['whatever'].value

this expression would resolve the value of column "whatever" in the grid. We had extra logic in the getter of dofGrid (don't ask why...), this extra logic would only crash when using CSV, PDF or XML exports (my guess it because a new window is opened and context changes somehow ?!)

Now the bad thing is that i didn't get an error "exception happened in getter dofGrid"

I got an error "dofGrid is NULL" :/

  • Related