Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello Peers,
I have the below requirements for which I am looking for some information, requesting you to provide the same if you have something from your end.
i) I have a custom action in WTPart action that updates an IBA value, I need to reload the window after the click of that action so that the value update will be reflected in the UI.
ii) After a click of an action, I want to display a notification pane with some information similar to what we see when we create a new object in Windchill.
Thanks,
Sha
Solved! Go to Solution.
Hello @Sha11
What you are looking for is a Inline Message.
An example is shown in a Windchill catalog.
<serverAddress>/Windchill/app/#netmarkets/jsp/componentCatalog/inlineMessageComponent.jsp
Additional information is in a help center Inline Messaging
here is example how to create some feedbackmessage in the Processor class.
@Override
public FeedbackMessage getSuccessFeedbackMessage(List< ObjectBean > list) throws WTException
WTMessage title = new WTMessage("com.ptc.core.ui.successMessagesRB", "OBJECT_CREATE_SUCCESSFUL_TITLE", (Object[]) null);
WTMessage message = new WTMessage("com.ptc.core.ui.successMessagesRB", "OBJECT_CREATE_SUCCESSFUL_MSG", (Object[])null);
if (list != null)
{
ArrayList<Object> createdObjects = new ArrayList<>();
try
{
Locale sessionLocale = SessionHelper.getLocale();
FeedbackMessage feedbackMessage = new FeedbackMessage(FeedbackType.SUCCESS, sessionLocale, title,null, createdObjects, message);
String[] incorrectTextArray = {"MY TEXT", "ALL IS OK"}; // next example of text added to the feedback message
if (incorrectTextArray != null)
{
for (String incorectMessage : incorrectTextArray)
{
feedbackMessage.addMessage(String.format("<span style=\"color: red;font-weight: bold;\">%s</span>", incorectMessage));
}
}
} catch (WTException e)
{
//e.printStackTrace();
}
}
return null;
}
Hope this can help.
PetrH
Hello @Sha11
What you are looking for is a Inline Message.
An example is shown in a Windchill catalog.
<serverAddress>/Windchill/app/#netmarkets/jsp/componentCatalog/inlineMessageComponent.jsp
Additional information is in a help center Inline Messaging
here is example how to create some feedbackmessage in the Processor class.
@Override
public FeedbackMessage getSuccessFeedbackMessage(List< ObjectBean > list) throws WTException
WTMessage title = new WTMessage("com.ptc.core.ui.successMessagesRB", "OBJECT_CREATE_SUCCESSFUL_TITLE", (Object[]) null);
WTMessage message = new WTMessage("com.ptc.core.ui.successMessagesRB", "OBJECT_CREATE_SUCCESSFUL_MSG", (Object[])null);
if (list != null)
{
ArrayList<Object> createdObjects = new ArrayList<>();
try
{
Locale sessionLocale = SessionHelper.getLocale();
FeedbackMessage feedbackMessage = new FeedbackMessage(FeedbackType.SUCCESS, sessionLocale, title,null, createdObjects, message);
String[] incorrectTextArray = {"MY TEXT", "ALL IS OK"}; // next example of text added to the feedback message
if (incorrectTextArray != null)
{
for (String incorectMessage : incorrectTextArray)
{
feedbackMessage.addMessage(String.format("<span style=\"color: red;font-weight: bold;\">%s</span>", incorectMessage));
}
}
} catch (WTException e)
{
//e.printStackTrace();
}
}
return null;
}
Hope this can help.
PetrH