What rough with this code (getSessionBean1().getVoudetailRowSet().setObject

hi master

sir i use listbox this name is personIdDD and link with master table

and for detail i use table

i use this code

String dsName = (String) personIdDD.getValue();

getSessionBean1().getVoudetailRowSet().setObject(1,dsName);

but secount line give me error

this line give me error

getSessionBean1().getVoudetailRowSet().setObject(1,dsName);

sir see my code What rough in this code

please give me idea how i pass parameter in SessionBean1 query

thank's

aamir

[545 byte] By [mfa786a] at [2007-11-27 2:56:35]
# 1
Hi!What kind of error gives You second line? Did You add in designtime to query parameter '?' before call setObject()?Thanks,Roman.
-Grif-a at 2007-7-12 3:34:26 > top of Java-index,Development Tools,Java Tools...
# 2

thank's for your reply

sir when i run my project then the output windows give me two error

C:\Documents and Settings\Administrator\My Documents\Creator\Projects\finalf\src\finalf\Page1.java:307: unreported exception java.sql.SQLException; must be caught or declared to be thrown

getSessionBean1().getMfa1mRowSet().setObject(1, mfa1mDataProvider.getValue("mfa1m.rno"));

C:\Documents and Settings\Administrator\My Documents\Creator\Projects\finalf\src\finalf\Page1.java:333: unreported exception java.sql.SQLException; must be caught or declared to be thrown

getSessionBean1().getMfa1dRowSet().setObject(1,personIdDD.getSelected());

2 errors

please give me idea how i pass textbox value as parameter in sessionbeen query

then i get result as per user input

pease give me idea

thank

mfa786a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 3
Hi!Just put call of setObject() in try {} catch {} block.Thanks,Roman.
-Grif-a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 4

thanks for your reply

sir i check my data type

i try some thing please give me idea

i try to pass interger variable in sessionbean qury but i can't get integer form listbox

tt.setValue(personIdDD.getSelected()); no give error

String dPersonId = (String) personIdDD.getSelected()give error

Integer currentPersonId = new Integer(personIdDD.getSelected()); give error

Integer currentss = new Integer(tt.getValue());give error

getSessionBean1().getMfadetailRowSet().setObject(1, tt.getValue()); give error

getSessionBean1().getMfadetailRowSet().setObject(1, personIdDD.getSelected());give error

please give me idea how i move listbox and text box value into variable

thanks'

mfa786a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 5

sir

tt is my textbox see my code this is give me error

tt.setText(mfamasterDataProvider.getValue("mfamaster.sno").toString());

error at runtime

===========

Possible Source of Error:

Class Name: com.sun.data.provider.impl.CachedRowSetDataProvider

File Name: CachedRowSetDataProvider.java

Method Name: getFieldKeyInternal

Line Number: 481

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

=========

please give me idea

thanks

mfa786a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 6

Hi!

Look at Java Help, it really can helps You.

tt.setValue(personIdDD.getSelected()); no give error

Right: tt.setValue() require Object as parameter, personIdDD.getSelected() return Object.

Integer currentPersonId = new Integer(personIdDD.getSelected()); give error

Right: constructor of Integer require int ot String, but personIdDD.getSelected() return Object.

Integer currentss = new Integer(tt.getValue()); give error

Right: constructor of Integer require int ot String, but personIdDD.getSelected() return Object.

getSessionBean1().getMfadetailRowSet().setObject(1, tt.getValue()); give error

getSessionBean1().getMfadetailRowSet().setObject(1, personIdDD.getSelected()); give error

If You add parameter '?' to query in designtime, it can be that You pass wrong Object to setObject() method. Try to debug and find out if passed parameter is correct.

Probably You can do some workaround:

getSessionBean1().getMfadetailRowSet().setObject(1, new Integer(tt.getValue().toString()));

But anyway, look what returns to You getValue() and getSelected() methods.

Thanks,

Roman.

-Grif-a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 7

sir thank for your reply

sir when i use this code

getSessionBean1().getMfadetailRowSet().setObject(1, new Integer(tt.getValue().toString()));

in output windows give me this error

C:\Documents and Settings\Administrator\My Documents\Creator\Projects\biss\src\biss\Page1.java:450: unreported exception java.sql.SQLException; must be caught or declared to be thrown

getSessionBean1().getMfadetailRowSet().setObject(1, new Integer(tt.getValue().toString()));

1 error

C:\Documents and Settings\Administrator\My Documents\Creator\Projects\biss\nbproject\build-impl.xml:233: The following error occurred while executing this line:

C:\Documents and Settings\Administrator\My Documents\Creator\Projects\biss\nbproject\build-impl.xml:122: Compile failed; see the compiler error output for details.

BUILD FAILED (total time: 0 seconds)

and no compile not run

my porject

please give me idea how i get select record as per user give parameter

thank's

aamir

mfa786a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 8

Hi!

As I've written above just put call of setObject() in try {} catch {} block.

try {

getSessionBean1().getMfadetailRowSet().setObject(1, new Integer(tt.getValue().toString()));

}

catch(java.sql.SQLException sqle) {

//some exception's handler

}

Thanks,

Roman.

-Grif-a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 9

sir i use your given code

try {

getSessionBean1().getMfadetailRowSet().setObject(1, new Integer(tt.getValue().toString()));

mfadetailDataProvider.refresh();

}

catch(java.sql.SQLException sqle) {

//some exception's handler

}

no error in output window but browser give many error as under

===========

Exception Details: java.lang.ClassCastException

java.math.BigDecimal

Possible Source of Error:

Class Name: biss.Page1

File Name: Page1.java

Method Name: button1_action

Line Number: 450

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Stack Trace:

biss.Page1.button1_action(Page1.java:450)

sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

Exception Details: javax.faces.el.EvaluationException

java.lang.ClassCastException: java.math.BigDecimal

Possible Source of Error:

Class Name: com.sun.faces.el.MethodBindingImpl

File Name: MethodBindingImpl.java

Method Name: invoke

Line Number: 130

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Stack Trace:

com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)

com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.j ava:72)

com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListen erImpl.java:57)

javax.faces.component.UICommand.broadcast(UICommand.java:312)

-

Exception Details: javax.faces.FacesException

#{Page1.button1_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: java.math.BigDecimal

Possible Source of Error:

Class Name: com.sun.faces.application.ActionListenerImpl

File Name: ActionListenerImpl.java

Method Name: processAction

Line Number: 78

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Stack Trace:

com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.j ava:78)

com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListen erImpl.java:57)

javax.faces.component.UICommand.broadcast(UICommand.java:312)

-

Exception Details: com.sun.rave.web.ui.appbase.ApplicationException

#{Page1.button1_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: java.math.BigDecimal

Possible Source of Error:

Class Name: com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl

File Name: ViewHandlerImpl.java

Method Name: destroy

Line Number: 601

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Stack Trace:

com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java: 601)

com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.ja va:302)

see all error in jsp page how i solve

please give me idea how get my result pass user parameter in sessionbean query

thank's

aamir

mfa786a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 10
Hi!Try to debug and You will see where is a problem.Thanks,Roman.
-Grif-a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 11
sir if i not use where accid=? then page run and not give errorbut when i pass parameter then it give me errorplease give me ideathank
mfa786a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...
# 12

sir see my code

how use inte

Integer currentssgg = new Integer(tt.getValue().toString());no error

//yy.setValue(currentss);no error

//yy.setValue(new Integer(tt.getValue().toString()));on error

getSessionBean1().getTripRowSet().setObject(1,currentssgg); give me error

tripDataProvider.refresh();

mfa786a at 2007-7-12 3:34:27 > top of Java-index,Development Tools,Java Tools...