Failing to take control of navigation

Hi,
Im trying to take control of the navigation. Im using MyFaces.
let me explain:
I wish to have my own piece of code to parse the request URI and control the navigation to the next JSF page.
This functionality is desired for accomplishing a permalinks scheme of some sort.
For example
The link root/yuval/yuvals_stuff should cause the following to happen:
- I parse the request with a servlet filter and know that we need to load some data for yuval.
- I use a ViewHandler to load the data (it delegates the call to some service that gets the data from the database)
- I now forward the user to a known jsf page that is bounded with the viehandler and presents yuval's stuff .
Actually, the first time i try to use the code, the navigation goes well. But right after refresh or calling the same url again I get an exception. The code and the exception are provided here:
Here is what i do inside a servlet filter (I also tried to put this code inside the faces servlet, just for testing):
<code>
FacesContext fc = FacesUtils.getFacesContext(req, res);
String action = "#{viewPollViewHandler.go2}";
javax.faces.application.Application application = fc.getApplication();
MethodBinding mb = application.createMethodBinding("#{viewPollViewHandler.go2}",null);
String outcome = (String)mb.invoke(fc, null);
String fromAction = mb.getExpressionString();
NavigationHandler navigationHandler = application.getNavigationHandler();
navigationHandler.handleNavigation(fc, fromAction, outcome);
String viewId = fc.getViewRoot().getViewId();
UIViewRoot view = fc.getApplication().getViewHandler().createView(fc, viewId);
view.setViewId(viewId);
fc.setViewRoot(view);
fc.getExternalContext().dispatch(viewId);
fc.responseComplete();
</code>
Explanation:
First we try to get the FacesContext, using the current request and response objects. Now we know what action we want to invoke on what ViewHandler, so we go ahead and make a method binding for this method through the JSF Application context. Now we invoke the method and get the outcome String from it. Till now everything seems to work ok � we get the ViewHandler's method invoked correctly and we get the proper outcome String from it.
This means the ViewHandler is now populated with our needed data, so all we have left to do is go to the presentation page that uses this ViewHandler.
We use JSF's NavigationHandler to navigate as usual, giving it a "fromAction" and an outcome. Now we want the name of the page for this navigation, so we get the view id from the FacesContext. The view id is correct and points to the next page as states in the faces-navigation.xml, so we set it as the new view root and try to "dispatch()" (which is the same as "forward()") to it.
The result seems sufficient, as we get to the next page and all the data is presented correctly (sometimes, in IE only we experienced some javascript errors that were unknown). The big problem occurs when trying to hit "REFRESH" or clicking back and then trying the original href link again. We suddenly get a NullPointerException that occurred in the "getValue()" method of JSF's getValueBinding()".
Can anyone contribute?
Thank in advance!
Yuval.

Hey all,
The following link shows how to solve the problem:
http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls#head-6c1aaf488d48f938896da962aaa4361ec3ffaf70

Similar Messages

  • Multipoint 21012 "Take control" from Dshboard failed

    GoodDay
    I have installed WindowsMultipoint2012Premium
    and I use Direct-Video-Coneted
    station.
    When I want to use Dashboard, it works
    fine, but when I want to"Take
    Control"- it appears the following error message;
    "The Take Control Failed
    action.Multipoint can not connect to
    the session "
    Same if I use the"Project":
    error messageis:
    "Project failed.Unable to connect to
    session"
    I do not use virtual machine.
    I do not use WMP 2012 virtual.
    It is installed as the operating system on
    an Intel i7 with 16 GB
    RAM. Connection using NVIDIA
    Quadro 440 (and/or Nvidia Quadro nvs 295)+ USB HUB
    + monitor and the second Config. (connection)
    is a Zero Client HP T 200.
    I reinstalled WMP 2012 several times.
    Tacke control sometimes worked
    and sometimes not. I do not know why.
    Pleasehelp me,
    What should I do?
    Thanks
    [email protected]

    Good day
      Thanks for the reply. I checked
    those mentioned by you.
    As I said, I use Monitor
    connection (Nvidia NVS 440 qadro)
    + HUB ..and  another station
    with the HP t200 Zero Client
    No results for Take Control
    I want to sent a copy from screen to
    be more specific.
    please inform me an E-mail
    address where I can send
    Thank you and I wait for your advice

  • Failed to take snapshot of one or more contents in package

    We have two main SCCM site system servers, and all of a sudden (everything was working before, no change) the applications would not distribute to the DPs.
    distmgr.log:
    Snapshot processing content with ID 16781461 ...
    The source directory \\sccm02\Packages\ doesn't exist or the SMS service cannot access it, Win32 last error = 5
    Failed to take snapshot of one or more contents in package 00239
    I tried granting Everyone full control for both Share and NTFS, and granting the site server computer account full control, still the same issue.  I could access it manually w/ the UNC path and read/write/delete all of its contents.
    If I copy the folder to another server and point it there in the Application, it distributes the content to DPs just fine.

    I tried replacing ntfs permissions on all the folders, still getting Win32 last error = 5
    I was seeing some errors in event log
    The shadow copies of volume \\?...ac2-11e4-9f6d-005056a7533c} were aborted because of an IO failure on volume \\?...ac2-11e4-9f6d-005056a7533c}.
    The system failed to flush data to the transaction log. Corruption may occur.
    Reset to device, \Device\RaidPort0, was issued.

  • Take Control of your Travel: Webcast with SAP Travel OnDemand customer UST Global

    You are invited to take control of your travel - register here to attend the SAP Travel onDemand webcast and learn how to manage your travel and expenses.
    SAP Travel onDemand: How UST Global runs SAP to manage travel expenses like never before
    Date - Wednesday | October 31, 2012
    Time - 10:00 AM Pacific Daylight Time
    Duration - 60 minutes
    Travel expenses are the second highest controllable expenses after payroll expenses. However, businesses like yours are able to take control of their business travel expenses, reduce travel expense management costs, increase travel policies, compliance, improve travel vendor discounts, maximize credit card remittance, discounts, and help get reimbursed faster for business travel with SAP Travel OnDemand.
    Come hear Corby Brendle, Practice Director of UST Global, share why they chose SAP Travel OnDemand to help reduce corporate travel expenses by 11.6% of hard cost savings and run their business like never before. With the addition of the SAP integrated GetThere Online booking tool, they recognized an additional 15% savings in total travel cost without reducing actual travel.
        Read Corby's Blog post : A Mobile Customer's Experience - Travel on the Go With SAP Travel OnDemand

    You are invited to take control of your travel - register here to attend the SAP Travel onDemand webcast and learn how to manage your travel and expenses.
    SAP Travel onDemand: How UST Global runs SAP to manage travel expenses like never before
    Date - Wednesday | October 31, 2012
    Time - 10:00 AM Pacific Daylight Time
    Duration - 60 minutes
    Travel expenses are the second highest controllable expenses after payroll expenses. However, businesses like yours are able to take control of their business travel expenses, reduce travel expense management costs, increase travel policies, compliance, improve travel vendor discounts, maximize credit card remittance, discounts, and help get reimbursed faster for business travel with SAP Travel OnDemand.
    Come hear Corby Brendle, Practice Director of UST Global, share why they chose SAP Travel OnDemand to help reduce corporate travel expenses by 11.6% of hard cost savings and run their business like never before. With the addition of the SAP integrated GetThere Online booking tool, they recognized an additional 15% savings in total travel cost without reducing actual travel.
        Read Corby's Blog post : A Mobile Customer's Experience - Travel on the Go With SAP Travel OnDemand

  • How can i take control of an ipad using my apple ID..??

    I have bought a used ipad mini 2 [wifi + retina], & while trying to sync the apps from my PC using my apple ID, the ipad keeps asking for the authorization of the PC even though the authorization was successful using my ID. then i authorized the PC with the previous users apple ID, and the syncing was successful..! however i want to use my apple ID to run the ipad, & take control of it. can anyone advise how can i get rid of the previous ID, & use my own one..?? Thanks!

    The Seller should have performed these Steps Before you took possion of the Device.
    What to do before selling or giving away your iPhone, iPad, or iPod touch
    NOTE:  You may need to contact the Seller
    salm4n wrote:
    I have bought a used ipad mini 2
    i want to use my apple ID to run the ipad, & take control of it
    Restore the Device as New and Set it up using your Apple ID.
    See  Erase your device  Here  >  http://support.apple.com/kb/HT4137

  • Yosemite: What the *** is Atos and why does it want to take control?

    "Atos wants to take control.." dialogue box comes up on every boot-up.  New phenomenon since upgrading to Yosemite.  Nothing can be done until I fulfill this request by putting in my AppleID password.
    -What is Atos?
    -Why is this happening?
    -Is this an Apple thing or is there a ghost in the machine?
    -Why didn't Apple do a compatibility test for user/s before allowing the upgrade?
    -How do I get rid of this ridiculous hassle?
    Would be nice to have an official Apple response.  Mostly I've seen other folks who want me to send diagnostics, which sounds sketchy.
    PS:  I don't tacitly use Bento, never heard of it until I had this problem and looked over the forums - to no avail, don't use Filemaker.  I do have Office 2011 installed.
    Help, this *****. 
    MacMini (2013)

    It's likely that one of your login items is causing the problem. Select the Login Items tab in the Users & Groups pane of System Preferences. Delete any items that you don't recognize. If you're not sure which ones to delete, double-click each to test it.

  • What would be the simplest way to view and take control over the internet?

    Hi All:
    Can some one tell me what would be the best and simplest way to connect from my laptop to another laptop through the internet?
    I have DYNdns running on the second laptop and have a host name assigned to that system for it to update the IP since the system uses different internet connections. The services that I would like to be able to have are the viewing and controlling of the system. I've read some where in this NG that if I have a copy of ARD admin. installed on that system also, it would be one way to do it... can some one verify this and please let me know if there are any specific settings I need to have on either one of the systems.
    I can connect to the second laptop while in my home network with no problem and perform all tasks. when trying to connect through the internet.. the system shows offline .
    Both systems are identical in hardware an software, Intel 2.16, 2G's RAM, OS X ver 10.5.2 all up to date and ARD 3.2
    Yes, I'm new to ARD and yes I'm searching the NG and the net. but I figure it doesn't hurt to ask since time is limited.
    All help greatly appreciated ..
    TIA
    Oscar A.

    To be able to connect to a workstation from outside it's network, the ports that ARD uses must be open on both ends of the connection. ARD uses ports 3283 and 5900 so those must be open.
    If your workstations get their addresses from an NAT device rather than being "real", the ports also need to be forwarded in the router to the workstation's internal IP address. ARD uses port 3283 for the reporting and updating function, so if your Macs are getting their IP addresses through NAT, since you can only forward a port to a single workstation, you can only get reports, push package/files to etc. for a single workstation.
    ARD uses the VNC protocol for observation and control, though, and there are a range of IP addresses for that protocol, starting with 5900. ARD uses 5900 by default, so that port would be forwarded to the first workstation. You would, I believe, need to install VNC servers on the systems (since the ARD client cannot listen on any port other than 5900 while VNC servers can be set for other ports such as 5901, 5902, etc. You would then forward 5901 to the second workstation (and on to 5902, 5903, etc.). You can then use the following information:
    Remote Desktop 2: How to specify a port number for a VNC client
    to connect.
    The only other options are: 1) to run the ARD administrator on a workstation on the network, and then take control of that system from outside, either via VNC or another copy of ARD, or 2) set up a virtual private network (VPN) so that when you connect from outside, your admin system is officially part of the local network.
    Hope this helps.

  • Take Control of Workflow with Workflow Analyzer!  See Note 1369938.1

    Take Control of Workflow with Workflow Analyzer!  Immediate Analysis and Output of your EBS Workflow Environment.          
    The EBS Workflow Analyzer is a script that reviews the current Workflow Footprint, analyzes the configurations, environment, providing feedback, and recommendations on Best Practices and areas of concern.          
    Video - Watch a 9-minute overview video (9:00)          
    Go to [Doc 1369938.1|https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1369938.1] for more details and Script Download.          
    Proactive Benefits:          
    Immediate Analysis and Output of Workflow Environment          
                   Identifies Aged Records          
                   Identifies Workflow Errors & Volumes          
                   Identifies looping Workflow items and stuck activities          
                   Identifies Workflow System Setup and configurations          
                   Identifies and Recommends Workflow Best Practices          
    Easy To Add Tool for regular Workflow Maintenance          
    Execute Analysis anytime to compare trending from past outputs          
    [Please send any items to Feedback.|https://communities.oracle.com/portal/server.pt?open=514&objID=224&mode=2&threadid=297966]
    Edited by: user715498 on Feb 14, 2012 11:09 AM
    Edited by: user715498 on Feb 14, 2012 11:12 AM

    14. Once my photos look the way I want, I then export them to JPEG. I have set up a Photoshop droplet for Lightroom that will then do all my sharpening after export.
    That's it! I know it sounds like a lot of steps, but once you've done it a couple of times it goes by really quick. I'm really loving most things about Lightroom in terms of its cataloging and export options. But the image quality of the Lightroom raw conversions just isn't there yet. I've found by integrating both Capture NX and Lightroom I can get top quality results while still gaining advantage of Lightroom's many nice features. It took me a few days of exploration and experimentation to nail down the optimal workflow for my needs. Hopefully this will help some others out and maybe give them some ideas of their own toward a better workflow.
    Please feel free to share your thoughts or own experience on all of this.
    Thanks to Tony Long for his suggestion in this thread, which caused me to go on a search for the optimal Lightroom/Capture workflow: http://www.adobeforums.com/cgi-bin/webx?7@@.3bc719df/3
    If you are interested in taking a look at the final output of the workflow listed above, please look here: http://photos.unsavory.com/p634883589
    Cheers everyone!
    -©aine

  • Terminal Server Session Management: why do we need a rdp session to take control of a terminal session?

    Hi all,
    As title, I have this question: why do we need a rdp session to take remote control of a terminal server session?
    I copied tsadmin and related file to a windows 8.1 pc and I'm able to see for every terminal server the list of users logged in, but the option "take control" is greyed out... why? is not possible to avoid this block?
    Thanks in advance
    Davide

    Hello, Davide_ita.
    Also tried to use RDSM to "Remote Control" user's sessions, but in this thread
    Remote Control
    with Remote Desktop Services Manager - error Access is denied (Windows Server 2012 R2)
    I get the recommendation to use RDP or Remote Assistance.
    The quote of
    TP []:
    Hi,
    You cannot remote control a session on a 2012 R2 RDSH server using Remote Desktop Services Manager.  You need to use the RDP 8.1 mstsc.exe or the RDS gui in Server Manager on 2012 R2.  The command you would use with the RDP 8.1 client would be
    this:
    mstsc /shadow:<sessionid> /control
    -TP

  • Can the sequence pass/fail status be controlled in Test Stand?

    I have a sequence that contains a DoWhile loop. Within the loop are 5 or 6 steps that are executed. If the result of those steps is a fail the loop runs again until it passes or meets its allowable number of iterations. My problem is that if an iteration fails and then passes the result for the sequence is failed. Can the pass/fail status be controlled via an expression etc? I know I can create a subsequence and loop in it with the properties. I am just curious to know if there is a way it can be done like I have explained.
    Thanks in advance for any help,
    Troy

    Troy,
    You might be able to use the RunState.ThisContext.SequenceFailed property.  Set this equal to False after your loop runs, and the sequence should report as if it passed.
    John B.
    Applications Engineer
    National Instruments

  • Somehow a third party tried to remotely take control of my mouse!

    I have an iMac (10.6.8). Today someone tried to take control of my mouse to open Finder, a youtube downloader program, etc. I caught this happening both times and fought for control of the mouse until I ultimately had to put the iMac to sleep to prevent them from getting into anything personal, etc.
    Following the first round, I changed my password to my imac and macbook, made sure the firewall was set up, disabled making either discoverable via bluetooth, and somehow it happened AGAIN.  For a final test, to see if this happens a third time, I disabled the remote control infrared receiver.
    Can someone tell me what the BLEEP is going on (outside of the fact that someone has managed to gain remotely access to my computer) and what I can do to stop it.  I am in teh process of compressing my files and moving them off the imac and doing a full system reinstall to set it back to factory settings when i first got it and see if that does the trick.  I am very careful about what I download so I dont think it was anything like that (mainly because I use my iphone for email)
    Ideas? Thoughts? Suggestions?

    Is Screen Sharing enabled in System Preferences > Sharing?

  • Is there a way for Labview to take control of a file that is already in use

    Is there a way in LabView to programatically take control of a file in use by another process?  I wish to write data to files that may be opened by another process, this data is time sensitive and acquired continuously so having my process wait until the file is available is not feasible.
    There should not be any other software accessing these files but sometimes windows is looking at them for some reason and I'm not sure how to make windows let go of them.  This does not accur often but it is annoying.

    Axehandler wrote:
    Is there a way to find out which program/service might be opening these files?
    Yes, use handle or process explorer from sysinternals. (see also).
    How is your labVIEW program structured? Could it be that your LabVIEW program itself holds on to the file from e.g. a previous file IO operation? Make sure references don't become invalid (e.g. via a "use default if unwired output tunnel) which would prevent the file from getting closed properly for example. Your program should open the file once at the start of the program and keep it open for the duration of the run. This way you should not have any intermittent problems accessing it.
    LabVIEW Champion . Do more with less code and in less time .

  • Take control of Apple Mac over broadband ?

    Is it possible to 'take control' of another mac over broadband ?
    This would be useful so I could remotely do stuff for my folks ?
    Is it possible to do this out of the box with a mac or do I need 3rd party software ?

    Hi, Mark.
    You wrote: "1. Is it possible to 'take control' of another mac over broadband ?
    2. This would be useful so I could remotely do stuff for my folks ?
    3. Is it possible to do this out of the box with a mac or do I need 3rd party software ?"
    [Numbers added for reference]1. Yes.
    2. Yes.
    3. You want to use a Virtual Network Computing (VNC) solution, such as those listed in this VersionTracker search.
    Technically, all Macs ship with the client for Apple Remote Desktop (ARD), but you'd have to install the server version of ARD ($$$) on your Mac to control the remote Mac.
    As Kappy suggested, when looking for new applications, I recommend searching MacUpdate or Version Tracker. The user-submitted reviews accompanying the listings can be helpful in sorting the wheat from the chaff.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • Controlling the Navigation Pane from Topic links

    I've followed Rick Stone's instructions (in his Skinny on Skins tips file) for controlling the navigation pane from topic links, but I've included the reference to whtbar.js in my Master Page (as I want it to be available to all my topics) instead of in a single topic in my WebHelp output. It works fine, however, I'm experiencing a page flicker whenever I click a link which opens the TOC, Index, Glossary, etc. Does anyone know if this can be avoided?
    Thanks
    Jonathan

    Hi Willam
    No your method still works fine thanks (without any page flicker). However, it only opens and closes the navigation pane. What I've been playing around with is the idea of hiding the standard WebHelp toolbar by setting its height to zero in the .SKN and then creating my own toolbar in a Master Page that controls the navigation pane, i.e. with Home, Contents, Index, Search, and Glossary links. That way I have more control over how the toolbar looks and, for example, I can use some script to power drop-down menus, etc. I've been looking at using the Bootstrap framework.
    I seems to work okay, apart form the annoying page flicker when I use the links in my custom toolbar.
    Oh well, maybe I'm trying to push the boundaries a little too far?!
    Thanks anyway,
    Jonathan

  • CharacterFormat fails to take values

    I'm finding that CharacterFormat (soon ITextLayoutFormat)
    fails to take a value of "regular" for fontStyle. This code
    illustrates the case (attached)
    On the first run the traces are as expected, setting the text
    to italic:
    "existing fontWeight: normal"
    "existing fontStyle: regular"
    "new fontStyle: italic"
    "should be: italic"
    But when I click my italic button again it fails to reset the
    text to regular because the "italic" CharacterFormat will not take
    a value of FontStyle.REGULAR when using a conditional assignment
    (ternary or if-else), the final trace shows the outcome of this
    conditional assignment, it just never actually gets assigned (it
    remains null). So the traces for when the text is already italic
    are:
    "existing fontWeight: normal"
    "existing fontStyle: italic"
    "new fontStyle: null"
    "should be: regular"
    I'm not using bold here so there's nothing running through
    the BOLD_ITALIC stuff.

    I guess this is where I should:
    a) read the docs in minute detail
    b) not rely on naming conventions when string assignment is
    involved
    The problem was fontStyle does not take a string found in
    FontStyle, it takes a string in FontPosture, so "luckily"
    FontStyle.ITALIC married up with the string for FontPosture.ITALIC,
    but of course FontStyle.REGULAR was not suitable in place of the
    FontPosture.NORMAL string.
    It's a shame we don't have real enums because this naming
    convention really threw me where other properties like fontWeight
    do use a class that matches name-wise (FontWeight). I imagine this
    won't be such a problem when the ASDoc hints the class types
    instead of just String.

Maybe you are looking for

  • Why are my PSD's placed in Indesign not printing as accurate as Jpegs?

    Are there any common do's and donts when placing PSD's in indesign? I know its an extremely broad question. Ill explain my process... Take Raw photo - use adjustment layers to modify image -  save as PSD - place saved image in indesign - scale to app

  • Iphone with bumper case and connector cable

    I recently purchased the iPhone 4 and gave my wife my 3G. I had a couple of cables that I use on the 3G for my car and at the desk. I attempted today to charge the iPhone 4 while on a trip only find that the cables that I have for the 3G will not fit

  • A slightly different backlight question

    I've heard some other people have had a problem with the backlight of their iBooks turning off and then not coming back. I've had the same problem but it tends to happen when I adjust the screen. I'll push it back slightly and it will turn off. If I

  • Can I add skype contact as skype to go number

    I want to call a local number and be connected to my skype friend? Is this possible?

  • My LR 5.4 Crop Tool isnt Working correctly?

    I just bought a new Macbook Pro 15" fully loaded with the 27" Monitor, I am running Mac 10.9.2 Mavericks and just updated to LR 5.4. It is the second time I have used LR on it since I bought it. When I went to crop a photo from 4X6 to 8X10, it is not