HTMLB TableView: Edit first Line

Hi,
I have implemented an HTMLB TableView with the attribute selection mode 'singleselect'.
The users can mark one row to edit. This works so far.
But as the users have to maintain at least one row, the first row should initially be editable <b>without mark it</b> and raising an event.
Thanks in advance

set the selectedRowIndex = 0 or 1 to whatever number of the row you would like initially checked in your OnCreate or OnInitialization Event Handler with selectedRowIndex being defined in your Page Attributes and then assigned to the tableView.

Similar Messages

  • Edit First line in dreamweaver templates

    Hello,
    When I create a page from a Dreamweaver template, a
    dreamweaver comment similar to the one below will be inserted:
    <!-- #BeginTemplate "/Templates/test.dwt" -->
    Each time I edit a page to add php code in the very first
    line, it is removed with every template update and the source code
    again starts with the dreamweaver comment. I need to add to all my
    pages a php code in the very first line like this one:
    <? $ob_start; $session_start; ?>
    How can I do that without removing the code from my pages
    with each template update. Another problem is that I can't insert a
    placeholder in the very first line of a dreamweaver template. Above
    that the first line is locked in dreamweaver, so that I can't
    change it manually. Is there any workaround available?
    Thanks,
    Philip

    > How can I do that without removing the code from my
    pages with each
    > template
    > update. Another problem is that I can't insert a
    placeholder in the very
    > first
    > line of a dreamweaver template. Above that the first
    line is locked in
    > dreamweaver, so that I can't change it manually. Is
    there any workaround
    > available?
    Put the code ABOVE the <html> tag.
    Which DW are you using? It looks like DW4 or earlier....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "flip3" <[email protected]> wrote in message
    news:ec40u0$mr3$[email protected]..
    > Hello,
    >
    > When I create a page from a Dreamweaver template, a
    dreamweaver comment
    > similar to the one below will be inserted:
    >
    > <!-- #BeginTemplate "/Templates/test.dwt" -->
    >
    > Each time I edit a page to add php code in the very
    first line, it is
    > removed
    > with every template update and the source code again
    starts with the
    > dreamweaver comment. I need to add to all my pages a php
    code in the very
    > first
    > line like this one:
    >
    > <? $ob_start; $session_start; ?>
    >
    > How can I do that without removing the code from my
    pages with each
    > template
    > update. Another problem is that I can't insert a
    placeholder in the very
    > first
    > line of a dreamweaver template. Above that the first
    line is locked in
    > dreamweaver, so that I can't change it manually. Is
    there any workaround
    > available?
    >
    > Thanks,
    >
    > Philip
    >

  • HTMLB TableView Iterator & Edit columns, cells

    Hi friends,
    I am getting errors when , I tried to edit the columns, & Cells of  HTMLB TableView by using Iterator.Actually, I got the whole edit buttons and when I edit the values of particular column & cell fileds, it is not saving the values, instead it is giving same old values. The code I used is as follows.
    <u><b>To Edit the  columns,</b></u>
    method
    IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
    FIELD-SYMBOLS: <def> LIKE LINE OF p_column_definitions.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
    <def>-COLUMNNAME = 'STUDENTID'.<def>-EDIT = 'X'.
    endmethod.
    <u><b>To Edit the  cells,</b></u>
    RENDER_CELL_START Method:
    method
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
    CASE p_column_key.
    WHEN 'ICON'.
    WHEN 'STUDENTID'.
           IF p_edit_mode IS NOT INITIAL.
    ENDIF.
    WHEN 'SDATE'.
           IF p_edit_mode IS NOT INITIAL.
    ENDIF.
    ENDCASE.
    endmethod.
    <u><b>To Edit the SDATE cells,</b></u>
    WHEN 'SDATE'.
      IF p_edit_mode IS NOT INITIAL.
    DATA: date TYPE STRING.
    date = m_row_ref->SDATE.
    p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
                          id        = p_cell_id
                           value     = date
                           type      = 'DATE'
                             showHelp  = 'TRUE'
                             cellValue = 'TRUE' ).
                               ENDIF.
    Why the either column or cell is not saving the new values, when I edit them? where it went wrong? please mail me in this regard.
    regards
    CSM Reddy

    Hi REDDY CSM 
    To learn coding these Methods.
    You need to learn everything from scratch about MVC.
    To learn functionalities of Methods in Controller and how to use them,its Better,if you start with some tutorial(Little application) on MVC.
    Here is link,Just follow this,You will get some Exposure to these methods.
    http://help.sap.com/saphelp_erp2005/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
    Rest keep posting whenever you face and Problem..
    Happy Coding..!!
    Vijay Raheja

  • I am editing an e book. How do I delete a first line indent?

    In a 'Pages' e-book, how can I delete first-line indent on every paragragh?

    Use can use an intro media image. The first time the ibook is open it will start with that page. However, remember that any other time the ibook is open it will show the last page viewed. This is a behavior that can't be changed.

  • Regarding HTMLB TableView Celclick

    Hi All,
    I have an HTMLB tebleview where the first column is a LINK .
    When i click this cell (link) , i have following values n the method DO_HANDLE_EVENT of my class :
    htmlb_event->name = 'tableView'.
    table_event->event_type = 'cellClick'.
    I need to capture the DATA of the ROW for which the CELL was clicked in an internal table .
    The HTMLB TableView in the looks like:
    <htmlb:tableView id              = "list"
                           emptyTableText  = "<%= otr(BBP_SUS_UI/LIST_ORDER_NO_ENTRIES_FOUND) %>"
                           selectionMode   = "MULTISELECT"
                           sort            = "SERVER"
                           onHeaderClick   = "onmyHeaderClick"
                           onNavigate      = "onMyNavigate"
                           onRowSelection  = "onMyRowSelection"
                           visibleRowCount = "<%= lepp %>"
                           visibleFirstRow = "<%= iv_list_nav_index %>"
                           width           = "100%"
                           table           = "//model/order_list"
                           headerVisible   = "<%= IV_HEADER_VISIBLE %>"
                           headerText      = "<%= status %>"
                           iterator        = "<%= io_iterator %>" />
    Thanks,
    Anubhav.

    Hi Anu,
    actually you haven't tried my code. You've changed it.
    You have moved the double-quote (") signs to different places and added an asterix (*).
    In ABAP a asterix (*) in the first character of a line comments out the entire line. A double-quote (") sign comments out the remainder of the line it appears in.
    The comments I placed in the code where to show you the names of the attributes that hold the values you are looking for.
    So in other words the attribute
    tableview_event->selectedrowindex
    contains the index of the selected row. You can then use this attribute in further ABAP statements.
    You say that
    the issue is retriving the value of ROW_INDEX
    - well you do not need to retrieve it. It is already in the attribute tableview_event->selectedrowindex.
    I also suggest you use the debugger to look at the other attributes that are visible in this object.
    Cheers
    Graham Robbo

  • Sums in htmlb:tableView

    Hi Community,
    how to you guys usually display a line with sums under a htmlb:tableView.
    As far as I have understood this, I can do either one of the following two ways:
    1) I add a line to the internal table where I calculate the sums I need. I then have to make sure that this line will always be displayed at the bottom after sorting, filtering etc. and that the sums are re-calculated after filtering.
    2) I display a second htmlb:tableView underneath the first, which will have only one line containing the sums. By this, I have to make sure that the widths of the columns of both tableViews has to be equal (which is not that easy when you text in the table that is larger than the allowed width).
    Is there another way? What is the preferred way?
    Daniel

    you can also handle it thru iterator. but the easiest would be add another row to itab and handle the sorts and filter and positioning of the total row yourself.
    samle code for iterator.
    RENDER_CELL_START method.
    assuming you have 10 rows in the itab.
    IF p_row_index EQ 10 .
      DATA: icon_plane TYPE string.
            icon_plane = cl_bsp_mimes=>sap_icon( id = 'ICON_WS_PLANE' ).
            if_first = cl_htmlb_image=>factory( id = p_cell_id id_postfix = '_first' src = icon_plane onclick = 'image_click' ).
            CLEAR icon_plane .
            icon_plane = cl_bsp_mimes=>sap_icon( id = 'ICON_WS_PLANE' ).
            if_bus = cl_htmlb_image=>factory( id = p_cell_id id_postfix = '_bus' src = icon_plane onclick = 'image_click' ).
            CREATE OBJECT multi_bee.
            multi_bee->add( if_first ).
            multi_bee->add_html( html = '<div style="border-top-style: solid; border-top-width: 1px;  padding-top: 1px">' ).
            multi_bee->add( if_bus ).
            multi_bee->add_html( html = '</div> ' ).
            p_replacement_bee = multi_bee.
    in the above example if_bus is for holding the last row value and if_bus is for holding the total value .
    in the above example i just showed how you have have two rows in the last row and just rendered two images.
    Regards
    Raja

  • HTMLB: tableview filter problems

    Hi,
    We developed a BSP application in CRM Web_IC. Whenever user goes to this screen, it retrieves the results from SAP CRM table and lists the entries. We used htmlb:tableview with filter attribute set to 'SERVER'. The first row of the entry is used to filter the entries displayed based on wildcard search and redisplay the same.
    We noticed that all this handled by client side eventing (Java Script) and it works okay in our development and testing environment.
    But we got wierd results when it went for user testing. On some of the machines, the page looks refreshed but the list display does not change based on the search. We thought it might be caching problem so we tried with different IE settings, it looks okay for some time on one of the machines but the problem gets repeated after wards. The situation is we cannot afford intermittent problems.
    OS are win'2000 and XP and browser is IE 6 with sp1 and sp2. The problem is not consistent so none of the combinations actually suggested if the problem is related to one area.
    Has anyone experienced similar to above. Any ideas are welcome.
    Message was edited by: Raju Datla

    Thanks Rainer,
    Without making any changes, today majority of the users are did not encounter the problem. I could not check the browser server cache settings as the BSP is using MVC and these fields are missing.
    Thanks and Regards,
    Raju
    I lost how to add points. I remember there was a document on how to add points, which I could not get by search. Could you help me how I can award points to you.
    Sorry for that and Thanks
    Message was edited by: Raju Datla

  • Arraylist only reading first line of file

    I am reading a text file using an arraylist. my file has a single value on each line e.g.
    2
    3
    4
    5
    however this method is only reading only the first line of each file. is it because of this statement:
    String s1[] = number.split("\\s");
    I would like to change the method so its not expecting numbers in a single line.. but reads each line and adds it to the collection... how can I do that?
    here is getData method that gets the file and processes it.
         public static List<Integer> getData(String Filename) {
              List<Integer> array1 = null;
              // BufferedReader for file reverse.txt
              try {
                   array1 = new ArrayList<Integer>();
                   BufferedReader bf = new BufferedReader(new FileReader(Filename));
                   String number = bf.readLine();
                   String s1[] = number.split("\\s");
                   for (int i = 0; i < s1.length; i++)
                        array1.add(Integer.parseInt(s1));
              } catch (Exception e) {
                   e.printStackTrace();
              return array1;

    Faissal wrote:
    while(bf .ready()){
    readline() will return null if the end of the stream has been reached. ([http://java.sun.com/javase/6/docs/api/java/io/BufferedReader.html]). This condition can be used to determine when to stop reading thereby ensuring that all lines have been read.
    EDIT:
    Here's a code snippet from [Java Developers Almanac|http://www.exampledepot.com/egs/java.io/ReadLinesFromFile.html]: notice how they close() the stream when they're finished with it.

  • How to insert check box fields in a htmlb: tableview

    Hi,
    Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
    Thanks in advance,
    Aruna.

    Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "design2002+design2003"
                   controlRendering = "SAP"
                   rtlAutoSwitch    = "true"
                   forceEncode      = "ENABLED" >
      <htmlb:page title="Test " >
        <htmlb:form>
          <%
      data TV_ITERATOR Type Ref To zcl_itr.
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id              = "fligts"
                           headerText      = "Flight"
                           width           = "100"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "10"
                           fillUpEmptyRows = "true"
                           showNoMatchText = "true"
                           filter          = "server"
                           sort            = "server"
                           onHeaderClick   = "MyEventHeaderClick"
                           table           = "<%= APPLICATION->itab %>"
                           iterator        = "<%= ITERATOR %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Event Handling:</b>
    DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
    IF NOT event_id1 IS INITIAL.
       if event_id1->server_event+0(9) = 'chkevent'.
      SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
      endif.
    endif.
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
         CLEAR p_column_definitions.
        CLEAR p_overwrites.
        DATA: tv_column  TYPE TABLEVIEWCONTROL.
        tv_column-COLUMNNAME  = 'FLDATE'.
        tv_column-edit        = 'X'.
        tv_column-sort        = 'X'.
        tv_column-TITLE               = 'Flight Date'.
        tv_column-WIDTH  = '100'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CONNID'.
        tv_column-TITLE               = 'Conn.ID'.
        tv_column-WIDTH  = '70'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CHECKBOX1'.
        tv_column-TITLE               = 'Check Box'.
        tv_column-WIDTH  = '30'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
    endmethod.
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
           DATA: L_EVENT TYPE STRING.
      CASE P_TABLEVIEW_ID.
        WHEN 'fligts'.
          CASE P_COLUMN_KEY.
            WHEN 'CHECKBOX1'.
    *          CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
    CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
              P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
            ONCLICK = L_EVENT CHECKED = 'false' ).
          ENDCASE.
      ENDCASE.
    ENDMETHOD.
    Hope this will solve your problem.
    <b><i>* Reward each helpful answer.</i></b>
    Raja T
    Message was edited by:
            Raja T

  • TEXT_IO ...  replace first line

    Hello,
    i have a small Problem with the TEXT_IO.PUT_LINE builtin
    I want to write and read a .txt file with TEXT_IO
    It workes fine but if i use put_line to write something in, it replace all inside my .txt file
    My Question: Is it possible to replace only the first line inside my txt file
    Example Forms:
    Declare
         filename           varchar2(30) := 't:\test\Laufzettel.txt';
         file_handle TEXT_IO.FILE_TYPE;
         umrechnung number;
    BEGIN
    If :parameter.intervall is not null then
         file_handle := TEXT_IO.FOPEN(filename, 'W');
         umrechnung := :button.intervall;
         umrechnung := round(((umrechnung*60)*1000));
         TEXT_IO.PUT_LINE(file_handle,umrechnung);     
         TEXT_IO.FCLOSE(file_handle);
    end if;
    END;
    and the .txt file looks like this:
    6000
    CT
    CT2
    Mammo
    MR
    US
    Bestrahlung
    MRT
    NUK
    SD
    i want to replace the 6000 with another number without rewriting all the other entrys?!
    Sorry for my bad English :)
    Message was edited by:
    user628271

    If you are unix use grep command to replace the string. And this grep command can be called using host.
    If you are in Windows , create a new file from the original and while creating you
    can replace which ever line you needed.
    Once you create the new file , delete the original file using host command.
    Once you delete the old file, copy the new file to the original file name using host command.
    Rajesh Alex

  • The first line in a file is supressed

    hi all,
    i have a really weird problem.
    i have a file with a lot of data and i am using a file adapter with file content conversion to parse it.
    the file adapter is a sender one.
    the problem come when i do read the file and then it ignore the first line of the file.
    all the lines from the second one forward is shown in SXMB_MONI but the first line of the file isn't.
    i can't seem to figure out what the problem is, i tryed looking for some kind of attribute in the file adpater but had no luck.
    could you please help me?
    btw,
    the file structure is: header,1,body1,<wildcard>,body2,<wildcard>
    Edited by: Roi Grossfeld on Oct 29, 2008 4:24 PM

    Recordset Structure: H1,1,B1,<wildcard>,B2,<wildcard>
    Key Field Name: RecordType
    H1.fieldFixedLengths 6,2,8,1,1,3,30,5
    H1.fieldNames FileNo,RecordType,TransmissionDate,Car_Truck,BU,MD,FileName,Count
    H1.keyFieldValue H1
    B1.fieldFixedLengths 6,2,10,27,8,8,4,5,3,11,9,9,11,11,9,9,7,9,11
    B1.fieldNames FileNo,RecordType,InvoiceNumber,VesselName,MMSEShipmentDate,PlanArrivalDate,DeliveryPlace,Units,Currency,ModelPriceAmount,OptionPriceAmount,ColourPriceAmount,REPriceAmount,TotalPriceAmount,FreightChargeAmount,InsuranceFeeAmount,MiscellaneousAmount,VATAmount,GrandTotalAmount
    B1.keyFieldValue B1
    B2.fieldFixedLengths 6,2,10,12,12,12,5,6,12,3,3,3,4,17,7,7,12,8,5,3,9,7,7,9,9,7,9,4,20
    B2.fieldNames FileNo,RecordType,InvoiceNumber,MDOrderNumber,MMSEOrderNumber,MMSECaseNumber,ModelYear,BodyType,Model,ExteriorColourCode,InteriorTrimColourCode,OptionCode,RearEquipment,VehicleIdentificationNumber,ChassisModel,CSequenceNumber,EngineModel,ESequenceNumber,KeyNumber,Currency,UnitModelPrice,UnitOptionPrice,UnitColourPrice,UnitRearEquipmentPrice,UnitTotalPrice,UnitVATAmount,UnitTotalVAT,VATRate,VATNumber
    B2.keyFieldValue B2
    ignoreRecordsetName true
    Edited by: Roi Grossfeld on Oct 29, 2008 4:39 PM

  • TableView.edit() is not working in JavaFX 2.1

    Hi All,
    Yesterday i have updated my javafx installation from JavaFX 2.0.2 to JavaFX 2.1 b07
    After that I am facing issues with TableView.edit() method. It stops working and not making the cell as editable.
    In the below example , select the first cell, and on click of 'tab' , the next cell is changed to editing state..and goes on for all the cells. If it reaches the end column, the first cell of the next row is selected.
    You can find the sscce example below. The same code is working well in 2.0.2 build.
    import javafx.application.Application;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.TableCell;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.TextField;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    import com.sun.javafx.scene.control.skin.TableRowSkin;
    public class StartEditDemo extends Application {
        public static void main(String[] args) {
            Application.launch(args);
        public void start(Stage primaryStage) {
            primaryStage.setTitle("Start Edit Test");
            StackPane root = new StackPane();
            Scene scene = new Scene(root, 600, 150);
            primaryStage.setScene(scene);
            primaryStage.show();
            configureTable(root);
         private void configureTable(StackPane root) {
              final ObservableList<MyDomain> data = FXCollections.observableArrayList(
                         new MyDomain("Apple","This is a fruit","Red"),
                         new MyDomain("PineApple","This is also a fruit","Yellow"),
                         new MyDomain("Potato","This is a vegetable","Brown")
              TableView<MyDomain> table = new TableView<MyDomain>();
              TableColumn<MyDomain,String> titleColumn = new TableColumn<MyDomain,String>("Name");
              titleColumn.setPrefWidth(150);
              titleColumn.setCellValueFactory(new PropertyValueFactory<MyDomain,String>("name"));
              titleColumn.setCellFactory(getEditableCallBack(1));
              TableColumn<MyDomain,String> descCol = new TableColumn<MyDomain,String>("Description");
              descCol.setPrefWidth(150);
              descCol.setCellValueFactory(new PropertyValueFactory<MyDomain,String>("description"));
              descCol.setCellFactory(getEditableCallBack(2));
              TableColumn<MyDomain,String> colorCol = new TableColumn<MyDomain,String>("Color");
              colorCol.setPrefWidth(150);
              colorCol.setCellValueFactory(new PropertyValueFactory<MyDomain,String>("color"));
              colorCol.setCellFactory(getEditableCallBack(0));
              table.getColumns().addAll(titleColumn,descCol,colorCol);
              table.setItems(data);
              root.getChildren().add(table);
         private Callback<TableColumn<MyDomain, String>, TableCell<MyDomain, String>> getEditableCallBack(final int nextColumn) {
              /* Cell factory call back object */
              return new Callback<TableColumn<MyDomain, String>, TableCell<MyDomain, String>>() {
                   @Override
                   public TableCell<MyDomain, String> call(TableColumn<MyDomain, String> p) {
                        return new EditableCell<MyDomain>(nextColumn);
         public class EditableCell<T> extends TableCell<T, String> {
              private TextField textBox;
              private Label label;
              private int nextCol;
              public EditableCell(int nextcolumn) {
                   this.label = new Label();
                   this.nextCol = nextcolumn;
                   /* Enabling to get the edit cell on single mouse click over the cell. */
                   this.setOnMouseClicked(new EventHandler<MouseEvent>() {
                        @Override
                        public void handle(MouseEvent event) {
                             startEdit();
              @Override
              public void startEdit() {
                   super.startEdit();
                   if (isEmpty()) {
                        return;
                   if (textBox == null) {
                        createTextBox();
                   } else {
                        textBox.setText(getItem());
                   setGraphic(textBox);
                   textBox.requestFocus();
                   textBox.selectAll();
                   setEditable(true);
              @Override
              public void updateItem(String item, boolean empty) {
                   super.updateItem(item, empty);
                   if (!isEmpty()) {
                        if (textBox != null) {
                             textBox.setText(item);
                        label.setText(item);
                        setGraphic(label);
              private void createTextBox() {
                   textBox = new TextField(getItem());
                   /* On focus of the textbox, selecting the row.*/
                   textBox.focusedProperty().addListener(new ChangeListener<Boolean>() {
                        @Override
                        public void changed(ObservableValue<? extends Boolean> paramObservableValue,Boolean paramT1, Boolean paramT2) {
                             if(paramT2){
                                  EditableCell.this.getTableView().getSelectionModel().select(EditableCell.this.getIndex());
                   textBox.setOnKeyReleased(new EventHandler<KeyEvent>() {
                        @Override
                        public void handle(KeyEvent t) {
                             if (t.getCode() == KeyCode.ENTER) {
                                  callAction();
                             } else if (t.getCode() == KeyCode.ESCAPE) {
                                  cancelEdit();
                   textBox.setOnKeyPressed(new EventHandler<KeyEvent>() {
                        @Override
                        public void handle(KeyEvent t) {
                             if (t.getCode() == KeyCode.TAB){
                                  if(nextCol!=0){
                                       // Making the next as editable and focused.
                                       TableColumn nextColumn = getTableView().getColumns().get(nextCol);
                                       getTableView().edit(getTableRow().getIndex(), nextColumn);
                                       getTableView().getFocusModel().focus(getTableRow().getIndex(), nextColumn);
                                  }else{
                                       // Making the next row as editable.
                                       if(getTableRow().getIndex()<getTableView().getItems().size()){
                                            TableColumn nextColumn = getTableView().getColumns().get(0);
                                            getTableView().edit(getTableRow().getIndex()+1, nextColumn);
                                            getTableView().getFocusModel().focus(getTableRow().getIndex()+1, nextColumn);
              @Override
              public void cancelEdit() {
                   super.cancelEdit();
                   textBox = null;
                   setGraphic(label);
              @Override
              public void commitEdit(String t) {
                   super.commitEdit(t);
                   setItem(t);
                   textBox = null;
                   label.setText(t);
                   setGraphic(label);
              @SuppressWarnings("rawtypes")
              public ObservableList<Node> getAllCellsOfSameRow(TableCell cell) {
                   TableRowSkin rowSkin = (TableRowSkin) cell.getParent();
                   return rowSkin.getChildren();
              public void callAction() {
                   TableRowSkin<T> rowSkin = (TableRowSkin<T>) this.getParent();
                   ObservableList<Node> cells = rowSkin.getChildren();
                   for (Node node : cells) {
                        EditableCell<T> cell = (EditableCell<T>) node;
                        cell.commitEdit(cell.getTextBox().getText());
              public TextField getTextBox() {
                   return this.textBox;
              public Label getLabel() {
                   return this.label;
         public class MyDomain{
              private SimpleStringProperty name = new SimpleStringProperty();
              private SimpleStringProperty description = new SimpleStringProperty();
              private SimpleStringProperty color = new SimpleStringProperty();
              public MyDomain(String name, String desc, String color){
                   this.name.set(name);
                   this.description.set(desc);
                   this.color.set(color);
              public String getDescription() {
                 return description.get();
              public SimpleStringProperty descriptionProperty(){
                  return description;
             public String getName() {
                 return name.get();
             public SimpleStringProperty nameProperty(){
                  return name;
             public String getColor() {
                 return color.get();
             public SimpleStringProperty colorProperty(){
                  return color;
    }Regards,
    Sai Pradeep Dandem.

    As jsmith notes, the best place to report bugs is directly into the Jira tracker at http://javafx-jira.kenai.com. If you put it in the 'runtime' area against the 'controls' component, it'll end up on my plate.
    Thanks!
    Jonathan

  • First line not coming when FCC is used

    Dear All,
    I am using FCC on sender side and the input file is in UTF-8 format....
    i am using FCC with key fields on the sender file adapter...
    now as the UTF-8 file was having control characters at start the keyfield was not matching the start of file and hence the first line of data was not coming in moni..
    i got an answer to this query yesterday where Stefan Grube and Volker replied saying that some of the editors like notepad and word add control chars at start in UTF-8 files and hence UTF-8 files should be created only using editors like TEXTPAD .....
    but the problem is that the file would always have control chars at start.. what are the ways of removing it ?
    i am thinking of an adapter module at the sender side...
    Edited by: Tarang Shah on Jun 11, 2009 6:31 AM

    Hi,
    I faced this kind of problem previously.
    Have used SynTextEditor in which the hidden/special/control chars are clearly visible, delete those chars and use for input.
    Alternatively, you can save the file in UTF8 format in textpad and use as input.
    Regards

  • JTextPane first line read only

    Hi all!
    I'm a beginner in java programming, that said im trying to make a simple text editor (who isn't?), it will be a part of another larger application, nevertheless this editor is a main component, just need some simple editing tips.
    I want to use a JTextPane for the editable surface, this is working fairly well but i am not able access other lines in the editor except from the first one. Meaning that when containing a large piece of text, my JTextPane is only able to edit the first line: For instance the caret will only show it self on the first line, I can write new letters, but only on the first line and i can erase them and so on. What am I missing? Have checked around many places for solutions
    To sum it up; I want to edit every line in my JTextPane instead of just the first one :)

    Ok! thanks a lot for the good advice, ant help is most appreciated. :-)
    Here is a piece of code that demonstrates my problem. Hope it brings insight! Try to write a line of text, then press enter to go to the next line, most probably you will find yourself unable to edit this line.
    import java.awt.Dimension;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextPane;
    import javax.swing.SwingUtilities;
    public class Test implements Runnable
         public static void main(String[] args)
              SwingUtilities.invokeLater(new Test());
         public void run()
              JPanel cP = new JPanel();
              JTextPane tP = new JTextPane();
    JScrollPane sP = new JScrollPane( tP );
    tP.setPreferredSize(new Dimension( 400 , 400 ) );
              sP.setPreferredSize(new Dimension( 300 , 300 ) );
              tP.setEditable(true);
              cP.add(sP);
              JFrame f = new JFrame();
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setContentPane( cP );
              f.setLocationRelativeTo( null );
              f.setVisible( true );
    }

  • Problems with templates overtaking first line?

    Has anyone else had a problem with templates taking over the first line of code in any page that a template is applied to?
    I created a template that starts like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="head" -->
    but when that particular template is applied to a page it writes this to the code:
    <!-- InstanceBegin template="/Templates/default.dwt" codeOutsideHTMLIsLocked="false" --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="head" -->
    I don't particularly mind this, but in IE8, because the comment is the first line - and NOT the doctype, it forces the browser into another doctype and breaks the page.
    Has anyone experienced this?
    I've tried re-creating my templates, but I'm not finding the reason why it decides to place that comment in the beginning sometimes..

    The problem may be that the comment is on the same line as the doctype, try putting a blank line between the template comment and the doctype statement
    e.g.
    ..... IsLocked="false" -->
    <!DOCTYPE HTML .....
    The comment is place in the line before the doctype to enable editing of server side code, (php, asp, .net, etc.).
    PZ

Maybe you are looking for