|
Re: Disable drill through actions in PDF format [message #768314 is a reply to message #768092] |
Mon, 19 December 2011 22:33 |
|
I do not see an easy way of doing this without changing the pdf emitter
code.
You could try putting in something like:
protected String buildDrillAction( IAction action, Object context )
{
String baseURL = null;
if ( context != null )
{
if ( context instanceof HTMLRenderContext )
{
baseURL = ( (HTMLRenderContext) context ).getBaseURL( );
}
if ( context instanceof PDFRenderContext )
{
return "javascript:void(0);";
}
..
..
..
..
But this most likely will show the user an error.
Jason
On 12/19/2011 10:09 AM, dpardon wrote:
> Hi,
> I implemented a custom IHTMLActionHandler to manage drill-through
> exactly with my requirements. But i would need to enable drill through
> hyperlinks only when format is HTML.
> For instance, i tried when format is PDF to return an empty string in
> IHTMLActionHandler.getURL(IAction actionDefn, Object context), but it
> didn't work: the render task replaced the empty string by a default
> baseURl and keeps displaying hyperlinks.
> Is there a way to do this?
>
> Thanks!
|
|
|
Re: Disable drill through actions in PDF format [message #768549 is a reply to message #768314] |
Tue, 20 December 2011 10:48 |
donino donino Messages: 183 Registered: July 2011 |
Senior Member |
|
|
Thanks Jason,
indeed that's much better: with javascript:void(0), at least Adobe or Excel won't try to open a browser if a user click on hyperlinks. Moreover, on mouseover on these links, users now won't see a a huge URL, but just a small javascript tooltip. So i will let it like that, though it's still not ideal: for PDF it's ok, but for example in Excel it may confuse users when they try to select cells range in a crosstab, as shown in screen below it displays a security warning and tries to download a file named void(0):
I will try to have a look on emitters code to see if it could be conceivable to disable hyperlinks when needed
Dom
[Updated on: Tue, 20 December 2011 11:31] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03726 seconds