Hi all

I'm using jsf in ivy and normally i use directly API from ivy to get cms in xhtml file, ex:

 <p:outputLabel value="#{ivy.cms.co('/ch/axonivy/Label/EntityStep/Contact/email')}"/>

now in my cms, it has placeholder like Input email ex {0} {0} will be replaced by param and i can do it easily on ivy script/java (using API from ivy) but i can't use that api on xhtml page

 <p:outputLabel value="#{ivy.cms.co('/ch/axonivy/Label/EntityStep/Contact/email', 'someone@google.com')}"/>

Does anyone know?

asked 15.08.2016 at 09:50

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

edited 15.08.2016 at 09:51


I think it should be possible to write your own managed bean:

@ManagedBean("cmsHelper")
public class CmsHelper{
  public String getCo(String uri, String param){
     return Ivy.cms().co(uri, param);
  }
}

and access it like any other managed bean:

<p:outputLabel value="#{cmsHelper.co('/ch/axonivy/Label/EntityStep/Contact/email', 'someone@google.com')}"/>
link

answered 16.08.2016 at 11:34

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

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:

×35
×26

Asked: 15.08.2016 at 09:50

Seen: 3,252 times

Last updated: 16.08.2016 at 11:34