How to insert a backbutton arrow to refresh the portlet?

Viewpoint
Enthusiast

How to insert a backbutton arrow to refresh the portlet?

Hi All,
I looked into this jira http://developer.teradata.com/viewpoint/reference/how-to-create-a-controller-for-a-refreshed-paramet... for inserting a back button arrow into my portlet. It says that I must include the following lines of code into the drilldown jsp.

<%@ taglib prefix="vp" uri="http://teradata.com/viewpoint-widgets"%>

onclick="TDPortalManager.refreshPortlet('${context}',
'/MySystemPortlet/dataserver/summary');">



But the problem in above code is that my application is unable to get the taglib for http://teradata.com/viewpoint-widgets. Can anyone tell me where can I find a jar for this?

Regards,
S. Fawad Ali Shah.
5 REPLIES
dfu
Teradata Employee

Re: How to insert a backbutton arrow to refresh the portlet?

The jar you are looking for is tdcommons-taglib.jar. It should be included in each of the PDK portlets in the lib directory.
Enthusiast

Re: How to insert a backbutton arrow to refresh the portlet?

The jar exists there. But when I paste these lines in drillDown.jsp

<%@ taglib prefix="vp" uri="http://teradata.com/viewpoint-widgets"%> (Note viewpoint-widgets)
and then


It gives the following warning
Multiple annotations found at this line:
- Unknown tag (vpw:portletHeaderOverlay).
- Unknown tag (vpw:portletHeaderOverlay).

When I write the following lines in drillDown.jsp, the warning disapperas but the refresh button never appears on drill down. When, although, I paste the following lines to summary.jsp, it works as expected but that is what I do not want. I want the refresh arrow to appear on drilldown.
<%@ taglib prefix="vp" uri="http://teradata.com/viewpoint/core"%> (Note core)




Hope you got my point.
Enthusiast

Re: How to insert a backbutton arrow to refresh the portlet?

DFU:
Thanks a lot for your help. It has started working now. However, there is one more problem now. The arrow is not disappearing. When I click the arrow, I just refresh a part of the portlet and not the whole portlet, that part is done successfully but I want that the portlet header portion should come back to its original state i.e. the arrow should disappear and the portlet name should appear and when it is clicked it should convert to a text field.

I am not calling TDPortalManager.refreshPortlet but my own custom function which just refreshes a part of the portlet. So is there anyway to get the old header back???

Thanks in advance.
dfu
Teradata Employee

Re: How to insert a backbutton arrow to refresh the portlet?

The back arrow (or drill down arrow) was designed to correspond to a full portlet refresh when clicked. If you just want a section of your portlet refreshed then it might not be the best solution for you.

I believe the original title is still on the page but is hidden (display:none). You might be able to unhide it, but then you'll have to deal with removing/hiding the rest of the portlet-overlay stuff manually. It can get messy and is not something that I would recommend...
Enthusiast

Re: How to insert a backbutton arrow to refresh the portlet?

DFU:
Once again thanks for your help. Yes I have done it through JQuery now but I am still using your css classes for the arrow. The problem is solved.

I am still curious, though, about one point. I add the arrow at one place but when I look into the html source I find it at two places, which is right as one is needed for mouseover on the portlet and one is needed for mouse out from the portlet. I do not know that how the arrow div is duplicated at the second place while I am adding it one place. Any idea or should I make a new thread?