Sort table columns in a table and context created dinamically
Hello all,
I have implemented the table sorting several times in another developments, but now I'm facing a problem.
I have created the table and context node that I need to sort dinamically (before somebody ask me why, I would say that it's the only way to do that for my current project, there was no possibility of doing that in dessign time). I have implemented the table sorting more or less the same way I would do with a table created in dessing time, but when I run my WD the sorting of columns doesn't work.
In the wdDoModifyView, I have put the following code:
if(firstTime){
IWDAction ordenacion = wdThis.wdCreateAction(IPrivateResultDispGlobalView.WDActionEventHandler.ORDENACION, null);
IWDParameters param = ordenacion.getActionParameters();
param.addParameter("nombreNodo",nombreNodo);
and in the code of the action
//@@begin onActionOrdenacion(ServerEvent)
System.err.println("**** NOMBRE NODO **** "+nombreNodo);
wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.getChildNode(nombreNodo, IWDNode.LEAD_SELECTION));
//@@end
The name of the node ("nombreNodo) it's only correct the first time I click on a column.
Has anybody implemented the table sorting in a dinamically created table and context node? And how do you do to make it works.
Thank you very much
Here is the code
//Preparamos Navegaciones
IWDAction abrirProyecto = wdThis.wdCreateAction(IPrivateResultDispGlobalView.WDActionEventHandler.ABRIR_PROYECTO, null);
IWDAction abrirDisp = wdThis.wdCreateAction(IPrivateResultDispGlobalView.WDActionEventHandler.ABRIR_DISPONIBLE, null);
//IWDAction ordenacion = wdThis.wdCreateAction(IPrivateResultDispGlobalView.WDActionEventHandler.ORDENACION, null);
IWDAction ordenacion=wdThis.wdGetOrdenacionAction();
IWDParameters param = ordenacion.getActionParameters();
param.addParameter("nombreNodo",nombreNodo);
IWDTable table = wdThis.wdGetInformesController().crearTabla(view, nombreNodo, movimientosInfo,new String[]{"Codi Projecte",null,"Nom Projecte", "Import Projecte", "Client", "Increment Disponible futur per facturació no emesa i / o anualitats pendents","Increment Disponible futur per ingressos pendents de cobrar", "Disponible"},new String[]{"10px", null,"10px", "10px","10px","10px","10px","10px"},new IWDAction[]{abrirProyecto,null, null, null, null,null,null,abrirDisp}, -1);
//ordenar tabla
wdContext.currentContextElement().setTableSorter(new TableSorter(table, ordenacion,null));
containerTablasProyecto.addChild(table);
Edited by: Mireia Romo on May 28, 2009 12:27 PM
Similar Messages
-
I am unable to sort multiple columns in a table created in Pages.
I had been using Appleworks up until I installed Lion and have now switched to iWork. I created a table within a Pages document and am able to sort a single column (using the Table Inspector and choosing Sort from Edit Rows and Columns) but the Sort option is grayed out when I attempt to sort multiple columns.
In another post, someone talked about this being a problem if you have merged fields. I do not believe I have done this (to be honest I don't know the function of merging fields).
This is very frustrating as I was easily able to sort these tables in Appleworks.Sharon Anderson wrote:
Thanks for your quick response! I have been trying that but then found that Numbers would only let me print in landscape view so I had to paste the table back into Pages. Is there a way to print in portrat view (from Numbers?)
Not so. In the lower left corner of the window, there's an icon that looks like a piece of paper. If you see this:
you are in Sheet View, or normal, mode. If you see this:
You are in Print View mode. Now you see the icons for portrait and landscape modes. Click your choice. Then arrange your content to fit the pages as you wish.
Jerry -
Problem with sorting a Column in Advance table .
Dear Friends ,
I have a OAF page developed with advanced table region , the table has several columns, now i would
like to sort a column named "Trial number" which is of the type Number .
To accomplish this i have given Sort Allowed : True (Property Inspector) . but when i click on the sort button
i am unable to sort the record . Could you please some one give me some suggestion and help me out .
Regards,
Keerthi.kNo there is no Transient attribute involved , could you please tell me what might cause this error .
Basically this page is for inserting a record.
Thanks ,
Keerthi
Edited by: user1140193 on Oct 21, 2011 7:15 AM
Edited by: user1140193 on Oct 21, 2011 7:16 AM -
Hi,
There is a table with lot of data. I want to change the order in which the columns are displayed when the table is queries. Is there any way or i just have to drop the table and recreate again.
Have a nice day.
Thank you
PKHi,
Like user637951 said, you only need to change the order in your query. Example:
Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
Connected as hr
SQL> desc employees;
Name Type Nullable Default Comments
EMPLOYEE_ID NUMBER(6) Primary key of employees table.
FIRST_NAME VARCHAR2(20) Y First name of the employee. A not null column.
LAST_NAME VARCHAR2(25) Last name of the employee. A not null column.
EMAIL VARCHAR2(25) Email id of the employee
PHONE_NUMBER VARCHAR2(20) Y Phone number of the employee; includes country code and area code
HIRE_DATE DATE Date when the employee started on this job. A not null column.
JOB_ID VARCHAR2(10) Current job of the employee; foreign key to job_id column of the
jobs table. A not null column.
SALARY NUMBER(8,2) Y Monthly salary of the employee. Must be greater
than zero (enforced by constraint emp_salary_min)
COMMISSION_PCT NUMBER(2,2) Y Commission percentage of the employee; Only employees in sales
department elgible for commission percentage
MANAGER_ID NUMBER(6) Y Manager id of the employee; has same domain as manager_id in
departments table. Foreign key to employee_id column of employees table.
(useful for reflexive joins and CONNECT BY query)
DEPARTMENT_ID NUMBER(4) Y Department id where employee works; foreign key to department_id
column of the departments table
SQL> select e.employee_id, e.first_name, e.last_name from employees e where e.employee_id = 100;
EMPLOYEE_ID FIRST_NAME LAST_NAME
100 Steven King
SQL> select e.first_name, e.last_name, e.employee_id from employees e where e.employee_id = 100;
FIRST_NAME LAST_NAME EMPLOYEE_ID
Steven King 100
SQL> Regards, -
How to implement ajax at ADF table column or ADF table column button.
I want to use ajax in table column selection. I have two table. One is master table and second one is detailed table. I have requirement to click master table column and display data in detail table column against the master table column.
let assume i have two tables 1.
<af:form id="f1">
<af:panelSplitter id="ps1" orientation="vertical">
<f:facet name="first">
<af:table value="#{radionBean.generatedData}" var="item" columnSelection="single" rowBandingInterval="0"
id="tableData">
<af:column sortable="false" selected="true" headerText="Ticket No" align="start" id="c1">
<af:outputText value="#{item.ticketno}" id="ot1"/>
</af:column>
<af:column sortable="false" headerText="Requestor" align="start" id="c2">
<af:outputText value="#{item.requestor}" id="ot2"/>
</af:column>
<af:commandButton text="More" id="cb1" action="#{radionBean.myrow}">
<f:ajax execute="@this" render=":f1:detailTableData"/>
<f:setPropertyActionListener target="#{radionBean.currentrow}" value="#{item}"/>
</af:commandButton>
</af:column>
</af:table>
</f:facet>
Second table
<f:facet name="second">
<af:table value="#{radionBean.detailData}" var="itemdet" rowBandingInterval="0"
id="detailTableData">
<af:column sortable="false" headerText="Ticket No" align="start" id="c21">
<af:outputText value="#{itemdet.ticketno}" id="ot21"/>
</af:column>
<af:column sortable="false" headerText="Date" align="start" id="c22">
<af:outputText value="#{itemdet.date}" id="ot22"/>
</af:column>
</af:table>
</f:facet>
</af:panelSplitter>
</af:form>
The above is my two table when i run the program i have this exception
<UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
<FaceletViewHandlingStrategy> <handleRenderException> Error Rendering View[untitled1.jsf]
java.lang.IllegalArgumentException
at org.apache.myfaces.trinidad.component.UIXComponentBase.findComponent(UIXComponentBase.java:708)
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getResolvedId(AjaxBehaviorRenderer.java:279)
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.appendIds(AjaxBehaviorRenderer.java:269)
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.buildAjaxCommand(AjaxBehaviorRenderer.java:214)
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getScript(AjaxBehaviorRenderer.java:86)
at javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:103)
at oracle.adf.view.rich.render.RichRenderer._encodeClientBehaviors(RichRenderer.java:3740)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1409)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adf.view.rich.render.RichRenderer.encodeChildInContext(RichRenderer.java:3118)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.renderDataCell(BaseColumnRenderer.java:1468)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.encodeAll(BaseColumnRenderer.java:166)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.renderDataBlockRows(TableRenderer.java:2803)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderSingleDataBlock(TableRenderer.java:2433)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._handleDataFetch(TableRenderer.java:1634)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:560)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:617)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at oracle.adfinternal.view.faces.util.rich.InvokeOnComponentUtils$EncodeChildVisitCallback.visit(InvokeOnComponentUtils.java:116)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:531)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._visitFacetAsStretched(PanelSplitterRenderer.java:393)
at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._visitFacet(PanelSplitterRenderer.java:371)
at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.visitChildrenForEncodingImpl(PanelSplitterRenderer.java:338)
at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2393)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.visitChildrenForEncodingImpl(DecorativeBoxRenderer.java:214)
at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2393)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._visitFacetAsStretched(PanelStretchLayoutRenderer.java:856)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._visitFacet(PanelStretchLayoutRenderer.java:834)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.visitChildrenForEncodingImpl(PanelStretchLayoutRenderer.java:793)
at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2404)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
at org.apache.myfaces.trinidad.render.CoreRenderer.visitChildrenForEncoding(CoreRenderer.java:228)
at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncodingImpl(RichRenderer.java:2421)
at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2404)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
at org.apache.myfaces.trinidad.render.CoreRenderer.visitChildrenForEncoding(CoreRenderer.java:228)
at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncodingImpl(RichRenderer.java:2421)
at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2404)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
at org.apache.myfaces.trinidad.component.UIXDocument.visitTree(UIXDocument.java:82)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:487)
at oracle.adfinternal.view.faces.util.rich.InvokeOnComponentUtils.renderChild(InvokeOnComponentUtils.java:42)
at oracle.adfinternal.view.faces.streaming.StreamingDataManager._pprComponent(StreamingDataManager.java:756)
at oracle.adfinternal.view.faces.streaming.StreamingDataManager.execute(StreamingDataManager.java:525)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer._encodeStreamingResponse(DocumentRenderer.java:3713)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1475)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at oracle.adfinternal.view.faces.context.PartialViewContextImpl._processRender(PartialViewContextImpl.java:321)
at oracle.adfinternal.view.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:152)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:974)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
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:300)
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:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
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.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Please reply this.......
THANK YOU IN AN ADVANCE
Regards
Muhammad Khurram
Edited by: 912134 on Feb 3, 2012 4:28 AMI don't think you need the f:ajax tag - you should be able to do the synchronization between the tables with the built-in partial page refresh functionality.
Just define the partialTrigger property of the second table to point to the firsttable.
http://docs.oracle.com/cd/E16162_01/web.1112/e16181/af_ppr.htm#BGBEGIDF -
VC Multiple Table Column Header Lines, Table Width Adjustment
Hi Experts,
1) How to have Multiple headers for a column in a single cell i.e multiple lines in the same cell. please provide with example.
2) How to set your table to adjust the width automatically for all screen resolution since columns of the table disappear and some of the content of the header is not visible if the screen resolution is low.
3) Is there any way to set the screen resolution for our report alone to very high resolution even if the end user has set the system resolution to low. The reports were developed on a high resolution and now we face the problem as citrix is rolled out and it is standard 1024 * 768 resolution.
Thanks and Regards,
SivaWrapping the text of a table column caption into lines is currently not possible. Workarounds could be:
- using a single character text and a tooltip for the description
- using an image containing the wrapped text
Both workarounds have their problems.
Armin -
Update a table column from enother table?
Hello all,
i am using following query to update
update hrt_emp_mst set a.e_no=b.e_no
from hrt_emp_mst a,emp_temp b
where a.emp_no=b.emp_no
this is giving error message: as
command not properly ended.
please tell me is there any problem
thanks
yashHi Yash,
I can see you are coming from Sybase/SQL-Server background.
This syntax is not allowed in Oracle.
In Oracle, it can be,
update hrt_emp_mst a
set a.e_no= NVL( ( select b.e_no from emp_temp b where b.emp_no=a.emp_no ), a.e_no ) ;If the table hrt_emp_mst is very big and/or emp_temp is not indexed on emp_no, this will not be very efficiant. You will be better off writting a pl/sql block with 'bulk collect'.
Cheers -
How to Sort single column in webdynpro table
Hi all
I have requirement as follows.
i have webdynpro table with the following columns like Date,firstname,lastname,address etc.
now when i run the the application the table is populating the data at runtime that is fine.
i need as soon as table is loaded , Date field in the table should be displayed the values in the decending order...i have the requirement as follows...
how to sort the single column in table ...by default the values of the column displayed with decending order as soon as table displays at runtime....i dont want to click any button specific button to do the sort for that column
Regards
binduHi, I solved the same problem by modifying the sort() method in the default TableSorter class so that it takes a column id and direction rather than an event.
I assume you have read the TableSorter tutorial.
Like this. (This was done on nw ce 7.1 btw but may work on older versions as well.
Oh and then you just call the sort method right after you have made the request
//Code that goes into controller/view to execute sorting
wdContext.currentContextElement().getPensionplanTableSorter().sort("MyColumnId", "Up", wdContext.nodePensionPlan());
//Part of TableSorter.java
//The original method that needs an event. Now it just calls the new method
public void sort(IWDCustomEvent wdEvent, IWDNode dataSource) {
// find the things we need
String columnId = wdEvent.getString("selectedColumn");
String direction = wdEvent.getString("sortDirection");
sort(columnId, direction, dataSource);
//This is the new method.
public void sort(String columnId, String direction, IWDNode dataSource) {
if (columnId == null || direction == null ) {
return;
IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
NodeElementByAttributeComparator elementComparator =
(NodeElementByAttributeComparator) comparatorForColumn.get(column);
if (elementComparator == null){
//not a sortable column
column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE);
return;
// sorting
elementComparator.setSortDirection(WDTableColumnSortDirection.valueOf(direction));
dataSource.sortElements(elementComparator); -
Problem in Keeping one table columns in multiple pages and achive commit
Hi,
i'm using ADF BC+JSF. I have one table which holds 100 column, when i design the UI page, i'm using show one tab to show the fields and kept 50 columns in one tab another 50 columns in second tab. I filled the first tab 50 columns and i try to move to second tab then it showing error stating that you are filled the remaining columns which there in second tab.
pls. help me to resolve.
regards
BmganThanks Steve. Unfortunately we want to validate when users click on a button to fire the commit call. Since we do a lot of partial page rendering and sometimes we have to refresh the entire page (i.e. when coming back from pop-ups), this solution won’t work. Any ideas on how we can validate from the entity while at the same time showing the standard ADF error messages. We tried other approaches (like the ones from the below link) with no luck.
validations, autosubmit and partial page requests -
Object Modelling Question: How do I create multiple nested table columns in one table
Hi there,
I have a XML doc which is as follows:
<PERSON>
<ADDRESSLIST>
<ADDRESS>111, Hamilton Ave </ADDRESS>
<ADDRESS>222, Cambell Ave </ADDRESS>
</ADDRESSLIST>
<PHONELIST>
<PHONENO>4085551212 </PHONENO>
<PHONENO>6505551212</PHONENO>
</PHONELIST>
</PERSON>
I need a table that looks as follows:
Create table person
(addresslist address_table,
phonelist phone_table
I would like to create a table called person with columns addresslist and phonelist. Each defined as object type table of address and table of phones.
Can anybody please tell me how can I do this.
I have seen that there can only be one nested table per table. If so, how do we do this.
Thanks so much
Pramodpelle.k wrote:
peets wrote:Hehe because it's less typing!
Good one!
Also, it's by far the more dynamic method.
If you want to get pedantic, it's also far less efficient in terms of execution time: each iteration of the loop forks a new process, whereas using a single mkdir command forks only once. The "best" way is the curly-braces method demonstrated above by chimeric. -
Hiding table columns in a table view in JspDynpage
hi,
i have a situation where i need to hide a particular column in a tableview.
thanksHi,
What senthil has given is for dynpage not for jspdynpage
If u r using jspdynpage
<hbj:tableView
id="myTableView1" >
<%myTableView1.setColumnName("columnName",2);%> /2-->col.no/
<%myTableView1.setColumnInvisible("columnName");%>
</hbj:tableView >
u should set column name first using setColumnName
Regards,
Tamil K -
I need to make a spreadsheet based on info from specific table columns and headlines above those tab
Hi all,
A client of mine is requesting that I create a spreadsheet from a huge catalog that I am doing for him (this will also be done for all similar huge catalogs). The spreadsheet needs to pull information from some of the table columns, as well as the headline for each table. (This spreadsheet will then go out to some other people who will be putting this information into an online database/website for the client.) Let me be more specific and show you an example below.
Information from InDesign Catalog:
Tea Set
Part #
MFG #
Description
123-456
654321
Tea Cup
789-010
010987
Saucer
Here is how the Excel Spreadsheet needs to look:
Part #
MFG #
Product Name
Description
Page #
123-456
654321
Tea Set
Tea Cup
2
789-010
010987
Tea Set
Saucer
2
You have no idea how I have been pulling my hair out over this. Doing this manually will be a nightmare each time. My first thought was that I could assign specific cell styles to the columns (cells) and then create a TOC and then finangle with that - well, that didn't quite work, especially because of the headline I needed to pull into the spreadsheet as well. Is there ANY way I can get this information onto a spreadsheet? Knowing how wonderful InDesign is and all the tremendous capability it has, I am sure there IS a way and I just dont know how. Please PLEASE can someone point me in the right direction?
Thank you very much in advance for your assistance:) Any help would be greatly appreciated.
ChristineSorry for the delay.
I am sure that this can somehow be done by making use of the styles. For example, when creating the TOC InDesign does a GREAT job of pulling in the styles (that are of course associated with the headlines and whatever needs to be included in the TOC) and associating them with the correct page numbers. I had experimented a little with creating specific paragraph styles and working these into the table and cell styles...then applying the Table Style to the table. I was halfway getting to where I wanted to be by creating a TOC that pulled in all of these styles and applied the corresponding page numbers (that I could somehow work into converting back into a table to then flow onto an Excel spreadsheet) but the wrench in the works was of course the Product Name. That said, I am VERY confident that this CAN be done somehow, by making use of the styles, using the same (or similar) methodology that is used to create the TOC. If only I were a pro at scripting...
Well, it's great that you're certain and confident, but I think your confidence is misplaced.
I had sort of hoped that running headers could be convinced to support this, but that doesn't seem to be true.
I think you need to postprocess the data somehow. If I was doing this for real I'd probably export the document to IDML and have a seperate program read the IDML XML, find the product names and page numbers, and insert them in tables. Though...that might mess up the page numbers. And it'd be a lot of work.
An much-faster-to-rapid-prototype solution is to have an indesign script go through the document and add in page numbers and the product names. Here's a rough prototype:
var d,s,story,table,product,page,c2,c3,c5,i,j.k;
d=app.activeDocument;
s=d.stories;
for (i=0; i<s.length; i++) {
story = s[i];
for (j=0; j<story.tables.length; j++) {
table = story.tables[j];
product = story.chara
cters[table.storyOffset.index-2].paragraphs[0].contents;
page = table.parent.parentPage.name;
// $.writeln("This is table "+j+". Product name: "+product+" page "+page);
c2=table.columns[1];
c3=table.rows[0].columns.add(LocationOptions.AFTER, c2);
c3.contents=product;
c5=table.rows[0].columns.add();
c5.contents=page;
This doesn't handle the header rows in tables, but hopefully that's ok.
It may get page numbers wrong on multipage tables. Probably it would be better to just use
SpecialCharacters.AUTO_PAGE_NUMBER on the last full line (c5.contents=).
It should also probably not just look back 2 characters from the start of the table to find the paragraph, but it's probably good enough. -
How to use selectOneList in a updateable data table column
Hi,
Could someone tell me how to use selectOneList (source from a vo X) in an updateable data table column (from another vo Y)?
I successfully created a page with the data table. However, strange things happened:
1) the values populated on the selectOneList column don't match the underlying value in vo Y. in fact, every rows in the column got the same value.
2) when I update one of the rows, the column value in every other rows turns to the new value.
3) when I sort other columns in the table, the values shown in the selectOneList column get toggled between blank and some incorrect value.
I believe it is something related to the fact that the same iterator is used to the source view object. If this is the case, how can I solve it?See #7 here:
http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html -
Hi
I am displaying some data in a table, but when i sort any column of the table output, it is giving preference to the rows which are in Capital letter then it is considering small.
Eg:
A
B
C
a
b
c
Is there any work around to make the sort as:
A
a
B
b
C
c
Regards,
TrikanthHi Trikanth,
Ok by default you can not sort it like you wanted. A workaround could a function module which sorts it like you want. When a user click on the sort function (table header) then it sorted based on ASCII that's correct. I'm sorry to say that it is not possible to disable the default sort function. This is something which I also need for some apps.
Another question. Which data service returns you the data? If it is a RFC you can modify it, so that the data sorted as you want or otherwise you can modify the data, e.g. that everything is in lower case or in caps, therefore you can use a VC function UPPER().
Best Regards,
Marcel
If this question is answered for you please mark the question as answered and reward points, otherwise ask me again. -
How to bind a icon in the table column
Hi All
I have to bind a icon in a table column.Choose a table cell editor for that column that is able to display an icon, e.g. Caption, Image, LinkToAction
Create a context attribute "iconURL" under the data source node of the table.
Bind the corresponding property of the table cell editor, e.g. Image.source, to this attribute.
At runtime, the data source node will have elements. Element at index i will be displayed in table row i.
Set the "iconURL" attribute of each node element to the icon URL to be displayed in the table row.
You can use the predefined icons by using an URL of the form "~sapicons/<icon_filename>", or you can put your icons inside folder src/mimes/components/<componentName> and use the filename as URL.
Armin
Maybe you are looking for
-
View videos in list, not thumbnail view.
I just bought the new iPad and so far it is great. I have loaded a bunch of TV shows and movies onto it. The problem is that I can only see the files in thumbnail view which is awkward to say the least. How can I view it in list format or anything ot
-
Dual monitor color issue - oversaturated image in CS4
Hi, I wonder if you can help. I found people having similar issues, but never seen an actual answer, so your input would be greatly appreciated. My set-up: MacBook Pro Dual Core intel based 15.4 2.6GHz running OS X 10.5.6 - also my primary display HP
-
Intel PRO/10+ netwrok card and Solaris 8_x86
Hi! I have a working Solaris 7_x86. Now I want to try Solaris 8_x86 10/00 with the same hardware. Installation is fine, except it didn't detect Intel PRO/10+ ISA network card automatically. In the first installation, I just ignored it and go on with
-
Print Properties Buton Won't Open
I want to print a coupon online & when I go to File, Print, Properties, the Properties Button is Enabled & Highlights but the window won't open??? Please help! Thank You! ;-)
-
Reshipping the log files to logical standby
Hi All I am getting this error in the logical standby "ORA-01291: missing logfile" . The problem I had some wrong configuration in "standby_archive_dest" parameter in the logical database but I fixed it and now I need to reship the logfiles from prim