Invalidate navigation
Hi,
Situation:
In our BSP framework to each generated page we add a piece of javascript wich will check the input value on specified inputfields.
If the user fills in an exceptional amount we generate a popup (GetVBMessageBox) which warns him/her about the exceptional value. This works fine.
Problem:
When the user fills in an exceptional high value and doesn't leave the field (so the onChange event is not triggered) but presses the page-down key on the TableView the server navigates to the next page.
Then when the next page is displayed the popup is generated on the wrong page.
Question:
Is there a way to invalidate the navigation?
navigation->invalidate( )?
if you want to capture the user clicking navigate button in the table view on the server side you can use the following code in oninputprocessing
data: table type ref to cl_htmlb_tableview .
data: tv_data type ref to cl_htmlb_event_tableview.
data: event type ref to cl_htmlb_event.
event = cl_htmlb_manager=>get_event( runtime->server->request ).
table ?= cl_htmlb_manager=>get_data( request = request
name = 'tableView'
id = 'tv1' ).
if table is not initial .
tv_data = table->data .
endif .
if not tv_data is initial .
if tv_data->event_type = 'navigate' .
if tv_data->navigationtype = 'pageDown' .
**do something.
elseif tv_data->navigationtype = 'pageUp' .
** do something .
endif .
endif .
endif .
if you want to capture it on the client side, view the soruce of the page to identify the id for the button and write a javascript for onclick event of the button
Raja
Similar Messages
-
SSO - session time out while navigating across applications
Hi,
Problem statement
Handling session time out while navigating across applications involving SSO
Current approach
Application 1
1. Create session1.
2. URL rewrite the sesssion ID1 into the link refering to App2.
Application 2
1. Create session2
2. Get the session Id of App1.
3. send the session ID of App1 in the header
4. Invalidate the session2
Application 1
Get the ID from request and invoke getSession.
I'm having a very large session timeout at App1.
Is there a better approach. Ex: Having global session which is shared across multiple
webapplications."madhav" <[email protected]> wrote:
>
Hi,
Problem statement
Handling session time out while navigating across applications involving
SSO
Current approach
Application 1
1. Create session1.
2. URL rewrite the sesssion ID1 into the link refering to App2.
Application 2
1. Create session2
2. Get the session Id of App1.
3. send the session ID of App1 in the header
4. Invalidate the session2
Application 1
Get the ID from request and invoke getSession.
I'm having a very large session timeout at App1.
Is there a better approach. Ex: Having global session which is shared
across multiple
webapplications.
I have similiar problems in my system. What do you do if the session 1 times out
during ongoing operations in App 2 ?
Thanks
Kejuan -
Invalidate connection to BlazeDS server when closing tab in browser
There is an issue using IE and blazeds. When you establish a connection to blazeds from a tab of your browser, even when the tab get closed, she connection remains. The session doesn't get invalidated. It looks like it works fine in Firefox but it's an issue in IE.
It is especialy important if you are build a chat room for example ... you want to know precisly when someone is leaving the room.
I finally found an answer to this problem. I didn't find any answer on the Internet so I felt that I should share it.
I invalidate the session on the server side using a servlet.
Here is the code:
In my flex app html template I add:
<script langugage='javascript'>
function disconnectAll(){
if (navigator.appName == "Microsoft Internet Explorer")
xhr = new ActiveXObject("Microsoft.XMLHTTP"); // Trying Internet Explorer
else
xhr = new XMLHttpRequest();
if (xhr) {
xhr.open("GET", "../disconnect", false);
xhr.send(null);
</script>
</head>
<body scroll="no" onunload="disconnectAll()" >
This call to ../disconnect does a http request to my servlet that will invalidate the connection.
Here is the servlet code:
public class Disconnect extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
public void doGet(HttpServletRequest httpRequest, HttpServletResponse response) {
System.out.println("doGet disconnect called !");
httpRequest.getSession().invalidate();
This has to be added in the web.xml for the servlet to be accessible:
<servlet>
<servlet-name>DisconnectServlet</servlet-name>
<display-name>DisconnectServlet</display-name>
<servlet-class>com.ms.advil.servlets.Disconnect</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DisconnectServlet</servlet-name>
<url-pattern>/disconnect</url-pattern>
</servlet-mapping>
That’s it ! On the unload of the page, an Ajax request is made to the servlet that will invalidate the http session.
Your browser’s connections get invalidated and blazeDS catches the disconnection.
Hope this will help
Cheersanswered
-
How to populate Navigation List
Hi
I need to populate a navigation list with values obtained from an RFC.
Can I do this in the same way as populating DDBK?
The DDBK is linked to a Context Value Attribute, but the Navigation List is linked to a Context Node. The context value attribute linked to the DDBK is "addBusUnit". The context node linked to the Navigation List is "TeamList" with value attribute "Member". How would I change the following code(from the DDBK) so that it will work with the Navigation List?
IWDAttributeInfo attinfoBus = wdContext.getNodeInfo().getAttribute("addBusUnit");
ISimpleTypeModifiable modinfoBus = attinfoBus.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = modinfoBus.getSVServices().getModifiableSimpleValueSet();
try
wdContext.currentZhr_360_Teamviewer_InputElement().modelObject().execute();
for (int i = 0; i < wdContext.nodeZteamviewers().size(); i++)
valueSet.put(wdContext.nodeZteamviewers().getZteamviewersElementAt(i).getZzpaycode(),
wdContext.nodeZteamviewers().getZteamviewersElementAt(i).getZzfullname());
catch (WDDynamicRFCExecuteException d)
manager.reportException(d.getMessage(), false);
thanks in advance
AntonTo populate a NavigationList, bind the "itemSource" property to a context node and bind the other "item*" attributes to attributes inside that node. The item source may be a recursive node.
Say the item source node is named "NavItems" with attributes "FullName" and "PayCode". Then you may use code like
try
wdContext.currentZhr_360_Teamviewer_InputElement().modelObject().execute();
wdContext.nodeNavItems().invalidate();
for (int i = 0; i < wdContext.nodeZteamviewers().size(); i++)
IZteamviewersElement e = wdContext.nodeZteamviewers().getZteamviewersElementAt(i);
INavItemsElement navItem = wdContext.nodeNavItems().createNavItemsElement();
wdContext.nodeNavItems().addElement(navItem);
navItem.setPayCode(e.getZzpaycode());
navItem.setFullName(e.getZzfullname());
catch (WDDynamicRFCExecuteException d)
manager.reportException(d.getMessage(), false);
Bind NavigationList.itemText property to "FullName" to get the full name displayed as item text.
Armin -
Clear portal navigation cache from java
Hi,
I've written a navigation connector service based on the example in the ep6 pdk. It works fine but if I make changes to its configuration so that some new navigation entries should appear/disappear, it may last up to 2 hours until they show up. I think the portal caches the navigation entries for each user. Is it possible to clear the nav cache for certain/all users with a java statement?
thanks in advance,
MarkusHi,
if you know what you're doing and what the consequences of programming against a not-public API are, you could do the following:
CacheAccess cacheAccess = CacheAccess.getAccess("prt");
cacheAccess.invalidate();
build time dependency:
compile against j2ee\cluster\dispatcher\bin\ext\com.sap.ip.basecomps\BaseComps.jar
run time dependency:
add the SharingReference value SAPJ2EE::library:com.sap.ip.basecomps to your portal component deployment descriptor (dist/PORTAL-INF/portalapp.xml)
BR, Fabian -
Navigation Cache - Loading Web Dynpro iview
Hello Experts,
I developed a simple WebDynpro that count the access number to a single portal page.
And I put it in a Role.
In a cluster environment I had different results depending on the cluster instance I use.
If I do a Logon in the central instance and navigate the role I get a value of access number.
If I do a Logon in the dialog instance and navigate the role I get a different value of access number.
The value in the database is always the same..
Could it be a cache problem??
What can I do??
Best RegardsHi,
Did you try clearing the navigational cache on dialog server and also in Central Instance?
In Portal Navigate to System Administration - Navigation - Clear Navigation Cache.
And test the application again and see if it got resolved...
Or
Go to Index.html side and go to Web Dynpro Tools, and go to Invalidation of ARFC Metadata Cache - In section Dictionaries Cache Invalidation - click on the button to get teh application using the JCO connection and invalidate the cache...
Hope this helps.
Cheers-
Pramod -
Navigation handlers and user authentication
I've implemented a system to force user logins based on the code demonstrated here: http://www.jsftutorials.net/jsfNavigation/jsf-login-navigation-redirect.html but I've come across a problem.
It seems the navigation handler is called only when JSF needs to resolve the outcome of an action and this means that in certain cases a user can view a secure page without having to log in. For example, using the example app from the above link, if a user goes to the start page of the project and clicks on the command buttons to access the protected pages, they are re-directed to the login page as expected. However, if they go to the url of the protected page directly (eg http://localhost:8080/jsf-loginRedirect/secure/editUserProfile.jsf ) it still displays the page.
Currently I've got a filter in place that re-directs the user to the login page of the web app if there isn't a valid user logged in, but as this runs outside a Faces context I can't track the user's requests.
Is there some way I can force JSF to call the navigation handler for normal get requests?Chops,
There are 2 things related to this issue,
1. When the user goes out of the application, you must invalidate the session. So that the userid will not be present in the session.
2. You can have a phase listener that checks for User Id in session, if the user id is empty, you can re-direct the user to login page. If user id is present automatically the control will go to the navigation rule page.
Phase Listener will enforce the user authentication.
Hope this logic helps you to solve the issue.
Thanks
Prakash -
Caching on detailed navigation besides navigation cache?
Hello Everyone,
We use Btexx EasyWCM as a content management system on our SAP NW portal.
When we create a new page in the portal it should appear directly in the detailed navigation, but instead it appears much much later, often after more then an hour. The same happens when deleting a page.
We thought of navigation cache at first but we disabled it and the problem was still there.
Because the new page does appear after a while, what makes it time-based, we still think it might be a caching issue. We don't know what other caches influence the detailed navigation.
The page does appear in the PCD (role) directly after it is made, same goes for deletion.
We tried a restart already, but that didn't resolve anything. And I donu2019t think it's a network problem because the PCD updates instantly. Just the detailed navigation doesn't. Even when we changed the customised detailed navigation back to the standard SAP detailed navigation there was no difference.
We tried creating a page directly on the server so the caches of the proxy's etc could be excluded and the problem was still there.
Thanks.Hello Sander,
that's good to hear. But you do not need not turn the navigation cache off.
easyWCM supports the new Navigation Cache API. If a editor changes navigation structures, easyWCM automatically invalidates the relevant roles from the cache.
Please check if your SAP Portal release and easyWCM release supports that feature.
More information are available on our support plattform:
http://www.btexx.de/support/
Best regards,
Michael -
How to use Portal Navigation to redirect to the URL
Hi ,
I have a requirement where i need to log off the user which will invalidate the session and redirect the user to the Portal Login Page.
<b>The logoff.jsp is in a path like /web/logoff.jsp in the server.</b>
As there is a Problem with exit plug, I should use Portal Navigation (WDPortalNavigation API) to redirect to the log off page.
<b>Please let me know how to call the above JSP using WDPortalNavigation.</b>
Thanks and Regards,
SekarHi,
Thats a good idea. I have a Button Click Event, and on Action of it, I am doing a set of operation based on some condition and at the end of the operation i need to redirect to the logoff.jsp
<b>The LinkToURL in place of Button is not allowed</b>.The requirment is to have the button compulsory and i need to do those set of operation onclick of that button.
<b>Still i can use LinkToURL as a hidden element and can call the logoff.jsp and the end of the above operations on click of that button. Is it possible to achive that...</b>Please share your thoughts.
Appreciate your help.
Thanks and Regards,
Sekar -
Hi,
What is the use of Invalidate method of the context nodes...
thanks,
Arjun.GHi Arjun,
If you know the reason why clear and refresh are used in normal abap (for internal table and variables) and in which scenarios you require to use them .Then you can easily relate those cases with webdynpro abap.
Now take an example that you have a acreen where you are entering some data to input fields .In some case you want that after navigation is performed from this page or to this page what ever the data user entered previously should get erased.(as almost the similar concept for clear and refresh).So in this case use can use invalidate method for the correspondin node whose attributes are bound with the input fields.
Hope this will help you understand the concept.
If any query feel free to ask
regards
PG -
How to invalidate the browser cache?
Hello,
at the [AFP Wiki Site|http://wiki.sdn.sap.com/wiki/display/AFP/SAPPortal-AjaxFramework+Page] I found the document "Ajax Framework Page (AFB) - Features and Benefits", where it says
! There's no need to manually clear the browser cache when it is automatically
invalidated
Browser cache is automatically invalidated when
The SAP NetWeaver Portal is updated with a new Support Package (SP)
Content has changed
User's roles are modified (adding/removing all or parts of roles)
Does anbody know how to force this invalidation on client or server side? I mean, how does the client side cache know that the roles of a user changed?Hi Björn,
you might know this but just to be sure.
Backend side: HTTP > invalidate via visual admin, Navigation cache to be invalidated via system administration role, PCD cache to be invalidated via system administration role
Client side: to force the browser to pull the new content with IE > CtrlF5, FF > CtrlShift+R. The new HTTP content is pulled even if the server HTTP cache stores old content. In case of F5 the old content from the server HTPS cache will be pulled.
See you next week!
Best regards,
Alex -
ANN: Learn how to invalidate cache and handle exceptions
http://otn.oracle.com/sample_code/tech/java/codesnippet/webcache/index.html
These set of New OracleAS Web Cache How-to's illustrates how to invalidate cached content using esi:invalidate and PL/SQL invalidation tags. Also, learn how to esi exceptions using esi:try, esi:accept, and esi:except tags.
Cheers,
-SrikanthYou may use any of the two ways:
1. Use the interface. Go to Navigator, and go to that particular page where that portlet is, and then edit it. Go to Properties/Cache. See at the very bottom of the page for how to clear cache for that page.
2. See details of the api function for cache invalidation.
wwpro_api_invalidation.execute_cache_invalidation; -
After installing Mountain Lion, I tried to scan from my Canon MX870 and received the message: "MP Navigator EX quit unexpectedly. Click Reopen to open the application again. A report will be sent to Apple," This problem happened right after I installed Mountain Lion. I then downloaded Canon's upgraded software and drivers for the MX 870 and the problem was resolved. Now one month later, the problem has returned.
rjliii wrote:
Solved problem with original Canon software. When I downloaded Canon software upgraded for OS X 10.8, I got all by Navigator Ex. Noticed that on Canon's site, the upgraded version is 3.1; my app was 2.1. Upgraded to 3.1 for Nav. Ex, and it works.
You should still use Image Capture IMHO. If it was my gear, that's what I would do. No need to worry about software upgrades. -
EA2: ORA-01427 clicking on a view in the navigator
SQLDev: 1.5.0.52.03
Java: 1.6.0_04
Oracle: 9.2.0.7.0
I'm getting the following error when I click on a view in the navigator pane:
An error was encountered performing the requested operation:
ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery returns more than one row"I'm not seeing any errors in the shell window.
After clicking on <OK> in the error dialog, the normal tabs (Columns, Data, Grants, Dependencies, Details, SQL) are displayed, but there is no content in the Columns tab.
All the other tabs seem to function normally.
Here is the DDL from the SQL tab
CREATE OR REPLACE VIEW "SUBSCRIPTIONS"
"ORDER_ID", "SUNBURST_ORDER_ID", "SIEBEL_ORDER_ID", "ACCOUNT_ID",
"COMP_ID", "SUBACCOUNT_ID", "START_DATE", "END_DATE", "PULL_DATE",
"SUBSCRIPTION_TYPE", "PRICE_CLASS", "DESCRIPTION", "SEAT_COUNT",
"ORDER_DURATION", "CALLBACK_INTERVAL", "UPDATE_DATE", "UPDATE_USERNAME",
"AFFILIATE"
AS
SELECT order_id,
sunburst_order_id,
siebel_order_id,
account_id,
comp_id,
subaccount_id,
start_date,
end_date,
pull_date,
product_id,
price_class,
product_name,
add_users,
order_duration,
callback_interval,
last_mdfy_date,
last_mdfy_emp,
affiliate
FROM csbcrossworlds.subscriptions;We have 15 views in this schema, 3 of them fail this way but the other 12 display the columns just fine. So far I am unable to detect any commonality.
Any ideas?Ok, I think I found the problem. The view in question (SUBSCRIPTIONS) is owned by 'PHILC' and it references a table named 'SUBSCRIPTIONS' owned by 'CSBCROSSWORLDS'. There are two other development schemas that also own tables named 'SUBSCRIPTIONS'.
I believe the 'Columns' tab is executing the query below. The subquery in this SQL tries to identify the primary key columns for the 'SUBSCRIPTIONS' view in my schema (PHILC):
SELECT
c.column_name,
DECODE(
data_type,
'CHAR', data_type||'('||c.data_length||')',
'VARCHAR', data_type||'('||c.data_length||')',
'VARCHAR2', data_type||'('||c.data_length||')',
'NCHAR' , data_type||'('||c.data_length||')',
'NUMBER' , DECODE(c.data_precision,null,'NUMBER', data_type||'('||c.data_precision||','||c.data_SCALE||')'),
'NVARCHAR', data_type||'('||c.data_length||')',
'NVARCHAR2', data_type||'('||c.data_length||')',
data_type) data_type,
DECODE(nullable, 'Y', 'Yes', 'No') nullable,
c.DATA_DEFAULT,
column_id,
com.comments,
(SELECT 1 FROM all_constraints, all_cons_columns
WHERE all_constraints.constraint_type = 'P' AND
all_constraints.constraint_name = all_cons_columns.constraint_name AND
all_constraints.owner = all_cons_columns.owner AND
all_cons_columns.table_name = c.table_name AND
c.column_name = all_cons_columns.column_name) Primary_Key,
c_update.insertable,
c_update.updatable,
c_update.deletable
FROM
sys.all_tab_Columns c, sys.all_col_comments com, sys.user_updatable_columns c_update
WHERE
c.owner = :OBJECT_OWNER AND
c.table_name = :OBJECT_NAME AND
c.table_name = com.table_name AND
c.owner = com.owner AND
c.column_name = com.column_name AND
c_update.column_name = com.column_name AND
c_update.table_name = com.table_name
;Extracting the subquery into this:
SELECT
all_constraints.owner,
all_constraints.table_name,
all_constraints.constraint_name
FROM all_constraints, all_cons_columns
WHERE
all_constraints.constraint_type = 'P' AND
all_constraints.constraint_name = all_cons_columns.constraint_name AND
all_constraints.owner = all_cons_columns.owner and
all_cons_columns.table_name = 'SUBSCRIPTIONS' and
'ORDER_ID' = all_cons_columns.column_name;I got this output:
owner table_name constraint_name
CUTOVER SUBSCRIPTIONS SUBSCRIPTIONS_PK
CROSSWORLDS SUBSCRIPTIONS SUBSCRIPTIONS_PK
CSBCROSSWORLDS SUBSCRIPTIONS SUBSCRIPTIONS_PKLooking at the DDL for the view, the row we really want is for owner 'CSBCROSSWORLDS'. Unfortunately, that means having to somehow parse the SQL text to extract the owner name...
Phil -
Navigation no longer working with
I have been working with facelets now for a bit. I am on MyFaces 1.1 with the facelet libraries from the Exadel project wizard added.
Any time I have an action with from-outcome but no from-action specified, everything works as expected. I can route to whichever view. When I add the from-action tag to my configuration, it calls my action and action listeners fine, but the requesting page is always reloaded (I never go to a new view).
I have verified my "h:commandLink" components are within my "h:form" tag. Hierarchy:
jsp:root/jsp:text/ui:composition/ui:define/h:form/table/tr/td/h:commandLinkCommand link code:
<h:commandLink value="mylink" action="#{userBean.saveCurrentUser}"/>
<t:saveState id="adminUserBean" value="#{userBean}"/>
</h:form>
...(t = tomahawk namespace)
My template is nothing more than a bunch of div tags & HTML table elements, no JSF logic really.
Relevant tags in my faces-config.xml:
<managed-bean>
<managed-bean-name>userBean</managed-bean-name>
<managed-bean-class>mypackage.UserBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/administration/*</from-view-id>
<navigation-case>
<from-outcome>edit-user</from-outcome>
<to-view-id>/administration/users/edit.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{userBean.saveCurrentUser}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/administration/users/list.jsp</to-view-id>
</navigation-case>
...Code of saveCurrentUser:
public String saveCurrentUser()
try
return "success";
catch (Exception ex)
...(logging)...
return "failed";
...The action to edit the user that contains an action listener works. (navigate from /administration/users/list.jsp to /administration/users/edit.jsp).
The action to save the user successfully saves the user from what I can see (log is clear), but the page stays at /administration/users/edit.jsp instead of going back to the list.jsp.
I am using *.jsp instead of something like *.xhtml since Excadel doesn't support anything but *.jsp at this point in time.
I cannot figure out why the "from-action" is causing the navigation to fail.
No matter what I try, I get the same results. I attempted to update my facelets libraries, but I messed up along the way and was getting incompatible classes across the jar files, so I just rolled back.
Any assistance is appreciated. Even if you don't have a solution, if you know of a way to have the view or myfaces print out the navigation rule processing to the logs, that would be good as well. I am using log4j right now as my logger.
Thanks,
AndrewOkay, got logging turned way up on all "org.apache.*" and "com.sun.*".
Here is the problem (don't know how to fix it yet:
113121 DEBUG [http-8080-Processor4] org.apache.myfaces.application.NavigationHandlerImpl - handleNavigation fromAction=null outcome=success no matching navigation-case found, staying on current ViewRootWhy the action is being executed, but afterwards it says fromAction is null, I do not know yet.
I am hoping it is possible with the facelets + myfaces integration, as it would be a lot of work for me to go away from myfaces, and I need the facelet functionality.
Maybe you are looking for
-
its is possible to back up the songs that i have on my iPod touch in iCloud or either in iTunes?
-
Only G/L accounts can be entered on the fast entry screen
We are currently upgrading our SAP environment from version 4.70 to ECC 6.0. Our users are testing their Parked Document fast entry screen entries created through F-65 and when they attempt to "view" their entry on the Fast Entry screen, after enter
-
Apple application support to run itunes
I had to reinstall my ITunes. When I did it gave me a message "Apple Application Support is required to run ITUNES. Please Help?
-
Planning Layout KP75 - Max 30 columns allowed in the layout
Hi, I am trying to create a Planning layout(Excel Upload for KP26) in Transaction Code KP75. But when i am trying to create the columns, it is giving the error message that "Max of 30 column are allowed in the planning layout". But my requriement is
-
HT5312 Hi~I forgot the answers of my security question.
Hi~I forgot the answers of my security question. What should i do, now?