Tuesday, May 17, 2011

Applet Message

Applet Messages are quite useful in scenarios where one has to display help text to end user in the applet itself. We do have ihelp also but ihelp's are view specific and if we have multiple toggles defined in applet with different operations on each applet then ihelp may not be a good option. One can also go for direct modification of applet WebTemplates but again it will include maintainence overhead. An applet message allows to combine static text and dynamic data which can be displayed on applet. With little bit of HTML one can also add zing to the message.
Siebel bookshelf has elaborated the usage and configuration of Applet Messages how ever one thing is missed there(correct HTML Type) that i will try to fill out here. Let's say we need to add some help text on the SR form applet. Following steps are required to add an Applet Message.

1 - The applet message is configured using the Applet Message and Applet Message Variable object types. Query for the applet you want to add message and navigate to Applet Message object type. Add message in the Text Message. We can use %1, %2 for dynamic data to be defined in Applet Message Variable.

2 - Once the message is confiured,time to create a message control. Following properties should be set:
Name = Any Name
Field = Name of the Applet Message
Field Type = Message
HTML Type = Plain Text (Make sure this is set to Plain text and not to text or text area)
HTML Display Mode = DontEncodeData (If HTML attributes are being used for color and font changes)

3 - Once control is created, we can expose this on the applet. We can map control anywhere on the template where we want to display the message.


The advantage of using Applet message is we can change this on runtime also using dynamic data, where date being displayed from calculated fields using lookup value. This is something which we can be used to enrich UI for end user assistance.

Happy Configuration!!!

3 comments:

JMacZ said...

I tried this but I'm not able to get the UI to display the HTML. Instead I'm seeing the tags themselves.

Did you include the HTML tags within the symbolic string? I just used the Override on the Applet Message object.

Siebelish said...

Hi JMacz,
It will work ensure you have two properties properly set for control.
HTML Type = Plain Text
HTML Display Mode = DontEncodeData

Regards,
-Rahul-

JMacZ said...

I confirmed I have the properties set correctly, but still it's showing the HTML tags, e.g.:

Please review your input before continuing.

I am using this on a task applet -- I wonder if there is a difference here.