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.

Similar Messages

  • 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

  • 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

  • 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) ?!?!

  • 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.

  • 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

  • Form displays NULL values

    A page is using PL/SQL script to display data. There are 2 display variables. Instead of bringing initial set of data, it displays NULL values. It "fixes" itself after changing variable values from a drop down menu. Why is that and how to fix it?

    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

  • 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

  • Reset form to null values...except readonly fields.

    I need the ability to set all of my checkboxes to a state where they are not Checked...and my dropdowns to a value of zero....and non-readonly text boxes to null string.
    However, I have several text boxes with information I want to retain. They are set to readonly.
    Do I have to write my own reset function to do this or can I configure the form fields in a manner that Adobe's resetForm will do the trick ?

    You can set their default value to their current value. That will mean that
    the resetForm command will not affect them.
    If you don't want to do that then you'll need to write your own code to
    reset the file, yes.
    On Fri, Oct 24, 2014 at 4:35 PM, syswizardx <[email protected]>

  • 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

  • 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

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • Trying to dynamically output form fields returns URL values

    Hello,
    If there is a better way to go about this (which is quite likely), please let me know how to go about it.
    I'm working on some code that is supposed to dynamically set the form variables as regular variables so that we can be lazy and not have to refer to the variable with form.somevariable name.
    That part works perfectly.  Until I start testing for URL conflicts in which a URL variable has the same name.  For instance. . .
    I have a form that passes two variables; FirstName and LastName.  If I hit the page, the form shows up, I input a first and last name and click submit.  The code works perfectly.
    However, if I have URL variables with the same names, the code reports the url variable values instead of the form values.
    Some sample values;
    url.FirstName = Joe
    url.LastName = Black
    form.FirstName = Steve
    form.LastName = White
    My code that exposes the form variable will correctly find the form field names, but then when I 'evaluate' the value of the given form field, it will return the value of the URL variable of the same name rather than the form variable.
    What I am really wanting (as I described briefly up above) is to have code that automatically converts client, URL and Form variables into 'regular variables' so that you don't have to write lots of extra code grabbing them later on.  Frameworks like CFWHEELS and ColdBox do this by default, but at the company I work out, we aren't using any of them.  I need it to expose the URL variables, but give presidence to form variables if they have the same name, because they are likely to be intended to do an update or such.
    The code follows  Feel free to ignore the code for the URL and client variables if you wish as they don't directly affect how the form code works, I have tested with them commented out and I get the same result.  I provided all of it to give a more complete idea of what I have been toying with so far.  Please note that I don't normally use 'evaluate'.  There is probably a better way to go, but I don't know what it is.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <!--- Create a form so that we can post some form variables --->
    <form action="" method="post">
        First Name <input type="text" name="FirstName" />
        Last Name <input type="text" name="lastName" />
        <input type="submit" />
    </form>
    <!--- Set a variable to hold the list of URL variable names --->
    <cfset paramsurl = structKeyList(url)>
    <cfoutput>
    <br />
    URL variables:
    <!--- Loop through the list of url variables and then dynamically set a new variable to be equal to whatever is held by it --->
        <cfloop index="i" list="#paramsurl#">
            <cfset myDynVar = Evaluate(i)>
            <!--- Let's output the dynamically created variable as a test --->
            #i# = #myDynVar#<br />
        </cfloop>
    </cfoutput>
    <!--- If form fields exist --->
    <cfif isdefined("Form.FieldNames")>
        <cfoutput>
            <b>Field Names:</b> #Form.FieldNames#
            <p>
                <b>Field Values:</b><br>
                <cfloop INDEX="TheField" list="#Form.FieldNames#">
                    #TheField# = #Evaluate(TheField)#<br>
                    <cfset TheField = Evaluate(TheField)>
                </cfloop>
            </p>
            Lets try and output the two form fields without using the "form." notation<br>
            FirstName : #FirstName# <br />
            LastName : #LastName#
        </cfoutput>
    </cfif>
    <br />
    The client variables currently available are:<br />
    <cfoutput>
        <cfset nVarCounter = 1>
        <cfloop list="#GetClientVariablesList()#" index="whichClientVar">
            #whichClientVar# : #client[whichClientVar]#<br />
            <cfset whichClientVar = Evaluate(whichClientVar)>
        </cfloop>
    </cfoutput>

    Try this:
    <cfset structAppend( FORM, {
              'alpha' = 'bravo',
              'charlie' = 'delta',
              'echo' = 'foxtrot'
    }, true ) />
    <cfset structAppend( URL, {
              'alpha' = 'zulu',
              'lima' = 'mike',
              'echo' = 'papa'
    }, true ) />
    <!--- List the scopes in ascending order of importance. --->
    <cfdump var="#FORM#" label="FORM scope" />
    <cfdump var="#URL#" label="URL scope" />
    <cfset scopes = "url,form">
    <cfloop list="#scopes#" index="i">
              <cfloop list="#structKeyList( evaluate( i ) )#" index="j">
                        <cfset structInsert( VARIABLES, j, evaluate( i & '["' & j & '"]' ), true ) />
              </cfloop>
    </cfloop>
    <cfdump var="#VARIABLES#" abort="1" label="Combined Variables Scope" />
    What I did is insert 3 key/value pairs into the FORM and URL scope.  I then dumped the scopes to show their structure and values.  Then I defined a variable (scopes) which is a list of the least important scope to the most important.  After that, the loop I do simply goes through the SCOPES, their exisiting key/values and sets them into the VARIABLES scope.  Then, when it moves to the next scope of importance, it simply puts their value into the variables scope as well (overriding in the event it already exists), thus, the scopes defined later in the list override and replace.
    Then I just dump the VARIABLES scope (you'll notice it has the I, J and SCOPES variables in there that I used to create the loop.  If you perform this action in a function, simple make the I, J and SCOPES variables part of the LOCAL scope so they won't be in your VARIABLES scope.

Maybe you are looking for

  • Problem with JOB_RSINDCHK during upgrade to ECC 6.0

    Hi, We upgrade from 4.6b to ECC 6.0 SR1. During phase JOB_RSINDCHK the upgrade fails. The file RSINDCHK.ELG says: INDEX PRE-CREATION CHECK Errors and RETURN CODE in RSINDCHK.DE2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Ipod Classic TV viewing?

    I have an IPOD Classic and have downloaded music videos from Itunes (legally) Would like to view on my large TV but don't know the proper cables. My TV has USB port as well as an unused HDMI inputs. Any thoughts as to the proper cable and settings on

  • Issues to use GUI_LOAD to download xls file

    Hi Guru's, we are using the fm GUI_DOWNLOAD for downloading xls files to the physical system.  We are facing  following issues. 1. File contains the currency fields. When downloaded the file to desktop or any location  after decimal zero's are not pr

  • Wrong selection of number of processor in advanced boot option. system became dead slow.

    hello sir, i have acer aspire v3-571g laptop with windows 8.1 x64 based OS. Processor is Intel Core i5. To get a faster booting, i selected 2 processor instead of 1 in advanced boot option (msconfig) by mistake and now my laptop become dead slow on b

  • Search query problem

    SQL> select prod from prod where prod like '%chromium ore%'   2  / PROD chromium ore andconcentrates, ferro-chrome, silico-chrome chromium ore andconcentrates, ferro-chrome, silica-chrome, metal chromium ore andconcentrates, ferro-chrome, silica-chro