cancel
Showing results for 
Search instead for 
Did you mean: 

How to Message Framework available in ISA ?

Former Member
0 Kudos

Hi,

I am new to ISA. I am trying to get acquainted with the Message Framework used in ISA to post error,info and warning messages. The details given in dev & Extn guide was not adequate to give it s start off. I have searched through the forums but couldn't find any.

Please do guide me (thinking of a beginner) in achieving this understanding, so that i could populate my own customized error messages in JSP and guide subsequent flow after having shown the same.

Thanks,

Abhi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I could get find myself what i was looking for

Former Member
0 Kudos

Hi Abhiram,

Can you explain me how to use message framework to display messages in ISA.

Regards

MQ

devendervb
Contributor
0 Kudos

Hi Abhi,

Can you brief a bit how you have demostrated message framework, so that will be able to track the problem.

Regards,

Devender V

Former Member
0 Kudos

Hi Dev,

I was asked to look through Dev Extn guide and make myself acquainted with the usage of Message, MessageList, MessageListDisplayer classes and MessageListHolder Interface. Subsequently i was asked to understand how to post these messages in the JSP. I need to use the same for error handling, exception handling and certain Info Messages.

Firstly i have been through the following example(given in dev guide):

String args[]= {shopKey.getIdAsString()};

MessageListDisplayer messageDisplayer = new MessageListDisplayer();

messageDisplayer.addToRequest(request);

messageDisplayer.setOnlyLogin();

messageDisplayer.addMessage(new Message(Message.ERROR,"shop.loadError",args,null));

return mapping.findForward(u201Cmessageu201D);

I now have to understand how to give the language independent key (shop.loadError) and in which place should i be storing this?

Secondly, i need to understand what is the mapping entry i need to give in Config.xml for "message". should i be giving some error jsp location or can i give my success path jsp and show the error message on top(or somewhere).

Coming to retrieval of messages in JSP i have seen piece of code as shown below:

<isa:message id="errortext" name="<%=BusinessObjectBase.CONTEXT_NAME%>"

type="<%=Message.ERROR%>" >

<% addMessage(Message.ERROR, errortext); %>

</isa:message>

for obtaining this error message what do i need to furnish in my action class?

I have tried giving something like shown below:

User user = bom.getUser();

Message message = new Message(Message.ERROR,"GeneralError",null,null);

user.addMessage(message);

//Set user object in request for Header inclusion to function on click of Messages

request.setAttribute(BusinessObjectBase.CONTEXT_NAME, user);

So will the above thing sufficiate?

So, if you could help me giving some hints and inputs through some example code snippets how to:

1. Add error text to Message object

2. Pass it to JSP

3. Retrieval in JSP

4. What are various ways i could use this complete Message Framework provided by ISA.

I sincerely appreciate your time off for this green horn to understand this.

Thanks,

Abhi

Former Member
0 Kudos

Hi Dev,

I am sorry. I was a lot dumb in my previous thread posted.

Please do let me know some cake walk procedure to :

1. Adding custom "INFO" message to "Message" object in action class.

2. Displaying the same in the success JSP

Let me start with this and then i can ask further doubts.

Please ignore previous threads multiple dumb questions.

Thanks,

Abhi