vasanth
I'm new here

Get the Table Name of the FS_LIST

Hello All,

I have a FS_List in the template

<FS_LIST name="demo" hFill="yes" rows="5">

        <DATASOURCE type="database" useLanguages="no">

          <ACTIONS>

            <ACTION name="ADD"/>

            <ACTION name="REMOVE"/>

          </ACTIONS>

          <COLUMNS>

            <COLUMN show="no">#identifier</COLUMN>

          </COLUMNS>

          <LAYOUT>

            <ADD component="toolbar" constraint="top"/>

            <ADD component="overview" constraint="center"/>

            <ADD component="stackedview" constraint="hide"/>

          </LAYOUT>

          <table>demoschema.demo</table>

        </DATASOURCE>

        <LANGINFOS>

          <LANGINFO lang="*" label="XYXYXYX"/>         

        </LANGINFOS>

      </FS_LIST>

How can I get the value of the <table> element in the module through FS API ??.

Thank you,

Vasanth

0 Kudos
2 Replies
andre
I'm new here

you meant this element?  

     => <table>demoschema.demo</table>

there's no official api way... but you can try this Smiley Wink

use the fslist gom element as starting point

GomFsList (api: AbstractGomFormElement)  you may get this object from FsListEditorValue.

(ContentDataConfiguration) GomFsList#getConfiguration

ContentDataConfiguration#getTable#getTex

0 Kudos

Thank you Andre..

Please find the working code below

Media media = (Media) context.getStoreElement();

GomFsList gomFsList =  (GomFsList) media.getMetaFormData().getForm().findEditor(compName);

ContentDataConfiguration dataConfiguration = (ContentDataConfiguration) gomFsList.getDataSource().getConfiguration();

String tableName = dataConfiguration.getTable().getText();

Thank You,

Vasanth

0 Kudos