Skip to Content
avatar image
Former Member

Generic View For Table

Dear all,

I want to develop a generic component in a web dynpro DC that builds a table based on a ResultSet (dynamically). what is the best approach to do this?

Currently i'm doing the following:

My Generic component that has to build the table dynamically, receives its input through external context mapping from a component in another DC. The problem I currently have is, that i dont know when the data is received in my generic component. I tried to read it in wdDoInit() of the component controller, but at that time, it is still null. The mapping works when i have a String in my interface controller that gets mapped to component controller and from component controller to the view controller. This is not sufficient for me, because I cant directly show the resultset on the view. I have to know "when" i receive my resultset, so i can start the dynamic build of the table based on the resultset.

Am i using the right approach for reaching my goal? or are there other approaches that are better for making a generic component that can be embedded in other components and builds a table based on a ResultSet.

Kinds regards,

Joren

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 27, 2006 at 09:19 AM

    Joren,

    Unfortunately, IWDNode/IWDNodeInfo has not enough callbacks to implement your task completely transparently. I.e. there is are notifications on conext structrure changes and/or about binding of elements.

    So you have to create externally visible method in your reusable component, say update(), that performs all necessary work and call this method from outside.

    Valery Silaev

    SaM Solutions

    http://www.sam-solutions.net

    P.S. I'm creating almost the same thing 😊 However, with RowSet-s rather then RecordSet-s.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Joren,

      <i>If i use reset(false), should i first reset the context in the view controller then, before i reset it in the component controller?</i>

      For me it works even in reverse order. Anyway, you may add yet another event in component controller, subscribe to it in view and fire event before reseting data in controller. Obviously, event handler in view reset context itself.

      <i> Is it possible to create a input field for going to particular page there too (through standard behavior or creating own inputfield)? In the footer that is.</i>

      You may create such field but not in footer. Just a regular InputFiled in free area. Just bind InputField.value and Table.firstVisibleRow to same attribute.

      Valery Silaev

      SaM Solutions

      http://www.sam-solutions.net