Re: Using Display Tag library

2011-07-11 Thread JavaNoobie87
Hey Eric, thanks for replying! The thing is I'm NOT using struts 2 here , just basic jsp,javabeans and servlets .(Its a sort of demo project!). As of now my DAO fetches the result according to this query if (con != null){ System.out.println("Connecte

Using Display Tag library

2011-07-11 Thread JavaNoobie87
Hi All, Im developing a web app that performs the display of data in a tabular manner. Im trying to use the display tag library to help me with the pagination and sorting of the data being presented . But , seem to have hit a roadblock here , all samples of the displaytag library that I have come

Calling an action class through Javascript -Struts 2.

2011-03-20 Thread JavaNoobie87
Hi All , I'm trying to call an action class , On change of the values in a dropdown box in my jsp .I also have to pass a value to the action class to execute the method . Im trying to implement it only using Javascript as part of our project requirements , and so using AJAX with JSON , dwr etc is r

Re: RE: loading Dropdown dynamically from database

2011-03-16 Thread JavaNoobie87
Guess that didnt load properly. Heres the pastebin for that snippet. http://struts.1045723.n5.nabble.com/file/n3779718/ajms2KeY.txt snippet.txt -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3779718.html Sent from the Str

Re: RE: loading Dropdown dynamically from database

2011-03-16 Thread JavaNoobie87
JOSE L MARTINEZ-AVIAL wrote: > > Check the documentation for the tag > > http://struts.apache.org/2.0.14/docs/select.html > > I was referring to the attribute 'name', which indicates the name used to > get the select value from the Action, and also to send the value back to > the > server. It

Re: RE: loading Dropdown dynamically from database

2011-03-16 Thread JavaNoobie87
JOSE L MARTINEZ-AVIAL wrote: > > Well, the NPE is due to the fact that you are setting declaring dt_oid as > an > Integer(which can be null) but in the method listdomain is an int. The JVM > automatically tries to convert Integer to int, but if it's null, it will > throw a NPE, since an int can n

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
JOSE L MARTINEZ-AVIAL wrote: > > Struts does not know that yo want to should map that domainType to your > bean. It wil try to map the parameters received from the request to the > action. So for each parameter it founds in the request received from the > user, it is gonna look in the action for

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
No its not present in the action class. That snippet was taken from the bean class, that im using to set the values. Pardon my ignorance , but should i set it in the action class too? (because i dont use it in the action class directly ). The bean class is just a set of getters and setters that im

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
Dave Newton-6 wrote: > > The snippet doesn't actually help, and can't you just include small > samples in the email itself? > > The headerKey is a number, what are the ones filled by the tag? What > does the setDomainType method take as a parameter? Have you defined > any custom type converters?

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
JOSE L MARTINEZ-AVIAL wrote: > > Well, you are right, but I didn't say that that was the error :D. I just > pointed to that because AFAIK a setter is needed for the > parameterinterceptor to work, right?. Any case, and looking at the error > '[Ljava.lang.String;@aea710', is it possible that it's

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
The domaintype is of type string .Im using it to store the domain type that is selected from the master table (domain table) obtained through the jsp (ie from the user ) after he selects values from the dropdown . The jsp snippet for the same is placed below http://struts.1045723.n5.nabble.com/file

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
As Suggested ive set the devmode to true and as hinted the error is being thrown by the Parameters interceptor , as im new to coding im not being able to figure out where I'm going wrong .Ive put logging into the action ,dao classes and attached them here . The stack trace is as below. my logging s

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
Im aware of the documentation .My question was how parameters interceptor would be of use to me , for this particular application. -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3710504.html Sent from the Struts - User ma

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
devmode is disabled (I have never used it before) and how do I implement the ParamsInterceptor and whats the use of the same ? -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3710199.html Sent from the Struts - User mailing

Re: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
I am submitting a form in the page and trying to store the value in a bean (in the action class )and trying to use that bean to insert a row( but the values from the form aren't being reflected onto the bean and hence the NPE) , however I dont know how the values i submit from the form can be put

Re: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
Following changes? I didnt get what you meant. i dont see any code :S -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3683230.html Sent from the Struts - User mailing list archive at Nabble.com. ---

RE: RE: loading Dropdown dynamically from database

2011-03-15 Thread JavaNoobie87
Is there any way that i can set the value of one attribute that i obtain from the database in this case objid as given in the loaddomaintype ()method DAO class , to dt_oid , through the jsp Please advise -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dy

RE: RE: loading Dropdown dynamically from database

2011-03-14 Thread JavaNoobie87
Yes the value of dt_oid is null at that point. Im trying to figure out how i can populate it at that point . -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3672845.html Sent from the Struts - User mailing list archive at N

Re: RE: loading Dropdown dynamically from database

2011-03-14 Thread JavaNoobie87
Ive cleaned the project and restarted eclipse Yet it still throws the NPE -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3669127.html Sent from the Struts - User mailing list archive at Nabble.com. --

Re: RE: loading Dropdown dynamically from database

2011-03-14 Thread JavaNoobie87
Yes, very much .In fact, I copied the code directly from my IDE -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3666711.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: RE: loading Dropdown dynamically from database

2011-03-14 Thread JavaNoobie87
Im using the same version , as ive pasted for the DAO class. -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3664225.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: RE: loading Dropdown dynamically from database

2011-03-14 Thread JavaNoobie87
Yes very much the same code.But the method that leads to the NPE is not static in the action class. Im placing the action class below again Action Class http://struts.1045723.n5.nabble.com/file/n3663281/2vG8DAsH.txt 2vG8DAsH.txt -- View this message in context: http://struts.1045723.n5.nabble

Re: RE: loading Dropdown dynamically from database

2011-03-14 Thread JavaNoobie87
I solved the issue , but right now im facing a Null pointer exception, which Im trying to solve . Ive attached the pastebin links to the action and dao class , and the stacktrace below. (This is on running the addupdomain action.) Inside AddDomain Unknown else Listing records java.lang.NullPoin

Re: Code Help:CRUD example

2011-03-14 Thread JavaNoobie87
The thread is followed up here. Please address this post . http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-td3555885.html -- View this message in context: http://struts.1045723.n5.nabble.com/Code-Help-CRUD-example-tp3483604p3555951.html Sent from the Struts - User m

RE: loading Dropdown dynamically from database

2011-03-13 Thread JavaNoobie87
Yes there is a method doing that.Here is the snippet . public void setDtList(List dtList) { this.dtList = dtList; } public List getDtList() { return dtList; } Ive also uploaded the entire action class. http://struts.1045723.n5.nabbl

Re: loading Dropdown dynamically from database

2011-03-13 Thread JavaNoobie87
The jsp corresponding to the dropdown didnt show up im attaching it to the below file. http://struts.1045723.n5.nabble.com/file/n3555886/jsp_snippet.txt jsp_snippet.txt -- View this message in context: http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p35558

loading Dropdown dynamically from database

2011-03-13 Thread JavaNoobie87
Hi All, Im developing a Crud example using Struts 2 where im in the need to load values for a dropdown box dynamically from a database . However im just getting a empty dropdown now . The JSP code snippet is as below. The action class and DAO for the same functio

loading Dropdown dynamically from database

2011-03-13 Thread JavaNoobie87
Hi All, Im developing a Crud example using Struts 2 where im in the need to load values for a dropdown box dynamically from a database . However im just getting a empty dropdown now . The JSP code snippet is as below. DomainType