cancel
Showing results for 
Search instead for 
Did you mean: 

how to display text with variable at activiti explorer

tomi87
Champ in-the-making
Champ in-the-making
How can I display a text with variable at the activiti explorer ?

pseudocode example:


<activiti:expression>
            <![CDATA[
                  Hello ${StudentAppInfo.studentName},                
                 You stay here from ${StudentAppInfo.dateFrom} to ${StudentAppInfo.dateToo} in this University.
            ]]>
          </activiti:expression>

And then to display this text like an non writable variable.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Set the "writable" attribute to false, in the form-property, e.g. (form user guide):


<activiti:formProperty id="speaker" variable="SpeakerName" writable="false" />

This will render a readonly text-box in explorer. If this is not what you need, you can always create a custom form-type (or alter rendering of existing string-form type) to suite your needs.

tomi87
Champ in-the-making
Champ in-the-making
I know how to set it writable to false.
No I mean to show the following text in the explorer:

Like this:  …and longer.

Hello ${StudentAppInfo.studentName},                
You stay here from ${StudentAppInfo.dateFrom} to ${StudentAppInfo.dateToo} in this University.

What do you mean with a custom form-type and string-form type ?

frederikherema1
Star Contributor
Star Contributor
Every form-property type, has it's own java-class associated with it. In activiti-explorer, there is a *FormPropertyRendered, responsible of rendering the value in Vaadin UI. These renderers are pluggable and can be configured in the activiti-configuration. You could extend the default one (StringFormPropertyRendered) to use, for example, a multiline label in case the property is not writable.

OR you can create a "custom" form-property, with a different type than "string". Good example of a custom type is UserFormType (search forum for this, I've already replied a couple of times with a full explanation of required steps).