Make WebCenter Portals work in IE11

Work around to Fix the IE issue using custom Filter and overriding the header

Currently as you all may know, the WebCenter Portal Spaces and Custom WebCenter Portal (PS5, PS7).
11.1.1.6.0 and 11.1.1.8.0, does not work on the latest browser IE11, unless you switch the compatibility.

If you cannot control the users, that work around is not going to last more than some weeks.

I have tried the following approach mentioned for ADF and it worked fine in Clustered and non-clustered environment.

The additional step you have to do is to include this web.xml change to include filter need to be done in the spaces.war file in webcenter.ear.

http://jonasdegraaff.blogspot.com/2013/11/how-to-run-your-adf-111x-application.html?showComment=1408722524350&_sm_au_=isV00k0f1r17wDqV#c2695485923422317330

Summary of steps.

1. Create the Filter and Wrapper class in the above referenced blog from Jonas.
2. Deploy these classes to Spaces Managed server along with custom changes (e.g. extend.spaces.webapp.war)
3. Open up the webcenter.ear using a Zipping tool, 7-Zip was easy to use. Edit and update the web.xml and include it back to the spaces.war and webcenter.ear.

4. The filter added in web.xml should be the very first filter otherwise, the application will start reading and storing it.

Do all the steps in one shot and your portal should be now working fine in IE10 and IE11 and all the other browsers.

 


 

The reason why IE11 is different and it does not work.


 

This is how the header for IE 9 Looks like -

User-Agent : Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

IE11  – User-Agent : Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko

The MSIE key is gone and now we have rv:11.0. So the approach was to use ‘Trident’ as the key until it available :)

 

 


ADF Skin Selectors and specific style class

It’s a big relief knowing this solution to target skin selectors to specific style class.

The issue We were facing from an year was, since the skin was common for a Spaces (Webcenter), the styles applied to a panel group or a af:popup was getting applied to every component and every taskflow in that space.

This had really killed time because, it affected the out of the box search, discussion service, resource catalog etc. Over all it was bad applying it globally. May be for those using Webcenter as intranet could benefit with global styles.

Thanks for Ajay (Tavant) in helping with this one.

So how to target the skin/ style for a specific adf component from Webcenter Skin.

<Individual Style>.<styleClass>::<skin Selector>

af|dialog.lol_terms_dialog::content

{

background-color:  Green;

}

af|dialog. lol_questions_dialog::content

{

background-color:  Red;

}

terms_green

 

securityquestions_red

Note: Prior to this both came with the same color !

The component code, where the style class is specified.

POPUP 1 :    <af:popup id=”terms_popupid” binding=”#{pageFlowScope.termsPopupBean.popupid}”>

<af:dialog id=”trmsdlgid” styleClass=”lol_terms_dialog”

POPUP 2 :    <af:popup id=”questions_popupid”

binding=”#{pageFlowScope.termsPopupBean.popup_questions}”>

<af:dialog id=”qstnsdlgid1″ styleClass=”lol_questions_dialog”

Now you know that, you can play with the skin selectors and do lot more, straightforward with ADF styles.

Let me test, how much it will help the responsive design and will update you back.

http://jdevadf.oracle.com/adf-richclient-demo/docs/skin-selectors.html

http://myfaces.apache.org/trinidad/skin-selectors.html

af|dialog::header-start

af|dialog::inactive-background


How to distinguish between a Phone and a Tablet from ADF ManagedBean

There are usecases where, only in phones few components need to be replaced or hided. It may still be displayed in tablets.

The ADF supported and apache supported options currently (Feb 2013) is not able to distinguish between Phone and Tablet. Even though it’s able recognize them as ‘touchable’ client.

Reading the Header information does the trick.

IOS

Mozilla/5.0 (iPhone; CPU iPhone OS 6_0_2 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A551 Safari/8536.25

Mozilla/5.0 (iPad; CPU OS 6_0_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A523 Safari/8536.25

Android

Tablet – Mozilla/5.0 (Linux; U; Android 3.2; en-us; GT-P7510 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13

Phone – Mozilla/5.0 (Linux; Android 4.2.1; Galaxy Nexus Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19

Code

HttpServletRequest request =
           (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
    String userAgent = request.getHeader("user-agent");
    System.out.println(userAgent);

Other alternatives are but they recognizes both iPhone and iPad as the same (iPhone):

adfFacesContext.getAgent() or
org.apache.myfaces.trinidad.context.RequestContext.getCurrentInstance().getAgent();

Javascript code for the same. (Javascript also provides the very same information read from the header. )


      function checkPlatform(event)
      {
        alert(navigator.platform + ' ------------- ' + navigator.userAgent);
	AdfCustomEvent.queue(event.getSource(), "handleEnterEvent",
	{mobilePlatform: navigator.platform}, {userAgent: navigator.userAgent}, true);
        event.cancel();

      }

So now you will be able to switch or hide the component and customize the UI from the server level before serving the client request.

 


Tabbed Widgets in Webcenter

One of the Webcenter Group member have raised this question to implement a news summary in Webcenter Spaces.
Here are some options, there are multiple options to implement the same.

1. Out of the box Webcenter Spaces Tabset, available on page edit.

2. Edit/ Customize Content Presenter Temlplate in Webcenter Spaces Settings >> resources >> Content Presenter

3. Create a completely custom site studio widget and render the same on the spaces using content presenter.

This could be more productive for user as when the user hover over the headlines, the summary can be displayed.

Hopefully handled by a dynamic list and jquery. Also you can directly contribute from the portal page using Shift your control to Contribution (ctrl + shift +C)

4. For detailed news page – Use the Webcenter custom navigation and display the news details in webcenter pages.

Display those pages from navigation as lists.

Screenshots.

Webcenter Spaces using Action Menu or Shift your Control to Edit (ctrl + shift + E).

Tabs Created Using Site Studio.

Contribute Directly to Site Studio/Wc Content from Spaces page for contributors.

 

 

 

 

 

 

 

 

Decide based on

1. How fancy and detailed you want to display your Updates/ news.

2. How you want to open up the contributors access.


Enabling Announcement and Discussion Service for Spaces PS3

Got the Announcement and Discussion Service Working.

For an environment which is using the default OID-LDAP, it may be an easy setup (as per andrejus blog) but those who have custom identity provider, there could be some more setups required to enable the Announcement and Discussion service in you Webcenter Spaces PS3 environment.

Announcement uses the

The main solution of this blog is to say that, if you have a different identity provider, use a user id from that instead of weblogic (if weblogic user is not in your identity provider) to connect to Discussion Server from Webcenter.

If you are fan of the super user ‘weblogic’, you can add that to your primary identity provider as well.

Screenshot

The OOTB Webcenter Announcement has been customized and styled to fit into the portal.

In the Screenshot.

1. The ‘Announcement Manager’ icon will be visible only to those security role which has access.

2. The contribution happens within the context of the portal, as shown in the screenshot below.

Good thing is the Create Announcements, stays within the context of the portal seemlessly.

Errors Seen :

1.oracle.webcenter.collab.share.LoginFailedException: failure to authenticate the user weblogic, due to: Unable to get user profile for username: Weblogic

2. Caused By: oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object “/oracle/webcenter/collab/forum/scopedMD/s2a2e692a_452e_4b63_9c20_691d111eb225/service-config.xml”

The first error was because, the ‘weblogic’ user was NOT there in my Identity Provider (In my case it was Active Directory).

So I have used a new id from my AD and that error just disappeared (and took a new form !).

The second error.
This error really disappear after few bounces, seemed to be an MDS hickup of repair time.

Will write down some more review and customization done on Announcements.

Update on 6/15/2012

When I have migrated to my QA environment, I have got some new errors, weird, questioned myself if I have documented properly !!!.

Error :

Error thrown in the Webcenter Spaces >> Services tab, as soon as you enable ‘Announcements’

an error occurred while trying to provision the service ‘announcements’. the service did not get provisioned.

Subsequent Error in the log :

<Jun 14, 2012 3:46:10 PM CDT> <Warning> <oracle.webcenter.collab.share.security.DefaultRoleMapper> <BEA-000000> <The removeUsers call is failed because of unable to find the service configuration file /oracle/webcenter/collab/announcement/scopedMD/s2aee7ad9_96c5_4c2a_a5aa_93268cbeab2c/service-config.xml, due to: MDS-00013: no metadata found for metadata object “/oracle/webcenter/collab/announcement/scopedMD/s2aee7ad9_96c5_4c2a_a5aa_93268cbeab2c/service-config.xml”.
oracle.webcenter.collab.share.GroupSupportException: unable to find the service configuration file

There was one more thing which had to be done, i.e. setting up the Discussion Service, I am not sure on that first part how it worked without doing that !

So basically you have to run this setup and configure with all the LDAP details to properly enable the Discussion and Announcement service.

http://server:port/owc_discussions/admin/setup/

I will come back and update with the screenshots later.


Webcenter Spaces PS3 Portals

Here are the few Webcenter Spaces PS 3 Portals.

Note: This presentation is only for technical purposes to for sharing the features of Webcenter Spaces PS3.

These portals exhibit the following features.

1. Spaces Page Template customizations.

2. Custom Navigation using jQuery and additional advanced customization above that for Partial Page Refresh.

(Thanks to John Brunswick’s blog) http://www.johnbrunswick.com/2011/01/webcenter-ps3-navigation-models-and-css-menus/

I will Thank back by including PPR feature to that (I will create a separate blog for that), thanks to my colleague in making it happen and Oracle in helping out that.

3. Content Presenters – with Site Studio Widgets. Supports contributing directly to the widget.

4. ADF Taskflows/ ADF custom applications with Data from Database based on the logged in user id.

5. RIDC Service to interact with UCM from the Java layer from an ADF Application

WebCenter Spaces Portal PS3 Screen Shot

Webcenter Spaces Portal PS3 Two

The top header, footer and side columns are placed on page templates so that, the PPR (Partial Page Refresh) can be most effective.

Benefits of PPR: (Picked from our Enterprise Manager)

 

The following diagram demonstrates the different technologies used and how they are seamlessly blended together with skins on the same page.


Webcenter Portal Space PS5 Review Installation

Just like everyone eagerly waits for iPhone’s new version release, I think for all the Portal developers it would be excited to install and see the new features of Webcenter Spaces.

It usually takes a good amount of time during the presentations to explain the terminologies, what is webcenter, what is webcenter spaces, what is spaces, webceter portal ….

So Webcenter Spaces been re-branded to Webcenter Portal Spaces, UCM to Webcenter Content.

I am mainly excited to see the initial home page loading performance improvement, enhanced search customization options.

I was hoping this time it will be done in few hours, but it took, Friday and Saturday. (Downloading, installing, configuring etc).

Even after referring to Oracle documents, multiple blogs and Oracle forums, I have still managed to make two mistakes while installing PS5. Those were installing Oracle DB XE and Installing Weblogic 12c.

So the craze behind Weblogic 12 cloud is paused for now.

I have installed the Webcenter Portal Space or Webcenter Space and Webcenter Content on Windows 7 64 bit Platform.

Since I had bad experience during PS1 and PS3 installations, I had to uninstall and reinstall UCM 24 times, by trying combinations of 64 bit versions. This time I took a smart path of using only 32 bit versions of the installations.

Ingredients and Cooking vessels required.

  1. Oracle Database Standard Edition
  2. Weblogic 10.3.6.0
  3. RCU – Install all the schemas for Webcenter, Webcenter Content, Discussions, Image processing, OID etc. It’s all free, so why not, try those products.
  4. Webcenter Spaces – Installer to install the required libraries to WLS Middleware Home.
  5. Webcenter Content
  6. Jdeveloper 11.1.1.6.0

to be continued… I have created a word document with all the required screenshots of the installations.

Over all this an 8 hours effort. If you can all the steps right, may be 4 hours. But definitely, the speed of deployment have improved a lot compared to the previous versions.

Currently I am downloading WLS 10.3.6, so let me come back and update with the latest.

I will also publish the common errors I have encountered, I would assume, they are specific to Window 7 64 bit.

Another very good blog to refer : http://adfwebcenter.blogspot.com/2012/02/webcenter-ps5-installation-quick-guide.html

Kohooo … I have finally got the PS5 up and running on my laptop. I could definitely sense some performance improvement during page loading.

Post Installation Issues

Issue 1 :

The error I was facing :

Error – java.lang.ClassNotFoundException: oracle.mds.lcm.weblogic.WLLifecycle

Issue :

There was a nodemanager configuration I used to do to fix it from the first version of Webcenter Spaces, I thought Oracle fixed it, but to my surprise, it persists and that was the cause of the error I was getting.

Solution :

Navigate to nodemanager.properties and make StartScriptEnabled=true

or

run setNMProps.sh/cmd script to do the same thing.

Issue 2:

The following issue is specific to Windows 7 users and related to UCM Inbound refinery.

Solution :

When running Oracle Inbound Refinery on Windows platforms, you may see this alert:

“The weblayout directory is on a filesystem with 8dot3 semantics. Legacy 16-bit 8dot3 filenames conflict with revision labels and will cause file loss. Disable 8dot3 semantics by running Installer DisableNtfs8dot3 and then restarting Windows.”

On Windows 7, running Installer DisableNtfs8dot3 does not resolve this. You must make the configuration change manually in the Windows registry.

To change the Windows registry, go to the following key:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/FileSystem

Then, set the value of the NtfsDisable8dot3NameCreation key to 1. You must restart Windows for the new setting to take effect.

Please note that Oracle Inbound Refinery is supported on Windows 7 in development environments only.

Update on 4/17/2012

I have faced multiple issues after getting the portals running.

1. While connecting UCM from SiteStudio and

2. Connecting UCM from Webcenter Spaces / Content Presenter.

Issue 3:

This may not been seen as an issue, rather a step to get the site studio working.

It’s for the first time I came to know what are the essential steps to be done to make Site Studio access a fresh installed UCM.


Another related learning was on folder_g has been renamed to FrameworkFolders (Framework Folders)

Solution :

UCM > Admin Server > Components manager > Folders

UCM > Site Studio Administration > Set default Project Documentation and supply the metadata.

Issue 4 :

Even though UCM connection ‘Test’ was showing successful from Webcenter (In Enterprise manager).

While trying to access the ‘Documents’ tab from Webcenter Spaces Admin screen/ searching for a content from Content Presenter it was throwing the following error.

<Apr 17, 2012 9:51:41 PM CDT> <Warning> <oracle.webcenter.doclib.internal.view.backing.ContentProvider> <WCS-07006> <run-time error obtaining content repository
oracle.webcenter.content.integration.RepositoryRuntimeException: Apr 17, 2012 9:51:41 PM oracle.webcenter.content.integration.spi.ucm.UCMBridge setTrashStatus
SEVERE: Unable to retrieve trash status for repository WebcenterContent. When calling service COLLECTION_GET_ADMIN_MARKED_CONFIG, as user sysadmin, at timestamp 4/17/12 9:51 PM, recieved status code -32.

Solution :

Setting the folder_g in the UCM Advanced settings has resolved the issue.

It’s looks like a commonly mentioned statement that, the folder_g doesn’t go together with the Framework folder. Only one of them should be enabled at a time and Webcenter demands folder_g.

Anil Saka has a complete blog with screenshots for upgrading to PS5 : Click.


Follow

Get every new post delivered to your Inbox.