Title: READ%20ME%20
1Changing InfoView withoutChanging
InfoView
Matthias Nott, Business Objects
2Breakout Information (Hidden Slide)
- Changing InfoView without Changing InfoView
- Learn to modify behavior and the look and feel of
both InfoView and the Web Intelligence Applet
without changing one line of code. See the new
Web Intelligence Rich (offline) Client. Generate
new revenue opportunities by rebranding or
extending product functionality. Hands-on
examples and live coding show approaches to
change InfoView through the Business Objects
Interface Java library, and the Java Report
Panel, as well as the new Rich Client through its
new extension points. With no code changed,
modifications can be moved forward when hot fixes
or new versions arrive changes can be disabled
easily to put the system back in a supported
state. And learn how to customize sign on
behavior.
Convention Center Room 5, Wednesday, 23 May,
215pm -315pm B7_ID5_Q100
3Introduction
- Who I am
- Matthias Nott,
- Business Objects Service Line Leader for
Products, EMEA - What is this all about
- Changing InfoView without Changing InfoView?
- What I want you to do
- If you are not a Technical PersonUnderstand
what Technical Persons can do for you easily - If you are a Technical Person Understand
everything - If you dont know... Choose a side ?
- What I want you not to do
- Take Notes
- Answer your Phone
4Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
5What Is BOInterface?
- SDK library that greatly simplifies using the SDK
- You do not have to worry about document types
- Most common SDK tasks 1 line of code
- Does not limit you, it helps you
- Helps you to employ best practices on your
projects - Based on 5 years of development
- More than 35,000 lines of code behind the scenes
- Actively used by customers worldwide
- Consulting solution
- Ask your account manager
- Ask local professional services contact
- Ask me matthias.nott_at_businessobjects.com
6What Is BOInterface?
7What Is BOInterface?
8Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
9What is a Servlet Filter?
- Java Code sitting between the Client and the End
Point - Can filter multiple End Points
- Multiple Filters can be stacked
- Registered through web.xml
- No Code Change required!
- Can modify
- Request variables
- Header variables
- Cookies
- Page/Session/Application Beans
- Initialisation Parameters
- ...and the entire Response!
10What is a Servlet Filter?
Sample Servlet Filter Declaration for web.xml
- ltfiltergt
- ltfilter-namegtName of the Filterlt/filter-namegt
- ltfilter-classgtcom.bo....lt/filter-classgt
- ltinit-paramgt
- ltparam-namegtdebuglt/param-namegt
- ltparam-valuegtfalselt/param-valuegt
- lt/init-paramgt
- lt/filtergt
- ltfilter-mappinggt
- ltfilter-namegtName of the Filterlt/filter-namegt
- lturl-patterngt/InfoView/main/headerPlus.dolt/url
-patterngt - lt/filter-mappinggt
11Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
12What is going on in InfoView?
- Find out with a Servlet Filter!
- ltfiltergt
- ltfilter-namegtRequestAnalyzerlt/filter-namegt
- ltfilter-classgtcom.bo.bointerface.tools.http.Http
RequestAnalyzerlt/filter-classgt - ltinit-paramgt
- ltparam-namegtinitlt/param-namegt
- ltparam-valuegtfalselt/param-valuegt
- lt/init-paramgt
- lt/filtergt
- ltfilter-mappinggt
- ltfilter-namegtRequestAnalyzerlt/filter-namegt
- lturl-patterngt/lt/url-patterngt
- lt/filter-mappinggt
13What is going on in InfoView?
- ------------------------------------------
- http//linux9090/businessobjects/enterprise115/d
esktoplaunch/InfoView/main/navWork.do - ------------------------------------------
- Header Data Fri Apr 13 222302 CEST 2007
- ------------------------------------------
- par temp java.lang.String1176495784473
- ------------------------------------------
- hdr accept java.lang.Stringtext/xml,applicatio
n/xml,application/xhtmlxml,text/htmlq0.9,text/p
lainq0.8,image/png,/q0.5 - hdr host java.lang.Stringlinux9090
- hdr user-agent java.lang.StringMozilla/5.0
(X11 U Linux i686 en-US rv1.8.1.3)
Gecko/20061201 Firefox/2.0.0.3 (Ubuntu-feisty) - ------------------------------------------
- coo CE_LastAps java.lang.Stringlinux6400
- coo CE_LastAuthType java.lang.StringsecEnterpr
ise - coo CE_LastUser java.lang.StringAdministrator
- coo CE_LogonToken java.lang.StringLINUX_at_25378J
BCl8HYL8NgXIpeb25376JFUZkV8pIHsLKLCx - coo JSESSIONID java.lang.StringAAC57380EC0701D
7DE5BD2821EEA22D9 - ------------------------------------------
- ses CE_ENTERPRISESESSION
- com.crystaldecisions.sdk.framework.internal.
b(EnterpriseSessionlogon(SecuritySessionuserI
nfo(UserInfo
14RecapWhat is going on in InfoView?
- Find out with BOInterface
- Use HttpRequestAnalyzer Servlet Filter
- Get the complete Call Sequence
- See all Parameters
- See all Headers
- See all Cookies
- See all Beans
- Understand exactly how InfoView works!
15Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
16What is a Regular Expression (????)?
- Descriptive Pattern of a Text Fragment
- READ FROM LEFT TO RIGHT!
- Has special Characters
- Beginning of Line
- End of Line
- . Any Character
- \ Escaping Character
- Any number of character, including 0
- Like , but at least 1
- ? Shortest (non greedy) Match
- 1,4 Min/Max Quantities also 3
- a-z Character Class
- gt Not a gt
- ( ) Referenceable Group
- 1 Reference to Group Number 1
- (?sm) Match cross line boundaries
17What is a Regular Expression (????)?
Sample 1 Suppress some HTML Code
- Assume, you have some HTML Code like
-
- // "Send" Menu
- var btnSend toolbarCtrl.add
(newIconMenuWidget - ...
- var myInfoViewIcon ...
- If we want to suppress var btnSend..., we write
this as - (?sm)var btnSend.?(var myInfoViewIcon)
- Match accross multiple lines and
- search a v, followed by an a, followed by an
r, then a blank, then a b, then a t, then
an n, then an S, then an e, then an n,
then a d - then any character (.)
- of which we allow any number ()
- but only until we first match (?)
- a Group ( of var my ....
- And we replace this by referring to the group as
1
18What is a Regular Expression (????)?
Sample 2 Swap some HTML Code
- Assume, you have some HTML Code like
- ltframeset id"navWorkFrameSet" cols"200,,0"
framespacing"2" frameborder"1" border"2"
bordercolor"F6F6FB"gt - ltframe name"navigationFrame"
id"navigationFrame" src"../../InfoView/main/navi
gation.do" marginheight"0" marginwidth"0"
frameborder"0" gt - ltframe name"workspaceFrame"
id"workspaceFrame" src"workspace.do?url..2F..
2FInfoView2Fmain2Fhome.do" frameborder"0"
marginheight"0" marginwidth"0"gt - ltframe name"rightFrame" id"rightFrame"
src'../../applications/index.bouitoolkit?tokenLI
NUX_at_25382JnI1UvALCd0XYrsz25380JaRE7qtgzancz2tQONEO
FFLOCALEen_US' frameborder"0" marginheight"0"
marginwidth"0" scrolling"no" noResize"true"gt - lt/framesetgt
- To put navigationFrame after rightFrame, we
match - (?sm)(200,\,0)(.?)(ltframe
gt?gt)(.?)(lt/framesetgt) - And we replace this by replacing 1 and
reordering 3 and 4 - ,0,200 2 4 3
5
19RecapWhat is a Regular Expression (????)?
- A way to write a Pattern for Text Fragments
- Always read from Left to Right
- Allows Wildcards
- Allows Quantifiers
- Allows Grouping
- Helps to replace Text
- ???? is Japanese for
- Regular Expression...
- (not to mix with ????...)
20Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
21Visual Modifications to InfoView
- Change Colors and Fonts
- Mission Change the List Font
- Using Style Sheets
- Remove Buttons and Menus
- Mission Remove the Send Menu.
- Changing InfoView Code
- Using BOInterface and NOT Changing InfoView Code
- Move Frames around
- Mission Move the Navigation Frame to the Right
- Using BOInterface and NOT Changing InfoView Code
- Add Menu Items to the Viewer
- Mission Add an Export Context Menu Item to the
DHTML Viewer - Using BOInterface and NOT Changing InfoView Code
22Change the List Font
Coming from here...
23Change the List Font
...we want to go here
24Change the List Font
- Find out where the StyleSheet is
- Frame Source says, it is in
- /InfoView/res/schema.blue/default.css
- Frame Source refers to the style .list by
- lttd class'list' ...
- lta class'list' ...
- We locate it in the css File and change it to
- .list
- font-family Arial
- font-size 14pt
- font-weightbold
- colornavy
-
- ...and reload the Frame.
25RecapChange the List Font (Style Sheets)
- Simple Modifications can be done easily
- Not very flexible
- Styles are reused across elements (td, a)
- Changes affect more than intended
- Many elements not styled
- Difficult to drop things
- Difficult to include Logic
- Graphics can be changed in the File System
26Visual Modifications to InfoView
- Change Colors and Fonts
- Mission Change the List Font
- Using Style Sheets
- Remove Buttons and Menus
- Mission Remove the Send Menu.
- Changing InfoView Code
- Using BOInterface and NOT Changing InfoView Code
- Move Frames around
- Mission Move the Navigation Frame to the Right
- Using BOInterface and NOT Changing InfoView Code
- Add Menu Items to the Viewer
- Mission Add an Export Context Menu Item to the
DHTML Viewer - Using BOInterface and NOT Changing InfoView Code
27Remove the Send Menu
28Remove the Send Menu
Method 1 Attempting to Reverse Engineer
- Find out where the Send Menu is created
- Frame Information says, it is in
- /InfoView/main/headerPlus.do
- This refers to a Struts Class. Yet,
- /WEB-INF/struts-InfoView.xml
- redirects us to
- ltforward
- name"default"
- path"/InfoView/main/headerPlusButtons.jsp"
- redirect"false"/gt
- This file contains no button definitions.
29Remove the Send Menu
Method 1, continued Fighting with the Code...
- Being creative, we look at
- /InfoView/main/headerPlus.jsp
- Searching for button, we find a reference to
- /InfoView/headerPlus/buttons.do
- Looking at its code, and searching further we
find a file - /WEB-INF/classes/META-INF/buttons/headerplus/defa
ult.xml - Which is basically an empty file
- lt?xml version"1.0"?gt
- ltbutton-configgt
- ltbuttonsgt
- lt/buttonsgt
30Remove the Send Menu
Method 1, continued Pattern Searching...
- Taking another approach, we analyze the HTML
Source - // "Send" Menu
- var btnSend toolbarCtrl.add
(newIconMenuWidget - ...
- var myInfoViewIcon ...
- Searching the entire Web App for btnSend, we
get - /InfoView/main/headerPlus.jsp
- We earlier overlooked that it contains the above
code. - Other things (particularly for the Viewer) are
much more difficult to find.
31Remove the Send Menu
Method 1, Summary
- Changing the InfoView Code is a bad idea!
- Changes may go into all sorts of places,
including - JSP Files
- XML Files
- JS Files
- Struts Java Classes of which you may not even
have the Source - ...
- With any update of InfoView the logic may have
changed, so you would have create a new patch - Putting your InfoView back in a supported state
involves setting back changes in may be a number
of files.
32Remove the Send Menu
Method 2 Use BOInterface
- A five step process
- Analysis
- Find the URL
- Find the Pattern
- Synthesis
- Create a Regular Expression for that Pattern
- Create a Search/Replace Servlet Filter in web.xml
- Test
- Restart the Container, and Test.
33Remove the Send Menu
Method 2 Use BOInterface
- A five step process
- Find the URL for the Frame by using Frame
Information - /InfoView/main/headerPlus.do
- Open the Frame Source and Locate the Pattern
- // "Send" Menu
- var btnSend toolbarCtrl.add
(newIconMenuWidget - ...
- var myInfoViewIcon ...
- Create a Regular Expression for that Pattern
- (?sm)var btnSend.?(var myInfoViewIcon)
- Create a Search/Replace Servlet Filter in web.xml
- (see next slide)
- Restart the Container, and Test.
34Remove the Send Menu
4. Create a Search/Replace Filter in web.xml
- ltfiltergt
- ltfilter-namegtNo Search Buttonlt/filter-namegt
- ltfilter-classgtcom.bo.bointerface.tools.http.Http
ResponseAnalyzerlt/filter-classgt - ltinit-paramgt
- ltparam-namegtdebuglt/param-namegt
- ltparam-valuegtfalselt/param-valuegt
- lt/init-paramgt
- ltinit-paramgt
- ltparam-namegtsearchlt/param-namegt
- ltparam-valuegtlt!CDATA(?ms)var btnSend.?(var
myInfoViewIcon)gtlt/param-valuegt - lt/init-paramgt
- ltinit-paramgt
- ltparam-namegtreplacelt/param-namegt
- ltparam-valuegtlt!CDATA1gtlt/param-valuegt
- lt/init-paramgt
- lt/filtergt
- ltfilter-mappinggt
- ltfilter-namegtNo Search Buttonlt/filter-namegt
- lturl-patterngt/InfoView/main/headerPlus.dolt/url
-patterngt
35Remove the Send Menu
36RecapRemove the Send Menu
- Code Changes are BAD
- BOInterface makes it EASY
- Find the URL
- Find the Pattern
- Create a Regular Expression
- Create a Search/Replace Filter
- Restart Container, Test.
- Changes can easily be removed to make the System
supported - Multiple Expressions per Endpoint can be done
like - ltsearch01/gt..ltreplace01/gt, ltsearch02/gt..ltreplace02
/gt, etc. - Much more complex examples can be achieved
implementing - AbstractServletFilter.HtmlProcessor
37Visual Modifications to InfoView
- Change Colors and Fonts
- Mission Change the List Font
- Using Style Sheets
- Remove Buttons and Menus
- Mission Remove the Send Menu.
- Changing InfoView Code
- Using BOInterface and NOT Changing InfoView Code
- Move Frames around
- Mission Move the Navigation Frame to the Right
- Using BOInterface and NOT Changing InfoView Code
- Add Menu Items to the Viewer
- Mission Add an Export Context Menu Item to the
DHTML Viewer - Using BOInterface and NOT Changing InfoView Code
38Move the Navigation Frame to the Right
Coming from here...
39Move the Navigation Frame to the Right
...we want to go here
40Move the Navigation Frame to the Right
Analysis
- Find the URL
- HttpRequestAnalyzer tells us, the FrameSet is
generated by - /InfoView/main/navWork.do
- Find the Pattern
-
- ltframeset id"navWorkFrameSet" cols"200,,0"
framespacing"2" frameborder"1" border"2"
bordercolor"F6F6FB"gt - ltframe name"navigationFrame"
id"navigationFrame" src"../../InfoView/main/navi
gation.do" marginheight"0" marginwidth"0"
frameborder"0" gt - ltframe name"workspaceFrame"
id"workspaceFrame" src"workspace.do?url..2F..
2FInfoView2Fmain2Fhome.do" frameborder"0"
marginheight"0" marginwidth"0"gt - ltframe name"rightFrame" id"rightFrame"
src'../../applications/index.bouitoolkit?tokenLI
NUX_at_25382JnI1UvALCd0XYrsz25380JaRE7qtgzancz2tQONEO
FFLOCALEen_US' frameborder"0" marginheight"0"
marginwidth"0" scrolling"no" noResize"true"gt - lt/framesetgt
41Move the Navigation Frame to the Right
Synthesis
- Create a Regular Expression for that Pattern
-
- (?sm)(200,\,0)(.?)(ltframe
gt?gt)(.?)(lt/framesetgt) - ,0,200 2 4 3
5 - Create a Search/Replace Servlet Filter in web.xml
- (see next slide)
- Restart the Container, and Test.
42Move the Navigation Frame to the Right
4. Create a Search/Replace Filter in web.xml
- ltfiltergt
- ltfilter-namegtNavigation Frame
Rightlt/filter-namegt - ltfilter-classgtcom.bo.bointerface.tools.http.Http
ResponseAnalyzerlt/filter-classgt - ltinit-paramgt
- ltparam-namegtdebuglt/param-namegt
- ltparam-valuegtfalselt/param-valuegt
- lt/init-paramgt
- ltinit-paramgt
- ltparam-namegtsearchlt/param-namegt
- ltparam-valuegt
- lt!CDATA(?sm)(200,\,0)(.?)(ltframe
gt?gt)(.?)(lt/framesetgt)gt - lt/param-valuegt
- lt/init-paramgt
- ltinit-paramgt
- ltparam-namegtreplacelt/param-namegt
- ltparam-valuegtlt!CDATA,0,2002435gtlt/para
m-valuegt - lt/init-paramgt
- lt/filtergt
- ltfilter-mappinggt
43RecapMove the Navigation Frame to the Right
- BOInterface makes it EASY
- Find the URL
- Find the Pattern
- Create a Regular Expression
- Create a Search/Replace Filter
- Restart Container, Test.
- Wrap your statements in
- lt!CDATA ... gt
44Visual Modifications to InfoView
- Change Colors and Fonts
- Mission Change the List Font
- Using Style Sheets
- Remove Buttons and Menus
- Mission Remove the Send Menu.
- Changing InfoView Code
- Using BOInterface and NOT Changing InfoView Code
- Move Frames around
- Mission Move the Navigation Frame to the Right
- Using BOInterface and NOT Changing InfoView Code
- Add Menu Items to the Viewer
- Mission Add an Export Context Menu Item to the
DHTML Viewer - Using BOInterface and NOT Changing InfoView Code
45Add an Export Context Menu Item
Hand over Data to an External System...
46Add an Export Context Menu Item
Analysis
- Find the URL
- HttpRequestAnalyzer tells us, the Menu is
generated by - /viewers/cdz_adv/language/en/scripts/viewer.js
- Find the Pattern
- ...
- m.addSeparator()
- m.add("saveXLS","Save XLS")
- function initcellContextMenu()
- ...
- switch(id)
-
- case "saveXLS"
- ...
- wt()
- var purlParams(false)
- if (p!"") frameNav("Report", _root
"processSaveXLS"_appExtp,true) - break
- ...
47Add an Export Context Menu Item
Synthesis
- Create a Regular Expression for that Pattern
-
- (?sm)(function initcellContextMenu)(.?)(case
"saveXLS") - m.addSeparator()
- m.add("export","Export")
- 12
- case "export"
- var purlParams(false)
- if(p!"")
- wt()
- frameNav("Report", _root"processExport
"_appExtp, true) -
- break
- 3
- Create a Search/Replace Servlet Filter in web.xml
- (see next slide)
48Add an Export Context Menu Item
4a. Create a Search/Replace Filter in web.xml
- ltfiltergt
- ltfilter-namegtExportlt/filter-namegt
- ltfilter-classgtcom.bo.bointerface.tools.http.Http
ResponseAnalyzerlt/filter-classgt - ltinit-paramgt
- ltparam-namegtsearchlt/param-namegt
- ltparam-valuegtlt!CDATA(?sm)(function
initcellContextMenu)(.?)(case "saveXLS")gtlt/par
am-valuegt - lt/init-paramgt
- ltinit-paramgt
- ltparam-namegtreplacelt/param-namegt
- ltparam-valuegtlt!CDATAm.addSeparator()
m.add("export","Export") 12 case "export" var
purlParams(false) if(p!"") wt()
frameNav("Report", _root"processExport"_appExtp
, true) break 3gtlt/param-valuegt - lt/init-paramgt
- lt/filtergt
49Add an Export Context Menu Item
4b. Create a Search/Replace Servlet Filter
Mapping in web.xml
- HttpResponseAnalyzer tells us, the Menu is
generated by - /viewers/cdz_adv/language/en/scripts/viewer.js
- We need a filter mapping for each language.
Create one with
viewers/cdz_adv/language FExport for i in
do echo \ltfilter-mapping\gt\ltfilter-name\gtF\lt/filt
er-name\gt\lturl-pattern\gt/viewers/cdz_adv/language/
i/scripts/viewer.js\lt/url-pattern\gt\lt/filter-mapp
ing\gt done
ltfilter-mappinggtltfilter-namegtExportlt/filter-namegtlt
url-patterngt/viewers/cdz_adv/language/ar/scripts/v
iewer.jslt/url-patterngtlt/filter-mappinggt ltfilter-ma
ppinggtltfilter-namegtExportlt/filter-namegtlturl-patter
ngt/viewers/cdz_adv/language/cs/scripts/viewer.jslt/
url-patterngtlt/filter-mappinggt ltfilter-mappinggtltfil
ter-namegtExportlt/filter-namegtlturl-patterngt/viewers
/cdz_adv/language/de/scripts/viewer.jslt/url-patter
ngtlt/filter-mappinggt ltfilter-mappinggtltfilter-namegtE
xportlt/filter-namegtlturl-patterngt/viewers/cdz_adv/l
anguage/dev/scripts/viewer.jslt/url-patterngtlt/filte
r-mappinggt ltfilter-mappinggtltfilter-namegtExportlt/fi
lter-namegtlturl-patterngt/viewers/cdz_adv/language/e
l/scripts/viewer.jslt/url-patterngtlt/filter-mappinggt
ltfilter-mappinggtltfilter-namegtExportlt/filter-namegt
lturl-patterngt/viewers/cdz_adv/language/en/scripts/
viewer.jslt/url-patterngtlt/filter-mappinggt ltfilter-m
appinggtltfilter-namegtExportlt/filter-namegtlturl-patte
rngt/viewers/cdz_adv/language/es/scripts/viewer.jslt
/url-patterngtlt/filter-mappinggt ltfilter-mappinggtltfi
lter-namegtExportlt/filter-namegtlturl-patterngt/viewer
s/cdz_adv/language/fr/scripts/viewer.jslt/url-patte
rngtlt/filter-mappinggt ltfilter-mappinggtltfilter-namegt
Exportlt/filter-namegtlturl-patterngt/viewers/cdz_adv/
language/he/scripts/viewer.jslt/url-patterngtlt/filte
r-mappinggt ltfilter-mappinggtltfilter-namegtExportlt/fi
lter-namegtlturl-patterngt/viewers/cdz_adv/language/i
t/scripts/viewer.jslt/url-patterngtlt/filter-mappinggt
ltfilter-mappinggtltfilter-namegtExportlt/filter-namegt
lturl-patterngt/viewers/cdz_adv/language/ja/scripts/
viewer.jslt/url-patterngtlt/filter-mappinggt ltfilter-m
appinggtltfilter-namegtExportlt/filter-namegtlturl-patte
rngt/viewers/cdz_adv/language/ko/scripts/viewer.jslt
/url-patterngtlt/filter-mappinggt ltfilter-mappinggtltf
ilter-namegtExportlt/filter-namegtlturl-patterngt/viewe
rs/cdz_adv/language/nl/scripts/viewer.jslt/url-patt
erngtlt/filter-mappinggt ltfilter-mappinggtltfilter-name
gtExportlt/filter-namegtlturl-patterngt/viewers/cdz_adv
/language/pl/scripts/viewer.jslt/url-patterngtlt/filt
er-mappinggt ltfilter-mappinggtltfilter-namegtExportlt/f
ilter-namegtlturl-patterngt/viewers/cdz_adv/language/
pt/scripts/viewer.jslt/url-patterngtlt/filter-mapping
gt ltfilter-mappinggtltfilter-namegtExportlt/filter-name
gtlturl-patterngt/viewers/cdz_adv/language/ru/scripts
/viewer.jslt/url-patterngtlt/filter-mappinggt ltfilter-
mappinggtltfilter-namegtExportlt/filter-namegtlturl-patt
erngt/viewers/cdz_adv/language/sv/scripts/viewer.js
lt/url-patterngtlt/filter-mappinggt ltfilter-mappinggtltf
ilter-namegtExportlt/filter-namegtlturl-patterngt/viewe
rs/cdz_adv/language/th/scripts/viewer.jslt/url-patt
erngtlt/filter-mappinggt ltfilter-mappinggtltfilter-name
gtExportlt/filter-namegtlturl-patterngt/viewers/cdz_adv
/language/tr/scripts/viewer.jslt/url-patterngtlt/filt
er-mappinggt ltfilter-mappinggtltfilter-namegtExportlt/f
ilter-namegtlturl-patterngt/viewers/cdz_adv/language/
zh_CN/scripts/viewer.jslt/url-patterngtlt/filter-mapp
inggt ltfilter-mappinggtltfilter-namegtExportlt/filter-n
amegtlturl-patterngt/viewers/cdz_adv/language/zh_TW/s
cripts/viewer.jslt/url-patterngtlt/filter-mappinggt
ltfilter-mappinggt ltfilter-namegtExportlt/filter-nam
egt lturl-patterngt /viewers/cdz_adv/language/e
n/scripts/viewer.js lt/url-patterngt lt/filter-mapp
inggt
50Add an Export Context Menu Item
4c. Create a processExport.jsp
- lt_at_page language"java" gt
- lt_at_page import"com.bo.bointerface.tools.StringUti
lity" gt - lt_at_page import"java.util.regex.Pattern,java.util.
regex.Matcher" gt - ltjspuseBean id"boReport" class"com.bo.boxinter
face.boreport.BOReport"
scope"session" /gt - ltjspuseBean id"boHandler" class"com.bo.boxinter
face.boreport.handler.BOReportHandler"
scope"session" /gt - ltjspuseBean id"boViewer" class"com.bo.boxinter
face.boreport.viewer.xml.BOReportViewerXML"
scope"session" /gt - lt
- boReport.setCESession((com.crystaldecisions.sdk.
framework.IEnterpriseSession) session.getAttribute
("CE_ENTERPRISESESSION")) - boReport.setReportEngines((com.businessobjects.r
ebean.wi.ReportEngines) session.getAttribute
("ReportEngines")) - boHandler.setBOReport(boReport)
- boViewer.setBOReport(boReport)
- gt
- lt
- final String tok request.getParameter("sEntr
y") - final String bid request.getParameter("bids"
) - final String xml boViewer.getDocumentXML(tok
)
51RecapAdd an Export Context Menu Item
- JavaScripts may be language
- dependent, so use multiple
- Mappings per Filter
- BOInterface gets the Report XML
- XML parsing can be simplified
- using a Regular Expression
52RecapVisual Modifications to InfoView
- Change Colors and Fonts
- Mission Completed Change the List Font
- Using Style Sheets
- Remove Buttons and Menus
- Mission Completed Remove the Send Menu.
- Changing InfoView Code
- Using BOInterface and NOT Changing InfoView Code
- Move Frames around
- Mission Completed Move the Navigation Frame to
the Right - Using BOInterface and NOT Changing InfoView Code
- Add Menu Items to the Viewer
- Mission Completed Add an Export Context Menu
Item - Using BOInterface and NOT Changing InfoView Code
53Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
54Functional Modifications to InfoView
- Visual Modifications were just a Special Case
- HttpRequestAnalyzer used to identify End Point to
modify - HttpResponseAnalyzer used to modify End Point
- AbstractServletFilter is used for the General
Case - HttpRequestAnalyzer extends AbstractServletFilter
- HttpResponseAnalyzer extends AbstractServletFilter
- Write your own extensions of AbstractServletFilter
- For convenience, you only need to implement
- public interface AbstractServletFilter.HtmlProcess
or - public void preprocess
- (HttpModifiableRequest req, HttpModifiableRespon
se res, FilterConfig cfg) - throws ServletException
- public void postprocess
- (HttpModifiableRequest req, HttpModifiableRespon
se res, FilterConfig cfg) - throws ServletException
-
- Example MostSimpleFilter.java (see next slide)
55Functional Modifications to InfoView
MostSimpleFilter.java
- package servletfilters
- import com.bo.bointerface.tools.http.AbstractServl
etFilter - import com.bo.bointerface.tools.http.AbstractServl
etFilter.HtmlProcessor - import com.bo.bointerface.tools.http.HttpModifiabl
eRequest - import com.bo.bointerface.tools.http.HttpModifiabl
eResponse - import javax.servlet.FilterConfig
- import javax.servlet.ServletException
- public class MostSimpleFilter implements
HtmlProcessor - /
- Preprocess the Http request.
- /
- public void preprocess(HttpModifiableRequest
request, HttpModifiableResponse response,
FilterConfig config) - throws ServletException
- final String requestURL request.getRequestUR
L().toString() - final String endpoint requestURL.substring
(requestURL.lastIndexOf("/") 1)
56Functional Modifications to InfoView
MostSimpleFilter Registration for web.xml
- ltfiltergt
- ltfilter-namegtMost Simple Filterlt/filter-namegt
- ltfilter-classgtcom.bo.bointerface.tools.http.Abst
ractServletFilterlt/filter-classgt - ltinit-paramgt
- ltparam-namegtworkerlt/param-namegt
- ltparam-valuegtservletfilters.MostSimpleFilterlt/
param-valuegt - lt/init-paramgt
- ltinit-paramgt
- ltparam-namegtdebuglt/param-namegt
- ltparam-valuegttruelt/param-valuegt
- lt/init-paramgt
- lt/filtergt
- ltfilter-mappinggt
- ltfilter-namegtMost Simple Filterlt/filter-namegt
- lturl-patterngt/InfoView/logon/logon.objectlt/url-p
atterngt - lt/filter-mappinggt
57Functional Modifications to InfoView
BasicLoginFilter.java
- package servletfilters
- import com.bo.bointerface.tools.http.AbstractServl
etFilter - import com.bo.bointerface.tools.http.AbstractServl
etFilter.HtmlProcessor - import com.bo.bointerface.tools.http.HttpModifiabl
eRequest - import com.bo.bointerface.tools.http.HttpModifiabl
eResponse - import com.bo.boxinterface.boreport.BOReport
- import com.crystaldecisions.ePortfolio.framework.c
ommon.CEClientConstants - import com.crystaldecisions.sdk.framework.IEnterpr
iseSession - import javax.servlet.FilterConfig
- import javax.servlet.ServletException
- import javax.servlet.http.HttpSession
- public class BasicLoginFilter implements
HtmlProcessor - public void preprocess(HttpModifiableRequest
request, HttpModifiableResponse response,
FilterConfig config)
58Functional Modifications to InfoView
BasicLoginFilter.java, continued
- //...
-
- IEnterpriseSession enterpriseSession
- (IEnterpriseSession) session.getAttribute(CE
ClientConstants.SESSION_ENTERPRISESESSION) - if (enterpriseSession null)
- final String user request.getParameter("us
er") - final String pass request.getParameter("pa
ss") - final String cms request.getParameter("cm
s") - final String auth request.getParameter("au
th") - try
- boReport.initSession(user, pass, cms,
auth) - catch (Exception e)
- throw new ServletException(e)
-
-
- AbstractServletFilter.registerBOSession(boRepo
rt, request, response)
59Recap Functional Modifications to InfoView
- Implement HtmlProcessor
- Modify the Request and Response
- Filter multiple End Points
- Manage Security before Logon
- Move Users between Groups
- Activate/Deactivate Inbox
- Activate/Deactivate Personal Documents
- Audit User Activities
- Open Document handed over even from another JVM
60Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
61Functional Modification TreeView
- Works inside the Java Report Panel
- Search Hierarchical Data
- Select Data Nodes by Drag and Drop
- Automatically add Result Objects and Filters
62Demo
63Demo
64Demo
65Demo
66Demo
67Demo
68Search by Name
69Search in Result Set
70Search by ID
71Search Extending the Result Set
72Search History
73Search for multiple Keywords
74Technical Implementation
75Integration Extension Points
76Architecture
BusinessObjects Enterprise XI Release 2
77Communication
BusinessObjects Enterprise XI Release 2
HTTP(S)
XML over HTTP(S)
CORBA
Compressed XML over HTTP(S)
DB Middleware
JDBC
78Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
79Demo
80Demo
81Demo
82Demo
83Topics
- Introduction
- What is BOInterface?
- What is a Servlet Filter?
- What is going on in InfoView?
- What is a Regular Expression?
- Visual Modifications to InfoView
- Functional Modifications to InfoView
- Functional Modifications to the Report Applet
- Overview of the Rich Client
- QA
84QA
- Questions
- Matthias Nott,
- Service Line Leader for Products, EMEA, Business
Objects - I shall repeat questions to ensure everyone can
hear - Contact information
- Email matthias.nott_at_businessobjects.com
- Tel 41 (0) 79 784 45 54