Dynamic menus from database with URL parameters

Hello!
I'm trying to build a set of dynamic menus that would be based on data from the database. I need to have a menu item for every database row, and all the items point to the same page, but each with its own parameter in the item's URL. The URLs in the menus would look like ".../form.jspx?recordID=xx", where xx is read from the database.
Right now, I can display the menu, everything works fine, but the problem is in the PageMap section of Databindings.cpx - ADF needs to have every URL mapped to a page definition. So even if I have "form.jspx" mapped to "form_PageDef", I have to explicitly tell the server that "form.jspx?recordID=xx" is also mapped to "form_PageDef" by putting this into Databindings.cpx.
Of course, if I have to manually enter page mappings for all the record IDs that appear in the menu, it's not really a "dynamic menu" anymore. Does anyone know of a way to avoid this problem?
Can I somehow change Databindings.cpx programmatically? Can I change page mappings dynamically? Help, please? I'm very grateful for any and all info.

Hi Vex,
I'm not sure whether you'll find a solution as "Dynamic" as you are describing with dynamic entries via the DataBindings.cpx. Menu's work quite differently in JSF (See section 19.2 on dynamic menus in the developers guide). You may need to get the solution halfway.
1) Drive the menu contents / structure from the database via some backing bean. The sample application that comes with JDeveloper has a fixed menu structure via exposed beans. You'd have to adapt this to be driven off of a managed bean. This takes a bit of work, but it can be accomplished. You'll need to loop through your database records via the Iterator to build the content of your menuModel
2) Let JDeveloper create the entries in DataBindings.cpx to map the pageDef.xml file to each jspx file. (Manual). The pageDef.xml file gets interpreted during the initContext phase of the ADF Lifecycle, and the DataBindings.cpx tells this phase where to look to create the runtime version of the pageDef.xml (See developer's guide 13.2.3).
3) Manually setup your faces-config with the right outcomes.
4) have the database return the outcomes and viewIds, among other values.
5) do the appropriate thing in your JSPX to make use of this menu module backing bean.
In this case, you'll control the content and structure of the menu via the DB. However, you'd have to make sure the data in your DB matches the definitions of the jspx viewid's and outcomes.
However, there is a quite a bit of work involved to do this. I.e. db design, backing bean for menu module, disciplined co-ordination between DB and JSF, etc...
I hope this helps.
Kenton

Similar Messages

  • Start IC WebClient with URL Parameters

    Hi,
    we are currently implementing IC WebClient 5.0. One of the customer needs is it, to start the IC WebClient with a service order ID, so that the order is displayed immediately without searching and confirming an account. Is it possible to start the IC WebClient with URL parameters to solve that issue?
    Thank you for you help in advance!
    Marcus Walena

    Hallo Marcus,
    This is currently not possible.
    However, you don't need to always confirm the customer. You can use the agent inbox to do the search and navigate directly to the service order. However, if you want to do any processing after that, then you will need to identify the customer. The other option is to implement this yourself.
    BTW: It is possible to navigate via a URL to the service order directly using PC UI.
    Regards,
    Shiv

  • Still Can't Figure Out Returning to Page with URL Parameters

    Hi,
    I am trying to figuring out how after submitting a form to
    return to a previous webpage with URL parameters in it.
    Any ideas?
    Thanks,
    Craig

    I am using dreamweaver and coldfusion. I have been searching
    everywhere for the answer so if you can shed some light on this
    that would be great.
    Thanks,
    Craig

  • IMPORT from database with dynamic parameter list

    Hi Gurus,
    Iu2019m having problems during import from a cluster table.
    I wanu2019t to do an import with a dynamic parameter list, but I cannot get it to work.
    Sample code ********
    DATA: BEGIN OF st_key,
    report LIKE rsvar-report,
    variant LIKE rsvar-variant,
    END OF st_key.
    DATA dirtab1 LIKE cdir OCCURS 10 WITH HEADER LINE.
    DATA dirtab2 LIKE cdir OCCURS 10 WITH HEADER LINE.
    st_key-report = 'ZPRG'.
    st_key-variant = 'VAR1'.
    IMPORT DIRECTORY INTO dirtab1 FROM DATABASE vari(vb) ID st_key.
    IMPORT DIRECTORY INTO dirtab2 FROM DATABASE vari(va) ID st_key.
    DATA: tmp_var(100)   TYPE c.
    This works - P_BWTAR is a parameter from the selection screen registred in VARI
    I'm getting the content of the field in tmp_var
    IMPORT p_bwtar TO tmp_var FROM DATABASE vari(va) ID st_key.
    This does not work - the parameter P_BWTAR is in the dirtab2-name
    I'm not getting the content
    LOOP AT dirtab2.
        IMPORT dirtab2-name FROM DATABASE vari(va) ID st_key.
      ENDIF.
    ENDLOOP.
    I have tried the syntax IMPORT (dirtab2-name) ........
    but this fails the syntax check.
    Please - if you have any suggestions  :o)
    Best Regards,
    Vibeke

    Dear Vibeke,
    Could you please explain us how you solved the problem because you have the same issue ?
    thanks a lot
    KR
    véronique

  • Capturing a dynamic swf with url parameters?

    Hi,
    I'm wondering if it's possible for users to capture an swf
    with URL variables?
    for example ->
    www.somesite.com/foo.swf?param1="value"&param2=value"
    normal swf rippers will catch only the base "naked" swf, but
    is there a way to fully capture the whole flash object after it has
    rendered the parameters?
    (for example, if it's an ad, the full ad with all the
    elements will be captured)
    this can help me to quickly generate demo stand-alone
    instances for some apps i'm building, instead of compiling them
    separately

    oops...sorry for double posting..

  • Help with dynamic checkbox from database results

    Hi,
    I am creating some dynamic checkboxes from the results of a database read to sqlite.  I am able to get the data and the correct number of checkboxes is being created but I'm having a problem populating the labels for the checkboxes.  Here is the section of code that gets the results from the database and creates the checkboxes.
                    var result:Array = stmt.getResult().data;
                    for each( var obj:Object in result )
                        var cb:CheckBox = new CheckBox();
                        cb.label = obj.toString();
                        cb.setStyle("color", 0x00593B);
                        cb.setStyle("symbolColor", 0x000000);
                        container.contentGroup.addElement(cb);                   
    Neil

    This was answered on another forum for me.
    The line cb.label = obj.toString();
    needed to be changed to the data.
    cb.label=obj.myDatabaseFieldName;
    myDatabaseFieldName would be whatever column you are pulling the data in from and should be the actual name in the table.
    Neil

  • Help with URL Parameters and HTML DataSet please.

    Hello everybody!
    Looking at the example page: "Using URL Parameters to Control Data Regions", towards the bottom it gives an example of "Set by Product Name", from an XML DataSet using the following sample code:
        //Data set for the second example. var ds2 = new Spry.Data.XMLDataSet("../../demos/products/products.xml", "products/product");    //If the URL parameter 'product' has a value, set the XPath that includes a filter and then load the data. if (params.product){    ds2.setXPath("products/product[name = '"+params.product+"']");    ds2.loadData(); }
    Can anyone please explain how to amend this to work with a HTML Dataset rather than XML?
    The first example on the page (Set by RowID) works unchanged for the HTML DataSet, but I don't know what I should replace the 'setXPath' line with.
    I see this has been asked before, but I'm afraid I can't find any answer that works (or, more often, that I can understand properly!)
    Grateful for any suggestions.
    Len

    Wow! Thanks Ben.
    I hadn't thought about using Stacked Containers.
    I'll test this out tonight and let you know how I get on.
    Cheers,
    Len
    A few days later and at last I've been able to test your suggestions.
    I think I must be doing something wrong as the links and content don't work at all:
    http://www.myosanthe-bernhard-huber.com/html/stack1.php
    I know that the stacked containers do work (http://www.myosanthe-bernhard-huber.com/html/stack0.php), so I guess there are some errors in the coding somewhere.
    Would you mind reviewing, please?
    The important thing for me (in this case, anyway) is to get the called page's content using its 'Ref', and I'm not sure what benefit there is in using stacked containers as opposed to master-detail containers.
    The master-detail method works reasonably well for me at
    http://www.myosanthe-bernhard-huber.com/html/fotoalbum.php and sub-pages.
    Perhaps I am betraying my lack of knowledge, but as I said in my original post, I think that I just need the HTMLDataSet equivalent to:
        //Data set for the second example.
    var ds2 = new Spry.Data.XMLDataSet("../../demos/products/products.xml", "products/product");
       //If the URL parameter 'product' has a value, set the XPath that includes a filter and then load the data.
    if (params.product){
       ds2.setXPath("products/product[name = '"+params.product+"']");
       ds2.loadData();
    which as you can see uses an XMLDataSet, but does exactly what I need.
    (see http://labs.adobe.com/technologies/spry/samples/data_region/DataWithURLParams.html)
    Thanks again for your help, Ben.
    Len
    Message was updated by: ec1lennie

  • Mapping Issue(UDF) in HTTP-RFC scenario with URL parameters - Urgent

    Hi All,
    I am working out an HTTP-RFC scenarion wherein there is no xml data to be pushed.
    The data will be coming in the url parameters.
    Also we'll exposing our url(created by SAP PI) to 3rd party system to push data in terms of url parameters.
    So how do I do mapping? Also what UDF code will contain?
    Since I'm working on this kind of scenario for the first time, I need every help from you guys.
    Thanks & Regards,
    Amit Patil

    Hi All,
    I have worked on RFC to HTTP scenario wherein URL have to be passed. I used UDF in d same.
    But now the case is reverse, how shall I move ahead with what source message type(in the mapping) and how to do mapping.
    What kind of UDF will be useful here?
    I am completely blank in this kind of scenario where 3rd party system is going to pass four parameters on URL link craeted by us since its an HTTP to RFC scenario.
    Please guys help me! Give me some inputs.
    Thanks,
    Amit Patil

  • How to work with URL parameters?

    Hi,
    I'd like to use URL parameters in my WDA application and then call the application with HTTPS://....?myparam=12345
    and depending on the value of myparam I'd then load some data.
    My first problem is how to declare this parameter. I added an importing parameter "myparam" to the method HANDLEDEFAULT for the DEFAULT starter plug of my window. Is that right? Then I declared this same parameter on tab Parameters of my application and left the value empty.
    The second problem is how to get the parameter value when the application gets called. I pasted HTTPS://....?myparam=12345 into my browser but in the method HANDLEDEFAULT the value of the parameter was initial... What am I doing wrong?
    Any hints are appreciated
    Ira

    Hi Regina,
    >Create the parameters you like as importing parameters >of your startup plug of your window.
    Umm, how? The only way I could add something to the startup plug is to have importing parameters in the method HANDLEDEFAULT. Is that what you mean?
    >Then you have to pass the URL parameter to your >application, otherwise it will dump. BUT you can define >a default value at the application. Go to the property >tab in the application, choose your parameter from the >value list, and set some suitable default value.
    Yes, but my problem is then that the default value of the parameter is always known. I don't know how / where to extract the actual value of the URL parameter. How do I access this value? (and where, which method?)
    Thanks,
    Ira

  • Dynamic reading from database table

    Hi Experts,
    While reading from a database table the below statement for deletion works:
    DELETE (p_table) FROM <fs_wadbtab>.
    p_table: name of database table which is entered as a selection screen parameter
    <fs_wadbtab> : workarea of line type P_table
    However, the below statement does not work:
    READ (p_table) FROM <fs_wadbtab>.
    My requirement is to read a record from p_table with contents in a dynamic structure.
    Kindly suggest.
    Thanks.

    Just misunderstood you.
    Edited by: Karri Kemppi on Jun 23, 2010 10:00 AM

  • Content presenter: datasource based on CMIS query with URL parameters

    Hi all,
    I am trying to create a page containing a content presenter taskflow that is based on a CMIS query containing URL parameters. In my component properties I define the following query for my datasource:
    +SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xqblIntranetSubGroep='${param.qblSubGroep}'+
    I have a URL parameter qblSubGroep containing the value "Nieuws".
    Somehow my page does not show any content. It looks like the parameter value is not passed to the data source query. When I change my query to
    SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xqblIntranetSubGroep='Nieuws'
    so, I hardcode the value of my URL parameter in my query, the expected content items are shown.
    Also, I have another page containing a content presenter taskflow for a single item, based on the data source:
    +${'WebCenterSpaces-UCM#dDocName:'}${param.dDocName}+
    In this case, URL parameter values for dDocName are passed correctly and content presenter is showing the document with dDocName as entered in the URL.
    Does anybody have any idea on how to solve this probem?
    regards,
    Harold

    hi all
    when i try using cmis query with Arabic characters it display no results .
    SELECT * FROM ora:t:IDC:GlobalProfile WHERE AND ora:p:xAgrPressMag LIKE'جريدة الرياض'
    this is the query i am using and the value inside ora:p:xAgrPressMag is correct and i try search this value inside content presenter normal search and it display results i am afraid that cmis query doesnt accept arabic characters
    any suggestion please its top urgent
    best regards
    Edited by: 975169 on Feb 26, 2013 12:59 AM

  • Creating dynamically JTree from database values

    Hi,
    I have a local database with some node values. I receive these values from database as a String[].
    short example:
    String[] Values = {"mainNode","Processors","mainNode","RAM","mainNode","Monitors",
    "Processors","INTEL","Processors","AMD","RAM","Kingston","RAM","GoodRAM",
    "Kingston","400MHz","Kingston","433MHz"}First value is higher node, second is a child.
    I'd like to produce dynamically JTree from Values[] like below:
    MainNode
    |----Processors
          |----INTEL
          |----AMD
    |----RAM
          |----Kingston
                |----400MHz
                |----433MHz
          |----GoodRam
    |----MonitorsI can't build up any working and fast solution :(
    Can anyone help me ?
    Please for any advices (samples) which will help me to apply it.
    Dearly regards!

    This is a relatively straight forward task but it smacks of being homework so unless you post what you have already done you are unlikely to be given any code.
    As a hint -
    Go through the data creating a Map between the parent value and a child DefaultMutableTreeNode which contains as user object the child String.
    When you extract a parent String from the data lookup the parent DefaultMutableTreeNode in the map and add the child DefaultMutableTreeNode to the parent DefaultMutableTreeNode.
    Note - All the map is doing is giving you a quick way of looking up a DefaultMutableTreeNode given a parent name.
    Note - that your tree will have problems if the same value appears in two or more branches!

  • Displaying image from Database with php

    Hello everybody,
    I'm working on a website that displays videos courses and tutorials as my final project
    and I'm working with "Flash builder 4" the database with mySQL and the application server with php
    Basically, the goal is to display a datagrid that shows the manager of the website in column all the information stored on the "Course" table
    the structure of the table is :
    Course (id,img,src,title,description)
    -id : primary key
    -img : path to a photo of course {for example picture of JAVA}
    -src : path to the playlist file {xml file}
    -title : String
    -description : String too
    I already succeeded to display all these contents on a DataGrid, but not with the image, I couldn't display an imageon its column using the path stored on the database, I used a DataRenderer to do that, and here is my code for Renderer and the DataGrid.mxml
    CourseGrid.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:courseservice="services.courseservice.*">
    <fx:Script>
    <![CDATA[
    import Renderers.CourseDeleteRenderer;
    import Renderers.CourseImageRenderer;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
    getAllCourseResult.token = courseService.getAllCourse();
    ]]>
    </fx:Script>
    <fx:Declarations>
    <s:CallResponder id="getAllCourseResult"/>
    <courseservice:CourseService id="courseService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:DataGrid x="10" y="10" id="dataGrid"
    creationComplete="dataGrid_creationCompleteHandler(event)"
    dataProvider="{getAllCourseResult.lastResult}"
    width="100%">
    <mx:columns>
    <mx:DataGridColumn headerText="" dataField="img" sortable="false" itemRenderer="Renderers.CourseImageRenderer"/>
    <mx:DataGridColumn headerText="id" dataField="id"/>
    <mx:DataGridColumn headerText="src" dataField="src"/>
    <mx:DataGridColumn headerText="title" dataField="title"/>
    <mx:DataGridColumn headerText="description" dataField="description"/>
    <mx:DataGridColumn headerText="Delete" itemRenderer="Renderers.CourseDeleteRenderer"/>
    <mx:DataGridColumn headerText="Update" itemRenderer="Renderers.CourseUpdateRenderer"/>
    </mx:columns>
    </mx:DataGrid>
    </s:Application>
    CourseImageRenderer.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      focusEnabled="true">
    <mx:Image source="{data}" width="60" height="60"/>
    </s:MXDataGridItemRenderer>
    Result :
    Problem :
    How can I access to the path of the image, I tried to write "data.img" instead of "data" as img is the name of the column in the database that stores the path but it wasn't successful.
    I know that it not complete statement "data" because "data" is a reference to what the DataGrid provides of information that gets from the (CreationComplete) event.
    Question :
    - Can you please help me with this so I can complete displaying images by accessing to what is on the column in tha DB so I can manipulate my datas that is stored there ?
    ==> I still have some questions about the buttons to update and delete datas fomr the DataGrid, but, until now I need to access successfully to the photo and display it
    Thank you,

    Anyone that can help me with this ?
    Please, try this with me, I'm asking Flex developpers this might be easy for you !
    It's just question of how to access the string stored in the variable "data", when I used XML I just type the path to the repeated element like this :
    XML file :
    XML File
    <parent>
    <child>
    <repeated_child></repeated_child>
    <repeated_child></repeated_child>
    <repeated_child></repeated_child>
    </child>
    </parent>
    I used a Model as a reference to the xml file
    and an arrayList as a container of the repeated child
    I just write in the code "data.parent.repeated_child" to access the text in the "repeated_child"
    and here is the code, that I implemented to generate videos from xml file to display a video play list
    Video Playlist code(extract from XML file "data.xml")
    <fx:Declarations>
    <fx:Model id="model" source="assets/data.xml"/>
    <s:ArrayList id="products" source="{model.video}"/>
    </fx:Declarations>
    <mx:List  dataProvider="{products}" labelField="title"
      change="list1_changeHandler(event,List(event.currentTarget).selectedItem)" x="103" y="77" height="350" width="198"/>
    That was my goal to do that with the database.
    Please help me
    If you have other solution I still need it.
    Thank you,

  • Caching problem for iViews with URL parameters

    Hi,
    We have a big problem with <b>iView caching.</b>
    Our objective is to use <b>SAP Netweaver Portal 2004s & External Facing portal </b> for a public Internet Portal
    For performances reasons we need to activate iviews caching on the principal iviews. But the problem is that a page called with different parameters generates exactly the same html result
    <u>example --> The display of a news item:</u>
    /irj/portal/anonymous/index.htm?rid=/news_123.xml
    gives the same cached result as
    /irj/portal/anonymous/index.htm?rid=/news_456.xml
    The caching level is "shared" because all users are anonymous !
    The iview caching seems to be occuring on component (iView) level and not on URL level
    Can someone help ?
    At the moment we have performances of 10 seconds for a page, and with caching it's becoming less than 1 second, so we really need the caching !!!
    Thanks
    Laurent

    Hello
    I hope you get your answer since, nevertheless it could help other.
    Have you tried to put the cache level to "session" instead of "user" or "shared" at the iview level?
    Regards
    Benoit

  • HTTP Receiver with URL Parameters

    Hi, I need to pass the following parameters when I do an HTTP post
    1. Data
    2. DataType
    3. Protocol
    4. Security
    5. DataFormat
    Here the Data will have the payload to be sent to HTTP receiver. Can anybody tell me, how I can pass the payload using URL Parameter.

    in the HTTP reciever CC
    from the help...
    - If you want to use URL parameters, select Apply URL Parameters and enter the parameters in the fields Parameter 1 to Parameter 6.
    The parameters are included in the HTTP request under the names specified here.
    The technical names of the fields are URLParamOne, u2026, URLParamSix
    Also check this blog
    Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III
    Edited by: Anand on Oct 15, 2008 8:40 PM

Maybe you are looking for

  • BAPI_PO_CHANGE for account assignment tab

    Hi sdn, I am trying to chnage the Account Assgnment tab details with the BAPI BAPI_PO_CHANGE and getting below error message. E     MEPO     000     Purchase order still contains faulty items I     06     684     Releases already effected are liable

  • I accidently deleted the playlist selected for updating thing...

    i was adding new songs to my ipod and i guess there were too many songs there so it asked me if i wanted it to choose some songs randomly... so i chose "ok" but actually i didnt really want it to choose songs on its own so i deleted the list that was

  • Utl_file help!!!

    Hey people :) Below is my code it is produces a list of names address for a mail merge, an example of an outputted file: 32-36 GREAT VICTORIA STREET BELFAST BT2 7BA 08448920902 0026936 000001 MRS FRAME 51 HOUSE DRIVE HOUSETOWN COUNTY ANTRIM BT36 7JY

  • Why is the search field missing in Notes?

    I am not able to locate the search option in Notes on my iPad. where did it go? Thanks

  • NTSC 24P to HD

    I just finish a new documentary that I shot in NTSC 24P (Panasonic DVX-100A) and need to trasfered to HD 1080i/60i. How is this done, are they better machines than others or is a simple computer procedure? I am right now in Buenos Aires, Argentina bu