Skip to Content

Access Block data from main view

Dear all,

I have main view, where I isnerted some blocks:

<sections>

<ObjectPageSection title="{i18n>general}">

<subSections>

<ObjectPageSubSection title=" ">

<blocks>

<general:GeneralBlock id="generalblock"/>

</blocks>

</ObjectPageSubSection>

</subSections>

</ObjectPageSection>

The problem is: I cannot access to the elements of the Block. I use the Chrome debugger console, and if I enter: this.getView().byId("requ"), then the elemetn is returned (there is an elemnet with id=requ), but if I enter this.getView().byId("switch01") Nothing returned. (there is an element in the general block view with id =switch01)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 02 at 04:05 PM

    most likely your issue is with the scope where this is being called from.. make sure (this) refers to your controller

    Add comment
    10|10000 characters needed characters exceeded