I have the following ivy HTML Dialog component:

<cc:interface componentType="IvyComponent">
  <cc:attribute name="location" type="ivy.Location" required="true"/>        
</cc:interface>

How can I access the attribute location from a logic process of the component?

asked 20.10.2015 at 09:26

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%


You can use the following ivyScript Code to access the value of the attribute:

import ivy.Location;
import javax.faces.context.FacesContext;

FacesContext fc = FacesContext.getCurrentInstance();
Location obj = fc.getApplication().evaluateExpressionGet(fc, "#{cc.attrs.location}", Location.class) as Location;
link

answered 20.10.2015 at 09:27

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

edited 20.10.2015 at 09:28

Your answer
toggle preview

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: 20.10.2015 at 09:26

Seen: 1,802 times

Last updated: 20.10.2015 at 09:28