Is it possible in jsf? Action with parameters????

I have a NavigationItem, a object of myfaces.....
And when is clicked it, I want to create a new pane, based on the navigationItem clicked, obviuosly,
How I can submit a action with parameters???
Is it possible?
thanks all !

I will try to explain better.
I create menus dynammicaly....
and this menus has NavigationMenuItems, all componentes of myFaces
The navigationMenuItem is inherited of SelectItem.....
and creating it dynamically I need to put a action, and the backing bean has a method that return a string , but the value returned is always null, and I will to know How things I will do depending the parameters (like request parameteres) are passed through the action...
but I do not know how to set the action dynamically, when the method setAction expect a string and not a MethodBinding.....
And how I will to know after, what navigationMenuItem was clicked ??
I don't know if are answers to this questions, I'm not sure about the limitations of web development and jsf, but I must to do it...
thanks

Similar Messages

  • Is it possible to create views with parameters ?

    Hi,
    As MS-Access, is it possible to create views with parameters ?
    Ms-Access syntax : parameters [a] text; select * from table where code = [a]
    If yes, can you give samples ?
    Regards
    Pascal

    I suggest you you write a stored procedure that returns a recordset in oracle. Then execute the stored procedure and loop through the record set.
    Look in in MS Knowledgebase searching on ADO Stored Proceedures for the VB/C++/VBS .. code.
    Look in in Oracle PL/SQL guide for the Stored Proceedure code.

  • JSF commandButton with Parameters

    Hello,
    How can I pass parameters to backing bean through commandButton?

    Could you pl tell me how to pass parameter thru CommandButton
    I have the following situation
    1) greetingList.faces which list the Ids & greeting Text
    Id Text
    1 Hello World
    2 Hello World
    2) Pl note Ids are h:commandLink. A click on the Id will render greetingForm.faces with data pertaining to that Id and with Update h:CommandButton
    3) When i click Update button it results in the following error
    javax.faces.FacesException: Error calling action method of component with id greetingForm:_id4
    Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{greetingForm.update}
    Caused by: java.lang.NullPointerException
    So i verified with h:message that Id is passed as Null when click on Update button. I also checked greetingForm.faces has a not null value by printing <h:outputText value="#{greetingForm.message.id}"/>
    So i guess the Id value is overwriteen with null. Also i have defined Id as property in managed bean
    <managed-bean-name>greetingForm</managed-bean-name>
    <managed-bean-class>com.mycompany.GreetingForm</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>id</property-name>
    <value>#{param.id}</value>
    </managed-property>
    Any pointers/suggestions at the earliest on how to pass the value of Id on a click of update button from greetingForm.faces to greetingForm.java will be highly appreciated
    I am willing to upload my war file
    Regards
    Bansi

  • Is possible compiling of swf with parameters?

    i have flash project - .fla file, with import of .as file. im
    using few built in values in this project, but i need to compile
    .swf more than one time with different params. is possible to
    create some batch script, which could change value in one variable
    and store compiled .swf to specified directory?.. or i have to
    change and compile that for each clip i need? :( ?

    ive found commands :) it looks fine, but i cant touch
    anything in flash when im editing .as file :s there is no history..
    (i was working with java few years ago so my apps are much like
    application than mess of objects on animation board)..
    i though, there could be something like..
    i would write into .as file something like this:
    var foo:Number = {fooParam};
    and before compiling, i would set fooParam = 1;.. and i had
    some batch of this and could make .swf easy..
    param: foorParam = 1;
    path: foo1/movie.swf
    param: fooParam = 2;
    path: foo2/movie.swf
    :s ?
    only way, i could make it with my knowledge now is create
    some application which would edit .ad file and replace { .. } with
    real values and then pass to some flash compiler :s huh.. but it is
    little bit lol method, isn't it?.. and also i dont know, if flash
    could compile .fla by calling some command .. is this
    possible?

  • Makes it possible to create view with parameters

    makes it possibel to create view with paramater, example
    create or replace view v_test(segment varchar2)
        select * from ref_user where segment = segmentThanks

    thanks..
    select count(distinct substr(a.svm_id,1,10)) jumlah " +
       " from daily_distribution_pop a, ref_toko b " +
       " where " +
       " substr(a.svm_id,1,10)=b.id and b.segment_type = 'A' and enable_flag='Y' " +
       " and a.tgl_visit between to_date('" + fromStartDate + "', 'dd/MM/yyyy') and to_date('" + fromEndDate + "', 'dd/MM/yyyy')
         and " + whereA + "= '" + whereB + "' " +
       " and substr(a.pom_id,1,2) = 'DP' and (a.qty_instore <> 0 or a.qty_delivered <> 0) ";
    {code}
    where fromStartDate,  fromEndDate, whereA, whereB  is variable parameter from asp.net.
    how to i can implement with view                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Is it possible to start an application with parameters

    Hello together,
    I have written an application which is stored on a network. People from different computer start it to work with it. Now I have the problem, that I need some different configurations on each computer.
    Is it possible to start a labview application with parameters, like: application.exe -User_1
    The application should check the parametes and should switch to the needed configuration.
    Thanks a lot and best regards,
    Michael
    Solved!
    Go to Solution.

    Hi Michael,
    yes it is possible. First you have to activate the data transfer of your parameters. You can do it in the application builder. It is something like "send command line parameters to exe" which you have to activate. You will get the parameter in your program with the property "App.Args". It is an array with the exe name as the first element and one entry for each additional linked parameter.
    Hope it helps.
    Mike

  • : "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

     Hi   .
        I was creating the  pass the values t in temp tables  though s sis package vs2012 .
      First I was taken on executive SQL TASK.
     IN EXCUTIVE SQL TASK  . I was write the stored proce:
    Sp;
    reate  procedure  USP_GETEMP2333
    AS
    begin
    Select  eid,ename,dept,salary from emp
    end;
    create table #temp(eid int,ename varchar(20),dept varchar(20),salary int)
      insert into #temp
       exec USP_GETMP02333
       go.
     It was executive correctly.
     I was taken another sequence container. In the sequence container iam creating one   executive  sql
    In 2<sup>nd</sup> excutive sql task: sql statements is
    if object_id('emp_fact_sal') is not null
     drop table emp_fact_sal
    select eid,ename as emp_name,sal_bar=
    case when salary<=5000 then 'l'
    when salary >5000 and salary<=7000 then 'm'
    else
    'h'
    end
    into emp_fact_sal from #temp.
     and one falt flies  it was taken to designation .
     iam changing  all  connection properties:
     in oldeb connection:
    in excutive sal task properties .
    delay validation is true,
    and retain connection maner is also true,
    and package mode is 64 bit is false.
     But iwas excutive in 2<sup>nd</sup> excutive ql task .
    Iam getting this type of errors,
                    [Execute SQL Task] Error: Executing the query " if object_id('emp_fact_sal') is not null
     drop ta..." failed with the following error: "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
     Please help me

    Arthur suggestion works but you shouldnt even be doing this on a SQL Task.
    Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • [1.1.2.25.79] Program hangs after starting long runnin SQL with parameters

    Hello Forum,
    I'm currently tuning some SQLs with parameters that run some minutes. When I enter the SQL in the worksheet and press F9, SQL Developer asks for the parameters. But after clicking "Apply" (or whatever it is called in the english version, I'm using german ;-)
    I get the elapsed time of 0.018 seconds displayed and the whole program hangs until the SQL is completed. The elapsed time is not updated so I don't get the real elapsed time.
    I run SQL Developer against an Oracle 9.2 Database on Win2k. The client runs WinXP.
    I hope this is not a double post but searching the forum for "parameters" gave too many hits to check. ;-)
    Regards,
    dhalek

    Sqldev hangs when issuing an action that requires the previous action to be completed first.
    Sqldev could open a new connection for this, or at least display a message telling the action isn't possible until the previous one completes, instead of just hanging. Vote for the requests for this on the SQL Developer Exchange if you want this getting addressed sooner.
    Thanks,
    K.

  • Is it possible to trigger action in backing bean on page unload event?

    Hi,
    There is a RichPopup in my page which has a Listener to save data or not by user choice "Data change detected, do you want to save those changes?"
    I've tried with the javascript event 'window.onbeforeunload', but this way must be fit with a Servlet function which I am not allowed to use.
    The attibute 'onunload' in the tag '<af:document>' seems useless. Even there is few description or example in the 'Tag Reference'.
    So, is it possible to trigger action in backing bean on page unload event? Thanks in advance for helping.
    Viva

    Hi Frank
    Thanks for helping, I've tried in your way. My codes are like below:
    Page codes:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" clientComponent="true" title="viva test">
          <af:resource type="javascript">
            if (!window.addEventListener) {
                // alert('window.addEventListener is not supported in IE8. Override it!');
                window.addEventListener = function (type, listener, useCapture) {
                    window.attachEvent('on' + type, function() {listener(event)});
            window.addEventListener('beforeunload', function (){performUnloadEvent()}, false);
            function performUnloadEvent() {
              var eventSource = AdfPage.PAGE.findComponentByAbsoluteId('d1');
              //var x and y are dummy variables obviously neeed to keep the page
              //alive for as long it takes to send the custom event to the server
              var x = AdfCustomEvent.queue(eventSource, 'handleOnUnload', {args:'noargs'}, false);
              var y = 0;
          </af:resource>
          <af:serverListener type="handleOnUnload" method="#{vivaTestBean.testOnUnload}"/>
          <!--
          <af:form id="f1">
            <af:commandButton text="Unload" id="cb1" action="unload"/>
          </af:form>
          -->
        </af:document>
      </f:view>
    </jsp:root>The backing bean codes:
    public class VivaTestBean {
        public VivaTestBean() {
        public void testOnUnload(ClientEvent clientEvent) {
            System.out.println("Thanks God");
    }The first way which triggers a 'unload' event by clicking a button DO WORKS. :)
    But when I changed the triggered way by changing the <af:document> to clientComponent as what you did, the 'onbeforeunload' event won't come out when I refreshed or closed the page.
    That doesn't make sence, since I think the two ways to trigger a 'unload' event are the same.
    Edited by: 841766 on 2011-3-7 上午1:13

  • Returning from a JSF flow with faces-redirect

    I'm using Glassfish 4.1 with JSF 2.2.9. I can't figure out how to return from a JSF flow with a redirect. I've tried this in the flow definition xml:
    <flow-return id="returnFromFlow">
        <from-outcome>/index.xhtml?faces-redirect=true</from-outcome>
    </flow-return>
    This does the redirect but results in navigation errors on the page, specifically the button that enters the flow again: "Unable to find matching navigation case from view ID '/index.xhtml' for outcome 'select-person'" (the flow is called select-person).
    I've also tried appending faces-redirect=true to the action of the commandButton that exits the flow. Now the flow does not exit, it reloads the current page within the flow and says "Unable to find matching navigation case with from-view-id '/select-person/select-person.xhtml' for action 'returnFromFlow?faces-redirect=true' with outcome 'returnFromFlow?faces-redirect=true'"
    Exiting the flow with h:link works, but I want to be able to call an action and submit form values with the button so that isn't a good workaround for me.
    What's kind of interesting is that navigating between views within the flow DOES work with faces-redirect=true. I can add a "step2" node, and a commandButton with action="step2?faces-redirect=true", and it works. It's just exiting the flow that does not work.
    Any ideas?

    Hi Frank,
    Thanks so much for your response.
    Yes, since the user can do a commit prior to exiting my edit task flow, option 1 will not work for me.
    Option 2 sounded feasible, but jdeveloper would not let me set the restore point to true, since my btf didn't require a transaction. Is there a step I'm missing here??
    The thing that is really getting me when return via the cancel button from this edit task flow, back to my parent task flow, the record pointer is always moving back to the beginning of the data set in my parent task flow. For example,if I have a data set
    rec1, rec2, rec3..
    On my parent taskflow call it browser task flow, I navigate (via the next button) to rec3, and I click edit. At this point, my edit task flow kicks off, and since both task flows share the same data control, the edit task flow rec pointer is the same as the browse one.
    Okay I decide I don't want to change anything in my rec3, so I click cancel.
    At this point, when I return back to the navigator task flow, it points me back to rec1 ..
    HOwever, the savepoint seems to fix this. When I set my cancel return from edit taskflow to savePoint = true, the rec pointer stays in the correct spot. However, I cannot always do this, because the user can make iterative saves in the edit task flow which (based on your previous email) stales out the savepoint id.
    Question, so in this case, how can I make the parent browser task flow call stay on the same record I was just editing, opposed to going back to the beginning of the data set(ie. rec1)??

  • Automator action with dropdown to make folders with predetermined names

    Is there an action/workflow that will allow me to create Folders using a dropdown menu of predetermined names for those folders?

    I haven't seen one, and since no one has posted about one yet, I'll throw this out.
    I modified a couple of handlers I have laying around into a Run AppleScript action that will make folders from a list of names. The list can be set in a Get Specified Text action, with the "menu" being a Choose from List action:
    Tested workflow:
    1) Get Specified Text (your folder names, separated by returns) for example:
    Testing
    Another test
    My Spiffy New Folder
    2) Filter Paragraphs (Return paragraphs that are not empty)
    3) Choose from List (Prompt: Please choose folder names:)
    4) Run AppleScript:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    make folders with names from a list
    input: a list of names (text items)
    output: a list of Finder items (aliases) created
    set output to {}
    set DestinationFolder to missing value -- set the destination path here if desired
    try -- verify that the path is valid
    set DestinationFolder to DestinationFolder as alias
    on error
    set DestinationFolder to (choose folder with prompt "Choose the location to make the selected folders:")
    end try
    repeat with AnItem in the input
    GetUniqueName for AnItem from DestinationFolder -- avoid duplicates
    try
    tell application "Finder" to make new folder at DestinationFolder with properties {name:the result}
    set the end of the output to the result as alias
    end try
    end repeat
    return output
    end run
    to GetUniqueName for SomeName from SomeFolder
    check if SomeName exists in SomeFolder, creating a new unique name if needed
    parameters - SomeName [text]: a name.extension to check for
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique name
    set {Counter, Divider} to {"00", "_"}
    set Here to -(offset of "." in ((reverse of text items of SomeName) as text)) - 1
    set TheName to text 1 thru Here of SomeName
    if Here is -1 then -- no extension
    set TheExtension to ""
    else
    set TheExtension to text (Here + 1) thru -1 of SomeName
    end if
    set NewName to TheName & TheExtension
    tell application "System Events" to tell (get name of items of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName</pre>
    - the output from the Run AppleScript action is a list of aliases to the folders created, if you want that information to do something with.

  • Button action with onclick in a jsp page using Jscript

    hi,
    I am facing a problem in setting an action with a button in a jsp page the error is object does'nt support this function,kindly send me reply as soon as possible.
    Santhosh

    hi,
    I am facing a problem in setting an action with a button in a jsp page the error is object does'nt support this function,kindly send me reply as soon as possible.
    Santhosh

  • Associate Action with jcombobox item

    Is it possible to associate a particular Action with a jcombobox item (for example using setAction()). When the user selects a particular item of jcombobox, the Action must be triggered.
    regards,
    Nirvan.

    Hi,
    You can associate a particular action with a JComboBox. As per my understanding u can add one action perfrom action to combobox or itemStateChanged action
    if u add action perform action, u need to add the following method to ur logic.
    JComboBox combobox=new JComboBox();
        combobox.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
             JComboBox combo = (JComboBox)evt.getSource();
                if(combo.getSelectedItem().equals("LOCATION")) {
                A a = new A();
                a.show();
            } else if(combo.getSelectedItem().equals("HOUSE")) {
                B b= new B();
                b.show();
            });if action is ItemStateChanged then add the following method.
    combobox.addItemListener(new java.awt.event.ItemListener() {
                public void itemStateChanged(java.awt.event.ItemEvent evt) {
                    and write your logic here which one needs to be triggered when this action performed.
            });Hope this will help to you....
    Thanks & Regards,
    Maadhav..

  • Discoverer report with parameters and functions

    I am new to Discoverer. Is there a way to create a report (with parameters) of one line per customer such that the following data will be displayed for each customer?
    Among the parameters is: from_date (month & year) ,to_date
    The basic query gives totals for each date (month & year) for every customer.
    Among the fields displayed:
    1-customer_id,
    2-balance until from_date,
    3-total activity between from_date and to_date
    I have a function to calculate the total balance until from_date, but then I cannot get the total activity on the same line. I tried using another function and I tried using a total calculation but to no success.
    Is this possible?
    Thanks.

    Hi Markus
    You need to determine whether you can in fact call a Discoverer report using a URL before linking it in Portal. You need to run the report in Viewer first and then see copy the URL from the address line of the browser. Then you open another browser and paste the URL. You may well be prompted for a username and password but hopefully the correct report with the right parameters will then execute.
    Assuming this works you then paste the same URL link into Portal and you should be able to get the report to run.
    Best wishes
    Michael

Maybe you are looking for

  • Deciding what to do if user closes window(JDialog)

    I am drawing shapes- Rectangle, Ellipse, Trianlge...I have big class that implements JFrame and it is used to draw the draw the shapes on the its content pane. Inside this class, I have an inner class that draws a custom JDialog frame. A user selects

  • How do I fix a black screen iPhone?

    My iPhone screen is completely back. I know the phone still works becasue I can still egt phone calls and it still links to itunes. Does anyone know how to fix this problem?

  • START/STOP Decentral Adapter Engine

    Hi friends, We have a decentral adapter Engine . it is possible to start the adapter engine(decentral) if no conectivity exist with the XI central system? Thanks Bogdan

  • Bleed marks in pages

    I am making an ad in Pages. It seems like I can't make bleed marks in the document but I can define non printable area. Is there any difference? And after I have set the non printeble area, how do I know where it is on the document? I can't see the n

  • Size of a JApplet

    Hello everyone, I made an applet but when I display it in a browser, it doesn't react on the HTML tag for width and heigth. It remains pretty small, no matter what i enter as heigth and width. Can any1 help me with this? Regards, Frans