I feel like this should be added to the documentation, too. ::snicker::
Sorry, OT.
Beez
-Original Message-
From: Dave Newton [mailto:davelnew...@gmail.com]
Sent: Wednesday, March 16, 2011 9:43 AM
To: Struts Users Mailing List
Cc: JavaNoobie87
Subject: Re: RE: loading Dropdown
On Wed, Mar 16, 2011 at 8:35 AM, JavaNoobie87 wrote:
> I tried the same but my drop down becomes empty when i run the jsp and the
> source generated from the select tag is as follows
>
> --Select--
> Please advise.
Please use plain-text messages.
"The pastebin" isn't an attached message, it's
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
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
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 should be something like this
.
With respect to
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
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 not be null. That's the first thing you shou
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
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 a set.
If I remember correctly, if the p
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
humm, that snippet is not in the Action you gave before. Can you provide the
current version of the Action ?
2011/3/16 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 num
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?
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
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?
Dave
On Wed, Mar 16, 2011 at 12:42
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
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 receving an array? to
what should it try
On Wed, Mar 16, 2011 at 12:27 AM, JOSE L MARTINEZ-AVIAL wrote:
> In the action there is no setDomainType.
(Just for completeness, that's not necessarily correct; this error may
occur under some type conversion conditions.)
Dave
In the action there is no setDomainType. Is it suppoused to be a parameter
received from the user? where is it used?
2011/3/16 Dave Newton
> On Wed, Mar 16, 2011 at 12:12 AM, mv wrote:
> > SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
> caught
> > setting 'domainType' on
On Wed, Mar 16, 2011 at 12:12 AM, mv wrote:
> SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught
> setting 'domainType' on 'class com.vivek.struts2.action.DomainAction1: Error
> setting expression 'domainType' with value '[Ljava.lang.String;@aea710'
I'd say you're trying
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
It will take the parameter from the request and call the setter in your
action, so you will have the parameter available in you action.
2011/3/15 JavaNoobie87
> Im aware of the documentation .My question was how parameters interceptor
> would be of use to me , for this particular application.
>
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
Dave is right as usual. I was writing from memory.
2011/3/15 Dave Newton
> Are you aware there is Struts 2 documentation?
>
> http://struts.apache.org/2.x/docs/parameters-interceptor.html
>
> But I think the interceptor in question is the parameter filter
> interceptor:
>
> http://struts.apache.
Sorry, you need to put
2011/3/15 JOSE L MARTINEZ-AVIAL
> You can activate devMode putting this in you struts.xml
>
>
>
>
>
> [...]
>
>
> The ParameterInterceptor is in the default stack of Struts2. If you are
> using the default stack, it should work automatically. If not, you need to
>
You can activate devMode putting this in you struts.xml
[...]
The ParameterInterceptor is in the default stack of Struts2. If you are
using the default stack, it should work automatically. If not, you need to
add it to your interceptor stack.
http://struts.apache.org/2.0.6/struts2-core/
Are you aware there is Struts 2 documentation?
http://struts.apache.org/2.x/docs/parameters-interceptor.html
But I think the interceptor in question is the parameter filter interceptor:
http://struts.apache.org/2.x/docs/parameter-filter-interceptor.html
Dave
On Tue, Mar 15, 2011 at 12:57 PM, J
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
Well, ParametersInterceptor should take care of that. Do you have devMode
enable? check the logs, you should find there if it is been used, and if it
is working.
2011/3/15 JavaNoobie87
> I am submitting a form in the page and trying to store the value in a bean
> (in the action class )and trying
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
Just to comment that Struts2 will populate the parameter from the request if
you aure using the corresponding interceptor, or the default stack.
--Mensaje original--
De: Yo
Para: Struts Users Mailing List
Responder a: Yo
Asunto: Re: RE: loading Dropdown dynamically from database
Enviado
the
action is called and maybe we can help you.
--Mensaje original--
De: JavaNoobie87
Para: user@struts.apache.org
Responder a: Struts Users Mailing List
Asunto: RE: RE: loading Dropdown dynamically from database
Enviado: 15 Mar, 2011 03:10
Is there any way that i can set the value of one a
Oh, nevermind -- I replied before I saw that you'd solved that part of it :/
-Brian
On Tue, Mar 15, 2011 at 2:40 AM, JavaNoobie87 wrote:
> 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-Dr
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.
---
Try making the following changes to your Java code -- the output should give
you some clues about what's going wrong.
-Brian
On Sun, Mar 13, 2011 at 11:52 PM, JavaNoobie87 wrote:
> Hi All,
> Im developing a Crud example using Struts 2 where im in the need to load
> values for a dropdown box dyna
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
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
I think Eclipse auto-compiles by default.
What is this? DomainDAO.listDomain(dt_oid)
Is dt_oid null at this point? (Add a debugging statement)
Have you posted code for DomainDAO? I apologize if I've missed it.
-
To unsubscrib
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.
--
I meant that perhaps (and if you're using eclipse is more likely than
perhaps) your ide is not running the code that contains your latest changes
Maurizio Cucchiara
Il giorno 15/mar/2011 06.15, "JavaNoobie87" ha
scritto:
Yes, very much .In fact, I copied the code directly from my IDE
--
View th
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.
I'll try to reformulate the question: are your sure that your IDE is running
the code you posted?
Maurizio Cucchiara
Il giorno 15/mar/2011 05.53, "JavaNoobie87" ha
scritto:
> Im using the same version , as ive pasted for the DAO class.
>
> --
> View this message in context:
http://struts.1045723
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.
I was refering to the dao's method invocation
Maurizio Cucchiara
Il giorno 15/mar/2011 05.46, "JavaNoobie87" ha
scritto:
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.104572
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
Are you sure that you are running that version of code?
A static method invocation, even with null value as argument, should not
thrown a NPE
Maurizio Cucchiara
Il giorno 15/mar/2011 05.26, "JavaNoobie87" ha
scritto:
> I solved the issue , but right now im facing a Null pointer exception,
which
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
Are there any errors in the stacktrace?
Maurizio Cucchiara
Il giorno 14/mar/2011 07.59, "JavaNoobie87" ha
scritto:
> Yes there is a method doing that.Here is the snippet .
> public void setDtList(List dtList) {
> this.dtList = dtList;
> }
>
> public List getDtList() {
> return dtList;
> }
>
> Iv
Can you put the chunck of your struts.xml in which the action is
defined?
-Original Message-
From: JavaNoobie87 [mailto:vivek...@enzentech.com]
Sent: Monday, March 14, 2011 2:59 AM
To: user@struts.apache.org
Subject: RE: loading Dropdown dynamically from database
Yes there is a method
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
Is there a public List getDtList in the Action? You didn't put it in the
code.
-Original Message-
From: JavaNoobie87 [mailto:vivek...@enzentech.com]
Sent: Monday, March 14, 2011 12:57 AM
To: user@struts.apache.org
Subject: Re: loading Dropdown dynamically from database
Th
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
51 matches
Mail list logo