Component binding return null value

I'm migrating a JSF 1.2 application to JSF 2.1, specificly I'm currently using mojorra 2.1.24.
The application consists of request scoped beans, and in order to pass data between requests, it embeds the data inside UI components.
The following behaviour works well with JSF 1.2, but not with JSF 2.1.
The application has the following configuration:
<context-param>
  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  <param-value>client</param-value>
</context-param>
The page contains the following snippet:
<h:form prependId="false">
     <h:inputHidden binding="#{bean.inputHidden}" />
     <h:panelGroup rendered="#{bean.rendered}">
      <h:commandLink value="onAction" action="#{bean.onAction}" />
     </h:panelGroup>
</h:form>
The bean is the following:
@ManagedBean
@RequestScoped
public class Bean {
  private UIInput inputHidden;
  private AItem item;
  public setInputHidden(UIInput inputHidden){
    this.inputHidden = inputHidden;
    if(item != null){ this.inputHidden.setValue(item); }
  public AItem getItem(){
    return (AItem) getInputHidden().getValue();
  // other getter/setter
  public String onNavToPage(AItem item){ this.item = item; return "page"; }
  public String onAction(){ //... do something return ""; }
  public boolean isRendered(){ return getProcessItem() != null; }
The steps are the following:
to navigate to page page the method bean.onNavToPage is invoked from within another page;
upon page rendering the bean.item is set as bean.inputHidden value;
after the page is diplayed, the command link is pressed.
At this point no command link is invoked, because the bean.inputHidden.getValue() returns null, and the command link is not processed.
I noticed that the inputHidden parameter passed to the setInputHidden method during restore view phase has, inputHidden.getValue() == null, no value has been saved previously in the view.
I would guess that something has changed in the component state management, but debugging the JSF code I didn't find what.
Debugging JSF code I found that the component state has been masked before the state has been saved in the view, so the ComponentStateHelper.saveState saves the deltaMap and not the defaultMap, where all the state has been put.
public Object saveState(FacesContext context) {
        if (context == null) {
            throw new NullPointerException();
        if(component.initialStateMarked()) {
            return saveMap(context, deltaMap);
        else {
            return saveMap(context, defaultMap);
is this a bug?
If not, how can I restore JSF 1.2 behaviuor and save the defaultMap?
Thanks in advance for the help.

0.10: Saved session state: 6385226710016200 "P327_OU_NAME" changedValue="test"
0.10: ...P327_FK_ORGUNIT session state saving same value: "%null%"
0.15: Saved session state: 6388922235040486 "P327_OU_DESC" changedValue=""
0.15: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
0.15: Branch point: BEFORE_COMPUTATION
0.15: Computation point: AFTER_SUBMIT
0.15: Perform Branching for Tab Requests
0.15: Branch point: BEFORE_VALIDATION
0.15: Perform validations:
0.16: Branch point: BEFORE_PROCESSING
0.16: Processing point: AFTER_SUBMIT
0.16: ...PLSQL (AFTER_SUBMIT) INSERT INTO INDIT_PS_ORGUNIT ( OU_ID, FK_ORGUNIT, OU_NAME, OU_DESC ) VALUES ( INDIT_PASS_SEQ_GENERIC_ID.NEXTVAL, :P327_FK_ORGUNIT, :P327_OU_NAME, :P327_OU_DESC )
0.16: Show ERROR page...
0.17: Processing point: AFTER_ERROR_HEADER
0.18: Processing point: BEFORE_ERROR_FOOTER
ORA-01722: invalid number
the table was created with:
CREATE TABLE INDIT_PS_ORGUNIT (
OU_ID NUMBER(15) PRIMARY KEY,
FK_ORGUNIT NUMBER(15) NULL,
OU_NAME VARCHAR2(30) NOT NULL,
OU_DESC VARCHAR2(30) NULL,
OU_DELETED DATE NULL
what i see is that the status is "%null%" and not really "" (NULL, nothing, ...).
so what can i do to insert a null value from a select list?
i gave up RTFM. because i found nothing (NULL) ?!?!

Similar Messages

  • Reading User Profile Properties pragmatically in SharePoint 2010 Returns Null Values Although it has values returned from AD

    Reading User Profile Properties pragmatically in SharePoint 2010 Returns Null Values Although it has values returned from AD
    I configured the user profile service application and run Sync and user profiles and its properties returned from Active directory but when I want to read it pragmatically it returns null values.
    this is my code...
       void runQueryButton_Click(object sender, EventArgs e)
               // Get the My Sites site collection, ensuring proper disposal
                using (SPSite mySitesCollection = new SPSite("http://sp/my"))
                    //Get the user profile manager
                    SPServiceContext context = SPServiceContext.GetContext(mySitesCollection);
                    UserProfileManager profileManager = new UserProfileManager(context);
                    UserProfile profile = profileManager.GetUserProfile("Contoso\\user");
                    foreach (Property prop in profileManager.Properties)
                       // if (prop.Name == "Department")
                        resultsLabel.Text += prop.DisplayName + ":" + profile[prop.Name].Value + "<br />"; ;

     Hi,
    Please try with the following code
          PrincipalContext principalContext = new PrincipalContext(ContextType.Domain);
                                SPServiceContext context = SPServiceContext.GetContext(site);
                                UserProfileManager profileManager = new UserProfileManager(context);                        
      foreach (Property prop in profileManager.Properties)
                       // if (prop.Name == "Department")
                        resultsLabel.Text += prop.DisplayName
    + ":" + profile[prop.Name].Value + "<br />"; ;
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

  • How to check the sql:query is return null value

    I have use :
    <sql:query var="sql1" dataSource="${db}">
    select col_name from table_name
    where a=<c:out value="${row.test1}"/>
    and b='<c:out value="${row.test2}"/>'
    </sql:query>
    So, how can I check this statement return null value which is no record within this table?

    The Result should never be null but can be empty. You can check if the Result is empty using an if tag and checking the rowCount property:
        <sql:query var="books"
          sql="select * from PUBLIC.books where id = ?" >
          <sql:param value="${bookId}" />
        </sql:query>
         <c:if test="${books.rowCount > 0}">
         </c:if>http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL7.html#wp84217
    Look for query Tag Result Interface

  • Binding for "File Content Repository Path" is returning null value

    I have created a data control for file based content repository based on an existing file system path. *But when this data contol is invoked the command "#{bindings['getURI_returnURI'].inputValue}" is returning null.*+
    Please advice what are possible scenarios. I have performed the following
    #1. Create a file system folder in windows XP named "C:\CPContentRepository" and add some html pages into this folder.
    #2. Create a "content" project in the application.
    #3. Create a "Content Repository Data Control" named "CPFileContentRepository". Repository Type : "File System", Base Path : "C:\CPContentRepository". Test & Registration is successful.
    #4. Add a "panel horizontal" into jsf jsp "ContentTest" page & drap-dop data control "CPFileContentRepository--> getURI(String)--> Return--> URI". select return type as "ADF Output Text".
    #5. Edit Authorization of the "ContentTest" page definition for "View --> anyone".
    #6. Edit Authorization of the "ContentTest" page definition bindings "getURI" for "Invoke --> anyone".
    #7. Run the "ContentTest" page. The output for the page is empty.
    Regards,
    Vikki

    There're two major problems in your code. One you have used different names to get your parameters like in your first jsp they're like
    <input type="text" name="did" size="20" </p>
      <p align="center"> </p>
      <p align="center"><b>Name        </b>          
      <input type="text" name="name" size="20"></p>
      <p align="center"> </p>
      <p align="center"><b>Specialist In         
      <input type="text" name="specialist" size="20"></b></p>
      <p align="center"> </p>
      <p align="center"><b>Address                
      <input type="text" name="address" size="20"></b></p>
      <p align="center"> </p>
      <p align="center"><b>Phone no.            
      <input type="text" name="phno" size="20"></b></p>
      <p align="center"> </p>but when you're getting you're doing it like this
    String name = request.getParameter("name");
         String did = request.getString("did");
         String add = request.getParameter("add");
         String specilist = request.getParameter("specilist");
         String phno = request.getParameter("phno");First get them with same name as you have them in your first jsp. another thing in that you're not used form tag in write way... You have created submit button in some other form
    and when you're pressing submit button actully you're submitting only that form value and your form1 is not submitted that's why you're getting null values for
    those parameters you're getting with right name

  • Transient vo attribute binding returning null

    i have a editable form with multiple input text components which i created by dropping a collection on page.
    now i want to add more fields which are transient and read only.
    i added two transient attributes in VO with Updatable to Never and queryable to true, i dont have the logic yet so the expression is blank. i created a label using control hint.
    now i created two attribute value bindings for these new fields.
    i created two input text fields and used these bindings for their label , value properties. i set readonly and disabled both true for these input text fields.
    if i hard code the label and value properties of input text it works, if i use binding expressions for them, it throws some error saying could not find binding for transient fileds or thery returned null.
    what stpes should i use to add a transient field to a editable form.
    jdev 11.1.1.5.0

    Put the transient attributes into the underlying eo, refresh the vo and add the attributes from the eo to the vo. Now they should work just as any other attribute.
    Timo

  • Webservice returns null values (Flex)

    Hi all,
    I created a webservice in abap,
    (a RFC and a Function Web Service).
    It exports a table type and contains data from a Ztable.
    When i request it from Flex, it returns rows, but they contain NULL values, why ?
    I can request and display bapi webservices that comes with in SapNetweaver trial 7.1 but i cant display my own webservice.
    Result like this;
    result     generated.webservices.ZCUSTOMERS_TT (@2205981)     
         [inherited]     
         [0]     generated.webservices.ZCUSTOMERS (@2362c91)     
              CLIENT     null     
              ID     null     
              NAME     null     
         [1]     generated.webservices.ZCUSTOMERS (@23a4129)     
         [2]     generated.webservices.ZCUSTOMERS (@23a42e1)     
         [3]     generated.webservices.ZCUSTOMERS (@23a41c9)     
    it is true that there are 4 rows in table, but all client, id and name is null
    why ?

    thanks for answer but my problem didint solved.
    My webservice can return normal values like integer or decimal and i can read it from flex.
    but when i try to view tables, i always get null values BUT item count is true :=) i have 4 item in z table and 4 rows returns in array from webservice but NULL values :=).
    I can't return structure as well.
    result     mx.utils.ObjectProxy (@211af29)     
         DEGER     1     
         GS_CUSTOMER     generated.webservices.ZCUSTOMERS (@22ce719)     
              CLIENT     null     
              ID     null     
              NAME     null     
         GT_CUSTOMER     mx.collections.ArrayCollection (@210cd01)     
              [inherited]     
              [0]     generated.webservices.ZCUSTOMERS (@22cef61)     
                   CLIENT     null     
                   ID     null     
                   NAME     null     
              [1]     generated.webservices.ZCUSTOMERS (@22ced31)     
              [2]     generated.webservices.ZCUSTOMERS (@22cedd1)     
              [3]     generated.webservices.ZCUSTOMERS (@22cea11)     
              source     Array (@22687e9)     
         object     Object (@22ce8a9)     
         type     null     
         uid     "723117ED-66EC-C93B-9E66-C0FD4F01246C"     
         ZCUSTOMER_TT     generated.webservices.ZCUSTOMERS_TT (@22eb941)     
    What do you use, when declaring variables ?
    Like or type or ref to ? Can it be a problem ?
    here is my function export inteface.
    http://img241.imageshack.us/img241/9258/screenhunter01jun082052.gif
    Edited by: bilen cekic on Jun 8, 2009 8:26 PM

  • Procedure Array Binding a Null Value

    Can you perform array binding in ODP.NET (to a procedure for example that inserts values) and assume that if there are null values in the array that the records inserted will have the corresponding null values in their records?

    Here's a quick sample using pl/sql associative arrays to insert null values into a table (I think this is what you mean)...
    SQL*Plus: Release 10.1.0.3.0 - Production on Fri Feb 18 09:38:55 2005
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    SQL> connect /
    Connected.
    SQL> create table null_array_insert
      2  (
      3    first_name  varchar2(32) not null,
      4    middle_name varchar2(32) null,
      5    last_name   varchar2(32) not null
      6  );
    Table created.
    SQL> create or replace package null_array_test as
      2    -- create a type for each column
      3    type t_first_name is table of null_array_insert.first_name%type
      4      index by binary_integer;
      5
      6    type t_middle_name is table of null_array_insert.middle_name%type
      7      index by binary_integer;
      8
      9    type t_last_name is table of null_array_insert.last_name%type
    10      index by binary_integer;
    11
    12    -- the procedures that will perform our work
    13    procedure bulk_insert (p_first_name  in t_first_name,
    14                           p_middle_name in t_middle_name,
    15                           p_last_name   in t_last_name);
    16  end null_array_test;
    17  /
    Package created.
    SQL> create or replace package body null_array_test as
      2    procedure bulk_insert (p_first_name  in t_first_name,
      3                           p_middle_name in t_middle_name,
      4                           p_last_name   in t_last_name) is
      5    begin
      6      forall i in p_first_name.first..p_first_name.last
      7      insert into null_array_insert (first_name,
      8                                     middle_name,
      9                                     last_name)
    10                          values    (p_first_name(i),
    11                                     p_middle_name(i),
    12                                     p_last_name(i));
    13    end bulk_insert;
    14  end null_array_test;
    15  /
    Package body created.
    Here's the C# code:
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace Associative
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          string connStr = "User Id=/";
          OracleConnection oraConn = new OracleConnection(connStr);
          oraConn.Open();
          // create the command object and set attributes
          OracleCommand cmd = new OracleCommand("null_array_test.bulk_insert", oraConn);
          cmd.CommandType = CommandType.StoredProcedure;
          // create parameter objects for each parameter
          OracleParameter p_first_name = new OracleParameter();
          OracleParameter p_middle_name = new OracleParameter();
          OracleParameter p_last_name = new OracleParameter();
          // set parameter type for each parameter
          p_first_name.OracleDbType = OracleDbType.Varchar2;
          p_middle_name.OracleDbType = OracleDbType.Varchar2;
          p_last_name.OracleDbType = OracleDbType.Varchar2;
          // set the collection type for each parameter
          p_first_name.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
          p_middle_name.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
          p_last_name.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
          // set the parameter values
          p_first_name.Value = new string[4]{"First 1", "First 2", "First 3", "First 4"};
          p_middle_name.Value = new string[4]{"Middle 1", "", "Middle 3", ""};
          p_last_name.Value = new string[4]{"Last 1", "Last 2", "Last 3", "Last 4"};
          // set the size for each array
          p_first_name.Size = 4;
          p_middle_name.Size = 4;
          p_last_name.Size = 4;
          // set array bind size for the columns since they
          // are a variable size type (varchar2)
          p_first_name.ArrayBindSize = new int[4]{32, 32, 32, 32};
          p_middle_name.ArrayBindSize = new int[4]{32, 32, 32, 32};
          p_last_name.ArrayBindSize = new int[4]{32, 32, 32, 32};
          // add the parameters to the command object
          cmd.Parameters.Add(p_first_name);
          cmd.Parameters.Add(p_middle_name);
          cmd.Parameters.Add(p_last_name);
          // execute the insert
          cmd.ExecuteNonQuery();
          p_last_name.Dispose();
          p_middle_name.Dispose();
          p_first_name.Dispose();
          cmd.Dispose();
          oraConn.Dispose();
    And after running the code:
    SQL> select * from null_array_insert;
    FIRST_NAME                       MIDDLE_NAME                      LAST_NAME
    First 1                          Middle 1                         Last 1
    First 2                                                           Last 2
    First 3                          Middle 3                         Last 3
    First 4                                                           Last 4
    4 rows selected.
    SQL> select * from null_array_insert where middle_name is null;
    FIRST_NAME                       MIDDLE_NAME                      LAST_NAME
    First 2                                                           Last 2
    First 4                                                           Last 4
    2 rows selected.
    SQL>Hope that helps,
    - Mark

  • Varchar Column Returning Null Value

    Hi
    I have a report with a subquery which contains a dynamic from clause which is set by the main query, the report returns date and number values from the view in the subquery but does not return varchar2 values, if I select the varchar2 values from the view in sqlplus then the value is returned.
    Any help would be much appreciated thanks,
    Dereck

    Please check the elasticity of the field in the Report Layout where you are returning the varchar2 value.

  • Web Service Operation returns null values

    I got a Flash program that uses a Web Service.  I linked the actionscript to the Flex Files to get my connection to work.  I got it to work fine, but the problem is with sending it parameters.  This only works on functions without parameters.  But when I try to pass parameters, it returns null.  I also tried using the argruments function, but that caused it to return error.  What do I do to make it work?  Here is my code below:
    stop();
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import mx.rpc.soap.*;
    import mx.rpc.events.*;
    import mx.rpc.AbstractOperation;
    import flash.events.Event;
    import flash.utils.Timer;
    var webService:WebService = new WebService();
    webService.wsdl = "http://www.askent.com/ttcs.asmx?WSDL";
    webService.loadWSDL();
    var serviceOperation:AbstractOperation;
    /*var loginTimer: Timer = new Timer(1000, 1);
    loginTimer.start();*/
    var loginOperation: AbstractOperation;
    var nickname:String;
    var token:String = "token";
    var gameName:String = "CRAZ";
    //loginTimer.addEventListener(TimerEvent.TIMER, SetupWebService);
    signin_btn.addEventListener(MouseEvent.CLICK, login);
    /*function SetupWebService(event: TimerEvent):void{
              webService.loadWSDL("http://www.askent.com/ttcs.asmx?WSDL");
              webService.addEventListener(LoadEvent.LOAD, BuildServiceRequest);
    function BuildServiceRequest(evt:LoadEvent){
              /*loginOperation = webService.getOperation("GuestLogin");
              loginOperation.send(nickname, token, gameName);
              //nickname = name_input.text;
              loginOperation.addEventListener(FaultEvent.FAULT, DisplayError);
              loginOperation.addEventListener(ResultEvent.RESULT, DisplayResult);*/
              trace("connected");
    function login(event: MouseEvent): void{
              loginOperation = webService.getOperation("GuestLogin");
              //nickname = name_input.text;
              loginOperation.addEventListener(FaultEvent.FAULT, DisplayError);
              loginOperation.addEventListener(ResultEvent.RESULT, DisplayResult);
              //loginOperation({Nickname: nickname, Token: token, GameName: gameName});
              //loginOperation.arguments = {nickname: "GGG", Token: "token", GameName: "gameName"};
              loginOperation.send([nickname, token, gameName]);
    function DisplayError(evt:FaultEvent){
                                  trace("error");
    function DisplayResult(evt:ResultEvent)
              var wsdlResponse:String = evt.result as String;
              trace(wsdlResponse);
    function sendLogin(nickname: String, token: String, gameName: String): String{
              return nickname + token + gameName;

    Shay,
    The link worked. I generated Java Web Service from my WSDL, and tested using the HTTP analyzer
    But for get Operation method on the WSDL, I could not see anything in the response object, but the same operation i could see the output in soapUIPro.
    Can you give me some more guildelines to debug...
    Thanks,
    Sri

  • Hidden field in form returns null value

    Hi all - I searched for this but found nothing that fit my problem although various other problems came up.
    I have a Login jsp, with a simple form for username and password:
    <form name="login" method="post" action="servlet/ControlServlet"
    onSubmit="return validateForm()"><table width="180" border="0"
    cellspacing="0" cellpadding="0">
                <tr>
                  <td width="96" class="logintext">Username</td>
                  <td width="84"> </td>
                </tr>
                <tr>
                  <td><input name="username" type="text" size="15"
    maxlength="15"></td>
                  <td><input type="submit" name="Submit" value="Login"></td>
                </tr>
                <tr>
                  <td class="logintext">Password</td>
                  <td> </td>
                </tr>
                <tr>
                  <td class="logintext"><input name="password" type="password"
    size="15" maxlength="15"></td>
                  <td><input name="actionCode" type="hidden" value="0"></td>
                </tr>
                <tr>
                  <td> </td>
                  <td><div align="center"><a href
    ="Register.jsp"><i>Register</i></a></div></td>
                </tr>
              </table>
              </form>Nothing complex in that form. my hidden field is actionCode and it should pass a 0 to my ControlServlet servlet.
    Here is a snippet from my servlet:
    import java.io.* ;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ControlServlet extends HttpServlet {
      public void doPost(HttpServletRequest request,
                        HttpServletResponse response)
          throws ServletException, IOException {
        response.setContentType("text/html");
                //get the printwriter to output for debugging
                PrintWriter out = response.getWriter();
                //read in form variables
            //String formUsername = request.getParameter("username");
            //String formPassword = request.getParameter("password");
            String action = request.getParameter("actionCode");
            //convert String to int for action
            //int actionInt = Integer.parseInt(action);
            //add action variable to request
            request.setAttribute("aktion", action);
                //debug point 1
                //use requestDispatcher to forward session info to JSP
               RequestDispatcher dispatcher =
               request.getRequestDispatcher("/mvcoutput.jsp");
               dispatcher.forward(request, response);I have commented out a bit for debugging purposes, but basically, the form variables are read in, the username and password don't give me any problems, but the actionCode does. Upon forwarding to a basic jsp for testing my output displays value "null" when using the command:
    request.getAttribute("aktion")Any reason why the hidden field is playing silly buggers ??
    cheers

    Anyone ???
    If I have a field in an html form which is hidden, do I retrieve it in the SAME WAY that I retrieve the non hidden form fields i.e. using the request.getParameter() method ??
    Cheers.

  • Displaying a column in report which returns null value

    Hi
    I have a simple report with two column. The query is as below.
    SELECT decode(caste,1,'SC/ST',2,'General','3','PWD') fcastepi, nvl(count(*),0) fcapi
    FROM applicationformdtl
    WHERE year = :p_year
    AND selected = 1
    AND PROGCD = 'PRM'
    GROUP BY caste
    This query returns values for SC/ST and General as there is no matching data for the PWD. But I want to display PWD with value 0 in the report. How to do this? Can anyone help me in this matter at the earliest?
    Regards
    Trusha

    hello,
    u r calculating the cast in ur detail table applicationformatdtl.
    and also u have the table of caste in which caste description is given
    so ur query like this
    select nvl(decode(a.caste,1,'sc/st',2,'general'),'pwd')cast,
    nvl(a.caste,40),decode(count(*),1,0,count(*),count(*)) total
    from applicationformdtl a,caste c where c.caste = a.caste(+) group by a.caste
    which gives the output
    caste     total     
    sc/st 3
    general 5
    pwd 0
    bye
    Chandan

  • Client attribute returning null value in adf

    hi i am using jdev version = 11.1.1.5.0
    I have 2inputs and 2buttons in my adf form.One of my input boxes calls a javascript function using client listener,I need ids of remaining 1input and 2buttons and I am using client attribute.
    All the controls have their respective client attribute which gets their id from managebean like following:
    <af:clientAttribute name="inpAttr1"  value="#{manageBean.inp1Binding.id}"/>
    <af:clientAttribute name="inpAttr2"  value="#{manageBean.inp2Binding.id}"/>
    <af:clientAttribute name="btnAttr1"  value="#{manageBean.btn1Binding.id}"/>
    <af:clientAttribute name="btnAttr2"  value="#{manageBean.btn2Binding.id}"/>
    This javascript function is called on key press event in input box 1.:
    function clientEnterKeyPressEvent(evt) {
          try {
              var evtSource = evt.getSource();
              var _inp1 = evt.getSource().getProperty('inpAttr1');
              var _inp2 = evt.getSource().getProperty('inpAttr2');
              var _btn1 = evt.getSource().getProperty('btnAttr1');
              var _btn2 = evt.getSource().getProperty('btnAttr2');
              evt.cancel();
          catch (e) {
            alert("Error caught:" + e.message)
    But here i get _inp2,_btn1,_btn2 values null.
    Using client attribute i am getting the id of only one control, on which the event is invoked at the time of event.
    WHat could be the issue?
    Thanks

    Frank ramandeep singh - oracle
    Yes i am getting all values on hardcoding it.
    But here the scenario is ,I am getting id of control which invokes the javascript function i.e when i enter something in input1 javascript function is called and i get id of input1 only,similarly when i enter something in input 2 respective javascript function is called and i get id for input 2 only.
    Hope you got the scenario

  • Form Returns Null Values or Empty Values For Variables After Clicking OK Button

    I'm trying to create a new user based on a template user. Right now I just want to get the variables right, I just want to be able to select a template user, fill in the information that will be different, and click Create User. 
    I'm not sure why this isn't working. I think the problem is in the code for the OK button or Enter keypress but I'm not sure what's wrong with the code I've entered. Any advice would be helpful. I'm sure it's something simple but I'm fairly new to powershell
    and syntax has been rather tricky for me. Sorry if it's a rookie mistake and thanks for any advice.
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    Write-Host "Creating The Form For Selecting Templates"
    $TemplateForm = New-Object System.Windows.Forms.Form
    $TemplateForm.Text = "Select a Template"
    $TemplateForm.Size = New-Object System.Drawing.Size(640,700)
    $TemplateForm.StartPosition = "CenterScreen"
    Write-Host "Enabling Keystroke Response on Form"
    $TemplateForm.KeyPreview = $True
    Write-Host "Defining Keystroke Response for Enter Key"
    $TemplateForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
    {$SelectedTemplate=$TemplateListBox.SelectedItem;$newuserfirstname=$FnameTextBox.Text;$newuserlastname=$LnameTextBox.Text;$newusertitle=$TitleTextBox.Text;$newuserhiringmanager=$MgrNameTextBox.Text;$newuserphonenumber=$PhoneNumberTextBox.Text;$newuserdepartment=$DeptTextBox.Text;$TemplateForm.Close()}})
    Write-Host "Defining Keystroke Response for Esc Key"
    $TemplateForm.Add_KeyDown({if ($_.KeyCode -eq "Escape")
    {$TemplateForm.Close()}})
    Write-Host "Placing OK Button On Form"
    $OKButton = New-Object System.Windows.Forms.Button
    $OKButton.Location = New-Object System.Drawing.Size(75,550)
    $OKButton.Size = New-Object System.Drawing.Size(75,23)
    $OKButton.Text = "Create User"
    $OKButton.Add_Click({$SelectedTemplate=$TemplateListBox.SelectedItem;$newuserfirstname=$FnameTextBox.Text;$newuserlastname=$LnameTextBox.Text;$newusertitle=$TitleTextBox.Text;$newuserhiringmanager=$MgrNameTextBox.Text;$newuserphonenumber=$PhoneNumberTextBox.Text;$newuserdepartment=$DeptTextBox.Text;$TemplateForm.Close()})
    $TemplateForm.Controls.Add($OKButton)
    Write-Host "Placing Cancel Button On Form"
    $CancelButton = New-Object System.Windows.Forms.Button
    $CancelButton.Location = New-Object System.Drawing.Size(150,550)
    $CancelButton.Size = New-Object System.Drawing.Size(75,23)
    $CancelButton.Text = "Cancel"
    $CancelButton.Add_Click({$TemplateForm.Close()})
    $TemplateForm.Controls.Add($CancelButton)
    Write-Host "Placing Label On Template List Box"
    $TemplateListLabel = New-Object System.Windows.Forms.Label
    $TemplateListLabel.Location = New-Object System.Drawing.Size(10,20)
    $TemplateListLabel.Size = New-Object System.Drawing.Size(280,20)
    $TemplateListLabel.Text = "Please fill out the following new user information:"
    $TemplateForm.Controls.Add($TemplateListLabel)
    Write-Host "Creating Template List Box for Form"
    $TemplateListBox = New-Object System.Windows.Forms.ListBox
    $TemplateListBox.Location = New-Object System.Drawing.Size(10,40)
    $TemplateListBox.Size = New-Object System.Drawing.Size(260,20)
    $TemplateListBox.Height = 520
    Write-Host "Placing Label On First Name Box for Form"
    $FnameTextLabel = New-Object System.Windows.Forms.Label
    $FnameTextLabel.Location = New-Object System.Drawing.Size(300,20)
    $FnameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $FnameTextLabel.Text = "First Name:"
    $TemplateForm.Controls.Add($FnameTextLabel)
    Write-Host "Creating First Name Box for Form"
    $FnameTextBox = New-Object System.Windows.Forms.TextBox
    $FnameTextBox.Location = New-Object System.Drawing.Size(300,40)
    $FnameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($FnameTextBox)
    Write-Host "Placing Label On Last Name Box for Form"
    $LnameTextLabel = New-Object System.Windows.Forms.Label
    $LnameTextLabel.Location = New-Object System.Drawing.Size(400,20)
    $LnameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $LnameTextLabel.Text = "Last Name:"
    $TemplateForm.Controls.Add($LnameTextLabel)
    Write-Host "Creating Last Name Box for Form"
    $LnameTextBox = New-Object System.Windows.Forms.TextBox
    $LnameTextBox.Location = New-Object System.Drawing.Size(400,40)
    $LnameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($LnameTextBox)
    Write-Host "Placing Label On Department Box for Form"
    $DeptTextLabel = New-Object System.Windows.Forms.Label
    $DeptTextLabel.Location = New-Object System.Drawing.Size(500,20)
    $DeptTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $DeptTextLabel.Text = "Department:"
    $TemplateForm.Controls.Add($DeptTextLabel)
    Write-Host "Creating Department Box for Form"
    $DeptTextBox = New-Object System.Windows.Forms.TextBox
    $DeptTextBox.Location = New-Object System.Drawing.Size(500,40)
    $DeptTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($DeptTextBox)
    Write-Host "Placing Label On Title Box for Form"
    $TitleTextLabel = New-Object System.Windows.Forms.Label
    $TitleTextLabel.Location = New-Object System.Drawing.Size(300,70)
    $TitleTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $TitleTextLabel.Text = "Title:"
    $TemplateForm.Controls.Add($TitleTextLabel)
    Write-Host "Creating Title Box for Form"
    $TitleTextBox = New-Object System.Windows.Forms.TextBox
    $TitleTextBox.Location = New-Object System.Drawing.Size(300,90)
    $TitleTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($TitleTextBox)
    Write-Host "Placing Label On Manager Name Box for Form"
    $MgrNameTextLabel = New-Object System.Windows.Forms.Label
    $MgrNameTextLabel.Location = New-Object System.Drawing.Size(400,70)
    $MgrNameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $MgrNameTextLabel.Text = "Manager's Name:"
    $TemplateForm.Controls.Add($MgrNameTextLabel)
    Write-Host "Creating Manager's Name Box for Form"
    $MgrNameTextBox = New-Object System.Windows.Forms.TextBox
    $MgrNameTextBox.Location = New-Object System.Drawing.Size(400,90)
    $MgrNameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($MgrNameTextBox)
    Write-Host "Placing Label On Manager Name Box for Form"
    $PhoneNumberTextLabel = New-Object System.Windows.Forms.Label
    $PhoneNumberTextLabel.Location = New-Object System.Drawing.Size(500,70)
    $PhoneNumberTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $PhoneNumberTextLabel.Text = "Phone Number:"
    $TemplateForm.Controls.Add($PhoneNumberTextLabel)
    Write-Host "Creating Phone Number Box for Form"
    $PhoneNumberTextBox = New-Object System.Windows.Forms.TextBox
    $PhoneNumberTextBox.Location = New-Object System.Drawing.Size(500,90)
    $PhoneNumberTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($PhoneNumberTextBox)
    Write-Host "Creating Fake List of Templates"
    $TemplateGroupList = "Test"
    $TemplateForm.Controls.Add($TemplateListBox)
    Write-Host "Ensuring List Box appears in front of other windows"
    $TemplateForm.Topmost = $True
    $TemplateForm.Add_Shown({$TemplateForm.Activate()})
    [void] $TemplateForm.ShowDialog()
    $SelectedTemplate
    $newuserfirstname
    $newuserlastname
    $newusertitle
    $newuserhiringmanager
    $newuserphonenumber
    $newuserdepartment
    Pause

    If you plan on performing all of the work under the Click event, then you won't need to worry about assigning a Script scope to the variables, but if you are planning on using those variables outside of the Event, then David's answer is the way to go.
    Another option is to use a hash table as it also works around the issue with variable scope in a UI Event.
    #Define at beginning of script
    $hashtable = @{}
    $OKButton.Add_Click({$hashtable.SelectedTemplate=$Something})
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Need Help ::  Current row attribute value returning null

      Hi Frds,
    I am facing the problem that
    Current row attribute value returning null............ even though value is there..... plz.. he
    This is the code in PFR
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
        String  pPersonId = pageContext.getParameter("ctrlPersonId");
         String rowReference = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
         OptionsVORowImpl curRow = (     OptionsVORowImpl) am.findRowByRef(rowReference);
        String dtlsItem =  (String)curRow.getFlexValue();   /*  this is returning null value */
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks & Regards,
    jaya
    Message was edited by: 9d452cf7-d17f-4d1e-8e0e-b22539ea8810

    Hi Jaya,
    You want to catch Flexfield values?
    Try below code for catch value.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
    OADescriptiveFlexBean dfb = (OADescriptiveFlexBean)webBean.findChildRecursive("flexDFF"); //get the DFF bean
    OAWebBean dffbean = (OAWebBean)dfb.findChildRecursive("flexDFF0"); //get the field that applies to the attribute1 column that is being rendered
    OAMessageStyledTextBean Stylebean = (OAMessageStyledTextBean)dffbean;
    String dtlsItem  = (String)Stylebean.getText(pageContext);
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks,
    Dilip

  • Pipeline component returns null.

    Hey everyone,
    I have a pipeline component which returns null for negative scenarios. But this will throw an error since i have a flat file disassembler in the disassembler stage.
    I need to terminate the instance and exit before it goes to the pipeline disassembler stage. How do i go about it?
    Regards,
    Priya.

    When building "termination" Pipeline Components, you have to take into account whether they will be used in a Receive Port or a Send Port.
    Receive Port (your case):
    pInMsg.BodyPart.Data = null;
    return pInMsg;
    Send Port:
    pInMsg = null;
    return pInMsg;
    Morten la Cour

Maybe you are looking for

  • Issue in Gratutity Exemption

    Dear Folks, Please advise, here is a scenario of exemption of grautity. The client is calculate grautity amuont manually and proces thru Addtional payment thru custom wage type. The amount of grautity is add to w.type /130 for exemption purpose. Acco

  • Missing or invalid version of SQL Library PSORA with 8.50

    Although unsupported, I am trying to get a HCM 9.1 on PT 8.50.05 running on a 64 bit Windows 7 Pro laptop. Running 11.1.0.7 Windows 2008 64 bit Oracle. I installed the 32 bit Oracle 11.1.0.7 client for Win2008 also. Every thing seems OK until I try t

  • Philips 32' LCD HDTV

    I cannot get a full screen display with the above TV (Model no.: 32PF9966) even after installing SwithResx. It has 1366 * 768 resolution. I would like to know if anybody using the same TV or similare Philips LCD TV with 1366*768 sucessfully achieve a

  • Dual screen imac uses wrong inbuilt webcam for msn messenger video chat.

    I have an imac and apple display set up, using msn messenger the webcam built into the apple cinema display is used not the imac webcam itself, can I change this so the webcam built into the new imac is used, thanks.

  • Migration of SAP Script to SmartFrom

    Hi Experts, I migrated an SAP Script to a Smartform. The SAP Script have a lot of PERFORM <...> IN PROGRAM <....> and these are written in a report porgram. I want to know, how to convert those calls and subroutines so that I can use them in Smartfor