Roscoe Padsmith

Greenhorn
+ Follow
since Apr 10, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Roscoe Padsmith

Hi all,

I get the same error but my getters and setters are well defined. And both "sender" and "retard" are defined as String(s) in my ActionForm.

When it comes to doing <html:text property="sender" /> in my jsp page, it works fine but when I write <html:text property="retard" />, Tomcat gives me the no getter error and I absolutely don't know why as "sender" and "retard" have similar and interchangeable roles.

I have tried turning tomcat off and on again but nothing improved so I'm wondering if there's some tweak I should know to make this work because it's really driving me crazy at the moment.

Thanks in advance.

Regards,
-- Alain
14 years ago
Thank you for answering so quickly.

I already tried using indexed properties but I got an out of bounds exception because some of the records (from sitePlanRecords.records) are actually not displayed (yes I tried to clear some of the dark side of my code for better readability ).

I managed to get contents of "choice" using String [] choice = request.getParameterValues("choice") in my Action class but what I get is a big array with all the values (that were checked) in it so i changed the value property of the checkbox with value="${cvf.idEmployee},${record.numDay}". This way I get the matching line (i.e. employee) with some string tokenizing. I know it's a bit dirty but it's the best (actually only) way i could think of.

Don't hesitate if you have better ideas.

Regards,

-- Alain
14 years ago
Hi all,

What I'm trying to do is fill the property "choice" (String[]) of different "CopyVacationForm"s. What I have is a CopyVacationsForm which is a DynaActionForm containing a CopyVacationForm[] property cvfs.

My form bean has the correct getters and I'm not getting any errors but when I submit it it's not filled with the values I wanted.


In my jsp I do :




In my Struts-config.xml I have :



Other values of the form beans are correctly set but dealing with checkboxes and String arrays seems to be a problem.

Any help or suggestion would be really appreciated.
Thanks in advance.

-- Alain
14 years ago
Hi all,

I'm getting an exception when trying to query the database and I really don't know why. Here's the trace :


I think the problem comes from the criteria I have defined because I need to check something about the time slot of a vacation :


because it works fine when I just do

I think the mapping has been done correctly so if you've ever had this problem or know a better way to check associations than Criteria or think there's something I misunderstood don't hesitate.

Thanks in advance,

-- Alain

[ May 23, 2008: Message edited by: Alain Mebsout ]
[ May 26, 2008: Message edited by: Alain Mebsout ]
Hello,

I'm currently trying to use indexed properties into an imbricated loop, meaning I have one c:forEach iterating over a Slot[] object and a logic:iterate loop inside to iterate over something else. I'm not sure how to use indexed="true" so I just put it in thinking It would be aright but it's not.

My problem is when looking at generated jsp code, it goes like :

slot[0].strPostNeed[0] ...
slot[1].strPostNeed[1] ...

slot[0].strPostNeed[0] ...
slot[1].strPostNeed[1] ...

and I would like to have :

slot[0].strPostNeed[0] ...
slot[0].strPostNeed[1] ...

slot[1].strPostNeed[0] ...
slot[1].strPostNeed[1] ...

Some code from my jsp page :


Any help would be really apreciated !

Thanks,

Alain
[ April 30, 2008: Message edited by: Alain Mebsout ]
14 years ago
Thank you for these useful links, it helps a lot. I've managed to fix my problem but then some other ones (things with hibernate and all) appear as usual. Anyway thank you again.

-- Alain
14 years ago
Hello,

I'm quite new to Struts and JSP's and I'm trying to iterate over an ArrayList to set some properties but I really can't figure out what is going wrong. I've looked up and tried several ways to do it and here's briefly what I've done in the jsp page :



Which gives me the error message :



strPostNeeds is the ArrayList I want to fill and has the same length as the array postNames. Maybe I should use the set method instead of get but I don't know I could do that. I've tried to make that using regular arrays instead but I need to have a dynamic one because I perform tests on all its values afterwards.

Any suggestion would be welcome.

Thanks in advance,

-- Alain
14 years ago