on 05-08-2006 7:44 PM
Hi All
is it possible to hide/ show content (pages/ivews/tabs) on the portal based on time of the day?
what are the various options?
first thing came to my mind was desktop rules. but there are no time specific rules.
any help is appreciated
thanks
Prasad B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Hiding the tabs (pages,iviews) etc can be done in Portal by reading the Portal roles in Webdynpro application.
You have to include the Portalapi.jar file in the lib folder or the classpath of your webdynpro application.
then try the following code. re- enhance it where ever necessary to your logic.
// check whether the user is anonymous
if (user != null) {
//access logon ID by iterating through the IUserAccount array
IUserAccount[] acct = user.getUserAccounts();
if (acct[0] != null) {
strUserid = acct[0].getLogonUid();
wdContext.currentContextElement().setCurrentUser(
new String(strUserid.toUpperCase()));
wdContext.currentContextElement().setCurrentDate(
new Date(System.currentTimeMillis()));
}
} else {
wdContext.currentContextElement().setCurrentUser(
"Anonymous User");
}
} catch (UMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//@@end
}
This will give you the current logged in User. Set the time accorndingly for the user then use the WDVisibility to hide the tab for the particular user.
Hope it helps.
Thanks,
Guru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.