How to get row by row
hai all,
1Q. let us assume that i am accessing a table.
let us assume its emp table with fields eno, ename, sal then by using result set i have to get the resultset as
1 bvrkii 4000
2 xxxxxx 5000
---- and so on
if i am accessing a dept table with fields deptno, deptnm then my resultset should be as
1 aaaaa
2 bbbbb
what i want to say is, let any number of rows or columns in the table. but i have to get them row by row till the end of the resultset. is it possible.
2Q. is there any command in java just as in vb
rs.recordcount()
where rs is a result set.
3Q. is there any way to find the field names of a table in java.
that is if i am using emp table means it has
to give the result as the fields are
eno
ename
sal
Thanks in advance.
by
bvrk.
1) Yes, you can keep looping through a ResultSet to retrieve all the rows. You can just place your rs.next() call inside a loop, since it returns false when there are no more rows.
while(rs.next())
String no = rs.getString("eno");
String name = rs.getString("ename");
//etc...
}As far as how many columns are in the table, since you know what table you're pulling data from, you should know how many columns there are.
2) There is no method to give you the count of a ResultSet, mainly because of the nature of the ResultSet, which doesn't actually contain data itself, but is really just a cursor that moves along the data in the database. So it doesn't really know where the end is until it gets there. However, give me the reason you want the count of the rows, and i'll give you a reason why it's not necessary.
3) Retrieving table and column names is database independent, so you'll need to construct a SQL query with the correct syntax for whichever database you're using, retrieve the column names from that, and then use them to retrieve data from your other tables. Most databases provide a few system tables for this reason.
Similar Messages
-
How to get number of rows return in SELECT query
i'm very new in java, i have a question:
- How to get number of rows return in SELECT query?
(i use SQL Server 2000 Driver for JDBC and everything are done, i only want to know problems above)
Thanks.make the result set scroll insensitve, do rs.last(), get the row num, and call rs.beforeFirst(), then you can process the result set like you currently do.
String sql = "select * from testing";
PreparedStatement ps =
con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs = ps.executeQuery();
rs.last();
System.out.println("Row count = " + rs.getRow());
rs.beforeFirst();~Tim
NOTE: Ugly, but does the trick. -
How to get a unique row in a value set
How to get a unique row in a value set which is used in concurrent program.
Example if a table contains 10 unique rows i need only one row to show.
Thanksadd conditions in where clause to supress the duplicate values.
On how to supress the duplicate values follow the link
http://oracleschools.com/index.php?topic=40.msg76#msg76
Thanks
Prudhvi
www.erpschools.com -
How to get count of rows for a table?
Hi,
How to get count of rows for a table and secondly, how can i have access to a particular cell in a table?
Regards,
DevashishHi Devashish,
WdContext.node<Your_node_name>().size() will give you the no: of rows.
This should be the node that is bound to the table's datasource property.
WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value); will select the row at that particular index.
You can access an attribute of a particular row as
WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value).get<attribute_name>();
Hope this helps,
Best Regards,
Nibu.
Message was edited by: Nibu Wilson -
How to get a single row column from a viewobject in java?
I have a class file that goes out and gets a viewobject and sets its where clause
this is it:
vcRow = vc.createViewCriteriaRow();
vcRow.setAttribute("LogonId", "='" + strPcis_Login.toUpperCase() + "'");
vc.addElement(vcRow);
vo.applyViewCriteria(vc);
vo.executeQuery();
I know this working cause I can watch it in debug..
but now the problem.
I've looked in the docs and don't see how one can pull the value of the row it found and place it in a uix page in a textinput area
how can I get a single row column, in this case the UserName that is in the view object to a string and then place it into my
uix page? I've looked and looked and don't see a method for this.
is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
what way do you do this and where is it documented?is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
what way do you do this and where is it documented? What you can do is get the value from your VO and set it somewhere that UIX can data bind to -- as a Page proprety, on HttpSession, etc. This is documented in Chapters 4 (Data Binding) and 5 (Controller) of the UIX Developer's Guide.
To set a property, you use Page.setProperty(String key, String value). Then, in your UIX file, to make a textInput that has the value pulled from a given page property, use:
<textInput data:text="key@ctrl:page" />
-brian
Team UIX -
How to get the selected rows & columns in the table?
hi everybody,
In my application the table is kept inside the event structure.I select the cells in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?Hello,
You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings. I think for your "disable" question you are referring to the shortcut menu (when you right click). If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
Best Regards,
JLS
Best,
JLS
Sixclear -
Check box als column in a standard table, how to get the selected row
Dear experts,
I habe standard tablt with check box as column. Now I want to get the current selected row structure and do some changes. How could I solve this problem? till now I just know to get the structure via lead selection.
lo_node->get_element().
lo_element = lo_node->get_static_attributes ( static_attributes = ls_row).
How could I get the element through check-box in stead of lead selection. Many thanks!check this code
To get the selected row number
data: lr_element type ref to if_wd_context_element,
lv_index type i.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
lv_index = lr_element->get_index( ).
Thanks
Bala Duvvuri -
How to get number of rows in tableview
Hello,
Could anybody help me on how to get the number of rows in a tableview? Sort of using DESCRIBE TABLE in classic ABAP.
Thanks,
RickyThere is an attribute of the class CL_HTMLB_TABLEVIEW named
ROWCOUNT.
Inside an event u need to get this info use this code:
Replace 'Monitor' for the ID of your tableview
DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW,
r_count type i,
tv ?= CL_HTMLB_MANAGER=>GET_DATA(
request = runtime->server->request
name = 'tableView'
id = 'Monitor' ).
IF tv IS NOT INITIAL.
DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
tv_data = tv->data.
r_count = tv_data->rowcount.
ENDIF. -
V v urgent ... how to get the selected rows in the vl02n transaction
Hi ,
I have requirement that i have selected the line items in the vl02n transaction.
If I select only one row there is option gs_get_cursor-line.
If I select more than one line item at a time I am getting only the last value in to gs_get_cursor-line.
Can anybody let me know how to get the multiple line items that are selected
It is very urgent ..
Plz HelpHi,
can you check the E_row_id .
v_row type LVC_S_ROW
read table itab index E_ROW-index.
regards,
Ajay
Edited by: Ajay on Feb 14, 2008 6:22 PM -
How to get the selected rows in a table
Hi,
How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
ThanksPlease search the forum before posting questions.
refer following thread for table selection.
Re: Record selection with MessageCheckBox and print the selected record.
--Prasanna -
How to get h:datatable rows in the managed bean
Hi All,
I am showing a table with some columns in a page. I have submit button in that page.
After submission of page,I need to get the rows displayed in the page.
how can i acheive it?
is binding attribute helps?
please provide some info..
thanks in advance..
chenna........BalusC,
thanks for ur reply..
Let me reframe my question..
here is my code snippet..
// bean
private ArrayList<MyVO> myList;
// setter and getter methods for myList......
ArrayList<MyVO> getRows(){
resultFromDB=getMyRows();// call getMyRows() DAO method for results
this.myList=resultsFromDB;
return resultFromDB;
In the jsp and displaying all the rows using<h:datatable id="someId" value="#{someBean.rows}"
so far good.
In this page i have one submit button which will call confirm() of my managed bean.
In the confirm() i need to get all the rows. i.e; i need to get the myList.
I dont want to call the getRows() method again(since it is DB hit)
But myList is empty in my confirm method.
my managed bean is in request scope.
if i change it to session it is working.but i need request scope only.
I tried with <t:saveState value="#{someBean}" /> but no luck..
Later i have taken HtmlDataTable reference with setter and getters in the bean and bind this reference in <h:datatable>.
and tried to disply the htmlDataTable rowCount...
then im getting NotSerializableException though my bean is implementing Serializable interface..
Please give some suggestion in this
thanks.... -
JSP/BC4J app: How to get view object row data into a scriplet variable?
I have a JSP application using BC4J data tags. Within a rowsetiterate tag, how can I get the data value of an attribute for the current row into a scriplet variable?
Thanks,
SteveUsing the <jbo:Row> tag like this:
<jbo:RowsetIterate .... >
<%--
| Establish a scriptable variable "curRow" for the current row
+-->
<jbo:Row id="curRow" action="current"/>
<%
String foo = (String)curRow.getAttribute("YourAttrName");
%> -
How to get No. of rows affected by Update or Delete in Oracle in Java Code?
All,
I know that sql%rowcount can give me the rows affected. But I want to get this number directly after OracleCallableStatement.ExecuteUpdate?
Thank you.kellerer,
I appologize for what I said.
I gave a not clear question. And some rude words.
One my colleague wrote below code in order to get the affected rows after update data in Stored Procedure in Oracle. But it didn't work, so another colleague had to change the code. I think the best way is not to change Java code but change code in Stored Procedure. You know it was Friday, we all supposed to fix that change this week, I got the link you gave and tried to fix that using return in Stored Procedure. But still couldn't work after tried many times. Because I told my colleague how to change code, I had to take the responsibility, I was too impatient to write those rude words. Sorry.
int success = cs.executeUpdate(); -
How to get number of rows and columns in a two dimensional array ?
Hello,
What would be the simplest way to get number of rows and columns in a two dimensional array represented as integers ?
I'm looking for another solution as For...Each loop in case of large arrays.
Regards,
PetriHi Petri,
See a attached txt file for obtaining two arrays with upper and lower index values
Regards
Ray
Regards
Ray Farmer
Attachments:
Get2DArrayIndex.txt 2 KB -
How to get the previous row selected index of a table....
Hi friends,
I have a table. i have a action/event handler defined on its onLeadSelect event.
In this event, if i use node_code->get_lead_selection_index( ) .. i m getting the newly clicked row index.
ex: table has 3 rows.
Row 1 is by default selected. Now if i select the row 3, in my event by using node_code->get_lead_selection_index( ). im getting index 3. which i sel
But i want to get index 1.
kindly help me.. i dont have any other option as i m very new to this.
hope i gave u correct inputs on my problem.
thanks in advance,
NirajaOne way to achieve this is to maintain an attribute in the assistance class or a node element , called OldLeadSelection , at the Component controller level which stores the value of the lead selection index.
On LeadSelect action handler method, in the first line, read the value of the attribute/element defined above. For the first time a row is lead selected, this value will be initial. After exexcuting the code in the LeadSelection event handler method, store the LeadSelection index value in the attribute defined above. The next time when the LeadSelection event method is called, when the value of this attribute is read in the initial line, it will house the value of the index of the previous LeadSelection.
There could be other ways to achieve this. This is one of the methods.
Best Regards,
Rashmi. -
How to get table selected row without SelectedRowKeys
Greetings,
i am using JDeveloper 11.1.2.4.0 ADF application,
and i have few table that contains only 1 and some times 2 rows. When the table loads,
by default, the first row is selected, and i cant call a selection listener (by selecting a row and calling
a function). What i did (and it worked on the past, i don't know why now it doesn't) is:
i removed the "SelectedRowKeys" property, so it will not auto select the 1st row on load,
and on selection event i use this function code:
public void selectDisease(SelectionEvent selectionEvent) {
Object _selectedRowData = Disease_Table.getSelectedRowData(); //the table i select a row
JUCtrlHierNodeBinding _nodeBinding = (JUCtrlHierNodeBinding)_selectedRowData;
Row rw = _nodeBinding.getRow(); //getting error here
OperationBinding operation = bindings.getOperationBinding("ExecuteWithParams7");
operation.getParamsMap().put("disease_id", rw.getAttribute("disease_id").toString());
operation.execute();
AdfFacesContext.getCurrentInstance().addPartialTarget(panelTabbed);
The error:
<RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.el.ELException: //C:/Users/Philip/AppData/Roaming/JDeveloper/system11.1.2.4.39.64.36.1/o.j2ee/drs/MyApp/ViewControllerWebApp.war/main.jsf @470,113 selectionListener="#{backingBeanScope.BeanNavigation.selectDisease}": java.lang.NullPointerException
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:276)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:486)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:482)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
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:125)
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:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
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:139)
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)
Caused by: java.lang.NullPointerException
at view.navigation.selectArrergy_MED(navigation.java:489)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
... 48 more
<RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.el.ELException: //C:/Users/Philip/AppData/Roaming/JDeveloper/system11.1.2.4.39.64.36.1/o.j2ee/drs/MyApp/ViewControllerWebApp.war/main.jsf @470,113 selectionListener="#{backingBeanScope.BeanNavigation.selectDisease}": java.lang.NullPointerException
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:276)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:486)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:482)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
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:125)
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:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
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:139)
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)
Caused by: java.lang.NullPointerException
at view.navigation.selectDisease(navigation.java:489)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
... 48 more
I use the same method on the past on different application, on same jdeveloper version and it worked, i don't understand
what i am doing wrong here,
thanks for any help.I finally found the solution, since i don't use the table's property to make a current row, i add it programmatically:
public static Object invokeEL(String el, Class[] paramTypes, Object[] params) {
FacesContext facesContext = FacesContext.getCurrentInstance();
ELContext elContext = facesContext.getELContext();
ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
MethodExpression exp = expressionFactory.createMethodExpression(elContext, el, Object.class, paramTypes);
return exp.invoke(elContext, params);
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 void rowSelected(SelectionEvent selectionEvent) {
invokeEL("#{bindings.MyVO.collectionModel.makeCurrent}",
new Class[] { SelectionEvent.class },
new Object[] { selectionEvent });
Row rw =
(Row)evaluateEL("#{bindings.MyVOIterator.currentRow}");
rw.getAttribute("TheAttribueINeed").toString()); //etc....
Maybe you are looking for
-
How do you add rows in a table in "pages" on an iPad?
-
Unable to set a specific velocity to a stepper with 7342
Hi all, my system is a PCI-7342 driving two stepper motors via an UNI-7774 in open loop. The stepper(s) moved at the first try without problem, but... Last week I was tuning the system with MAX, trying to find a specific velocity I need around 70 ste
-
Random images are not loading in Firefox 3.6. Probem does not occur with IE.
When using Firefox in any site with images (eg Google Images or eBay etc) a small random number of images fail to load, and some of those which load do so after an unusual delay. This problem began post FF3.6 upgrade, and does not occur in IE. == Thi
-
Server Error -OSoft Application-
Hi Experts , I am getting eror ,or BPC ecieving error : Server Error in '/OSoft' Application. : No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).] Reagrds Prabhu
-
Query to find the start and end date of current quarter
I want a query to give me the start date and end date of current quarter I don't want to use TRUNC and ROUND as the 16th day roundoff logic is not required. Thanks in advance.