Hi ivyteam

As you know in HtlmUserDialog we can use #{data} or #{logic} to access the attribute/method on ivy from view(xhtml). No matter which component/page you have, you can use #{data} and #{logic} anywhere and it always work in correct context, There is no mistake that you use #{data} from component A but it return data of component B. That's great.

So i have two questions: - Can you share the mechanism how did you resolve those keywords in ivy (ex: some class that i can explore by myself), i guess that there is a managed bean(view scope) behind the scene? - If i have the page with some components as below picture, can i access #{data} of any components i want programmatically? I tried to resolve EL #{data} after the page has been loaded and it always return data of Page A

alt text

asked 29.03.2017 at 09:24

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

edited 29.03.2017 at 09:25

Do you want to access #{data} from Component A within Page A? Or vice versa? Or both? And this also for #{logic}?

(29.03.2017 at 20:44) Alex Suter ♦♦ Alex%20Suter's gravatar image
1

hi @Alex Suter ♦♦

yes, maybe both. i'm also curious about how ivy resolve two keyword in relevant context

(30.03.2017 at 04:50) trungdv trungdv's gravatar image

Hi @trungdv

Ivy needs to introduce custom ELResolver to handle resolving the #{logic} and #{data}. So you may want to start looking at the class IvyLogicBeanResolver and IvyDataBeanResolver and work out how Ivy integrate the expression with its DialogRuntimeManager.

But I think they are not part of the public API, so any code relying on these class are subject to be changed from release to release. So be careful then.

link

answered 03.04.2017 at 18:07

Genzer%20Hawker's gravatar image

Genzer Hawker
(suspended)
accept rate: 66%

edited 03.04.2017 at 18:08

hi @Genzer Hawker

Thanks for your response, i only want to know how and where ivy implement it. :D

(04.04.2017 at 03:26) trungdv trungdv's gravatar image

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×58

Asked: 29.03.2017 at 09:24

Seen: 2,064 times

Last updated: 04.04.2017 at 03:26