It's all about the answers!

Ask a question

Mouse over preview for attribute-based presentations (external Link)


Martin Muellenberg (7259) | asked Nov 12 '13, 3:25 a.m.
Hello altogether,

I work with RTC 4.0.4 and need to add an URL link (being dynamically calculated via javascript) to an externally stored picture. That can be used to implement a very cool feature: http://jazzpractices.wordpress.com/2013/01/29/what-state-are-you-in-and-where-can-you-go/.

I know this is supported for static URL links as can be added via a non-attribute-based Static Rich Text presentation but the thing is the link value must be calculated at runtime via javascript and thus an attribute-based presentation is required.

Any idea how a mouse over preview for a dynamically linked picture can be implemented?

Kind regards and thanks in advance
Martin Muellenberg

Accepted answer


permanent link
Ralph Schoon (61.2k33643) | answered Nov 13 '13, 3:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Martin, I am not sure I understand your question. Are you talking about Java Script based Attribute Customization?

If yes, you might be able to calculate a URL and return it in a value provider. See https://jazz.net/library/article/1093 example 5.6. Please note, this does not create a link on the links tab. JavaScript can not be used to access subscriptions, attachments, approvals, links and other complex data on a work item as explained in the workshop above at the beginning of Lab 5.

You would rely on the built in capabilities for hover. It works for e.g. work item attachments. I think the trick in 5.6 depends on an internal service implementation. It does not work with pictures stored as process attachments for example. We tried.... I don't think you can fix that, without enabling the remote service provider in certain ways.
Martin Muellenberg selected this answer as the correct answer

Comments
Martin Muellenberg commented Nov 13 '13, 4:16 a.m. | edited Nov 13 '13, 4:24 a.m.

Hi Ralph,

Yes, I am talking about the Java Script based Attribute Customization. I followed the Lab 5, so I have created a custom attribute and assigned the Java Script via 'Calculated Value':

customAttribute.png

The script just returns the URL link to the picture, sth like 'http://<host>:<port>/path/to/defect_state_resolved.png' depending on the work items state.

That results in:

result.png

So that is nice as I can click on the link and the state diagram pricture for the current state 'Resolved' open in an external picture viewer. Here it would be nice to have the mouse over preview. Is this possible?

Kind regards and thanks
Martin



Ralph Schoon commented Nov 13 '13, 4:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi Martin,

As far as I can tell, this does not work for arbitrary links to external sources. As mentioned above the image is only presented in the wiki type attribute, and even that only only works for images attached to a work item. Before publishing that example I talked to a developer and we figured that this is a capability that works with the specific implementation of the work item attachments. I am not aware that there is a way to achieve that with external sources. I think there is a work item to be able to embed images in the description for example.

I would consider to create an Enhancement request for this kind of capability. I think it would be nice if you could display external content, or at least hover and get a preview.


Martin Muellenberg commented Nov 13 '13, 4:54 a.m.

Hello Ralph,

Okay, thank you for the detailed explanation and the information that it is currently not possible. I will discuss that company internally and may create the enhancement request if that will be given high priority.

Kind regards and thanks
Martin


Ralph Schoon commented Nov 13 '13, 4:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Martin,

a last thought occurred to me. You could try, if this works with a link to an OSLC enabled source. If so, you could look into Lyo: http://eclipse.org/lyo/ if it would be possible to create an OSLC service for those pictures.

Your answer


Register or to post your answer.