Iterator & checkbox

Hello,
I display data in a tableview:
      <% create object iterator. %>
      <htmlb:tableView id="lief01"
                       table="<%=model->ERGEBNIS_lief01%>"
                       allRowsEditable="true"
                       rowCount="7"
                       iterator = "<%=iterator%>" />
and then, in my iterator I have to change the characteristics of one of the columns (it must show up as checkbox):
METHOD if_htmlb_tableview_iterator~render_cell_start .
  DATA: cb TYPE REF TO cl_htmlb_checkbox,
        lr_row_data TYPE REF TO zdxg_clust_lief01.   "<-- Structure
  lr_row_data ?= p_row_data_ref.
  IF p_column_key = 'ZDXG_LIFZ_AA'.
    cb = cl_htmlb_checkbox=>factory( id = p_cell_id
                                     text = ' '
                                     disabled = 'TRUE'
                                     textdirection = 'LTR' ).
    cb->_checked = lr_row_data->zdxg_lifz_aa.   "<- either ' ' or 'X'
    p_replacement_bee = cb.
  ENDIF.
ENDMETHOD.
when the value is ' ', the checkbox shows up. When the value is 'X', the cell is empty. There´s no marked checkbox.
Does any one know why ??
Thanks a lot.

Hi,
to show your checkbox, shouldn't diabled be equal to False
and _checked TRUE/FALSE depending on the default situation?
grtz
Koen

Similar Messages

  • Checkbox  in a table loop - without using Tableview or Iterator.

    My client doesnt want to use tableview or iterator. We are using basic html to create the page. I know I can accomplish much easily using tableviews...but I am not allowed to use it.
    My requirement is simple. In my layout I loop at my internal table and display the contents. The last field is displayed as a checkbox.
    Ex:
    Name  status flag
    Tom  10         [ ]
    Ted    20        [X]
    Rob    10       [X]
    My loop in the Layout is as below:
    <%
      loop at t_rqdt into l_rqdt.
      if l_rqdt-flag = 'X'.
         l_chk = 'checked'.
      endif.
    %>
    <tr bgcolor="#EFEFEF">
    <td></td>
    <td <%= l_rqdt-name %> </td>
    <td <%= l_rqdt-status %></td>
    <td class=tdstatus width=40% >
    <input type=checkbox name="flag" value="flag" <%= l_chk %> > </td>
      </tr>
    <%
      endloop.
    %>
    When I select couple of rows and mark the flag field checkbox, and SUBMIT at the end, and when I see my internal table t_rqdt field r_rqdt-flag.. I dont see them having value X for the rows I marked the check boxes.
    Can anyone please help me how can I trap the checkboxes marked inside a table loop in my on input processing?
    Thanks
    PK

    Much Thanks Raja! It worked!!
    I declared as below for the form fields and was able to get values.
        DATA:  t_form_fields TYPE tihttpnvp.
        DATA:  l_form_fields TYPE LINE OF tihttpnvp.
        CALL METHOD request->get_form_fields
          CHANGING
            fields = t_form_fields.
    One more before my client asks me to do..
    if I place a button CheckALL and Uncheck All on the layout, how can we check/uncheck all the checkboxes on the client side. Any simple Javascript method available? I know I can pass the itab to on input processing and get the flags set, but if it can be achieved on the client side using a script that would help.
    Please let me know.
    Thanks.

  • Getting values from a checkbox

    I am iterating through a vector and displaying the values in checkbox format. The problem I have is that my servlet can only see one value that has been selected from the checkbox.
    The JSP code is as such:
    <%int checkBoxIndex = 0;
    Vector abc = (Vector)session.getAttribute("vector");
    Enumeration e = abc.elements()
    while(e.hasMoreElements())
    code........
    checkBoxIndex ++;
    %>
    <input type=checkbox name="Select" value="<%= checkBoxIndex%>">
    <%}%>
    In the servlet, I am getting the selected values as such:
    String screenInput[] = request.getParameterValues("Select");
    Please help me with ideas of how to get all the selected values from the checkbox.

    Please send the full code, its not proper, i dont understand whether the checkbox is displayed only once or multiple times.

  • Problem with checkbox selection in Tableview

    Hi All
    I am using table view with 8 columns - in the last 4 columns i have checkboxes for user input - i have a strange problem - when the table has multiple entries - for the last column i can only select the checkbox on line 1 - and i cannot select the checkbox on the remaining entries below - but for the other colums with checkboxes this is not the case
    The selection mode for the table is no line selection - since the table is already displayed with input enabled fields - this is to reduce the no of clicks for user
    Can anyone point out what is going wrong - how can i fix this - what i am doing wrong ?
    Thanks
    Sen

    Hi
    When i click on the checkbox for the 2nd or 3rd rows of the last column - nothing happens - the checkox is still active but nothing happens -
    this is the tableview code
    <htmlb:tableView id              = "Detail"
                     design          = "ALTERNATING"
                     headerText      = "Header Text"
                     onNavigate      = "onMyNavigate"
                     emptyTableText  = "test"
                     onRowSelection  = "onMyRowSelection"
                     fillUpEmptyRows = "false"
                     footerVisible   = "true"
                     visibleRowCount = "5"
                     table           = "<%= DETAILTAB %>"
                     iterator        = "<%= iterator %>" >
    and this is the code for the last column
    <htmlb:tableViewColumn columnName         = "OBSOFLGICON"
                               width               = "3"
                               type                = "user"
                               horizontalAlignment = "CENTER"
                               title               = "Obs" >
          <htmlb:checkbox />
        </htmlb:tableViewColumn>
    Thanks
    Sen

  • How to use a SelectAll box / checkbox to select multiple checkboxes!!

    I have a question regarding checkboxes.
    My jsp page has the following layout generated dynamically based on a drop down selection box.
    ID State Initiated Released Locked
    US Initiated X
    Arg Released X X
    Ger Released X X
    Ita Locked X X X
    The Initated, Released & Locked columns are checkboxes. The checkboxes are enabled or disabled based on the State. This means that if the state is Initaited, the user will click the desired checkbox, while the others in the same row will be disabled, and so forth.
    Now all I want is the option of having a SelectAll button / checkbox (something like in yahoo,hotmail) for each column (Initiated,Released,Locked), which when clicked will select all the desired checkboxes under them.(which will select only those in the respective state).
    This is basically to make life easier for the user in case there are some 100 rows. Instead of selecting each individually, he can just click a single button for each column. He can then unselect whichever one he wants.
    I know this can be done using javascript. Remember that this list is not static, but dynamic. So I cannot send a fixed no. into my javascript function to iterate. Im using <nested:iterate> & <nested:checkbox> for iterating & displaying the checkboxes.
    If someone has a solution on it please do send me the code snippet.
    Thanks.

    Javascript is the only solution for something like this.
    I presume you are using struts indexed properties?
    Remember that this list is not static, but dynamic. So I cannot send a
    fixed no. into my javascript function to iterateTrue, but once your JSP is generated you know exactly how many controls you have generated using the varStatus of a iterate tag, or just looking at the size() of the list being iterated on. You can use that to generate the javascript function/call.
    Also you can use javascript without knowing exactly how many are there. You can actually discover the fields on the page.
    Hope this helps,
    evnafets

  • Disabling a checkbox which is in a table, from managed bean

    disabling a checkbox which is in a table, from managed bean -
    i am able to iterate table and get/set value of checkbox but i want to disable it, how can i do that?
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings}", Object.class);
    DCBindingContainer bindings = (DCBindingContainer) valueExp.getValue(elContext);
    DCIteratorBinding iter = bindings.findIteratorBinding("dogsIterator");
    RowSetIterator rit = iter.getRowSetIterator();
    rit.reset();
    while(rit.hasNext()) {
    Row currentRow = rit.next();
    Attribute attr = (Attribute)row.getAttribute("checked");
    what code should come here to disable checkbox?
    rit.closeRowSetIterator();
    thanks.

    Wes Fang wrote:
    You might find it easier to simply use EL and evaluate that value on the disable property:
    <af:column ...>
    <af:selectBooleanCheckbox ... disabled="#{row.bindings.checked.inputValue==YOUR_DISABLE_VALUE?true:false}"/>
    </af:column>
    i used this approach.
    kept a bean in session and used it's property in disabled attribute - now setting this property in my bean...

  • 10.1.3.4.0 : iterator mode : RowIterator.ITER_MODE_LAST_PAGE_FULL

    hi
    The ADF Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0) section "27.1.4 Presenting and Scrolling Data a Page at a Time Using the Range" ...
    at http://download.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvvo.htm#sthref2557
    ... documents two iterator mode flags.
    The first is ITER_MODE_LAST_PAGE_PARTIAL documented as "the style that works best for web applications ".
    The second is ITER_MODE_LAST_PAGE_FULL which turns out the be effectively the default iterator mode value, while the last page is not full.
    Please consider this example application created using JDeveloper 10.1.3.4.0
    at http://www.consideringred.com/files/oracle/2010/IterModeLastPageFull10gApp-v0.01.zip
    It has a simple View Object dropped on a JSF page as a read-only table. It also has a managed-bean that allows to show iterator mode information on the page.
    See the screencast at http://screencast.com/t/qm6flt7asYA
    questions:
    - (q1) Is it intended behaviour to have iterator mode ITER_MODE_LAST_PAGE_FULL while the last page is not full?
    - (q2) How should this iterator mode be configured, and is this possible declarative?
    - (q3) Is it possible to have the "last page full" when navigating ranges of rows using the af:table component (maybe using a configuration unrelated to iterator mode)?
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    ... So this seems to be a bug in the behavior. I asked Steve if he would consider this to be a bug and am waiting for his response ...Thank you, I am looking forward to Steve's feedback.
    ... The place to set the declarative setting is on the "Tuning" panel of the VO. ". See the "Fill Last Page of Rows when Paging Through Rowset" checkbox.If I uncheck the "Fill Last Page of Rows when Paging through Rowset" checkbox, as in the modified example application ...
    at http://www.consideringred.com/files/oracle/2010/IterModeLastPageFull10gApp-v0.02.zip
    ... this is reflected on the page, showing
    r_adfHelper.iterModeInfo['EmployeesLimitedVOVIIterator']  ITER_MODE_LAST_PAGE_PARTIAL (0)... instead of ...
    r_adfHelper.iterModeInfo['EmployeesLimitedVOVIIterator']  ITER_MODE_LAST_PAGE_FULL (1) ... but the behaviour of the af:table component has not changed, see also the screenshot in IterModeLastPageFull10gApp-v0.01-v0.02.png.
    - about (q3): Any thoughts on other (configuration) options that could cause "last page full" behaviour in the af:table component?
    regards
    Jan

  • The html-el:checkbox No Longer Works If Preceded by html-el:form

    My <html-el:checkbox worked fine. But if the <html-el:form ....> ... </html-el:form> come before the <html-el:checkbox ... >, I got the runtime JSP error: "cannot find bean: "org.apache.struts.taglib.html.BEAN" in any scope".
    The complaint points specifically to the <html-el:checkbox property="selectedUsers[${idx.index}].selected" />. The getter method for selectedUsers[0].selected can no longer be recognized.
    I need help because I really do not understand why it happens this way.
    <%@ page import="......common.pojo.user.User" %>
    <!-- Create a variable in scope called userRows from the Users object -->
    <c:set var="userRows" value="${requestScope.Users}" />
    <c:choose>
                                    <html-el:form action="/admin/findUsers.do">
                                               // many textfields and a submit button
                                    </html-el:form>
         <c:when test="${not empty userRows}">
              <!-- create a "user" object for each element in the userRows -->               
              <c:forEach var="user" items="${userRows}" varStatus="idx">
                                      <tr>                        
                          <td align="center">
                                                               <html-el:checkbox property="selectedUsers[${idx.index}].selected" />
                                                              <html-el:hidden property="selectedUsers[${idx.index}].id" value="${user.id}"/>
                                           </td>
             </tr>
                 </c:forEach>
                        <tr>
                             <td colspan="6" align="left">
                                      <html-el:link action="/admin/selectUsers.do">Edit Selected Users</html-el:link>
                             </td>
                           </tr>
                   </table>
              </c:when>
         </c:choose>
    ......

    The checkbox does "not" belong to the form that invokes the "findUsers.do" action. I put some search criteria in that form to search for users in the database.
    The checkbox "is" supposed to be outside the form and gets submitted to another action called "selectUsers.do".
    Question: How do I use the name attribute as well as the property attribute for the <html-el:checkbox property="selectedUsers[${idx.index}].selected" />?
    The checkbox is associated with SelectUsersForm.java:
    public class SelectUsersForm extends ActionForm
         private Map selectedUserFieldMap = new HashMap();
         private String[] selectedUsers = new String[0];
         private String[] selectedUserIDs;
        public SelectedUserField getSelectedUsers( int index )
           SelectedUserField selectedUserField = ( SelectedUserField )selectedUserFieldMap.get( new Integer( index ) );
           if ( selectedUserField == null )
             selectedUserField = new SelectedUserField();
             selectedUserFieldMap.put( new Integer( index ), selectedUserField );
           return selectedUserField;
        // Convenience method to get a list of selected user IDs.
        public String[] getSelectedUserIDs()
           List theUserIDList = new ArrayList();
           Iterator i = selectedUserFieldMap.values().iterator();
           while( i.hasNext() )
              SelectedUserField selectedUserField = ( SelectedUserField ) i.next();
              if ( selectedUserField.isSelected() )
                 theUserIDList.add( selectedUserField.getId() );
           return ( String[] )theUserIDList.toArray( new String[theUserIDList.size()] );
       public void reset( ActionMapping mapping, HttpServletRequest request)
           selectedUsers = new String[0];
           selectedUserIDs = new String[0];
    }and SelectedUserField.java is like:
    public class SelectedUserField
        private boolean selected = false;
        private Long id;
        public Long getId()
           return id;
        public void setId( Long newValue )
           id = newValue;
        public boolean isSelected()
           return selected;
        public void setSelected( boolean newValue )
           selected = newValue;
    }

  • Programatical checking of checkbox is not working in Jdeveloper 11.1.1.3.0

    Hi,
    I've a table whose first column is a checkbox bound to a ViewObject attribute(SelectFlag).
    I've another checkbox placed on column header for Select-All feature.
    The functionality is that when we check Select-All checkbox, it should check checkboxes for all the rows(first column) and when we uncheck Select-All checkbox, it should uncheck checkboxes for all the rows.
    I've the partial trigger on table for the Select-All checkbox.
    Here is the ValueChangeListener code for Select-All checkbox:
    public void checkAll(ValueChangeEvent valueChangeEvent) {
    Boolean isSelected = ((Boolean)valueChangeEvent.getNewValue()).booleanValue();
    System.out.println("New Check Value:"+isSelected);
    ViewObject vo = getIteratorBoundVO("KrcCapabilitiesVO1Iterator");
    vo.clearCache();
    vo.reset();
    vo.setWhereClause("KrcCapabilitiesEO.ACTIVITY_ID = 446");
    vo.executeQuery();
    while(vo.hasNext())
    Row row = vo.next();
    if(isSelected){
    row.setAttribute("SelectFlag",true);
    System.out.println("Checked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    else{
    row.setAttribute("SelectFlag",false);
    System.out.println("Unchecked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    This code is not working in latest Jdeveloper version 11.1.1.3.0 which uses WebLogic Server Version: 10.3.3.0
    It's working fine in Jdeveloper version 11.1.1.1.0 which uses WebLogic Server Version: 10.3.1.0
    Is this a bug? Can anyone help me on this please.
    Thanks,
    Bhaskar

    Hi Frank,
    Thanks for your response.
    You are right, the selection state is not shown in the table.
    I'm taking the ViewObject from Iterator Binding.
    Here is the entire code:
    public static Object evaluateEL(String el){
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    ValueExpression exp = expressionFactory.createValueExpression(elContext,el,Object.class);
    return exp.getValue(elContext);
    public static ViewObject getIteratorBoundVO(String voIterator)
    DCBindingContainer dcb = (DCBindingContainer)evaluateEL("#{bindings}");
    DCIteratorBinding dciter = dcb.findIteratorBinding(voIterator);
    dciter.invalidateCache();
    ViewObject vo = dciter.getViewObject();
    return vo;
    public void checkAll(ValueChangeEvent valueChangeEvent) {
    Boolean isSelected = ((Boolean)valueChangeEvent.getNewValue()).booleanValue();
    System.out.println("New Check Value:"+isSelected);
    ViewObject vo = getIteratorBoundVO("KrcCapabilitiesVO1Iterator");
    vo.clearCache();
    vo.reset();
    vo.setWhereClause("KrcCapabilitiesEO.ACTIVITY_ID = 446");
    vo.executeQuery();
    while(vo.hasNext())
    Row row = vo.next();
    if(isSelected){
    row.setAttribute("SelectFlag",true);
    System.out.println("Checked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    else{
    row.setAttribute("SelectFlag",false);
    System.out.println("Unchecked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    Thanks,
    Bhaskar

  • ADF Table with CheckBox - Select/deselect issue

    I have seen couple of threads and blogs for ADF table with check box . but none of them exactly matching with my requirement . My Database table does not have any field for check box .
    Here is my DB Table
    tableA_
    A_Id
    A_Name
    tableB*
    B_Id
    Requirements :*
    1. Display the above tables data with Checkbox . ( if A_Id = B_Id then the checkbox will be checked , else unchecked ) .
    2. Select / deselect the check box and save the data . Saving the data , will update only tableB . i,e when a new check box is selected then A_Id value will be inserted to tableB . Similarly , deselecting a checked in data will remove the entry from tableB.
    Development :
    1. Created a VO where tableB has marked as updateable .
    2. Created a transient Boolean variable for checkBox . and modified the getter method of checkbox for returning true/false based on the below condition in the ViewRowImpl Class .
    if ( A_Id = B_Id )
    return true;
    else false ;
    3. I have not modified the setter method .
    Using the above concept i can view the data with selected checkbox . but the problem is to save the data . because , when I select a checkbox the above coding in the getter method will return false .
    Therefore , though i am selecting the checkbox but value of the checkbox has been set as false .
    While saving the Data , I am iterating through the VOIterator and observed that a newly selected checkbox value is false . and realized its because of the getter method condition .
    Can you please suggest how can I overcome this issue or shall I need to take any other approach ?
    Jdev version 11.1.1.5
    Regards,
    Amitava
    Edited by: Amitava on Mar 17, 2012 3:48 PM

    You need to go through the ADF page life cycle concepts. In simple words the boolean value in the model is not set while in valueChangeListener. Try adding valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance()); on top in your listener method and see the effect.
    Reference:
    http://docs.oracle.com/cd/E15051_01/web.1111/b31974/adf_lifecycle.htm

  • Problem with getting actual value in Row row=iter.getCurrentRow();

    hi,
    the use case is as follows:
    in master-details, on detail table there are 2 columns with checkbox and username.
    when user clicks checks, the username text item is populated with current user value in respective row.
    <af:column sortProperty="#{bindings.DcaRegisterLinesV1.hints.Selected.name}" filterable="true"
    sortable="true" headerText="#{bindings.DcaRegisterLinesV1.hints.Selected.label}" id="c1"
    width="30">
    <af:selectBooleanCheckbox value="#{row.bindings.Selected.inputValue}"
    label="#{row.bindings.Selected.label}" autoSubmit="true"
    valueChangeListener="#{registerBean.socSelectedChangeListener}"
    shortDesc="#{bindings.DcaRegisterLinesV1.hints.Selected.tooltip}" id="sbc1">
    <!--af:setPropertyListener from="#{securityContext.userName}"
    to="#{bindings.ProcessedUser.inputValue}"
    type="attributeChange"/-->
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column headerText="#{bindings.DcaRegisterLinesV1.hints.ProcessedUser.label}" id="c17" width="80"
    sortProperty="#{bindings.DcaRegisterLinesV1.hints.ProcessedUser.name}" filterable="true"
    sortable="true">
    <af:outputText value="#{row.ProcessedUser}" id="ot17"/>
    </af:column>
    the bean's code is below:
    public void socSelectedChangeListener(ValueChangeEvent valueChangeEvent) {
    BindingContainer dcbindings = getBindings();
    AttributeBinding at;
    DCBindingContainer dc=(DCBindingContainer) dcbindings;
    DCIteratorBinding iter=dc.findIteratorBinding("DcaRegisterLinesV1Iterator");
    BindingContext bindingctx = BindingContext.getCurrent();
    BindingContainer bindings = (BindingContainer)bindingctx.getCurrentBindingsEntry();
    Row row=iter.getCurrentRow();
    String AgreementId=row.getAttribute("AgreementId").toString();
    System.out.println(" AgreementId="+AgreementId);
    it always prints the first row's values.
    even though i click on different rows on the table prior clicking checkbox.
    what's wrong? seems like the model is not refreshed because what? autosubmit=true ?..
    how can i get the actual row values?
    please help
    the

    Hi,
    lets clean up your code first:
    public void socSelectedChangeListener(ValueChangeEvent valueChangeEvent) {
    BindingContainer dcbindings = getBindings();
    //AttributeBinding at;
    DCBindingContainer dc=(DCBindingContainer) dcbindings;
    DCIteratorBinding iter=dc.findIteratorBinding("DcaRegisterLinesV1Iterator");
    //BindingContext bindingctx = BindingContext.getCurrent();
    //BindingContainer bindings = (BindingContainer)bindingctx.getCurrentBindingsEntry();
    Row row=iter.getCurrentRow();
    String AgreementId=row.getAttribute("AgreementId").toString();
    System.out.println(" AgreementId="+AgreementId);No to the possible problem. Check if the table SelectListener is set. It should have an EL string that ends with ".makeCurrent". This however makes only sense for single row select cases.
    Frank

  • A checkbox in a loop must be selected by default

    Hi all,
    There are two lists of checkboxes (in a loop), and one of the checkboxes list in the loop must be selected by default. I am trying to put the value of the checkbox to true but it is yeilding bizzare results... one of them being the checkbox doesn't get deselected sometimes...
    Any help would be appreciated,
    Thanks,
    Deepu.

    Even i have the same problem. Unable to figure that out. I have these checkboxes inside a loop and the name of the checkbox is being constructed dynamically using the loopIndex as follows
    <SimpleTable>
    <Field Loop....>
    <Field name='tempFields.checkBox_4_$(loopIndex)'>
    <Display class='Checkbox' />
    <Default>
    <s>true</s>
    </Default>
    </Field>
    </End Field Loop>
    </SimpleTable>
    I am incrementing loopIndex by 1 for every iteration of the loop.
    If i change the checkBox field name to be static (Ex: tempFields.checkBox_4_test) the checkboxes are being checked when the page loads..
    Anybody any ideas as to why it is not working when using a dynamic field name.
    Thanks
    SJ

  • Using Checkboxes in a Table Component

    I have a table bound to a sql-query. I added an additional checkbox-row not bounded to the sql-query. now, I would like to check, which checkboxes are checked.
    I used these code-snippets to do so:
    http://blogs.sun.com/divas/entry/using_checkboxes_in_a_table
    there is written
    "Use code like the following to determine which checkboxes are selected."
    Iterator rows = getSessionBean1().getSelectedRows().iterator();
    while (rows.hasNext()) {
        String rowId = (String) rows.next();
        RowKey rowKey = <your table's data provider>.getRowKey(rowId);
        ... use the row key to access the data in the data provider
    }However, I don't understand what <your table's data provider> is and how I should be able to access the data in the provider.
    my provider is not related to the checkboxes! Where do I need isSelected()?
    Thanks for helping me with this.

    Hi there,
    Try this
    http://blogs.sun.com/winston/entry/single_selectable_row_table_component .
    http://blogs.sun.com/winston/entry/multi_column_listbox_table
    Thanks
    K

  • Automatic Marking of a row Checkbox in tableview MULTISELECT

    Dear all,
    We are using a tableview with iterator and selectedrow-table in MULTISELECTMODE . The tableview gives back the table of the selected rows which have to be processed .
    After a users action and a fired event we have to store possible changed data out of the tableview into a internal memory table ( Export/Import to INDX database ).
    Therefore the user has to mark all rows with changed data to prevent that we have to check all rows (max. 20000 )out of the tableview for differences between the data in the memeory table and the tableview ( performance !! )
    Is ther any possibility to mark the checkbox on the left border of the data row automatically ( by event ? ) if one of the editable inputfields is changed by the user ? Otherwise the user has to scroll up to 40 columns to the left only to mark the row for saving the changed data .
    It would be great to get a hint !! Thanks in advance .

    Hi Craig,
    Yes this is clear .
    We already use that pattern tabid_row_cell for the cell identification in a javascript function.
    But how can I adress to the automaticly in MULTISELECTMODE added checkbox ( or the PrevSelectedtable ) which is not part of my columndefinitions table ? What is the name of that field ?
    The background of our problem with rowmarking is the fact that all data of an internal table are lost in event OnInputProcessing if we fill that table ( 45 columns )for the first time in OnInitialization and not in OnCreate like in most of the mentioned examples ( for instance with table sflight ) .
    On the other hand the OnCreate event will be proceeded after every click event , no matter if we use a stateful or stateless mode . And we want to read the database table for filling the internal table only once if we proceed the OnInit for the first time . 
    We have to select the data out from a ODS table with searchcriteria ( 4 values of table-keys ) from a pre-called start page . And the validation of automatic page attributes in OnCreate seems to fail in general , so all the needed attributes are empty in OnCreate.
    That's why we have to refill the internal table ( from INDX database ) everytime we proceed the OnInitialization event ( also after a simple pageDown ), so data changes inside the tableview object would have been overwritten without storing changes into the memory area of the internal table . This is an unwished emergency exit but we don't know how to deal with this on a better and easier way .
    I tried to save the internal table as a hidden page attribute in OnLayout getting an conversion error after syntax check - this worked very well in other cases .
    If there is a way to get a persistant existing internal table ( during all events ) and the tableview hold it's data changes we could forbear from the rowmarking .
    Best regards and hope that you can help
    Dirk Läufer

  • Horizontal table with checkboxes

    Hi,
    I need to create a horizontal table. With this i mean the column aren't on top but on the left side and the data goed from top to bottom. You often see this construction to make it easy for user to compare values. I also need to display in the last row for every column a checkbox.....as to select that data column
    Something like this:
                  | X | Y |
    name     |    |    |
    descr     |    |    |
                  | 0 | 0  |
    I managed to create the table dynamically but i cant seem to find a way to a the checkboxes because the go by column and not by row. I tried adding them in a seperate container underneath but i can't seem to get hold of the column widths at runtime.
    Another possibility which i thought maybe would work, is not to work with a table but to simulate this and just create it with a container with Gridlayout and filling it like a grid. Dont know if this woulr workd though...
    Any thoughts or idea's?
    Much thanks & regards,
    Hugo

    Hi Hugo,
    This is the complete code for achiving a simple sceanrio where you would have
    both checkBox and textview in the same column.
    if(firstTime)
             int elementIndex =0;
             IWDTable table = (IWDTable)view.getElement("Table");
             for(int i=0;i<wdContext.nodeTableNode().size();i++){
             IWDTableColumn tableColumn = (IWDTableColumn)view.createElement(IWDTableColumn.class,"tableCol"+elementIndex+i);
              elementIndex++;
             Iterator iterator = wdContext.nodeTableNode().getNodeInfo().iterateAttributes();
             while(iterator.hasNext()){
                   IWDAttributeInfo attInfo = (IWDAttributeInfo)iterator.next();
                   IPrivateAView.ITableNodeElement tableNodeElement = wdContext.nodeTableNode().getTableNodeElementAt(i);
                   IWDTableStandardCell stanCell = (IWDTableStandardCell)view.createElement(IWDTableStandardCell.class,"standardCell"+elementIndex);
                   elementIndex++;     
                  if(attInfo.getDataType().getLocalName().equalsIgnoreCase("string")){
                        IWDTextView textView = (IWDTextView)view.createElement(IWDTextView.class,"textView"+elementIndex);
                        textView.bindText(attInfo);
                        textView.setVisible(WDVisibility.VISIBLE);
                        elementIndex++;
                        stanCell.setEditor(textView);
                        stanCell.setVariantKey(elementIndex+ "String");
                  else{
                        IWDCheckBox checkBox = (IWDCheckBox)view.createElement(IWDCheckBox.class,"checkBox"+elementIndex);
                        checkBox.bindChecked(attInfo);
                        checkBox.setVisible(WDVisibility.VISIBLE);
                        elementIndex++;
                        stanCell.setEditor(checkBox);
                        stanCell.setVariantKey(elementIndex+ "Boolean");
                   tableColumn.addCellVariant(stanCell);
                   tableColumn.setVisible(WDVisibility.VISIBLE);
                   table.addColumn(tableColumn);
             table.bindDataSource(wdContext.nodeTableNode().getNodeInfo());
    Regarding the the data source in this case you can create a node i.e table Node with least an attribute of type String and another of type boolean.Create and add
    node elements in wdDoInit() for the same.
    Regards
    Amit

Maybe you are looking for