Af:table component.

Hello,
I am trying a display the contents of a file in a table, having one column and the no. of rows as many are lines in the file.
I am mapping the table to a collection of type string which contains all the lines in the form of a list. Now i want a few lines to be highlighted or have a different text color.Say in a file of 10 lines, i want line 4,6,8 to be of color red.
Please suggest if it is possible to do inside a table, can we put any condition.
Or is there any other way to do it more properly.
Thanks
Ankush Gupta

Hi John,
This is my table:
<af:table summary="Diff" id="iter123" var="line"
value="#{pageFlowScope.lifecycle_srmimport.differences}"
contentDelivery="lazy" columnStretching="last" width="100%"
rows="#{pageFlowScope.lifecycle_srmimport.lineNum}"
fetchSize="#{pageFlowScope.lifecycle_srmimport.lineNum}"
autoHeightRows="0">
<af:column id="col11" headerText="Difference" noWrap="false">
<af:inputText value="#{line}" id="gsimpo" readOnly="true"/>
</af:column>
</af:table>
Here i am not able to understand how to put the condition on inline:color.
My scenario is like for a particular line, if i have a boolean variable set==true(the set i am setting in my bean), then i set the color to true. How can i do that ,can u please explain?
Thanks
Ankush Gupta

Similar Messages

  • Clicking a tree node does not refresh the fields in the table component

    hi all,
    I am using a tree component along with a table component in my page.so whenever i am clicking on a node it should display the relevant information of that node in the table from the database.But whenever i am doing the page is not refreshing and the old values of the textfields in the table still exist.i have written the code to populate the table in a button click event.It is working fine but the same is not working when i am clicking any node in the tree component.Can anyone provide a solution to this problem.
    Thanks and regards,
    Prasant Kumar

    Never mind... I actually found something that works...
    treeModel.nodeStructureChanged(leadSelection);

  • Table component disturbing the order of rows while displaying

    HI,
    In jspx when ever data is displayed in table,when we select last page the table component
    is displaying data which is not sorted.(values given to table are changed in output).
    This is occuring only in last page.
    EX:If i have 87 records with pagination,where 15 are displayed.
    when i select to last page the output from my query is not matching the data viewed.
    Using apache trinidad1.0.5
    Regards,
    Vin
    Edited by: vinTK on Apr 26, 2012 6:16 AM

    I think that it's a very common situation.
    No ideas?
    I think that it's interesting to create appz with great performance.

  • Problem with text direction in table component for text with two language!

    Hi,
    I want to display text in table component by binding to the one property,and also the language of this text is farsi that must be in the RTL direction.
    so i defined a direction in style of staticText component in the table.
    when the text is only in farsi language ,it works correct but when the text has one or more words in english language ,format of the text changed and the words moved in text.
    thanks

    I can not understand relation between COM and HTML elements .
    can you elaborate more ?
    All HTML elements are accesable via DOM in browsers.
    Indeed to change an element attribute in html files (in browser without server interaction) we use scripts to access DOM tree and then we change the element attribute.
    for example when you write
    document.forms[1].submit()
    you accessing the element using DOM tree.
    About Farsi problem , I think there is no solution for this problem , as you may know , when we mix RTL and LTR languages in one element text attribute , we have no control over its appearance.
    If i understand your post , you want to show both rtl and ltr in one static Text , which is not doable in simple manner.
    At least i can not offer you a simple way to solve this.

  • Problem with checkbox on table component

    Hello i am having a problem with checkbox in table component
    i am developing something like a shopping cart app and i have a checkbox in my table component , i want users to select items from the checkbox to add to thier cart, They can select the items from cartegory combobox , my problem is when they select the items from the checkbox if they select another category the alread selected once do not display in my collection opbject please how can i maintain the state of the already selected items in my collection object

    Hi,
    Please go through the tutorial "Understanding scope and managed beans". This is available at:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/scopes.html
    The details of the selected items need to be stored in an object that is in session scope.
    Hope this helps
    Cheers
    Girish

  • How to Create a Table Component Dynamically based on the Need

    Hello all,
    I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code.
    Please help.

    Winston's blog will probably be helpful:
    How to create a table component dynamically:
    http://blogs.sun.com/roller/page/winston?entry=creating_dynamic_table
    Adding components to a dynamically created table
    http://blogs.sun.com/roller/page/winston?entry=dynamic_button_table
    Lark
    Creator Team

  • How to change font size, in a table component!

    Hello,i im trying to change the font size of the text inside a table component and i want to disappear the borders of the table, i was trying to achieve this using style, but this dont work, can anybody can help me with this?
    Beltazor!

    As i recall you gotta write css styles that overide the default behaviour. There's a tutorial on the subject.

  • Table component - how to find out which cell is clicked

    Hello!
    I have a couple of questions regarding table component
    1. Is there any way to find out which table cell is clicked on?
    2. And is it possible to paint clicked cell programmatically?
    Possible solution might be a Select Boolean Checkbox inside a cell, but anyway, i'd have to determine which cell contains this checkbox (some kind of cell coordinates, etc...)
    Thank you

    1. Is there any way to find out which table cell is clicked on? It would be easy to suggest the way, if you can share us the requirement
    2. And is it possible to paint clicked cell programmatically?You can do it through javascript by setting contentStyle property.
    Sample Code:
    <af:table ...>
      <af:column>
         <af:inputText ...>
                  <af:clientListener method="paintCurrentCell" type="click"/>
         </af:inputText>
      </af:column>
    </af:table>
    <!-- javascript method -->
    function paintCurrentCell(event){
        event.getSource().setContentStyle("background-color:red");
      }Sireesha
    Edited by: Sireesha Pinninti on Nov 10, 2009 7:01 PM

  • Java script error when using a "Table" component (jsc2)

    using a table component, I get a js errors, when lodiing the HTML page, sorting rows etc.
    can some one helpe me or can some one have the same problem ?

    Hi,
    Please post JSC2 related queries at:
    https://feedbackprograms.sun.com/login.html
    Cheers
    Giri

  • Problem with JDev 10g ADF table component and rangeChangeListener

    Hi,
    I'm populating an ADF table component from a backing bean and would like the range of rows be changed using custom method on the backing bean.
    I have declared table on page as shown below and the table is populated correctly. However the onRangeChanged method in the backing bean never fires when
    user hits previous or next. Any ideas of what I missed ?.
    Thanks,
    Kenneth
    <af:table emptyText="No items were found"
    value="#{companySearchBean.companies}"
    var="company" rows="20"
    first="#{companySearchBean.firstCompany}"
    rendered="#{companySearchBean.queryExecuted}"
    rangeChangeListener="#{companySearchBean.onRangeChanged}">
    <af:column sortable="false" headerText="Company Name">
    <af:outputText value="#{company.partyName}"/>
    </af:column>
    <af:column sortable="false" headerText="Party Number"
    formatType="number">
    <af:outputText value="#{company.partyFileNo}"/>
    </af:column>
    </af:table>

    Hi,
    I'm populating an ADF table component from a backing bean and would like the range of rows be changed using custom method on the backing bean.
    I have declared table on page as shown below and the table is populated correctly. However the onRangeChanged method in the backing bean never fires when
    user hits previous or next. Any ideas of what I missed ?.
    Thanks,
    Kenneth
    <af:table emptyText="No items were found"
    value="#{companySearchBean.companies}"
    var="company" rows="20"
    first="#{companySearchBean.firstCompany}"
    rendered="#{companySearchBean.queryExecuted}"
    rangeChangeListener="#{companySearchBean.onRangeChanged}">
    <af:column sortable="false" headerText="Company Name">
    <af:outputText value="#{company.partyName}"/>
    </af:column>
    <af:column sortable="false" headerText="Party Number"
    formatType="number">
    <af:outputText value="#{company.partyFileNo}"/>
    </af:column>
    </af:table>

  • How to perform insert, update and delete in a table component

    hi all,
    i am using a table component in my page. I want to retreive data from multiple tables as well as perform insertion, updation and deletion operation.The changes should be affected in the corresponding tables. can anyone provide a solution for my problem.
    Thanks in advance
    regards,
    prasant

    There is a great tutorial for insert, update and delete records in a table.
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    Hope it helps.
    Thanks,
    Moumita

  • Changing row selection of a af:table component in a managed bean

    Hi,
    how can ich programmatically change the selected row of a <af:table> component within a managed bean class?
    I have a table which depends on the date settings of a <dvt:timeSelector> of a <dvt:lineGraph> component. Now when the timeSelector is moved to new dates the table should be refreshed by executing the query for the table again with the new dates. The problem is when the query of the table's view object is executed again the first row will be automatically selected after executing.
    Now I want to achieve that the last row I have selected will be selected again after moving the time selector.
    I searched already in the OTN Discussion Forum but didn't find a fitting solution.
    Thanks in advance!

    The problem is that executing the query moves the current roe to the first one.
    What you can do is to save the current row (its pk), execute the query and then set the current row to the pk of the saved selected one. Set the table attribute displayRow="selected" and set the selected row of the table to the now current row.
    One problem is that you have to be sure the last selected row is still in the record set of the new query result.
    Here are some pointers with code:
    Keep the scroll position on partial commit in <af:table>
    Jdev 11G ADF BC: rollback and keeping current row problem
    How can I programmatically select row to edit in ADF - 11g
    Timo

  • Accessing list of DISPLAY objects in a table component.

    Hi there,
    I am using a class that extends ObjectListDataProvider to populate a JSF table component.
    I need to access the list of objects that are actually displayed currently in the table. The table uses pagination so there are other table elements not displayed and I do not want those.
    Can someone help me?
    thanks

    Hello,
    I've been working with this method and it works good with pagination as far as you do not start to sort the table... it starts to append new rows at the end.
    The only workaround I've found so far is to call clearSort() before getting the ids... but that is just partially nice...
    So, maybe I'm doing something wrong or maybe there is a bug that could be fixed in 1.2?
    Regards,
    Rob

  • Jsf data table component + print null cell

    I am using the jsf data table component and binding the column values to a backing bean.
    <h:dataTable binding="#{backing_showDifferences.dataTable2}"
    id="dataTable2">
    <h:column binding="#{backing_showDifferences.userColumn1}"/>
    <h:column binding="#{backing_showDifferences.userColumn2}"/>
    <h:column binding="#{backing_showDifferences.userColumn3}"/>
    </h:dataTable>
    - some code from my showDifferences.java
    HtmlOutputText column1Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.uclass}");
    column1Text.setValueBinding("value", vb);
    usercolumn1.getChildren().add(column1Text);
    HtmlOutputText column2Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.ue1}");
    column2Text.setValueBinding("value", vb);
    usercolumn2.getChildren().add(column2Text);
    HtmlOutputText column3Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.ue2}");
    column3Text.setValueBinding("value", vb);
    usercolumn3.getChildren().add(column3Text);
    ResultSetDataModel dataModel = new ResultSetDataModel();
    dataModel.setWrappedData(rs);
    dataTable2.setValue(dataModel);
    The raw HTML:
    <table id="form1:dataTable2" class="iuptable" border="1">
    <thead>
    <tr>
    <th scope="col">Heading 1</th>
    <th scope="col">Heading 2</th>
    <th scope="col">Heading3</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>some data in this column</td>
    <td>X</td>
    <td></td>
    </tr>
    <tr>
    <td>Some more data in this row</td>
    <td>X</td>
    <td></td>
    </tr>
    </tbody>
    </table>
    My problem is this...in the raw HTML the <td></td> tag is not formatted nicely on my table output. I have lines around my entire table and each cell within it. When the <td></td> prints there are no lines. I am new to the JSF table data component, but if I were writing some JSP or servlet code I would check that if value was null I would append an &nbsp to the <td> tag (ex. <td>&nbsp</td>) and the table would be formatted properly. The backing bean that I am binding to is pulling the data from a database table...so my sql looks like this:
    SELECT uclass, ue1, ue2 from table1; my problem is when ue1 or ue2 is a null value.
    Any ideas would be greatly appreciated!

    Hi,
    the h:dataTable belongs to the JSF Reference Implementation from Sun, not to Oracle ADF Faces. The rendering is within this component set and I suggest to report your issue on one of the SUN forums (http://forum.java.sun.com/forum.jspa?forumID=427) as we have no handle to e.g. fix an issue if it exists in the component set.
    Frank

  • ADF:LOV declarative component not working inside table component.

    Hi,
    I have created a custome LOV control,I am using this custom LOV control inside the table component,I am passing the below values as the parameter
    KeyValue="#{row.bindings.Value.inputValue}"
    LovModel="#{row.bindings.Value.listOfValuesModel}"
    Value- is the list of value attribute.
    When i click on the LOV search icon, the popup displays the Query model(it displays the list name at the top in the search page.so it is able to recognise the LOVmodel) but it is not able to retrive the list values.I am getting Query page with no values
    in the jspx page it is giving warning as "reference not found for row.bindings.Value.listOfValuesModel"
    Please can anyone help me on this?
    Thanks,
    Harish

    Hi Frank,
    below is my actual requirement and the solution i tried till now.
    I have a table and it has two columns let’s say “Columns” and “Values”. The first column i.e. “Columns” will be a dropdown and it will have predefined values, the other column “Values” will be a “List of value” control or similar kind of control in which the user can search and select multiple values from the popup list, and that list should dynamically bounded to the first column selected value.
    For Ex: if I select a value “Product” from the dropdown of the first column “Columns” , the control in the other column “Values” should bound to “product” list and I should be able to search and select multiple values from the pop up. And the popup should return the multiple selected values as a comma separated string to the textbox.
    In my requirement I have to use only VO’s to create the list and the control in the “Values” column should switch between these VO’s depending on the value selected in the first column.
    The solution we tried till now.
    I used a LOV switcher to achieve the above requirement. But we have a limitation in this approach as we could not do the multi select. Then we created a declarative LOV component in which we can select multiple values as a comma separated string from the popup.
    I retained the LOV switch model , instead of binding LOV switch model to the basic “Input List of Value” control in the JSPX page ,I used the LOV declarative component. Below is the code snippet which calls the declarative LOV component from JSPX page.
    <af:panelFormLayout id="pfl2">
    <af:selectOneChoice value="#{bindings.Columns.inputValue}"
    label="#{bindings.Columns.label}"
    required="#{bindings.Columns.hints.mandatory}"
    shortDesc="#{bindings.Columns.hints.tooltip}"
    id="soc3" autoSubmit="true">
    <f:selectItems value="#{bindings.Columns.items}" id="si5"/>
    </af:selectOneChoice>
    <mc:OraMultiSelect
    KeyValue="#{bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"
    id="oms2"/>
    </af:panelFormLayout>
    Where Value attribute is having LOVModel.
    The above code perfectly fine as I used it inside the “Form layout” and with the parameters passed as KeyValue="#{bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"
    The problem I am facing:
    The actual problem comes when I use this control inside the table which I required in my implementation.
    I called the declarative LOV control as shown below inside the table as I used to call the basic “Input List of value” control which works fine inside the table.
    . <af:column sortProperty="Value" sortable="false"
    headerText="#{bindings.OpPlanning1.hints.Value.label}"
    id="c1" width="133">
    <mc:OraMultiSelect KeyValue="#{row.bindings.Value.inputValue}"
    LovModel="#{row.bindings.Value.listOfValuesModel}"
    id="oms1"/>
    </af:column>
    Above code doesn’t works fine when I select value from the “Column” dropdown it displays the corresponding list model in the pop up but not able to retrieve the value of the list in the popup .
    If I pass the parameters as
    . <af:column sortProperty="Value" sortable="false"
    headerText="#{bindings.OpPlanning1.hints.Value.label}"
    id="c1" width="133">
    <mc:OraMultiSelect KeyValue="#{bindings.Value.inputValue}" --instead of ="#{row.bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"--}" --instead of ="#{row.bindings.Value.inputValue}"
    id="oms1"/>
    </af:column>
    It works fine for the first row.The subsequent rows refers the value selected in the first row dropdown.
    Thanks For the help,
    Harish
    Edited by: 886523 on Nov 3, 2011 8:04 AM

  • Table Component and Row Height

    I am using XCelsius 4.5 and using the table component.  Is there anyway the row height on the table component can be linked to the Excel file?  It is not dynamically changing or wrapping text based on the amount of data that is imported in.

    Judging from the stack trace this has nothing to do with your variable row height. You are simply not respecting some array bounds (maybe your data array for the table model) when you insert the new row.
    In newRouteFare() do you fire a tableRowsInserted event? Or something similar? Check the rows passed into the Event object to see if you are exceeding the limits of the current table model.
    Thomas

Maybe you are looking for

  • End Routine - Modify a record in the cube

    Hello Guys, In the end routine I have to update a field . The transformation is the same cube to the cube. I want the record to be modified like add a value to a field in the end routine. Since it is a cube it creates a new record instead of overwrit

  • WEB DYNPRO FOR ABAP OR BSP OR WD FOR JAVA ?

    Hello Friends, We have some bussiness reports, and we have to replace the standard GUI with web; for web dynpro of java, I think we have to first put the business code of reports to some kind of RFC and then call the rfc and etc.... is there somethin

  • After Effects 7.0 Spark trail

    Does anyone know of a good tutorial on creating a spark trail e.g. like the sparks along a gunpowder trail.  I've looked everywhere.  I've found 3D text, smoke, fireworks, but no sparking trails.  I want one that is quite dense and compact that I can

  • Date assignment syntax error

    hi all i am using the code below but its giving errors can anyone tell me the error error in the bold part for(int i=0;i<Applicabilities.length;i++){                if(Applicabilities.getEffectiveStartDate().before(effectiveStartDate)){              

  • Hp dv6500 - Need to change the prodigal

    Hello, I have hp pavilion dv6500 (hp dv6695 el) p/n: GZ922EA#ABZ, s/n: {Personal Information Removed} and i have problems with the prodigal. I asked for an advise time ago for replacing this part on my notebook. And now, i'm here asking for the chara