Newline problem in Textbox

Hi,
Sorry if my question sounds pretty noobish since I am new to JavaFX. I have a problem with inserting newline into JavaFX's textbox (with multi-lines allowed). I realize that JavaFX's textbox keeps replacing the newline character '\n' with a blank space. Is there anyway I can insert newline into the textbox? Perhaps JavaFX uses a different newline character for its textbox?
Thanks.

Hmm... this is weird. I am also on Windows machine (Vista) by the way.
I tried your code and it works, but somehow with my code it does not work. I copy-pasted my TextBox settings to your code and it still works, but my code somehow still does not work. It's weird. Perhaps Netbeans JavaFX GUI designer added something "extra" there. I will shift through my code, and post the stripped down version here later.
Meanwhile, I found this JavaFX API documentation http://download.oracle.com/docs/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.scene.control/javafx.scene.control.TextBox.html, and look at the explanation under the textbox.text variable (click the arrow head). It mentions "The text value of this TextInput. This is updated when the user commits (on desktop, this is typically after focus lost or an ENTER press). *_New line characters ("\n") in the text will be replaced with space characters._*" It exactly describes my problem. But I don't understand why the newline character work with your code though.

Similar Messages

  • Problem with textboxes in Flash CS5

    Hi, I am currently a Flash CS4 user and am trying Flash CS5 currently to see if it is worth it to pay for the upgrade. I currently have a problem with the use of textboxes in CS5 comparing with the previous version. When I try to change the texts of a text box using the following command in actionscript:
    showlmytext.text = "My string: " +String(somevariable);
    I would get weird misaligned text outputted in my textbox, which exact same code did not cause this problem on Flash CS4.
    Can somebody please tell me what is the problem and how can I fix it?
    Thanks

    Hi Mario,
    I hope you are well. My name is Sandi Langlotz.
    At my job at greenidea.com, here in SF; I am having difficulty with using Hebrew in the trial download of CS5 Flash. Russ Mumford my boss has also contacted you regarding our problem.
    Flash has a new TLF (Text Layout Format tool).  My difficulty has to do with text boxes that are formatted for Right to Left text, with Hebrew selected as the Locale. We are pasting from Microsoft Word.
    I hope  that you may have a suggestion, a referral  or a possible work around for me to try.
    I have tried Adobe Customer Service several times to no avail.
    Problem 1.
    The first sentence below, (in blue) is correct format for Hebrew. Hebrew reads from R to Left.
    When I paste the Hebrew text into the Flash animation, one of two things can happen;
    the punctuation is cut off of the left side completely; or it is pasted in to the Right side of the Text box, (at the wrong end of the sentence). 
    I have tried to click the cursor into the left in order to insert the punctuation mark; this works sometimes but often I am unable to click in to manually correct the problem. I don't understand why it is cutting it off, or why I am sometimes unable to click into the left side and insert the punctuation.
    Problem 2
    In the second paste (the 2nd bold sentence),  .CSO on the left side of the sentence is correct, as is the rest of the sentence.
    When I paste the text  into Flash from Word, Flash puts it in as reversed order. the word CSO. has the punctuation switched to the right (CSO.)  Flash reverses the order of the other characters in the sentence also (like in the 2nd black sentence).
    שולחן נקי הוא שולחן מאובטח.
    שולחן נקי הוא שולחן מאובטח
    מבוסס על רעיון ממגזיןCSO .
    .CSOןיזגממ ןויער לע ססובמ
    Adobe says it supports Right to Left text, but I can find no info on these two buggy problems. Do you have any idea what is wrong?
    Thank you ahead of time for any info or referrals you may suggest.
    Sandi Langlotz
    שולחן נקי הוא שולחן מאובטח.
    שולחן נקי הוא שולחן מאובטח
    מבוסס על רעיון ממגזיןCSO .
    .CSOןיזגממ ןויער לע ססובמ

  • Newline problem with soap

    I'm having these weird problems with newlines. I'm sending \n in a message because I have a multi lined message i want parsed. Axis is receiving the message and throwing exceptions. I printed out the line it's parsing and it's giving this error that it can't parse:
    '2.5
    PID'
    The parser is not supposed to parse past the \n but it seems to be trying to. I've tested this without webservices and it works fine, adding webservices into the equation gives me these errors.

    Additional info: The problem is the same in the entire environment here (PI DEV, QAS and PRD) and on another PI machine.
    So I doubt very much if it's cache related.
    Edit: This is the 'application error':
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  XML Validation Inbound Channel Response
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="UNKNOWN">APPLICATION_ERROR</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>application fault</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="http://xml.apache.org/axis/">hostname</SAP:ApplicationFaultMessage>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Edited by: Frederik-Jan Roose on Dec 7, 2009 11:11 AM

  • Problem with textBox border

    Hi All,
      I am trying to simulate a grid line table with 4 column and as much as row in database. So i had 4 textboxes with border but when doing so i run in to the below problem
    When even one of the 4 TextBox has a bigger content to display the height of that textBox alone increasing leaving the other textBox hanging above.
    Is there a way to increase the height of all the TextBoxes in the Row to the textBox which has the maximum height. Previously i was using IReport where i had such option but in crystal i couldnt find.I dont beleive that if Crystal doesnt have such an option.
    SomeBody please tell me how to do that?
    Thanks,
    Prem

    Try to place the text boxes in a single box by inserting a box and separate them by inserting vertical lines. If the data is in details section then insert one more section below as details b and extend the box height and lines height to details section b and fit the details section b.
    Now the box height will vary according to the text length whch means the section height will also vary accordingly. So the complete box height will be the same for all texts.
    I Hope it helps !
    Raghavendra

  • BIC Mapping newLine Problem

    Hello,
    I have problem with SEEBURGER BIC mapping. I need to create out file with new line for each segment.
    I triend with parameter in Module configuration by  newLine to true. But no Successes. Does anybody having idea?
    regards,
    Kareem.

    Hi Ansar,
    sorry I wanted to post a solution, but I have to write special characters and this editor is deleting the characters when i press "edit message".
    But in
    http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_21915676.html
    you see the characters you have to add.
    Regards Mario
    Edited by: Mario Müller on Oct 30, 2008 2:59 AM

  • NewLine problem

    I've having a problem creating a new line in my output file
    here's my code
    import java.io.*;
    class CopyFile
         public static void main(String[] args)
              int i = 0;
              int lineCount = 0;
              String fileName1 = "";
              String fileName2 = "";
              String line;
              int c;
              try
              for (i = 0; i < args.length; i++)
                   fileName1 = args;
                   fileName2 = args[++i];
              File inputFile = new File(fileName1);
              File outputFile = new File(fileName2);
              FileReader inFile = new FileReader(inputFile);
              FileWriter outFile = new FileWriter(outputFile);
              BufferedReader lineCnt = new BufferedReader (new FileReader(inputFile));
              while ((c = inFile.read()) != -1)
                   outFile.write(c);
              while ((line = lineCnt.readLine()) != null)
                   lineCount++;
              outFile.write("Total number of lines: " + lineCount);
              inFile.close();
              outFile.close();
              catch (IOException e)
              System.out.println(e);
    i want to add out.newLine(); just before i use outFile.write("Total number of lines: " + lineCount); but i get the error that it cannot find the symbol
    please help
    thanks

    here it is
    CopyFile.java:40: cannot find symbol
    symbol: method newLine( )
    location: class java.io.FileWriter
    outFile.newLine( );
    /\ ***arrow is under the .
    line 40 is: outFile.newLine( );
    import java.io.*;
    class CopyFile
         public static void main(String[] args)
              int i = 0;
              int lineCount = 0;
              String fileName1 = "";
              String fileName2 = "";
              String line;
              int c;
              try
              for (i = 0; i < args.length; i++)
                   fileName1 = args;
                   fileName2 = args[++i];
              File inputFile = new File(fileName1);
              File outputFile = new File(fileName2);
              FileReader inFile = new FileReader(inputFile);
              FileWriter outFile = new FileWriter(outputFile);
              BufferedReader lineCnt = new BufferedReader (new FileReader(inputFile));
              while ((c = inFile.read()) != -1)
                   outFile.write(c);
              while ((line = lineCnt.readLine()) != null)
                   lineCount++;
              outFile.newLine(); ///***LINE 40 !!!***
              outFile.write("Total number of lines: " + lineCount);
              inFile.close();
              outFile.close();
              catch (IOException e)
              System.out.println(e);
    Message was edited by:
    devilsknight

  • Problem resizing textbox Illustrator CS

    Hi to everybody! I don't speak english very well..I'm sorry! I try to write something! I have a problem with Illustrator CS. It worked very well until few days ago. The problem is I can't resize the textbox now, I dont' have the arrow to do this! But If I enter as Administrator of the pc all works well as few days ago. I've tried to do a new installation of the program, I tried to uninstall and to do a new installation again...but the problem does'nt disappear. Any idea?Thank in advance. Sara

    Is it that you no longer have the "arrow" (selection tool) or that you no longer have the bounding box?
    If the latter, read
    this FAQ
    If the former, trying trashing prefs (
    FAQ #2

  • Database updation problem from textbox input

    Hi everybody
    I am new to java technology .. Plz help me out ...
    I am having a problem with this code in one JSP page ..
    I am not able to retrive value stored in text box with request.getParameter method whose initial value is assigned by retriving value from database ...
    Also Not able to update these values back to database ...
    Here is the code ...
    <%@ page language="java" import="java.sql.*" import="java.lang.*" %> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"> <% String Susername; Susername = session.getAttribute( "theUsername" ).toString(); %> <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">         <title>Edit details</title>     </head>     <body>     <table border="0" cellspacing="10" > <thead> <tr>     <%@ include file = "Logtab.jsp" %> </tr> </thead>     <% String Empname,EmpID,Address; Empname = request.getParameter("Empname");   EmpID = request.getParameter("EmpID");   Address = request.getParameter("Address"); Connection connection = null; PreparedStatement statement = null; ResultSet rs = null; response.setContentType("text/html");   try { Class.forName("com.mysql.jdbc.Driver"); connection = DriverManager.getConnection ("jdbc:mysql://localhost:3306/fts","root","admin");                                               statement = connection.prepareStatement("SELECT empname,empid,address FROM emp Where empid='admin'");                                    rs = statement.executeQuery();                                   while(rs.next()){                 %>                 <tbody><form name="DetailsForm" action="AdminHome.jsp" method="POST"> <tr>     <table width="80%" border="0">   <tr>     <td>Name</td>     <td><input name="Empname" type="text" value="<%= rs.getString(1) %>"></td>   </tr>   <tr>     <td>Employee ID</td>     <td><input name="EmpID" type="text" readonly="true" value="<%= rs.getString(2) %>"></td>   </tr>   <tr>     <td>Address</td>     <td><input name="Address" type="text"  value="<%= rs.getString(3) %>"></td>   </tr>   <tr>   <td><input type="submit" value="Submit" name="Submit" /></td>   <td><input type="reset" value="Reset" name="Reset" /></td>   </tr> </table> <%                }                       rs.close();                   Statement s = connection.createStatement();                                  String q = "UPDATE emp SET empname='"+ request.getParameter("Empname") +"' , address ='" +request.getParameter("Address") +"' WHERE empid ='admin'";                                 s.executeUpdate(q);                                                       statement.close();                 s.close();                 }                 catch(SQLException se ) { System.out.println("SQL Exception generated "); }                 %> </tr> </form> </tbody> </table>     </body> </html>

    Have you tried adding single quote (') before and after %
    cmdSearch.Parameters.Add("@search",
    SqlDbType.VarChar).Value
    = "\'%" + txtContactFirstName.Text
    + "%\'";
    cmdSearch.Parameters.Add("@StId",
    SqlDbType.VarChar).Value
    = "\'%" + txtContactID.Text
    + "%\'";

  • Urlvariables newline problem

    hello, I am using URLLoader to load a URL variables object
    from a php-database call.
    When it arrives in Flash, it has newline "\r\n" characters at
    the start which corrupt the file.
    How can I get rid of these ?
    Thanks

    var regexPattern:RegExp = /\n|\r/g;
    var str:String = "one line\nano\rther line \nthird \nline.";
    trace(str.replace(regexPattern, ""));

  • Problem: textbox leave empty string("") instead of null

    Hello, I have a problem with textboxes. By default, they always are initialized to null, but when I start entering and removing data from textboxes, many times they leave an empty string "" instead of null.
    And, of course, it's not the same a null value as an empty string and thus, I haven't got the expected result in queries to database.
    Thus, I always have to compare textbox values with "" and null. It's very tedious and not elegant solution. I would like to know if there is another way to get the values as null instead of empty strings.

    Yes. Once you entered and remove the text it will evaluated as you told .
    For ur case u can Try the condition as
    if ( instance !=null && instance.length !=0)
    be sure instance != null check b4 other wise u can get NullPointerException

  • Getting input from textbox as "console"

    Hi all. I am learning C# and have a Windows forms project that I am working on to learn various techniques. Basically it has a text box that I use to mimic a console. The user enters a command followed by the Enter key and the program reads that in and interprets
    it. I also have some rudimentary "batch" commands, such as IF/THEN, INPUT and PRINT.
    The application has two main components: The form and a class. The form takes care of interpreting the commands that the user enters and the class implements the three batch commands (more to follow in the near future). The issue that I am having is that
    sometimes (maybe 2%) the INPUT functionality does not work. When I enter a string and press Enter an empty string is returned. I have tried to debug this as much as I can, but it is difficult since this problem only happens once in a while.
    I have extracted the INPUT functionality and duplicated it in a simple app which I present here. The test app contains one button called btnConRead and a multi line text box called txtConsole. Clicking the button "forces" the app into "run"
    mode where the batch commands are interpreted. For this example I run the code that runs when an INPUT command is being processed. The app prompts with "OK" and waits for the user to type something in. When the user presses the Enter key the entered
    string is echoed on the console. The form module contains this code:
    string sKBBuf = ""; //App wide KB buffer when form Key preview is enabled.
    bool bEnter;
    private delegate void DisplayMsgDelegate(string sMsg);
    private void cEventPrint(object sender, PrintDataEventArgs e)
    Display(txtConsole, e.sPrintLine);
    private void cEventRead(object sender, ReadDataEventArgs e)
    //Event that reads text from the console and returns it.
    //This event requires input from the user. It traps the program here until the user
    //presses Enter.
    //Clear the KB buffer.
    sKBBuf = "";
    //Loop incessantly until user presses Enter key or Stop key (s).
    do
    //Braindead.
    } while (!bEnter);
    if (bEnter)
    //User pressed the Enter key, return the KB buffer.
    e.sReadLine = sKBBuf;
    //Empty buffer.
    sKBBuf = "";
    //Reset Enter key flag.
    bEnter = false;
    //Push CRLF to console.
    Display(txtConsole, Environment.NewLine);
    private void DisplayMsg(string sMsg)
    txtConsole.AppendText(sMsg);
    private void Display(TextBox txtOutput, string sMsg, bool bToCon = true)
    //Check output to console flag.
    if (bToCon)
    if (txtOutput.InvokeRequired)
    txtOutput.Invoke(new DisplayMsgDelegate(DisplayMsg), sMsg);
    else
    txtOutput.AppendText(sMsg);
    private void GetConInput()
    clsExample cEx = new clsExample();
    cEx.ReadData += cEventRead;
    cEx.PrintData += cEventPrint;
    System.Threading.Thread runThread = new System.Threading.Thread(() =>
    cEx.Process();
    this.KeyPreview = false;
    this.KeyPreview = true;
    runThread.Start();
    private void btnReadCon_Click(object sender, EventArgs e)
    //Prep stuff
    sKBBuf = "";
    txtConsole.Focus();
    Display(txtConsole, "OK" + Environment.NewLine);
    //Read console textbox
    GetConInput();
    private void Form1_KeyPress(object sender, KeyPressEventArgs e)
    bEnter = e.KeyChar == 13;
    //Save to buffer. At this time I am not distinguishing from letter or digits.
    //But I do need to check for a BS.
    if (e.KeyChar == 8)
    //Yeah, BS, remove the last char, if any.
    if (sKBBuf.Length > 0)
    sKBBuf = sKBBuf.Substring(0, sKBBuf.Length - 1);
    else
    sKBBuf += e.KeyChar;
    The class is called clsExample and contains the following code:
    //Event raised when data needs to be printed to console.
    public event EventHandler<PrintDataEventArgs> PrintData;
    //Event raised when data needs to be read from console.
    public event EventHandler<ReadDataEventArgs> ReadData;
    protected virtual void OnReadData(ReadDataEventArgs e)
    EventHandler<ReadDataEventArgs> handler = ReadData;
    if (handler != null)
    handler(this, e);
    protected virtual void OnPrintData(PrintDataEventArgs e)
    EventHandler<PrintDataEventArgs> handler = PrintData;
    if (handler != null)
    handler(this, e);
    public void Process()
    ReadDataEventArgs argsRead = new ReadDataEventArgs();
    PrintDataEventArgs args = new PrintDataEventArgs();
    string sMsg = "";
    //Get input from user.
    OnReadData(argsRead);
    if (argsRead.sReadLine.Length > 0)
    //I have something
    sMsg = argsRead.sReadLine;
    else
    //No data
    sMsg = "*";
    args.sPrintLine = sMsg + Environment.NewLine;
    OnPrintData(args);
    Plus two more support classes for the Print and Read events:
    public class PrintDataEventArgs : EventArgs
    public string sPrintLine { get; set; }
    public class ReadDataEventArgs : EventArgs
    public string sReadLine { get; set; }
     All the above was necessary so that the Process procedure running in a different thread could interact with the UI elements in the main form. The above mostly works, but I wonder if I am doing it the right way. I don't particularly like the use of
    global flags, such as bEnter or having empty loops to just "kill" time, such as the one found in the cEventRead procedure.
    In the cEventRead procedure I had the if() block immediately following the empty loop inside
    the loop and moved it out of there to see if this made any difference, but apparently it did not. Can anyone provide any feedback or suggestions of what I could change to make it work 100% of the time? I appreciate your time and effort. Thank you, Saga
    You can't take the sky from me

    Hi all. I am learning C# and have a Windows forms project that I am working on to learn various techniques. Basically it has a text box that I use to mimic a console. The user enters a command followed by the Enter key and the program reads that in and interprets
    it. I also have some rudimentary "batch" commands, such as IF/THEN, INPUT and PRINT.
    //Loop incessantly until user presses Enter key or Stop key (s).
    do
    //Braindead.
    } while (!bEnter);
    Hi Saga,
    Please don't use such kind of loop in your code, if you want to monitor the user input, just use the KeyPress event provided by the TextBox control.
    Control.KeyPress
    Event
    If you just want to execute some standard commands, I recommend that you use
    Process to start cmd.exe to execute the command, for example:
    void ExecuteCommand(string command)
    int exitCode;
    ProcessStartInfo processInfo;
    Process process;
    processInfo = new ProcessStartInfo("cmd.exe", "/c " + command);
    processInfo.CreateNoWindow = true;
    processInfo.UseShellExecute = false;
    // *** Redirect the output ***
    processInfo.RedirectStandardError = true;
    processInfo.RedirectStandardOutput = true;
    process = Process.Start(processInfo);
    process.WaitForExit();
    // *** Read the streams ***
    string output = process.StandardOutput.ReadToEnd();
    string error = process.StandardError.ReadToEnd();
    exitCode = process.ExitCode;
    Console.WriteLine("output>>" + (String.IsNullOrEmpty(output) ? "(none)" : output));
    Console.WriteLine("error>>" + (String.IsNullOrEmpty(error) ? "(none)" : error));
    Console.WriteLine("ExitCode: " + exitCode.ToString(), "ExecuteCommand");
    process.Close();
    If it's powershell script, you can also use the existing library to execute it, check this blogpost:
    Executing PowerShell scripts from C#
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Textbox size changing on different resolutions

    Hello.
    First of all, i am using Captivate 4.
    I am recording some learning materials and i am recording them at a resolution of 1280x800.
    After i stop recording them, i am starting to edit them and then i am publishing them as swf files.
    The next stept is to put the swf file on a website.
    There i see a problem: the textboxes have another dimension. They are a little biger than they are in the project.
    Another thing: after i send the project file (*.cp) to another person that has a screen resolution of 1280x1024, all the textboxes appear a little larger.
    Adobe Captivate modifies the textboxes size depending on screen resolution ?

    Hello,
    CP is all about bitmap images. Resolution is very important then. Normally you start playing a published CP-SWF starting the HTML-file and size will be kept. But apparently you just clicked the SWF or inserted the SWF, and it adapts to the screen it is playing on. Perhaps I'l try a metaphor: imagine a T-shirt with an image on it. If you try to enlarge the T-shirt, the image will be bigger, also the details like text on it. This is not captivate changing the text captions sizes :-)
    Lilybiri

  • Textboxes inside a column

    <af:table value="#{BillingBB.billingList}" width="50%" var="row" inlineStyle="border: 3px solid #D2D8B0; border-top: 4; height:200.0px;">
    <af:column>
    <f:facet name="header">
    <af:outputText value="Number"/>
    </f:facet>
    <af:table value="#{row.details}" var = "newrow">
    <af:column>
    <f:facet name="header">
    <af:outputText value="Number"/>
    </f:facet>
    <af:inputText value="#{newrow.memno}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Type"/>
    </f:facet>
    <af:inputText value="#{newrow.description}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Kind"/>
    </f:facet>
    <af:inputText value="#{newrow.kind}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Quantity"/>
    </f:facet>
    <af:inputText value="#{newrow.quantity}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Weight"/>
    </f:facet>
    <af:inputText value="#{newrow.weight}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="totalprice"/>
    </f:facet>
    <af:inputText value="#{newrow.totalprice}"/>
    </af:column>
    </af:table>
    </af:column>
    </af:table>
    you see there is the billinglist, insde that billinglist there is details list..
    i want to create empty textboxes in a table where the user can add to the detailslist ...
    problem, empty textboxes dont show up inside a column..
    anyone got solution for this?

    this is my original code
    !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <f:view>
    <afh:html>
    <af:form>
    <af:commandButton text="Add New Bill" action="#{BillingBB.save}"/>
    <af:outputLabel value="Billno" />
    <af:inputText value="#{BillingBB.detail.billno}" disabled="true"/>
    <af:selectOneChoice label="MemberName" value="#{BillingBB.selectedValue}">
    <f:selectItems value="#{BillingBB.options}"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="CountryName" value="#{BillingBB.selectedValue0}">
    <f:selectItems value="#{BillingBB.options0}"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Currency" value="#{BillingBB.selectedValue1}">
    <f:selectItems value="#{BillingBB.options1}"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Day" value="#{BillingBB.selectedValue2}">
    <f:selectItems value="#{BillingBB.options2}"/>
    </af:selectOneChoice>
    <af:table value="#{BillingBB.detailist}" width="50%" var="row" inlineStyle="border: 3px solid #D2D8B0; border-top: 4; height:200.0px;">
    <af:column>
    <f:facet name="header">
    <af:outputText value="memno"/>
    </f:facet>
    <af:inputText value="#{row.memno}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="description"/>
    </f:facet>
    <af:inputText value="#{row.description}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="kind"/>
    </f:facet>
    <af:inputText value="#{row.kind}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="quantity"/>
    </f:facet>
    <af:inputText value="#{row.quantity}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="weight"/>
    </f:facet>
    <af:inputText value="#{row.weight}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="totalprice"/>
    </f:facet>
    <af:inputText value="#{row.totalprice}"/>
    </af:column>
    </af:table>
    </af:form>
    </afh:html>
    </f:view>
    And this is billingbb.java
    package project2;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.lang.String;
    import java.lang.*;
    import javax.faces.model.SelectItem;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.table.TableModel;
    import oracle.adf.view.faces.model.SortableModel;
    import org.hibernate.Criteria;
    import org.hibernate.cfg.Configuration;
    public class BillingBB {
    List<Billing> billingList;
    BillingDAO cont = new BillingDAO();
    Billing p = new Billing();
    //Table table;
    List options;
    List options0;
    List options1;
    List options2;
    String selectedValue;
    String selectedValue0;
    String selectedValue1;
    String selectedValue2;
    List<Details> detailist = new ArrayList();
    Details detail = new Details();
    public BillingBB() {
    detailist.add(detail);
    public SortableModel getBillingList()
    billingList = cont.getList();
    /* int y = billingList.size();
    for( int x = 0 ; x < y; x++)
    if(detail.getBillno() <= billingList.get(y).getBillno() )
    detail.setBillno(billingList.get(y).getBillno() +1);
    detailist.add(detail);*/
    // System.out.println("jas");
    return new SortableModel(billingList);
    public void setOptions1(List options1) {
    this.options1 = options1;
    public List getOptions1() {
    int i = 0;
    options1 = new ArrayList();
    while( i < 2)
    SelectItem option = new SelectItem();
    if(i == 0)
    option.setValue("dollar");
    option.setLabel("dollar");
    else
    option.setValue("lira");
    option.setLabel("lira");
    options1.add(option);
    i = i +1;
    return options1;
    public void setOptions2(List options2) {
    this.options2 = options2;
    public List getOptions2() {
    int i = 0;
    options2 = new ArrayList();
    while( i < 10)
    SelectItem option = new SelectItem();
    option.setValue("10/10/200" + i);
    option.setLabel("10/10/200" + i);
    options2.add(option);
    i = i +1;
    return options2;
    public List getOptions()
    options = cont.getOptions();
    return options;
    public List getOptions0()
    options0 = cont.getOptions0();
    return options0;
    public void setBillingList(List<Billing> billingList) {
    this.billingList = billingList;
    public void save()
    int x = Integer.parseInt(selectedValue);
    int x1 = Integer.parseInt(selectedValue0);
    int y = cont.getList().size();
    System.out.println("dsajkfadskj");
    System.out.println("dsajkfadskj");
    for ( int u = 0; u < detailist.size(); u++)
    detailist.get(u).setBillno(0);
    System.out.println("dsajkfadskj");
    int z = 0;
    billingList = cont.getList();
    System.out.println("number " +y);
    for( int x2 = 0 ; x2 < y; x2++)
    // z = billingList.get(x2).getBillno();
    z = billingList.get(x2).getBillno();
    System.out.println("dsajkfadskj");
    if(detailist.get(0).getBillno() <= z )
    for ( int p = 0; p < detailist.size() ; p++)
    detailist.get(p).setBillno((z +1));
    System.out.println(detailist.get(0).getBillno());
    // detailist = new ArrayList();
    // System.out.println(selectedValue1 + "" +selectedValue2);
    // detailist.add(detail);
    //System.out.println(detailist.get(0).getBillno());
    //System.out.println(detailist.get(0).getMemno());
    //System.out.println(detailist.get(0).getDescription());
    //System.out.println(detailist.get(0).getKind());
    // System.out.println(detailist.get(0).getQuantity());
    //System.out.println(detailist.get(0).getWeight());
    cont.saveBilling(x,x1,selectedValue1,selectedValue2,detailist);
    //cont.saveBilling(x,x1,selectedValue1,selectedValue2,detail);
    public void setCont(BillingDAO cont) {
    this.cont = cont;
    public BillingDAO getCont() {
    return cont;
    public void setP(Billing p) {
    this.p = p;
    public Billing getP() {
    return p;
    public void setOptions(List options) {
    this.options = options;
    public void setSelectedValue(String selectedValue) {
    this.selectedValue = selectedValue;
    public String getSelectedValue() {
    return selectedValue;
    public void setSelectedValue1(String selectedValue1) {
    this.selectedValue1 = selectedValue1;
    public String getSelectedValue1() {
    return selectedValue1;
    public void setSelectedValue2(String selectedValue2) {
    this.selectedValue2 = selectedValue2;
    public String getSelectedValue2() {
    return selectedValue2;
    public void setSelectedValue0(String selectedValue0) {
    this.selectedValue0 = selectedValue0;
    public String getSelectedValue0() {
    return selectedValue0;
    public void setDetailist(List<Details> detailist) {
    this.detailist = detailist;
    public List<Details> getDetailist() {
    return detailist;
    public void setDetail(Details detail) {
    this.detail = detail;
    public Details getDetail() {
    return detail;
    public void valueChanged( ListSelectionEvent event )
    Details krikor = new Details();
    detailist.add(krikor);
    System.out.println("dfjfsjk");
    /* // See if this is a valid table selection
    if( event.getSource() == table.getSelectionModel() && event.getFirstIndex() >= 0 )
    // Get the data model for this table
    TableModel model = (TableModel)table.getModel();
    // Determine the selected item
    String string = (String)model.getValueAt(table.getSelectedRow(),table.getSelectedColumn() );
    // Display the selected item
    System.out.println( "Value selected = " + string );
    I need to add a button to my adf page, which on click adds another row to the detailslist..
    Basic what do i have to do in my java side?? can anyone hand me solution quickly plz?

  • Prob with FILE

    Hi everybody,
    I read a file txt char by char. Here is an example oy my file containt:
    INSERT INTO DBD VALUES ("aaa","aaaa","aaaa",NULL,NULL,NULL,
    TRUE,FALSE,FALSE);
    INSERT INTO SUIVI VALUES ("bbbb","bbb",NULL,NULL);
    INSERT INTO SUIVI VALUES ("cccc","ccc",NULL,NULL);
    I want ONE row of each query, my first query is not good.
    I read char by char and I place it in a BufferString. When I find a '\n' I continue without place this char in my BufferString, I place char althought i find the char ';'
    Here is my code:
    while (dejaLu < longueurFichier)
    car = (char) flotLecture.read();
    dejaLu = dejaLu + 1;
    if(car != '\n') ========>It's not good !!!
    if(car == '"') ligne.append("'");
    else ligne.append(car);
    if (car == ';')
    msg.addFenMessage(ligne.toString());
    //nbInsert = stmt.executeUpdate(ligne.toString());
    cpt++;
    ligne.delete(0, ligne.length());
    My file txt is create in DL1, I don't know the carriage return char !!!
    Please help me...

    hi,
    I think this might be a way to do it since hopefully BufferedReader's readLine method will sort out the newline problems for you
    asjf
    import java.io.*;
    import java.util.*;
    BufferedReader br = new BufferedReader(new FileReader(file));
    List lines = new ArrayList();
    String currentLine = "";
    for(String line = ""; (line=br.readLine())!=null; ){
         currentLine+=line;
         if(line.endsWith(";")){
              lines.add(currentLine);
              currentLine="";
    for(Iterator i = lines.iterator(); i.hasNext(); )
         System.out.println(i.next());

  • JSP Form

    I have a problem with TextBox and Button in Flash
    I put a textbox and submit button in flash .and I want to
    give button link with textbox value
    like searchCarrier.do?number=12345678 and i have to store the
    value of textbox in the database .
    How to takeout the value from the textbox in flash
    one more thing is
    If the user clicks go/submit before typing in any number,
    make a popup alert box “Please type in the
    number”

    quote:
    How to takeout the value from the textbox in flash
    Store it in a variable and then do with it what you want i.e.
    var tb_value = your_textbox.text;
    quote:
    If the user clicks go/submit before typing in any number,
    make a popup alert box “Please type in the number”
    Perform a simple validation of the text field i.e.

Maybe you are looking for

  • Rocketfish RF-AP307 mini dispalyport to Vga Adapter

    Hi. I just bought a rocketfish RF-AP307 mini dispalyport to Vga Adapter for my 11" MacBook Air. I plugged it in and all I can see is a flash of blue then the original galaxy desktop with out any of the things I have on it on my copmuter. When I open

  • PAR Iview resizing problem....

    Hello Gurus, I have the following problem. I've develop a PAR Iview and i want to resize it on runtime. I've write on my PAR app. a javascript code, but the system shows me a javascript's error when i launch it on my portal, after open the error it s

  • ADF-BC webservices and MDS

    Hi gurus, I have exposed my application module as a webservice. Now I want to store them in MDS and also want to refer them from MDS. I have following questions around this 1. What advantage I would get if I store them in MDS? I believe all consumer

  • Sap isu device management

    Hello experts, Kindly expain how to create the master data in sap isu device management. as i am using oracle base software and now i want convert it to SAP ISU DEVICE MANAGEMENT, so firstly i have to create master data then interface program. am i r

  • Website Store Pickup "Unavailable"

    I'm looking at buying this http://www.bestbuy.com/site/olspage.jsp?skuId=4281001&type=product&id=1219097504339, yet when I try to say ship to store, it only gives me stores that are way out of range I want to go to pick it up. I also only want to pic