Re: Type-Conversion error - NPE

2007-04-09 Thread Tim Williams

On 4/9/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute ListMyBean insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe


Felipe,
Can you please stop this spam.  Be nice/patient and ask your question
once vs. 6 duplicate emails in less than an hour.  Give it some time.
Thanks,
--tim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] problem with displaytag column sorting in struts 1.2 web project

2007-04-08 Thread Tim Williams

On 4/8/07, robin bajaj [EMAIL PROTECTED] wrote:

Hi All,
In my Struts 1.2.x webapp, I am getting some Patient records from
backend using my PatientManager businessObject (which uses Hibernate)
to send back a populated Patients List in the request scope. (Patient is
my bean).

I am feeding this patientsList to Displaytag table,
to show the data in a table.

Here's the code snippet for my jsp containing displaytag table.
http://rafb.net/p/artIJr98.html

Now, I want to sort this table based on the PatientID
when I click on the PatientID column.

I read in the Displaytag docs

http://displaytag.homeip.net/displaytag-examples-1.1/example-sorting.jsp

where it mentions the following :

If you want to allow the user to sort the data as it is coming back,
then you need to just do two things, make sure that the data returned
from your property implements the Comparable interface (if it doesn't
natively - use the decorator pattern as shown a couple of examples ago),
and then set the attribute sortable=true on the columns that you want
to be able to sort by.


Following the above suggestion, I changed my Patient class to implement
Comparable interface and implemented the following compareTo method (as
following)
http://rafb.net/p/t0CR4Q98.html

Then I re-build my app and restart it on the server, the displaytag
table shows up fine. But when I click on the first column PtId, it
doesn't sort the table. I just get the Http404 error page.

Am I missing something ?


Try setting the requestURI attribute of the table itself?
--tim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] problem with displaytag column sorting in struts 1.2 web project

2007-04-08 Thread Tim Williams

Just put requestURI=/mypage.do  (where mypage.do==the page that
displays the table).

--tim

On 4/8/07, robinbajaj [EMAIL PROTECTED] wrote:


thanks for the tip.
can you please provide more specific example/code-snippet for using the
requestURI attribute. i couldnt find enough documentation on this feature.
thanks in advance,
robin


Tim Williams wrote:

 On 4/8/07, robin bajaj [EMAIL PROTECTED] wrote:
 Hi All,
 In my Struts 1.2.x webapp, I am getting some Patient records from
 backend using my PatientManager businessObject (which uses Hibernate)
 to send back a populated Patients List in the request scope. (Patient is
 my bean).

 I am feeding this patientsList to Displaytag table,
 to show the data in a table.

 Here's the code snippet for my jsp containing displaytag table.
 http://rafb.net/p/artIJr98.html

 Now, I want to sort this table based on the PatientID
 when I click on the PatientID column.

 I read in the Displaytag docs

 http://displaytag.homeip.net/displaytag-examples-1.1/example-sorting.jsp

 where it mentions the following :

 If you want to allow the user to sort the data as it is coming back,
 then you need to just do two things, make sure that the data returned
 from your property implements the Comparable interface (if it doesn't
 natively - use the decorator pattern as shown a couple of examples ago),
 and then set the attribute sortable=true on the columns that you want
 to be able to sort by.


 Following the above suggestion, I changed my Patient class to implement
 Comparable interface and implemented the following compareTo method (as
 following)
 http://rafb.net/p/t0CR4Q98.html

 Then I re-build my app and restart it on the server, the displaytag
 table shows up fine. But when I click on the first column PtId, it
 doesn't sort the table. I just get the Http404 error page.

 Am I missing something ?

 Try setting the requestURI attribute of the table itself?
 --tim

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
View this message in context: 
http://www.nabble.com/-OT--problem-with-displaytag-column-sorting-in-struts-1.2-web-project-tf3543922.html#a9895137
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding dynamic radio button..

2007-02-20 Thread Tim Williams

On 2/20/07, Vijay Prajapati [EMAIL PROTECTED] wrote:





I am using Struts2.0.1.

I have created groups of 3 dynamic radiobuttons through iterator(Array List) 
tag. But I have to give different names to these groups. I am here giving code 
which I have been written in my jsp.



s:iterator status=stat value=groupname

 tr

td class=txtstrongs:property//strong/td

td class=txts:radio list={'None','Admin','Developer'} 
name=groupname[%{#stat.index}].value/

/td

 /tr

/s:iterator



Here groupname is collection(ArrayList which store groupname(String)) in 
Action class. So can I user name as value of collection so every radio button would have 
different name as per collection value?



So Help me to assign different names for each radio button group.


I'm doing something similiar using the nested tags.  It provides the
unique naming for you. I explicitly create the radio buttons with the
nested:radio tag though.  I use nested:iterate in the same way you use
s:iterate.  Since you have to pass the list into the radio tags, I
reckon it wouldn't hurt for you to also explicitly list out the
buttons.  Anyway, if you have any flexibility, you may want to take a
look at the nested tags before trying to do it yourself.

--tim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to join Struts Team?

2007-01-30 Thread Tim Williams

On 1/30/07, Struts2 Fan [EMAIL PROTECTED] wrote:

Hi,

I just want to know if it is possible to join Struts2 Team.

If (possible) {
 how();
}else if( !possible){
 willItBePossible();
}


These should be helpful:
http://struts.apache.org/helping.html
http://apache.org/foundation/how-it-works.html#meritocracy

--tim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]