0

I am planning to do this implementation from a widget. User would input an ID to the controller, then to the java class which would generate a report and send an excel file to the user.

But ofbiz seems to be a bit overwhelming. Can you please give me some ideas to implement this?

chip
  • 3,039
  • 5
  • 35
  • 59
  • Please explain in more detail or provide some code. – Sebastian Mar 28 '13 at 05:17
  • as of now I have only created the webpages but for the middle tier, i have not created or spliced the components yet because I am not very familiar with how the components should be linked together. i have been figuring out the controllers with different types of events, one of them is java. i'm just trying to see how i can get things done with that. – chip Mar 28 '13 at 06:38

1 Answers1

1

There are different ways for doing that, and it really depends on what you want to do exactly. The simplest way of doing that would be: on the ofbiz UI create a link/button pointing to the controller. That is simple if you already have a screen created with widgets. Then add a java event to the controller. Your event method will get as parameters servlet request and response objects. Inside that method create your excel file, prepare it, and write it to response object's output stream. The response type in your controller entry should be "none" because you are manually writing the response in your event. So you don't need to render a new screen or anything. The effect will be that, whenever the user clicks on the button, it will call the controller, which in turn will return the excel file. HTH

Bilgin Ibryam
  • 3,345
  • 2
  • 19
  • 20