1

how to concatenate text whit parametre in title attribute

asked 2017-09-11 21:42:58 +0800

Radoslav86 gravatar image Radoslav86
13 3

updated 2017-09-11 21:44:05 +0800

In panel title attribute i want to add some text and finish whit parameter from ViewModel Is this possible. Something like this:

<panel title="text" + @load(parameter)
delete flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
0

answered 2017-09-12 11:37:38 +0800

chillworld gravatar image chillworld flag of Belgium
5143 3 9
https://github.com/chillw...

title="@load('text'.concat(parameter))"

link publish delete flag offensive edit

Comments

EL3 version: title="@load(('text' += parameter))"

consider using @init, if not dynamically updated later, or even use a fully static expression which can be inlined:

title="text${parameter}"

cor3000 ( 2017-09-13 11:02:32 +0800 )edit
0

answered 2017-09-13 13:53:58 +0800

Radoslav86 gravatar image Radoslav86
13 3

Тhanks for the answers will be useful to me.I have already changed several panel titles.But for the next panel the problem is:

title="${sec:isAnyGranted('ROLE') ? 'text1' : 'text2'}"

I want to add @load(parameter) after text1/text2 . I tried the ways suggested so far but did`t work . For now I create method and use him like this:

title="@bind(vm.createTitle('lc'))"

He returns the required text, but I have several cases and need to pass different parameter to form the right result.So I think if I can add the different parameter to zul is the smart decision.

link publish delete flag offensive edit

Comments

@load(sec:isAnyGranted(vm.role)?'text1':'text2') => your binder need to know when role changes so that's normally coming from viewmodel. ${} is static only and will render only 1 time.

chillworld ( 2017-09-13 20:10:09 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2017-09-11 21:42:58 +0800

Seen: 12 times

Last updated: Sep 13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More