Hi Maheshwari,

you can assign groovy-scripts to the screen. To do so, you have to set up your screen like this:

   <screen name="your-screen">
        <section>
            <actions>
                <script
   location="component://your-path-to-groovy/YourGroovyFile.groovy"/>
            </actions>
            <widgets>
                <platform-specific>
                    <html>
                        <html-template
   location="component://your-path-to-ftl/YourFtl.ftl"/>
                    </html>
                </platform-specific>
            </widgets>
        </section>
   </screen>

in the script you can use Worker-methods or query-strings to fetch the data you want to display. Write those to context-variables and you can use them in the ftl.

You can find plenty of examples in the applications, like the "Contact"-Screen in "ProfileScreens.xml" and its usage of "GetContactMechs.groovy".

This one fetches one entity, but you can also use lists of entities.

Have fun exploring, all good wishes and best regards,

Benjamin


Am 20.01.22 um 06:52 schrieb Mahi maheshwari:
Hi,

I have few ftl files which are dashboards in my plugin.
these ftl files has forms, text boxes and buttons in it. my requirement is
to fetch the data from the tables(only required columns) and show that
table data in the text boxes of ftl page.
for example : I have a text box with label product name in the ftl page .I
want to display the product name by fetching the data from the product
table.

can anyone suggest me how can I achieve this?

Thank you,
Best regards,
Maheshwari.

Reply via email to