How to get readonly text field value in backing bean?

Below is my code in JSF.
<h:inputText id="prodLine" value="#{fbackingBean.value}" required="true" styleClass="readOnlyField" readonly="true"/>
This is a readonly field, and the value will been pass in by a pop up window. after the value had been passed in, i try to store the data which i had selected, but the value in readonly field (which show in above) return a null value.
May i noe how can i get the readonly field value in backing bean? thanks!

Why not keep track of the value in the backing bean? If it's a read only value set from a backing bean it should be simple to retrieve from a backing bean.
I'm new to JSF, but one thing that I have figured out is to try to put everything in the backing beans possible and to do as little as possible within the JFS web page components.

Similar Messages

  • How to get the current JSF phase in backing bean?

    How to get the current JSF phase in backing bean?
    Edited by: jimmy6 on Nov 27, 2007 7:27 AM

    I am using phasetracker to trace it also.I want to know whether it is it render response phase. I know FacesContext.getCurrentInstance().getRenderResponse() work for normal jsf component but it will not work for qiupukit datatable. FacesContext.getCurrentInstance().getRenderResponse() will not return true in the following phase. Why?
    [ INFO] 27-11-07 16:20:21 : BEFORE RENDER_RESPONSE(6) (http-80-Processor23)
    I want the 'get' method of datatable being called in response phase to reduce the number of calling because i put the query in 'get' method there. Actually i still straggling with the best practice to code the datatable...

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • How to get the 'text' property value of a button in coding?

    Hi Experts,
    I'm using 10 buttons all are having common action('click'). when i click a button the 'text' value of the button should pass to a function.So the action is same but the passed value will be the 'text' value of the corresponding button.  I don't know how to get the 'text' property of a button in coding. Kindly help me to solve this problem.
    Thanks and Regards
    Basheer

    Hi,
    My event is like this.
    public void onActionclick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
         String s =  ?  ; // should get the 'text' property of clicked button
         fillInput(s);     // function to be called
    The called function is,
    public void fillInput( java.lang.String id )
        String str=wdContext.currentContextElement().getNum();
        str = str + id;
        wdContext.currentContextElement().setNum(str);
    How can i get the 'text' property value of the corresponding button. Click action should be common to all buttons.
    Thanks and Regards,
    Basheer

  • When and How to get the Text.ScrollPos value of a String control when scroll bar position changed

    Hi, 
    I'm working on a feature triggered by scroll bar position of a string control changed.
    But I could not find a good way to catch the scroll bar position changed event, 
    the scroll bar is controlled manually by mouse down → mouse move → mouse up, I want the get the Text.ScrollPos value when user mouse up, and compare with the maximum value.
    But the problem is,  mouse up on the scroll bar could not trigger String: Mouse up event!
    So I have to get the Text.ScrollPos continuously in the background in Timeout event, but I think it’s not efficient.
    Do you have any better idea on when to get the correct destination value of Text.ScrollPos?
    I plan to store the value of Text.ScrollPos in the bottom(maximum value) in a shift register, then compare the current Text.ScrollPos value with the max one.
    If it comes close to the bottom(90%~100% of the maximum value), then the close to bottom LED will turn on.
    Attachments:
    scroll bar pos changed.vi ‏15 KB

    Hello Cecilia,
    I don't think there is any build-in event for this.
    One solution would be to create your own user event at the initialisation of you main and launch a thread which is going to be pulling the value of your scrollbar position:
    Then you can build your main as if they were a scrollbar move event.
    And dont forget to close the thread and destroy the event at the end.
    Hope it helps.
    Attachments:
    Scrollbar event.PNG ‏10 KB

  • How to get-set Hidden field value from JSP ?

    Hii,
    I am quite newbie about jsp and looking for some help..
    I have several url links on my jsp page.
    I when I click one of them, I want to reload my page with new request parameter(s) but also keep the older one(s) in hidden field(s)...
    but I dont know how to set and get hidden field value "syntax" and I am not sure about where/when should I do this... at first I though that I can do it in "onClick" property of url..
    Thanks..

    Hy,
    I have a problem just like that. I am trying to send the value of an subdomain is to another page to be able to modify an entry.
    So in listsubdomains.jsp I have
    <input type = "hidden" name = "subdomainid" value="<%=subdomains.SubdomainID%>"><%=subdomains[i].SubdomainID%>.
    This shouls send the id of the subdomain.
    I an sending this to modifysubdomain.jsp with <form name = "listsubdomains" method = "post" action = "modifysubdomain.jsp">
    and there I retrieve the value like this:
    Integer id = new Integer (request.getParameter("subdomainid"));
              out.println(request.getParameter("subdomainid"));
    My problem is that no matter what is the value I chose to modify it always sends the first value. If I another value manually it works, but just then.
    Please give me some ideas.

  • How to get sales org. field value in CUSTOMER_ADD_DATA~SAVE_DATA  ?

    Dear Guru ,
    The requirment is we send some information to external email system when user save the customer master data ( XD01 , XD02 ) .
    I try to use badi CUSTOMER_ADD_DATA~SAVE to satisfy this requirment , but i can't get the Sales Org value ( KNVV-VKORG ) in this badi in XD02 ...
    Has someone guide me how to do that ?
    Below abap code can get the Sales Org value in tcode XD01 , but not in tcode XD02 .
            DATA :  lv_knvv type char30 value '(SAPMF02D)KNVV'  .
            DATA : l_vkorg type vkorg .
      FIELD-SYMBOLS : <fs_xknvv> type knvv .
      ASSIGN : (lv_knvv) TO <fs_xknvv> .
    * Now i have the Sales Org in XD01 !
          l_vkorg = <fs_xknvv>-vkorg .
    Thanks .
    Best Regards,
    Carlos

      DATA :
             lv_knb1 type char30 value '(SAPMF02D)KNB1' ,
             lv_knvv type char30 value '(SAPMF02D)KNVV' ,
             lv_kna1 type char30 value '(SAPMF02D)KNA1' .
      FIELD-SYMBOLS : <fs_xknb1> type knb1 .
      FIELD-SYMBOLS : <fs_xknvv> type knvv .
      FIELD-SYMBOLS : <fs_xkna1> type kna1 .
      ASSIGN : (lv_kna1) TO <fs_xkna1> .
      ASSIGN : (lv_knb1) TO <fs_xknb1> .
      ASSIGN : (lv_knvv) TO <fs_xknvv> .
    Edited by: Carlos Zhang on Dec 17, 2010 3:25 PM

  • How to get ADF UI Component value in managed bean

    JDev version 11.1.1.1.3.0
    I have written a managed bean method and calling that method on valueChangeEvent of a Select boolean Checkbox ADF Component.
    I want to retreive the value of some other component located in the same page as the checkbox. I need the value of the component into the manged bean. I know how to get the value of the checkbox eg:
    public void selectCheckBoxListener(ValueChangeEvent evt){ 
    boolean selectedValue = (Boolean)evt.getNewValue();
    String oldvalue = (String)evt.getOldValue();
    How can I access the value of an input text component in the above managed bean ? Can someone help on this?

    Hi Sackam,
    String selectedRowId = (String)(evt.getComponent().findComponent("rowId")).getAttributes().get("value");
    The above coding will work fine
    but wht u have specified rowId???? whether the "value" field is inside a af:table????? if so i have doubt on the above code's working.....
    Regards,
    Suganth.G

  • How to get the text is front or back?

    Can any one help me,  getting text is front or back (override)
    I try below code
    but its not working
                PDETextState objPDETextState;
                PDEText aotextObject;
                memset(&objPDETextState, 0,sizeof(PDETextState));
                aotextObject = (PDEText)pdeElement;
                PDETextGetTextState(aotextObject,kPDETextRun,0,&objPDETextState,sizeof (PDETextState));
                if(objPDETextState.renderMode == kPDETextInvisible)
                    AVAlertNote("Invisible");

    [url http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html]How to Use Layered Panes

  • How to get the application module instance in backing bean.

    This is Ramesh, I am new to JDeveloper world.
    In my current application I have change password screen which allows user to change there password.
    Here this is a pop-up page. Here I don't have the view object and pagadef for this changepassword.jspx file.
    My aim is to call the Application Module method which takes the user name, old password and new password.
    In backing bean I am trying to call this method by using
    MyProjAM obj = _binding.getDataControl().getApplicationModule();  //throw null pointer exception.
    _binding is the object of DCBindingContainer. 
    ( I have created the parameter called "binding" as my managed bean property and values as #{binding})
    But the above line is throwing the NullPointerException.
    Could you please help me to come out of this problem.
    Thanks and Regards,
    Ramesh Biradar.

    If your page has no page definition, then #{bindings} will be null during the request for that page.
    If you need your page to invoke a data control method when you press a button, the simplest (and declarative) way is publish your AM method on the AM's client interface, then drop the method as a button from the data control palette onto your page. You don't even need a backing bean to accomplish this.
    That said, you can refer to a data control in a backing bean using the expression #{data.[i]YourAppModuleNameDataControl.dataProvider}
    So, assuming you have a helper method like this:
      public static Object EL(String expression) {
        FacesContext ctx = getFacesContext();
        Application app = ctx.getApplication();
        ValueBinding bind = app.createValueBinding(expression);
        return bind.getValue(ctx);
      }and assuming that your application module is named SRService
    and assuming that you have correctly nominated any Application Module custom methods as being available to clients by selecting them on the "Client Interface" panel of the application module editor, then in a backing bean you can acquire an instance.
    Then, the ADF design time will have automatically generated you a custom AM client interface named SRService and you can reference that service interface in your backing bean by using code like this:
            SRService svc = (SRService)EL("#{data.SRService.dataProvider}");
            svc.yourCustomMethod(your,args);

  • How to get the following field values?

    I have an invoice number. How can I find out (from which tables and fields) the ship date, vessel, port of loading, port of discharge. I think it is VTTK table and fields are datbg, text1, add01 and add02, but if so what should I give in VTTK table to get these values?
    Please give your input.
    I appreciate and points assured for helpful answers.
    Krishen

    Hi Krishen,
    For ship date you can find the data in LIKP table itself. All other details like vessel, port of laoding and port of discharge will be found at the shipping point level.
    Select the delivery number in VL03n and from the menu GOTOITEMSHIPMENT you will find the shipping point details.
    Cheers
    VJ

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How to Add/Concatenate to a text field, values selected in a combo box

    I have a combo box form field that allows the user to select a value from a list and click on an Add button. The Add button should add/concatenate the vaue selected to a text field in order to create a list of values selected. I'm not sure how to do this using Javascript in Acrobat? I know I need to add the javascript to the Add button's Mouse Up action. Any help would be greatly appreciated. Thanks!

    Thanks so much - it works!
    >>> "Gilad D (try67)" <[email protected]> 9/25/2013 9:16 AM >>>
    Re: How to Add/Concatenate to a text field, values selected in a combo box created by Gilad D (try67) ( http://forums.adobe.com/people/try67 ) in JavaScript - View the full discussion ( http://forums.adobe.com/message/5712118#5712118 )
    Let's say the text field's name is "Text1", and the combo is called "Combo1". You can then use this code as the MouseUp script of the Add button:
    var f1 = this.getField("Text1");
    var f2 = this.getField("Combo1");
    if (f1.value=="") f1.value = f2.value;
    else f1.value = f1.value + ", " + f2.value;
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5712118#5712118
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5712118#5712118
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5712118#5712118. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in JavaScript by email ( mailto:[email protected].com ) or at Adobe Community ( http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=3286 )
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How to clear input field value on back

    Hi All,
    I have developed an application, in which user put sales order on first page and press a button then its detail display on second page using restAPI. Now when I press back button on second page then it takes me to first page with holding previous sales order value in input field. And when I change its value and press that button again then it shows me previous sales order detail.
    Please suggest me, how to refresh cache and input fields value on back button?
    Thanks & Regards
    Shubhanshu

    Hi Viren,
    My code is,
    First view
    sap.ui.jsview("uitest2.first", {
      getControllerName : function() {
      return "uitest2.first";
      createContent : function(oController) {
      var text = new sap.m.Label({
            text: 'Dealer Code',
           layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center })
      var input =  new sap.m.Input("CUSTOMER",{
            type: sap.m.InputType.Text,
          placeholder: 'Enter Dealer code...',
          layoutData: new sap.m.FlexItemData({growFactor: 1, alignSelf: sap.m.FlexAlignSelf.Center}) 
      var Dealer = new sap.m.HBox({ 
                items:[  text,input
    //                   new sap.m.Label({
    //                   text: 'Dealer Code'
    //                   new sap.m.Input("CUSTOMER",{
    //                   type: sap.m.InputType.Text,
    //                   placeholder: 'Enter Dealer code...'
                       height : "6em"
          var button = new sap.m.Button({
               text: "Submit",
               press: function(oEvent) {
                  oController.loadData();
                  app = sap.ui.getCore().byId("myApp");
                  app.to("idsecond1");//, sap.ui.getCore().byId("CUSTOMER").getValue());
               layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center}) 
          return new sap.m.Page({
         title: "Sales Dealer Info",
         content: [ Dealer,button
    First controller
    sap.ui.controller("uitest2.first", {
        loadData: function() {      
            var oParameters = ({
            "CUSTOMER" : sap.ui.getCore().getElementById('CUSTOMER').getValue(),    
             console.log(oParameters);
             var url = "http://###########:8000/sap/bc/zrst_customer?sap-client=800/";
             var oModel = new sap.ui.model.json.JSONModel();
             $.ajax({             
             url : url ,
             dataType : "jsonp",
             type : "POST",
             data: oParameters,
             success: function(data,textStatus,jqXHR) {
             data = JSON.parse(data);
                     console.log(data);   
                     oModel.setData(data);
             sap.ui.getCore().setModel(oModel);
    Second View
    sap.ui.jsview("uitest2.second", {
      getControllerName : function() {
      return "uitest2.second";
      createContent : function(oController) {
      var oTable = new sap.m.Table("table",{
           headerText: "Dealer data",
           columns: [
             new sap.m.Column({
               header: new sap.m.Label({text: "NAME"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "CITY"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "COUNTRY"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "COUNTRYISO"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "STREET"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "PST_CODE"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "TELEPHONE"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "EMAIL"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
           items: {
           path: "/KEY",
           template: new sap.m.ColumnListItem({
           cells: [
                   new sap.m.Text({                              //new sap.m.ObjectIdentifier
                   text: "{NAME}"
                   new sap.m.Text({
                   text: "{CITY}"
                   new sap.m.Text({
                   text: "{COUNTRY}"
                   new sap.m.Text({
                   text: "{COUNTRYISO}"
                   new sap.m.Text({
                   text: "{STREET}"
                   new sap.m.Text({
                   text: "{PST_CODE}"
                   new sap.m.Text({
                   text: "{TELPHONE}"
                   new sap.m.Text({
                   text: "{EMAIL}"
      return new sap.m.Page({
      title: "Dealer Info",
      showNavButton: true, 
      navButtonTap:function(){ 
      app = sap.ui.getCore().byId("myApp"); 
      app.to("idfirst1"); 
      sap.ui.getCore().getElementById('CUSTOMER').setValue("");
      oModel.refresh();
      content: [ oTable
    Index.htm
    <!DOCTYPE HTML>
    <html>
      <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <script src="resources/sap-ui-core.js"
      id="sap-ui-bootstrap"
      data-sap-ui-libs="sap.m,sap.ui.commons"
      data-sap-ui-theme="sap_bluecrystal">
      </script>
      <!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->
      <script>
      sap.ui.localResources("uitest2");
      var app = new sap.m.App("myApp",{initialPage:"idfirst1"});
      var page = sap.ui.view({id:"idfirst1", viewName:"uitest2.first", type:sap.ui.core.mvc.ViewType.JS});
      var page1 = sap.ui.view({id:"idsecond1", viewName:"uitest2.second", type:sap.ui.core.mvc.ViewType.JS});
      app.addPage(page).addPage(page1);
      app.placeAt("content");
      </script>
      </head>
      <body class="sapUiBody" role="application">
      <div id="content"></div>
      </body>
    </html>
    Thanks
    Shubhanshu

  • How to get multiple selected fields in list

    Hello all,
    I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
    Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
    Thankx..

    i want to put the selected fields of list in an array through AS3....
    actually......i figured it out how to do that...........
    Its simple......use
    list.selectedItems[index]
    and to get the number of items selected......
    list.selectedItems.length
    simple.....

Maybe you are looking for

  • PE9 "The file is damaged or is a format that cannot be included in the Organizer"

    I am trying to rebuild my Photoshop Elements 9 Organizer content after a previous computer was physically damaged beyond repair. I reinstalled PE9 and told it to import the image files from my HDD. It imported a large number but also rejected a large

  • Events on External Drive not showing up in Event Library

    Hi, I spent several hours last night importing nearly a Terabyte of iMovie events into FCP X.  It took forever, but seemed to work - all my iMovie events appeared in the FCP Event library. Today, when I started up FCP X, my external drive appears in

  • Album info doesn't save.

    Changing info on any album won't save. I right click album, get info, I change the info and click "ok" and then nothing is changed.

  • STMS Extended Transport Control

    Anyone ever used the Extended Transport Control in STMS?  The team at my current project wants to setup a client landscape like this (not the complete diagram)... DEV100 >--+----+--> QA100 >-----> PROD100           |    | DEV110 <--+    +--> QA120   

  • Premiere keeps crashing after installing BCC Continuum Complete

    Hi, I just downloaded and installed the BCC Continuum Complete plug-in for Adobe and I need to use one of it`s effects on my footage - BCC Flickering Fixer. When I attempt to apply the effect, everything works at first, but then: a) Premiere crashes