Help in ADF JCleint Table sorting
I am having an EntityObject OrderEntity. I am having one ViewObject OrderView, created from the EntityObject OrderEntity. I having some calculated fields in the View Object OrderView which are not in EntityObject OrderEntity. Like Profit and GrossProfit. I calculated these values from the Module in the ViewObject.
This ViewObject OrderView is bind with the JTable. There is sorting functionality in this JTable. When user clicks on the Table Header for sorting, data of the calculated fields fron the view gets cleared/wiped out.
Question: How to keep the calculated data intact while sorting? So that user can sort based on profit also.
Any help will be appreciated.
This Question has been posted in Jdeveloper and ADF forum
Similar Messages
-
Need help on ADF Trinidad Table
Hi,
I got one strange problem, i have one AF Query and result table, in my af query 2 fields are LOV's have created LOV followed by the below link
http://andrejusb.blogspot.com/2008/11/adf-query-component-and-view-criteria.html LoV is coming fine but on the result table values are coming as a numbers.
For example in my LOV i have 3 values 1. Apple, 2. Orange 3. Grapes.
Now in the table fruits coloum i am getting 1 instead of Applet. and another row 3 instead of grapes.
Can any one help how can i get the values in the table instead of numbers.
It's urgent for me.
Regards,Hi,
My problem was resolved, if i use Combo box with list of values is's working fine.
But here i have one more problem like if i use bind variable in the LOV VO Query then my result is not coming, if there is not bind variable it's working fine and if i use the bind variable in the LOV search option then it's working fine but if i hide the bind variable and set the value in AM prepareSesstion method the LOV is not returning any value.
Query is:
select substr(d.description,0,40) description
from cm_system_users a,
cm_user_responsibilities b,
cm_responsibility_processes c,
cm_processes d
where a.nt_login =:B_NT_LOGIN
and a.user_id = b.user_id
and trunc(sysdate) between b.eff_date and nvl(b.exp_date,sysdate + 1)
and b.RESPONSIBILITY_ID = c.RESPONSIBILITY_ID
and c.process_type = d.process_type
and d.enabled_flag = 'Y' order by d.arguments_flag
AM Method:
CmProcessViewImpl vo = getCmProcessView();
String nt_login = getUserPrincipalName();
vo.setNamedWhereClauseParam("B_NT_LOGIN", nt_login.toUpperCase());
vo.executeQuery();
Can any one help me in this. -
Problem in ADF Table Sorting Accessor Fields Generated from EJB 3
Here are the things that I have done:
1) created EJB entities for Employee and Department based on the HR schema
2) created an HRFacade session bean
3) generated DataControl
4) created a browse page
5) created an adf read only table with the following fields: employeeId, lastname, and departmentName with row selection, filtering and sorting enaabled.
when I invoke sorting for the employeeId and lastname fields, the table sorts fine, but...
when I invoke sorting on the departmentName field (an accessor field), the following error occured:
WARNING: ADF: Adding the following JSF error message: Definition departmentName of type Attribute is not found in employeesFindAll.
oracle.jbo.NoDefException: JBO-25058: Definition departmentName of type Attribute is not found in employeesFindAll.
at oracle.jbo.uicli.binding.JUCtrlValueBinding.findAttributeDef(JUCtrlValueBinding.java:589)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.findAttributeDef(JUCtrlValueBinding.java:559)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding.__setSortCriteria(FacesCtrlRangeBinding.java:247)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setSortCriteria(FacesCtrlHierBinding.java:346)
at org.apache.myfaces.trinidad.component.UIXCollection.setSortCriteria(UIXCollection.java:464)
at org.apache.myfaces.trinidad.component.UIXTable.setSortCriteria(UIXTable.java:196)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:260)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:140)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:364)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:147)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:140)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:364)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:787)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:280)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Is this a bug or a not supported feature?
We been stack on this... Help!!!I have a similar problem but related to the creation of Project Gantt Chart.
oracle.jbo.NoDefException: JBO-25058: No se ha encontrado la definición XXXView2 del tipo Atributo en YYYView1.
this is happened when i try to create a Project Gantt Chart whit 2 view objects that have a parent-child relationship where XXXView2 (SUBTASKS) is the child and YYYView1 (TASK) is the parent.
still not find the solution.
This is the bug? -
How to show the filter and sort capabilities in adf dynamic table
hi
how to show the filter and sort capabilities in adf dynamic table..
Pls help meHi
Click on a colum in your table and go to the properties pallet
make true the sortable property then you can sort the table according to that column
Thanx
Padma -
ADF UIX table example: oracle.cabo.doc.* missing
Hi,
I'm working through the Oracle ADF UIX Developer's Guide and want to try the ADF UIX Table Example. Unfortunately I don't seem to have the classes which are referred to in that example (located in oracle.cabo.doc.demo.table..), which makes it difficult for me to follow and understand the example.
I've found a reply to a post to this forum of 26-nov-2002 where it is stated that these files were at that moment not yet available.
My question is: have these files become available in the meantime. If so, wher can I find them?
Regards,
AntonClicking on a sortable header generates a sort event. You need to specify a handler for this event. The error you see is a result of the application not knowing how to handle the sort event. On your page you should include something like the following to handle the sort event:
<handlers>
<event name="sort">
<method class="myPackage.myClass" method="doMySort"/>
</event>
</handlers>
For more details, see the "Sortable Column Headers" section in this chapter of the ADF UIX Dev Guide: http://helponline.oracle.com/jdeveloper/help/state/content/navSetId.jdeveloper/navId.4/vtAnchor.Sort/vtTopicFile.jdeveloper%7Cuixhelp%7Cuixdevguide%7Ctables%7Ehtml/ -
URGENT: ADF Faces table updating issue.
I have a project that uses JSF, ADF Faces, EJB 3.0, and the ADF binding framework.
In this project, I have a page with a databound ADF Faces Table. The table has a number of read-only columns and two read-write columns. I also have an Edit button that allows the user to pop up a dialog box to edit the selected row of the table. When the user clicks OK in the dialog box, the data is passed back to the main page and the table is updated.
Everything works correctly for the read-only columns. For the read-write columns, however, the table data does not get updated following an edit. This is what I have found:
1. The table row data gets passed in to the Edit dialog correctly.
2. The data gets passed back correctly.
3. The model gets updated correctly (up to and including the database).
4. Looking at the iterator in the debugger shows the correct, updated data.
5. When the table row is getting redrawn, the getter calls for the read-write columns return the updated data.
6. As mentioned above, the read-only columns get updated correctly.
7. Updating the read-write columns directly from the table works correctly.
So, the problem appears to be in the GUI layer. I suspect that, somehow, the submitted values of the read-write columns are not getting set properly, but I cannot figure out how to do this.
Note that clicking on the Edit button results in a partial submit. In the return listener, I add a call to AdfFacesContext.getCurrentInstance().addPartialTarget(getRecipientTable()) in order to redraw the table (getRecipientTable() is the bound value of the ADF table).
Please help! We are so close to production and we need to fix this.
Thanks,
AraHi,
I don't have a testcase for this, so I just come up with ideas to try
1. refresh the parent container of the table. It seems that the input text components are not triggered to refresh if the refresh is on the table.
2. If using ADF, make sure the update is performed directly on theiterator (which automatically is the case if you use a ADF bound form for this)
3. Check if executing the table iterator and then setting back the current row makes a difference
Frank -
Text Overlapping/Wrapping Issue in BSP(Table Sorter Using JQUERY)
Hi ,
I have a requirement to add a new column in existing table which has been built by Table Sorter method in JQUERY.
I have added the new column but the issue is value for the new column is populated on next line of the table.
This could be a simple width issue, but i don't know JAVA much.Attached the image for reference.
Code i have used is:
<input type="text" name="t_rbclaim[<%= lv_tabix%>].reason" size="3" maxlenth="3" wrapping = "true"
onBlur="javascript:this.value=this.value.toUpperCase();" value="<%= w_rbclaim-reason%>">
Please let me know how to modify the above code in better way.Hi Raja,
Can you please help on this problem. I want to know whether there is any funciton module to convert the univercel character set code (HTML Codepage) page to SAP codepage. We are going to use ECC 6.0 which is unicode system for background R/3. So we can get the correct character format if identify the correct conversion method.
Please let me know if any information and expect some information on this.
Regards,
Saravanan V -
How to select rows in adf faces table
Hi guys
im new to adf faces .I created a adf faces table with some data.My task is to select one row and if i click tht row, the data of tht row will be displayed in an input text fileds.How can i select a row in a adf faces table and give actions to rows...i read so many tutorials...none of them didnt give a correct idea....plz help me...
thanks in advance..
rajivYou're here in the Sun JSF forum, not in the Oracle JSF forum.
Try here: JDeveloper and ADF
If the ADF datatable is technically comparable with the RI datatable, check http://balusc.xs4all.nl/srv/dev-jep-dat.html to get some insights how to retrieve the selected row object. -
Problem in executing Child VO having bind parameter for ADF tree table
In my application i need to show a ADF Tree table which is using two view objects having view links between them
and the child VO has a bind variable.By clicking on the parent node of the parent VO attribute it showing the right result from the child VO attribute by the view link.
I have tried to execute the child VO programmatically (In AmImpl) with the bind variable and using ViewCriteria as well
but both the cases the child vo is not showing the proper result according to the bind variable instead of it is showing all the records on click of the parent node attribute.
Your help will be appreciated.
ThanksHello,
In the same situation I added another relationship to the view link to set the parameter.
Tricky moment is you have to name your parameter like :Bind_ParamName as view link is setting this kind of parameters (check it in Query tab). -
Af:table sorting when immediate='true' bug
Where can I find the patch to fix the problem of sorting an af:table when immediate='true'?
No I don't have a bug number, I've found that this is a bug based on this thread <a href src='BUG: ADF FACES 10.1.3_04: Table sort broken if immediate="true" but I have no idea what the number is or where to find the patch for it.
This is a really irritating bug. I want to have sorting on my tables but if I can't put immediate='true' on the table then other components on the page will fire their validation. -
Search Help values to Internal table
Dear Friends,
Is it possible to export Search Help values to Internal table?
On screen, when user click on Search button, the SAP standard search help will call (Customer Search). After entering values, some result get displayed and this result need to export to the internal table.
Thanks in stack
NileshHi:
try this:
DATA : wa_shlp TYPE shlp_descr,
it_records LIKE ddshretval OCCURS 0 WITH HEADER LINE.
wa_shlp-SHLPNAME = 'MAT0M'. "one of elementary search help name from mara-matnr.
wa_shlp-SHLPTYPE = 'SH'.
CALL FUNCTION 'F4IF_SELECT_VALUES'
EXPORTING
shlp = wa_shlp
MAXROWS = 0
SORT = ' '
CALL_SHLP_EXIT = ' '
IMPORTING
MAXROWS_EXCEEDED =
TABLES
RECORD_TAB =
RECDESCR_TAB =
return_tab = it_records
LOOP AT it_records.
WRITE:/ it_records.
ENDLOOP.
Follows is how to get the search help name:
CALL FUNCTION 'DD_SHLP_GET_HELPMETHOD'
EXPORTING
tabname = 'MARA'
fieldname = 'MATNR'
langu = sy-langu
NO_CHKTAB_MAPPING =
GET_ENTITYTAB = ' '
CHANGING
shlp = wa_shlp
callcontrol = callcontrol
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
OTHERS = 3
CALL FUNCTION 'F4IF_EXPAND_SEARCHHELP'
EXPORTING
shlp_top = wa_shlp
IMPORTING
shlp_tab = shlps.
好运,
启明星 -
Replace default table sort with order by on the view object
The Jdeveloper help for af:table says:
If the underlying model is not a CollectionModel , the Table automatically examines the actual data to determine which properties are sortable. Any column that has data that implements java.lang.Comparable is sortable. This automatic support cannot be nearly as efficient as coding sorting directly into a CollectionModel (for instance, by translating the sort into an "ORDER BY" SQL clause), but is sufficient for small data sets.
I have a database table with varchar2 columns that can contain string, date or number values. So in the af:table I want to sort the columns either in string, date or number order.
I tried creating a sort listener and in that listener set the view object order by clause and execute the query, but it does not affect the row order - it is always sorted as a string. I assume that the collection is doing its sort after I do the query, and overwriting the query order. I have tried disabling the sort in the listener by setting the sortcriteria to null but it has no effect.
Can anyone suggest how to stop the default sort re-ordering the rows, or else how to code sorting directly into the CollectionModel as suggested in the help.
Hugh NelsonBy running in debug I discovered that when you click on a column heading to sort by the column values it actually sets the order by clause on the view object and executes a query. The help says that the default sorting is not as efficient as setting the order by clause - perhaps the help is out of date because default sorting does set the order by clause.
This means that you cannot do a column sort on a transient attribute. The attribute being sorted on must exist in the table/query.
The easiest solution is to override the setOrderByClause method on the view object. The string parameter is the column to order by eg "COLUMNA". If this column holds date values I can change it to something like "TO_CHAR(TO_DATE(COLUMNA,'DD-MON-YYYY'),'YYYYMMDD')". For numbers I do "LPAD(COLUMNA,10,'0')".
This works OK.
Hugh Nelson -
Can't add row using table sorter
I had a jtable with my own mytableModel that implements AbstractTableModel. In mytableModel, I have addRow, removeRow... so I can delete/add row dynamically by calling mytableModel.addRow(..). Everything works fine.
However, after I added the table sorter and table map (got the code from the tutorial).
MyTableModel myModel = new MyTableModel();
TableSorter sorter = new TableSorter(myModel);
JTable table = new JTable(sorter);
sorter.addMouseListenerToHeaderInTable(table);
Now, when i call mytableModel.addRow(..), it doesn't work anymore. It doesn't add a row anymore, why?
Thank you so much for your help.I don't have a addRow method in TableSorter. My addRow method is in myTableModel. So, when I need to addRow, I called myTableModel.addRow, In my addRow method, I have fireTableRowsInserted method. This used to work using integrating with TableSorter.
Do I need to move all my addRow, addCol....DelRow... to TableSorter? The table data are stored in myTableModel. I guess I really doesn't know how the TableSorter work :(
Thanks -
ADF Tree table is not exapanding
Hi all,
I have to implement an ADF tree table along with a form. I have three Views,
two of the views are used to populate the Tree table, And one of the view used in the Tree population is used to manipualte the form,
And the third one is to populate a table. And I have a Popup call button in the same panelCollection where the tree table is placed
I am facing two issues with the the tree table.
1. The tree table is not expanding, if I click on the '+' on the node it won't expand and it will show me small circle which is trying to open the node.
But if I click on the Popup button and cancel(RollBack) the popup and come to the node, it will exapand. I don't kow why it is....
2. As I said I have a Form and I have to populate the form based on the selection in the tree table nodes, the form filed is same as that of the view used to populate the Tree table view.
But when i click on the tree table nodes it is not chaning the record according to the selection in the tree nodes. But in a master Detail form it is working fine. It is always pointing to the first record.
Please help.....No vinod, I am not getting any kind of exceptions..
And mY tree table is
<af:treeTable value="#{bindings.TestVO.treeModel}"
var="node"
selectionListener="#{backingBeanScope.TestBean.TreeTableSelectionListener}"
rowSelection="single" id="tt1"
columnStretching="column:c1" contentDelivery="immediate"
binding="#{backingBeanScope.TestBean.tt1}">
<f:facet name="nodeStamp">
<af:column id="c1">
<af:panelGroupLayout id="pgl15">
<af:outputText value="#{node.SubtaskDesc}" id="ot1"/>
<af:outputText value="#{node.HazardDesc}" id="ot4"/>
</af:panelGroupLayout>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}" id="ot2"/>
</f:facet>
<af:column id="c2">
<af:outputText value="#{node.MaxRiskRating}" id="ot3"/>
</af:column>
</af:treeTable>
Edited by: Ranjith C on Jul 18, 2011 6:21 AM -
Hi all,
I have successfully personalized the EIT SSHR screen to display one of the configured EIT on a custom responsibility using a custom function(so that I can do personalization on function level without affecting other EIT screens).
Now my challenge is that, when I click on the menu function, it takes me to the people search page, I do a search and select a employee, then it shows me the list of existing EIT records with an option of add, update and delete. Here, I need to show the existing records in a sorted order. I need the latest entry entered to appear in the top. If this is not possible, it would be great if I can have the table sorted as per one of the segment value.
Is there a way to do this. Can someone help me in doing this and let me know the steps to do the same.
Cheers
ArunI think Tomahawk is the way to go here.
Tomahawk allows sorting of data in the data table.
For action based on row selection, you need to invoke java script function
using rowOnClick attribute of t:dataTable and then make a hidden command button "click" from
the java script.
Regards,
Joshua
Maybe you are looking for
-
Custom cropping using pixel dimension
The banner image module for my website requires images cropped to 940 x 400 pixels. When I use the Custom cropping function in PSE 12 (on a Mac OSX 10.9.2), it only shows a cm dimension. Can I do a custom crop using a pixel dimension?
-
How to edit the text in a trailer 'after' converting to a project?
After converting my trailer to a project so I can add photographs and further music. I accidently deleted the last frame of the trailer credits.. and now need to add it back in. Your help is much appreciated! Nick
-
Cannot get dvi to via cable to work
trying to connect mac to tv, help
-
"tap to click" resetting after shut down/restart
I've been having trouble more and more frequently with the "tap to click" option - sometimes when I turn my (2.5 year old) MacBook off at night and restart it the next morning, tap to click will be unchecked and I will have to go reset it in System P
-
Adobe support sent me to a Photoshop suite CS3 site but when I clicked the download for mac option I was redirected to a site with an error 404.