Best way to execute different jspx pages from a parameterized URL

JDeveloper 10.1.3.3.0
I'm looking for an elegant way for ADF to determine which page to go, based on a parameterized URL.
I currently have a way of doing it, it's not what I want, but perhaps some other ideas.
For example:
http://localhost/MyDemo-ViewController-context-root/faces/decisionPage.jspx?vehicleType=car
http://localhost/MyDemo-ViewController-context-root/faces/decisionPage.jspx?vehicleType=boat
Given vehicleType, I need decisionPage.jspx to go to car.jspx or boat.jspx immediately
Currently, I had to do this:
1. Expose a method in the application module setVehicleType()
2. decisionPage.jspx has a binding for a methodAction to call setVehicleType() and grab the vehicle type using ${param.vehicleType}. Store the vehicle type in the application module when this page is loaded.
3. In decisionPage.jspx, create a commandButton into the page
4. When the user clicks on this commandButton, it will be bound to a UI bean.
5. This UI bean will then get the vehicleType from the application module method getVehicleType()
I don't want the client to go directly to car.jspx or boat.jspx. I also don't want this extra step of the client clicking on a button to go to the proper page.
Any suggestions would be great!

Hi user,
You could create a jsp page (or a servlet) which acts as the starting point of your web application. (decisionPage.jspx in your case). In the jsp, grab the url parameters using a scriptlet, put them on the sessionScope and redirect to the correct page.
By putting the value on sessionScope, you have access to the parameters in your whole application during the session. You can use it to execute a query with bind variables.
Hope I made it a bit clear.
Regards,
Koen Verhulst

Similar Messages

  • Dw, css, and a template, what is the best way to create a 20 page website with a different header in each page?

    dw, css, and a template, what is the best way to create a 20
    page website with different header content on each page? i am
    trying to insert a specific image and background color for each
    header on every page. what is the easiest or best way to do this?
    thanks, bryan

    "mediastream13" <[email protected]> wrote in
    message
    news:f47bes$9om$[email protected]..
    > ok, murray, here is the site.
    http://www.helphotline.org
    > in I.E. 6 i can't see the background color behind the
    header images,
    I'm seeing a hot pink background (which is my browser default
    - so that I do
    remember to declare a background color). You need to add:
    body { background-color: white;} to your stylesheet, or into
    the imbedded
    styles on your page.
    In Firefox, the very top black section, #headertop is hidden
    behind the
    header image.
    > background of the date/time isn't stretching the full
    length of the
    > screen, and
    > the margins aren't working in the main content area. how
    can i put a
    > background
    > color behind the header images?
    I can see the header image stretching right across the page..
    so not sure
    what color is missing there.
    > is there anyway to download i.e. six on my computer if i
    already have
    > i.e.7? i
    > just want to be able to preview the site before i upload
    the changes. it
    > seems
    > everything works in i.e. 7.
    Yes, I used this and it works really well.
    http://tredosoft.com/Multiple_IE
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au

  • What is the best way to call a pageflow action from JavaScript?

    What is the best way to call a pageflow action from JavaScript?
    Thanks,
    John

    John,
    How would I do this from a grid??? Unfortunately there are no JavaScript attributes
    on any of the grid tags that I can see.
    Thanks,
    John
    "John H" <[email protected]> wrote:
    >
    Thanks John!
    "John Rohrlich" <[email protected]> wrote:
    John,
    If you want to put up a confirm dialog before calling an action from
    an
    anchor it is done as follows.
    Here is an example from code of mine that deletes a customer order,if
    the
    user confirms the delete. I pass the order id as a parameter.
    - john
    Here is the JavaScript -
    function confirmDelete() {
    if(confirm('Continue with order delete?'))
    return true;
    else
    return false;
    Here is a sample anchor tag -
    <netui:anchor action="requestToDeleteOrder" onClick="return
    confirmDelete(); return false;">
    Delete
    <netui:parameter name="orderId" value="{container.item.orderId}"/>
    </netui:anchor>
    "John H" <[email protected]> wrote in message
    news:402138f5$[email protected]..
    Thanks for the replies. I figured it was going to require buildingmy own
    url
    to call the action. I had hoped there was an easier way to do it.Rich,
    the
    reason I want to do this is because I want to call the JavaScript
    function
    confirm()
    when a user clicks on a link (in a repeater/grid) to drop a record,I only
    want
    to call the drop action if the user confirms the drop. Maybe thereis a
    better
    way to do what I am trying to do??? I really appreciate any help
    you
    guys
    can
    give me on this, I am pretty new to this sort of stuff.
    Thanks,
    John
    "Rich Kucera" <[email protected]> wrote:
    "John H" <[email protected]> wrote:
    What is the best way to call a pageflow action from JavaScript?
    Thanks,
    JohnTry figuring out the URL to the pageflow action, create a hidden
    form
    in the
    page, then use JS to submit the form. Why would you want to though,
    isn't
    the server going to want to send you to the next page?

  • Best way to create a conact list from the user profile properties

    We have a customer looking for a phone book utility, starting with a table showing main user information and with some search options. We would like o base it on the user profile properties and not to create an indipendent studion record browser porlet.
    What is best way to create a conact list from the user profile properties ?

    I did something like this using search.  It can get messy, so you need to take care with it.
    * Identify the properties you want to make accessible to search (ex: name, etc.)
            - add them to the user property map
            - flag them as searchable
    * I broke down and used the native server API.  I'd still suggest this approach.
    * Write some simple code to do vcard export if you like
    (my code is all in vb.net)
    I really believe this is the &#034;right&#034; approach, but honestly, this was a bit painful and has been
    messy for us given some other business issues.  (to my chagrin we have users with 2-letter last
    names...)
    I have code you're welcome to poke at, but it's more or less slapped together and has various
    different search methods commented out so you can see how I tinkered w/ the remote vs. server
    API.
    If you'd like it mail me at [email protected] and I'll send you a zipped copy w/ a
    readme.  I hope it may be useful to you as both a starting reference.

  • What is the best way to transfer my iphoto library from old imac to new imac. both have iphoto 9.2.1

    What is the best way to transfer my iphoto library from current imac to my new imac.  Both imacs have iphoto 9.2.1
    os on old imac is 10.6.8.   os on new imac is 10.7.2.   I want the albums  and events to stay intact.  I have 4500 photos and 79 videos. 14.9 gb. looking for some advice here. Thanks so much.

    Connect the two Macs together (network, firewire target mode, etc) and drag the iPhoto library intact as a single entity from the old Mac to the pictures folder of the new Mac - launch iPhoto on the new mac and it will open the library and convert it as needed and you will be ready move forward.
    LN

  • Iphone 4s coming friday, what is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across.

    What is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across. If I do a restore as I have when previously from one iphone to another it has shown (in settings, usage) the cumulative usage from previous phones so all the hours of calls on all previous iphones will be displayed even though its brand new. Anyone know how I can get my notes (from standard iphone notes app) to my new iphone 4s without restoring from previous iphone 4. Thanks for any help offered.

    First, if you haven't updated to iTunes 10.5, please update now as you will need it for the iPhone 4S and iOS 5.
    Once you're done installing iTunes 10.5, open it. Connect your iPhone to iTunes using the USB cable. Once your iPhone pops up right click on it. For example: an iPhone will appear and it will say "Ryan's iPhone."
    Right click on it and select "Backup" from the dropdown menu. It will start backing up. This should backup your notes.
    Please tell me if you have any problems with backing up.
    Once you backup and get your iPhone 4S, you must follow these steps. If you don't follow these steps, you will not be able to get your notes on your new iPhone 4S.
    Open up iTunes again then right click on your device (iPhone 4S). Once you do you will see a dropdown menu. It will say "Restore from Backup..." Select this and it'll ask for a backup, select it from the dropdown menu. For example "Ryan's iPhone - October 12, 2011." Pick that and it will restore to your backup. Do this when you get your iPhone 4S so you will not lose anything. Even though you're restoring, you're getting back, since you're getting the previous settings, notes, contacts, mail and other settings from your old iPhone. You'll still have Siri though! So, restore when you first get it. Also frequently backup your device, as it will be worth it. You can restore from a backup if something goes wrong or save your data for a future update.
    Once you do that, you should have your notes on your new iPhone 4S and iOS 5.
    Please tell me if you need any help.
    I hoped I answered your questions and solved your problem!

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • What's the best way to create a login page in muse?

    Hi.
    Busy exploring muse I came across another problem:
    What’s the best way to create a login page in muse?
    I want to create 1 page on a site with access for people with login details only.
    Sorry for beeing a newbie
    Dutch greets
    Toin Corten

    Hi Toin,
    Never need to apologize for being a newbie...we all were at one point or another. 
    I am going to move this question to the main Muse forum where you'll have a much better chance of getting a response.  This particular forum is for questions around our Muse getting started project.
    You may also want to check this thread out: http://forums.adobe.com/thread/1004543.
    Thank you,
    Ed Sullivan

  • Can you suggest a best way to store and read arabic from oracle database?

    Hi ,
    can you suggest a best way to store and read arabic from oracle database?
    My oracle database is Oracle Database 10g Release 10.1.0.5.0 - 64bit Production on unix HP-UX ia64.
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CHARACTERSET WE8ISO8859P1
    I have presently stored the data in nvarchar2 field. But i am not able to display it correctly.

    Using the national characterset should work but there are other factors that you have to consider when working with NCHAR/NVARCHAR2/NCLOB.
    If possible, changing the characterset is usually the best solution if it's a possiblity for you.
    For more info:
    Dear Gurus: Can u pls explain the difference between VARCHAR2 & NVARCHAR2??

  • What is the best way to cancel the related update from aboutToUpdate ?

    What is the best way to cancel the related update from DescriptorEventAdapter.aboutToUpdate ?
    Anyway to manipulate descriptorEvent.getQuery() so that it doesn't generate anything?
    In our specific case, TopLink 11 - EclipseLink 2.0.2 generates useless update, so we want to silence them to avoid DB round trip.

    Mustafa,
    Thats the way to kill the Job, But We are not Authorized for SM50.
    At present we will raise a request to the Basis to do that. Speaking from user point of view is there any better way to handle it.
    Tony

  • Best way to transfer a 10g database from HP9000 to Linux Redhat?

    What is the best way to transfer a 10g databasse from HP9000 to Linux Redhat?

    Hi Bill,
    What is the best way to transfer a 10g databasse from HP9000 to Linux Redhat?Define "best"? There are many choices, each with their own benefits . . .
    Fastest?
    If you are on an SMP server, parallel CTAS over a databaee link can move large amnunts of tables, fast:
    http://www.dba-oracle.com/t_create_table_select_ctas.htm
    I've done 100 gig per hours . . .
    Easiest?
    If you are a beginner, data pump is good, and I have siome tips on doing it quickly:
    http://www.dba-oracle.com/oracle_tips_load_speed.htm
    Also,, make sure to check the Linux kernel settings. I query http://www.tpc.org and search for the server type . . .
    The full disclosure reports show optimal kernel settings.
    Finally, don't forget to set direct I/O in Linux:
    http://www.dba-oracle.com/t_linux_disk_i_o.htm
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference" http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

  • Best way to get and pass filename from a DB Table to SQL Loader?

    What is the best way to get the data filename from an Oracle Table to pass it to SQL Loader?

    I am looking for a sompler way.
    I only want to instruct SQL Loader/Control file to get the filename from a table. Do we need external tables for this? Can I pass a funciton/SQL as parameter to filename?
    Thanks

  • What's the best way to import my itune library from iMac to macbook air?

    what's the best way to import my itunes library from my imac to my macbook air?

    Use Migration Assistant to copy your entire user folder from old computer to new computer.
    -> http://support.apple.com/kb/HT4889

  • Using the new iPad, what's the best way to watch video files (away from home) which are stored on a NAS (WD My Book Live)? Any help would be appreciated!

    Using the new iPad, what’s the best way to watch video files (away from home) which are stored on a NAS (WD My Book Live)?  Any help would be appreciated!

    Before you go, move the files to I tunes and sync them down.  There is no viable way to stream from your nas drive to the pad.

  • Best way to move/copy iTunes library from PC to Mac

    Hi,
    What's the best way to get my iTunes library from my PC to my new Mac?
    The two computers are both networked.
    Thanks.

    Greetings David:
    I have just completed this task... It took many attempts to get the two computers talking (windows xp pro, and new Imac g5). When I finally got them to talk to each other, the file transfer was brutallly slow. I used the ether-net cable to connect the two machines directly. The system was not very stable and crashed continuously. I would get one or two songs transferred and then the mac would lock up and require a restart (command option esc), via force quit of finder. Relaunch would not work, and I had to shut the machine off with the on off switch each time.
    Today I finally burned the tunes on 2 CDs and simply dumped them into the music file. The PC burns a full ( ~ 800 megs) in about 10 minutes. Mac can down load the CD in ~ 6 minutes. This adds up to less than 20 minutes. Using the direct connection (indicated 100 Mbts/sec on the PC) the process was pathetically slow (hours restarting and horsing around).
    One of my goals was to get the machines talking to each other, having accomplished this, it think it is not a worthwhile effort.
    Best of luck to you,
    Mike

Maybe you are looking for