Skip to Content
0
Former Member
Feb 16, 2006 at 09:41 AM

BSP Extension Composite Element with Body

26 Views

Hello,

I created an own BSP Extension element "myLink" which should be a composite element containing HTMLB:LINK element.

The myLink-DO_AT_BEGINNING looks like follows:

-

-


DATA: orgLink TYPE REF TO CL_HTMLB_LINK.

orgLink = CL_HTMLB_LINK=>FACTORY( id = id

reference = reference

text = text ).

WHILE m_page_context->element_process( element = orgLink )

EQ CO_ELEMENT_CONTINUE.

ENDWHILE.

rc = CO_ELEMENT_CONTINUE.

-

-


This works fine for - Tag (coming from DO_AT_END of HTMLB:LINK) is inserted before the body of my element.

It is possible to add the text "LinkText" as a literal in the WHILE - loop. But: I don´t find a way to do this dynamically! The body of a myExtension:myLink can contain text, images, other BSP elements. How can I access this during runtime so that I can supply the BODY-parameter of method "element_process"? How to do this? Or isn´t this the solution for this problem?

Maybe I´m to silly to see obvious things. I read a lot of articles about composite BSP elements - but I didn´t find an example handling dynamic or unknown element-bodies.

Thank you for any help,

best regards,

Stefan