Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » JSP-Files behind Toolbar
JSP-Files behind Toolbar [message #890480] Fri, 22 June 2012 11:53 Go to next message
Dnns . is currently offline Dnns .Friend
Messages: 30
Registered: May 2012
Member
Hi,

i tried to find out, which jsp-Files are behind the icons in the toolbar of the webviewer.

I want to delete some of these icons, and also delete the jsp-Files which open the dialogs or so.

Dnns
Re: JSP-Files behind Toolbar [message #890586 is a reply to message #890480] Fri, 22 June 2012 15:54 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The toolbar is created with the ToolbarFragment.jsp located in the
webcontent\birt\pages\control folder of the viewer.

Jason

On 6/22/2012 7:53 AM, Dnns . wrote:
> Hi,
>
> i tried to find out, which jsp-Files are behind the icons in the toolbar
> of the webviewer.
> I want to delete some of these icons, and also delete the jsp-Files
> which open the dialogs or so.
> Dnns
Re: JSP-Files behind Toolbar [message #890599 is a reply to message #890586] Fri, 22 June 2012 16:18 Go to previous messageGo to next message
Dnns . is currently offline Dnns .Friend
Messages: 30
Registered: May 2012
Member
Hi,

that is what i already know. I checked this file, but I can't find a relation to other files.

<INPUT TYPE="image" NAME='parameter' SRC="birt/images/Report_parameters.gif" TITLE="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter" )%>" ALT="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter" )%>" CLASS="birtviewer_clickable">


So i see, there is an input, shown as picture, with an alternate text, titel and class. What i also found out, that the name is important. If i change it via firebug, the name pops up in a javascript alert.

In the BirtToolbar.js (webcontent/birt/ajaxui/app) File, there is a switch/case block. It seems, that this block handles the events. How they are emittet, i don't know.

__neh_click : function( event )
{
	var oBtn = Event.element( event );
	
	if ( oBtn )
	{
		switch ( oBtn.name )
		{
			case 'print':
			{
				birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT );
				break;
			}				
			case 'printServer':
			{
				birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT_SERVER );
				break;
			}
			case 'exportReport':
			{
				birtEventDispatcher.broadcastEvent( birtEvent.__E_EXPORT_REPORT );
				break;
			}
			case 'export':
			{
				birtEventDispatcher.fireEvent( birtEvent.__E_QUERY_EXPORT );
				break;
			}
			case 'toc':
			{
				birtEventDispatcher.broadcastEvent( birtEvent.__E_TOC );
				break;
			}
			case 'parameter':
			{
				birtEventDispatcher.broadcastEvent( birtEvent.__E_PARAMETER );
				break;
			}
			default:
			{
				alert( oBtn.name );
				break;
			}	
		}
	}
}


My JavaScript knowledge is at the moment not the best. This is the point, where i stand. I don't come to a further step.

Dnns
Re: JSP-Files behind Toolbar [message #890688 is a reply to message #890599] Fri, 22 June 2012 21:01 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This gets to the heart of the AJAX code in the viewer. That code
broadcasts an event, which is handled by a js class that is registered
to listen for that event. These are implemented in
BirtReportDocument.js and AbstractBaseReportDocument.js.

Jason


On 6/22/2012 12:18 PM, Dnns . wrote:
> Hi,
> that is what i already know. I checked this file, but I can't find a
> relation to other files.
>
>
> <INPUT TYPE="image" NAME='parameter'
> SRC="birt/images/Report_parameters.gif" TITLE="<%=
> BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter" )%>"
> ALT="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.parameter"
> )%>" CLASS="birtviewer_clickable">
>
>
> So i see, there is an input, shown as picture, with an alternate text,
> titel and class. What i also found out, that the name is important. If i
> change it via firebug, the name pops up in a javascript alert.
> In the BirtToolbar.js (webcontent/birt/ajaxui/app) File, there is a
> switch/case block. It seems, that this block handles the events. How
> they are emittet, i don't know.
>
>
> __neh_click : function( event )
> {
> var oBtn = Event.element( event );
>
> if ( oBtn )
> {
> switch ( oBtn.name )
> {
> case 'print':
> {
> birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT );
> break;
> }
> case 'printServer':
> {
> birtEventDispatcher.broadcastEvent(
> birtEvent.__E_PRINT_SERVER );
> break;
> }
> case 'exportReport':
> {
> birtEventDispatcher.broadcastEvent(
> birtEvent.__E_EXPORT_REPORT );
> break;
> }
> case 'export':
> {
> birtEventDispatcher.fireEvent(
> birtEvent.__E_QUERY_EXPORT );
> break;
> }
> case 'toc':
> {
> birtEventDispatcher.broadcastEvent( birtEvent.__E_TOC );
> break;
> }
> case 'parameter':
> {
> birtEventDispatcher.broadcastEvent(
> birtEvent.__E_PARAMETER );
> break;
> }
> default:
> {
> alert( oBtn.name );
> break;
> }
> }
> }
> }
>
>
> My JavaScript knowledge is at the moment not the best. This is the
> point, where i stand. I don't come to a further step.
>
> Dnns
Previous Topic:genreport -m render split pdf file
Next Topic:look-ahead aggregate
Goto Forum:
  


Current Time: Fri Jan 17 21:20:02 GMT 2020

Powered by FUDForum. Page generated in 0.01410 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top