Skip to Content
0

Access Block data from main view

Feb 02 at 03:01 PM

20

avatar image

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)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sergio Guerrero Feb 02 at 04:05 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded