cancel
Showing results for 
Search instead for 
Did you mean: 

How to derive from BSP Extension Elements?

daniel_appelt
Explorer
0 Kudos
237

Hi there.

Is there an easy way to derive a new bsp extension element from an existing one?

Let's say I want to extend the functionality of the HTMLB tableView-Element. Am I right that I do have to do the following steps ?

1.)  Create a new BSP Extension if not already done.

2.)  Create a new BSP Element.

3.)  Specify the Element-Handler-Class for the new Element. The Base class for this is generated automatically. Somehow specify that (one of) these classes is / are derived from CL_HTMLB_TABLEVIEW or related classes.

4.)  Copy all the attributes from the attributes table of the tableView-Element into the attributes table of the new element (in Repository Browser -> BSP Extension).

Unfortunately, I couldn't achieve what I had planned because step 3 caused some problems. Besides step 4 seems to make the whole process a little bit more complicated than necessary.

Is there probably an easier way to do this?

If not, could someone be so kind to tell me what I have to do exactly in step 3 to get the desired result.

Thanks in advance.

Daniel

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member181879
Active Contributor
0 Kudos

Daniel,

The short answer is no, don't do it. Some groups here in house did the same trick, and then we had a lot of trouble once we changed some of our rendering code. (You could consider using a skin manager, but even here I am scared that you get trouble down the road. The rules are very strict here

First, maybe you can write exactly what you want to achieve. What tags to overwrite and what goals to achieve. Then we can see the best strategy. Specifically with tableView I think that the iterator approach is the best to achieve custom rendering.

There is also the approach of composition, whereby we can build a new tag from a number of other tags. But first, to see what you want to achieve.

As for your steps above, of course you shoot the base class around (effectively rebase the class). But from experience with the stuff that was done inhouse, I can only caution to not do it. We had a lot of burned fingers after one or another service pack.

regards, brian

daniel_appelt
Explorer
0 Kudos

Okay. The only concern I have here is the fact that it would be much more practical to be able to simply derive BSP extension elements. It would simplify lots of things for people who want to write their own elements because then they don't have to reinvent the wheel.

Concerning the HTMLB tableview I have the following wishes :

- It would be nice to be able to define by hand which cells should be spanning cells. The easiest way for this would be to be able to set the SPANINFO member of the tableview by hand.

- It would also be nice if the generated html code would be correct html according to the W3C's recommendation. In design2002 there are really some mistakes in the output...

Additionally it would be extremely helpful if one could define manually which css class is used for a HTMLB element. I see that it is nice to have all elements rendered according to the same style but sometimes the need  can arise to have an element rendered in a different way.

Greets,

Daniel