How to call a query from the backing bean ?

Hi all,
Another question for you guys :
I made a jspx page with an input form and a submit button.
When I click the submit button, the action my_action in my backing bean is executed.
This is the code :
public BindingContainer getBindings() {
return BindingContext.getCurrent().getCurrentBindingsEntry();
public String my_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("EmployeesView");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
I hoped that the query 'EmployeesView' was executed in this way, but I get the following exception :
java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding cannot be cast to oracle.binding.OperationBinding
So how should I execute the query EmployeesView ?
Second part of the question : What if I typed the name an employee in my form, and I want to
execute a query that selects all the Employees with that name ?
How do I make a query with a variable as input in the WHERE clause ?
Thanks in advance.
Edited by: Facehugger on 7-apr-2010 11:15

I'm still trying all the stuff you guys says, but still no result.
This is my backing bean :
+// the button action+
+public String my_action()  {+ 
+// get the selected rows from the multiselect table and store the objectid's in an String array+
RowKeySet rks = graph_table.getSelectedRowKeys();
Iterator itr = rks.iterator();
Object key;
int nbr_objects = 0 , i = 0;
if (rks.size()>0)  nbr_objects = rks.size();
+String[] objectid = new String[nbr_objects];+
while(itr.hasNext())
+{+
key = itr.next();
graph_table.setRowKey(key);
Object o = graph_table.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) o;
Row row = rowData.getRow();
+objectid[i] = row.getAttribute("Objectid").toString();+
i+;+
+}+
+// now get all the x and y values for these objectid's from the database out of the table history.+
BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
for (int j=0 ; j<nbr_objects; j+){+
+// get X and Y values for object number j+
DataPoints history = new DataPoints();
OperationBinding operationBinding = bc.getOperationBinding("retrieveHistory");   ===> operationBinding stays NULL ???+
+operationBinding.getParamsMap().put("OBJECTID", objectid[j]);+
Object retVal = operationBinding.execute();
+// ==> retVal should contain a List of all X and Y values for the provided objectid.+
+// while (retVal has values)+
+// {+
+// List_of_x_values.add(retVal.valueX);+
+// List_of_y_values.add(retVal.valueY);+
+// }+
history.add(List_of_x_values);
history.add(List_of_y_values):
+// call the soap method to do some calculations+
methodname.forecast(history);
+}+
+}+
In my application module :
public void retrieveHistory(String objectid) {
getHistory().setWhereClause("OBJECTID = '" + objectid + "'");
System.out.println("current query : "+getHistory().getQuery());
getHistory().executeQuery();
public ViewObjectImpl getHistory() {+
return (ViewObjectImpl)findViewObject("History");+
The query for the VO History : SELECT * FROM HISTORY
Please anyone ?
Edited by: Facehugger on 9-apr-2010 14:19

Similar Messages

  • How to call a package from the Report in Oracle Application Express

    How to call a package from the Report in Oracle Application Express

    Hello,
    What do you mean? Something like SELECT mypackage.function( par1, par2) from dual?
    Or do you want to execute a procedure when something happens on the page, like clicking a button?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Calling a method in the backing bean when rendering a table

    I'm rendering a table that begins with :
    <h:dataTable value="#{showRooms.rooms}" var="rowRoom" ...
    There are several properties I'm displaying. Some are just displayed as they appear from the database like:
    <h:outputText value="#{rowRoom.roomNumber}"/>
    However, some I need to translate so they display a more meaningful message to the users. For example, status is stored 'A', or 'NA', but this should display 'Available' or 'Not Available'. To do this, I'm taking an idea I saw in another forum by providing a method to call and translate the text. For example:
    public String getDisplayedStatus(String status) {
    if (status.equals("A") {
    return "Available";
    } else {
    My problem is how can I invoke a method and pass in the current value of status for that row in the table. I think I need something like this:
    <h:outputText value="#{showRooms.getDisplayedStatus(#{rowRoom.roomStatus})"/>
    But that doesn't work. I can invoke the getDisplayedStatus method when passing in a hardcoded parameter, but it won't translate the value of both expressions(the method and the method param). How can I achieve this?
    Thanks,
    Mike

    Yes. I've done that and it does work....sort of. It works as long as I refer to it as 'displayStatus'. It looks up the getDisplayStatus and returns a value. The problem is getting the current status value from the object in the List. For example, the 3rd row in the table has either 'A;' or 'NA' for status. I need to know this value in order to do my translation. The way I see it, I either need
    1.)a way to call a method on the backing bean and pass the value of status from the current row into the method.
    -or-
    2.)in getDisplayStatus, I need a way to access the current row's value, perhaps through an expression. This appears to be what you can do in the AbstractPageBean class that all backing beans inherit in Studio Creator. I've seen code in a getter like 'getValue(#{currentRow.status}'), but I don't know how that is done. I looked for the source to AbstractPageBean on the web but couldn't find it - maybe its not open-source.
    Anyway, please share if anyone has a solution. I'm sure this has been done before.
    Thanks,
    Mike

  • How to Launch a Query from the Easy Access Menu

    Hello Experts,
    Once I have created, saved and tested my query how can I set it up so that my users can either type in a transaction at the Easy Access Menu or select my query from the Easy Access Menu and launch the query input screen that displays fields for:
    Reporting Period
    Selection Criteria - Personnel Number, Employment Status, Personnel Area etc.
    Program Selections - company code
    Output Format
    Thanks.
    Regards,
    Jeanette

    Hello Jeanette
    You may refer to following thread
    Assign transaction code to SAP Query (created via SQ01)
    Hope this helps
    Best Regards
    Reddy

  • Call a Function From a Backing Bean

    Hello,
    I am trying to call a PL/SQL function from a Backing Bean but i am getting a getDBTransaction error. Here is the example i was trying to do in a backing bean.
    I Am getting the employee ID , sending it to a function that calculates the annual salary and then through a button whose code is in the backing bean, showing a message on the screen with the annual salary.
    I am getting the JBO-25301 error.
    Can't i use getDBTransaction in my backing bean.

    Please have a look at the following thread:
    Stored Procedure

  • Unable to call Action Method of the Backing Bean

    I have created a jsf page with several tables and input text boxes. I also have the command button to submit the values to the backing bean but, the action method "saveBean()" is not being called
    Hear are the codes listed below listed
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <h:form id="myBioDataForm">
    <h:panelGrid columns="2" >
              <h:panelGroup  >
                   <h:outputLabel id="NameLabel" value="Name" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:inputText id="NameTextBox" value="#{bioData.objBioDataVo.name}"/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="DOBLabel" value="DOB" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <t:inputCalendar id="DOBCalendar" renderAsPopup="true"  value="#{bioData.objBioDataVo.doB}"/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="AddressLabel" value="address" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:outputLabel value=""/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="Street" value="Street" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:inputText id="StreetTextBox" value="#{bioData.objBioDataVo.street}"/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="City" value="Town/City" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:inputText id="CityTextBox" value="#{bioData.objBioDataVo.city}"/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="Pincode" value="Pincode" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:inputText id="PincodeTextBox" value="#{bioData.objBioDataVo.pincode}"/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="Mobile" value="Mobile" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:inputText id="mobileTextBox" value="#{bioData.objBioDataVo.mobile}"/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="Email" value="Email" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:inputText id="emailTextBox" value="#{bioData.objBioDataVo.email}"/>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="Gender" value="Gender" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:selectOneRadio value="#{bioData.objBioDataVo.gender}">
                        <f:selectItem itemLabel="Male" itemValue="Male"/>
                        <f:selectItem itemLabel="Female" itemValue="Female"/>
                   </h:selectOneRadio>
              </h:panelGroup>
              <h:panelGroup  >
                   <h:outputLabel id="Marital_Status" value="Marital Status" style="font-size: medium"/>
              </h:panelGroup>
              <h:panelGroup >
                   <h:selectOneRadio value="#{bioData.objBioDataVo.status}">
                        <f:selectItem itemLabel="Married" itemValue="Married"/>
                        <f:selectItem itemLabel="UnMarried" itemValue="UnMarried"/>
                   </h:selectOneRadio>
              </h:panelGroup>
    </h:panelGrid>
    <f:verbatim><br><br><br></f:verbatim>
         <h:dataTable var="item" value="#{bioData.al}">
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="No Of Years"/>
              </f:facet>
                   <h:selectOneMenu id="NoYears1" value="#{item.noYears}">
                   <f:selectItems value="#{item.noYearsVoTM}"/>
              </h:selectOneMenu>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Organisation"/>
              </f:facet>
                   <h:inputText id="OrgnisationTextBox" value="#{item.orgVo}"/>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Designation"/>
              </f:facet>
                   <h:inputText id="designationTextBox" value="#{item.desigVo}"/>
              </h:column>
         </h:dataTable>
                   <h:commandButton id="addRow" type="submit" value="Add Row" immediate="true" action="#{bioData.addStr}"/>
                   <h:dataTable  var="edual" value="#{bioData.eduList}">
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Year of Passing"/>
              </f:facet>
                   <h:selectOneMenu id="NoYears11" value="#{edual.yearPassing}">
                   <f:selectItems value="#{edual.yearPassingTM}"/>
              </h:selectOneMenu>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Qualification"/>
              </f:facet>
                   <h:selectOneMenu id="NoYears11" value="#{edual.qualification}">
                   <f:selectItems value="#{edual.qualificationTM}"/>
              </h:selectOneMenu>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Specialisation"/>
              </f:facet>
                   <h:inputText id="SpecialisationTextBox1" value="#{edual.specialisation}"/>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Specialisation"/>
              </f:facet>
                   <h:inputText id="SpecialisationTextBox1" value="#{edual.specialisation}"/>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="School"/>
              </f:facet>
                   <h:inputText id="SchoolTextBox1" value="#{edual.school}"/>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Total Marks"/>
              </f:facet>
                   <h:inputText id="MarksTextBox1" value="#{edual.cgpa}"/>
              </h:column>
         </h:dataTable>
                   <h:commandButton id="addRow1" type="submit" value="AddRow" immediate="true" action="#{bioData.addEdu}"/>
         <h:dataTable var="str" value="#{bioData.strList}">
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="sno"/>
              </f:facet>
                   <h:inputText id="snoTextBox" value="#{str.sno}"/>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Stengths"/>
              </f:facet>
                   <h:inputText id="StengthsTextBox" value="#{str.strengths}"/>
              </h:column>
              <h:column>
              <f:facet name="header" >
                   <h:outputText value="Weaknesses"/>
              </f:facet>
                   <h:inputText id="WeaknessesTextBox" value="#{str.weaknesses}"/>
              </h:column>
         </h:dataTable>
                   <h:commandButton id="addRow2" type="submit" value="Add Row" immediate="true" action="#{bioData.addWks}"/>
              <h:outputLabel id = "saveLabel" value="Enter Name"/>
              <h:inputText id="saveTextBox" value="#{bioData.bioName}"/>     
              <h:commandButton id="savebutton" type="submit" value="Save"  action="#{bioData.saveBio}"/>
    </h:form>----------------------------Backing Bean--------------------------------------
    package com.minerva.trainees;
    import java.util.HashMap;
    public class BioDataHomeBackingBean
         String selectBio;
         HashMap selectBioHM;
         public BioDataHomeBackingBean() {
              selectBioHM = new HashMap();
              selectBioHM.put("Create BioData", "Create BioData");
         public String processBioData()
              String select_tmp = getSelectBio();
              String action="";
              if(select_tmp.equalsIgnoreCase("Create BioData"))
                   action= "displayCompetency@rgsRequest";
              return action;
         public String saveBio() throws Exception
              System.out.println("########################Inside saveBio##################");
              return "success";
         public String getSelectBio() {
              return selectBio;
         public void setSelectBio(String selectBio) {
              this.selectBio = selectBio;
         public HashMap getSelectBioHM() {
              return selectBioHM;
         public void setSelectBioHM(HashMap selectBioHM) {
              this.selectBioHM = selectBioHM;
    managed-bean>
              <managed-bean-name>MyNameBB</managed-bean-name>
              <managed-bean-class>com.minerva.trainees.MyNameBackingBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>bioData</managed-bean-name>
              <managed-bean-class>com.minerva.trainees.BioDataBackingBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>bioDataHome</managed-bean-name>
              <managed-bean-class>com.minerva.trainees.BioDataHomeBackingBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
              <managed-bean>
              <managed-bean-name>bioTest</managed-bean-name>
              <managed-bean-class>com.minerva.trainees.TestBean</managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
         </managed-bean>
              <managed-bean>
              <managed-bean-name>objBioDataVo</managed-bean-name>
              <managed-bean-class>com.minerva.trainees.BioDataVo</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>Please help me to solve this problem

    tracemein wrote:
    but, the action method "saveBean()" is not being called Maybe there was a validation or conversion error occurred. Add <h:messages /> to your page to take note of them and handle accordingly. Also read the application server logs if there isn't something interesting logged. JSF 1.2 by default logs undisplayed errors to the stdout.
    On the other hand, apart from the problem, you don't need h:panelGroup for single column items. Basically you can remove all of those h:panelGroup tags in your first h:panelGrid.

  • How to call a query from filter.

    can anyone please guide me how i will call a query of query resource in filter. Or i need to access a query resource query in filter java code. I know how to right a query in java code and execute it, but i have some query in query.htm and need to call it in filter, please help me out.

    <tr>
      <td>name</td><td>queryStr</td><td>parameters</td>
    </tr>
    <tr>
      <td>sampleQuery</td>
      <td>Select * from revisions where dDocName = ? and dInDate =?</td>
      <td>dDocName varchar
             dInDate date</td>
    </tr>
    DataBinder params = new DataBinder();
    params.putLocal("dDocName", "123456789");
    params.putLocal("dInDate", "9/5/13 12:58 PM");
    m_workspace.createResultSet("sampleQuery", params); 
    You may need to play with what date format you send into the query.
    Jonathan
    http://jonathanhult.com

  • Windows 8.1 & Skype: how to call a contact from the Windows Contact List?

    Hi  I just added a contact on Win 8.1 Surface. When I try to call directly from the windows contact list I get a message that skype has been replaced by skype for desktop. When I remove the skype app (and keep skype for desktop) calling from the list is also not possible: I get a message that no app is associated (message-skype-com) Is there a way around it? Or is it currently not possible to call a skype contact from windows contacts? 

    Hi, Pancake12,
    Because I am not certain I an interpreting what you mean - although it looks quite literal - I am going to provide three separate pieces of information:
    - To remove a contact's name from your Skype sign-in window, please refer to the instruction in this FAQ article - using their account name, not yours:  https://support.skype.com/en/faq/FA11070/how-can-i​-remove-my-skype-name-from-the-sign-in-screen-in-s​...
    - In case you mean removing a contact from the Skype Home Screen when you say, "sign in window," unfortunately, we cannot do this.  Skype has some arbitrary algorithm which places recently contacted people on the Home Screen.
    - In case you mean removing a contact from your contact list, here is an FAQ with the details how to do this:  https://support.skype.com/en/faq/FA421/how-do-i-or​ganize-my-contacts   In Windows, it's as easy as highlighting by single-clicking a contact's name, right-click, and choose Remove from Contacts or Block.
    Hope this helps!
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Build a ui component from the backing bean 2

    This is a related question to one I just posted:
    So, I'm trying to build ui components programmatically. In particular, I'm tyring to build af:selectBooleanCheckBox(es), using af:foreach loop. However, to know how many to output I need some information from the database. I query the database in the application module and build an array from the resulting query. I return this array from my method. Now in my backing bean, I want to invoke this method so I can get the array. I'll use tihs array in my jsp page to output the UI component. When I try to instantiate the function in the constructor of my backing bean, I get an error. So I'm planning to use invokeAction to run my method automatically on page load. However, if I do this, how do I get back my array? Where is it stored?
    Also, is it possible to make my array available to my jsp page without going through my backing bean?
    Thanks in advance.

    Hi, it would help if you tell us the jdev version you are using. I assume you use adf rich faces?
    As a general rule, you can't put this kind of code in the constructor.
    I would use a bounded task flow and put call a bean method as default task inside it.
    Timo

  • How to call a Query from widget which has mandatory variables/filter values

    Dear Gurus,
        I want to show data from BI query (BEX) in Wedget, which has variable/ Filter as input parameter.     Please tell me how add these parameters while calling query throgh web service.
    Regards,
    Aslam Khan

    Hi Aslam,
    Kindly refer to Page Number 49 u2013 23rd Point and Page 50 and 51 in the SAPEnterpriseWidgetDevelopmentGuide.pdf u2013 Which explains how to pass the Import / input Parameters.
    You can also refer these links u2013 [How to pass more than one value in RfcRequest ?;
    [how to bind an input field with an rfc input;
    Hope it helpsu2026
    Regards,
    Shilpa B.V

  • How to call WCF method from the SSRS 2008 ?

    I am developing the SSRS report and wanted to consume the one method call of the WCF service. Suppose I have a service Url like http:\\localhost\2014\security.svc and
    wanted to consumestring
    Encrypt(string data) method from that service. Now I know how to use XML and Web service as the data source. I don't want
    that what I want is to call the web service to get the some values encrypted on the report so I can use the expression to set the encrypted values for the some fields. In case of confusion feel free to leave a comment. Any help would be great .

    See this
    Blog post.
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • How to execute SQL Query from the Crystal report X1

    Dear All,
    I am using crystal report X1. In my application am creating run time MS Access tables and giving table name at run time based on my requirement . From these tables I want to fetch data based on some condition and to display using crystal report X1. I have never used the SQL Queries in the Crystal reports. Please help me out.
    Thanks and Regards,
    Rahaneef T

    Please note;
    This forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    This looks more like a Crystal Reports design issue?
    Ludek

  • SelectOneMenu does not show the data from the backing bean

    Here is my code:
    <!--
    Fetch the source directory
    -->
    <h:inputText id="dir"
    value="#{myBean.sourceDirectory}"/>
    <!--
    Click this button to refresh the sub-directories list below
    -->
    <h:commandButton value="fetch"
    actionListener="#{myBean.processFetch}" />
    <!--
    Show the list of sub-directories in the directory entered above as a drop
    down
    -->
    <h:selectOneMenu value="#{myBean.selection}">
    <f:selectItems value="#{myBean.dirs}"/>
    </h:selectOneMenu>
    public class MyBean{
    private String sourceDirectory;
    private ArrayList<SelectItem> dirs;
    public String getSourceDirectory(){
    return sourceDirectory;
    public void setSourceDirectory(String newDir){
    this.sourceDirectory = newDir;
    public ArrayList<SelectItem> getDirs(){
    return dirs;
    public void setDirs(ArrayList<SelectItem> newDirs){
    this.dirs = newDirs;
    public void processFetch(ActionEvent e){
    //For this example, we return some hard coded values
    dirs = new ArrayList<SelectItem>();
    SelectItem s1 = new SelectItem();
    s1.setLabel(sourceDir + "_1");
    SelectItem s2 = new SelectItem();
    s2.setLabel(sourceDir + "_2");
    SelectItem s3 = new SelectItem();
    s3.setLabel(sourceDir + "_3");
    SelectItem s4 = new SelectItem();
    s4.setLabel(sourceDir + "_4");
    dirs.add(s1);
    dirs.add(s2);
    dirs.add(s3);
    dirs.add(s4);
    When I run the above code, I notice that the first time, (and the only time), if I hit the "fetch" button the data in the drop-down menu does get refreshed.
    Subsequently, it does not change. I am not sure what I am doing wrong.
    Can someone help me?

    Hi,
    In order to use the JDBC persistence store you have to use a non XA JDBC driver for your Data Source.
    http://docs.oracle.com/cd/E23943_01/web.1111/e13701/store.htm#CNFGD221
    Point-13). When configuring a connection pool to use with WebLogic JMS JDBC Store, use non-XA database drivers.
    http://middlewaremagic.com/weblogic/?p=586
    Hope it helps

  • How to call the backing bean method through javascript by closing window?

    Hi all,
    What I want to do is:
    I open a new page by clicking <t:commanLink.../> from the first page. Then I close the new page. By closing the new page I will call a function in the backing bean such as myBean.doSomething() to do something. Such like:
    <body onUnload=jsFunction()..../>
    ...

    So far I understand, I should write following code
    in my second page:
    <html>
    <head>
    <script type="txet/javascript">
    function jsFunction()
    {>
    ocument.forms[0].action="#{myBean.doSomething}";
    document.forms[0].submit();
    </scrip>
    </head>
    <body onunload="jsFunction()">
    <ui:composition>
    <h:form id="myForm">
    <t:commandLink id="myLink" immediate="true"
    action="#{myBean.doSomething}"
    value=""></t:commandLink>
    </h:form>
    </ui:composition>
    Is that right? I am not sure if I've the javascript
    in the right position.I am sorry! That solution will not work. My Bad.
    You can try this.
    1) Have a invisible command button on your first page with the action attribute set to "#{myBean.doSomething}" as below
    <t:commandButton style="width:0px;height:0px" id="myButton" immediate="true"
    action="#{myBean.doSomething}"
      value=""></t:commandButton>2) Your JS onunload method on the second page should look like
    <script type="txet/javascript">
       function jsFunction()
    var buttonObject= window.parent.document.getElementById("formname:myButton");
    buttonObject.click(); // This would help in submitting the first page
    // to submit to the needed action method
    </script>Karthik

  • How to call the method from the java bean and pass it to JSP textbox

    i'm quite new to java thats why i'm asking how to call a method in the java bean file and pass it to the JSP textbox. My projects are communicating JSP with C#. i had successfully created a C# client bean file for JSP. The whole process is to type something on the server(C# programming) and it would appear in the textbox.

    your question doesn't provide much informartion. provide some other information and coding so that we could tell exactly what you are looking for?

Maybe you are looking for

  • Error while importing Rules into CC5.2

    Gurus, Part of our GRC go live, I have been trying to import Rules from the Development CC system to Q CC. I have followed all the steps as per the Admin tasks but the below error is coming up at the final step to import rules in to the desitnation s

  • My Bookmarks menu no longer has the "manage bookmarks" option. Where has this functionality gone?

    The top of the Bookmarks menu now only contains "Bookmark this page" and "Show all bookmarks". I'm running Firefox 4.0.1 on Windows XP.

  • Computer wont recognize iphone4

    I recentley purchased a new HP laptop with windows 7 on it. When i plug my iphone 4s into it, the computer wont recognized it, it just keeps making the noise like something is being plugged in over and over. When i plug in my girlfriends iphone 5 the

  • How to get photos on full size display in photo book ?

    I am creating a photo book with iPhoto. What bothers me is....the smallest zoom function possibillity for the photo display inside the default frames, won't let me see the whole photosize. Wenn edeting the photos in iPhoto by double clicking, they do

  • How to use BAPI wrappers

    Hi, We are developing our first mobile application for laptops with NWDS 7.1. Following the Developer's Guide, we have our application with a created data object model with data objects from DOE and its component (views, controller and so on). The da