Win a copy of Rust Web Development this week in the Other Languages forum!

Sakthi Priya

Greenhorn
+ Follow
since Apr 02, 2009
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 Sakthi Priya

Could you please throw some highlight about validate() method? Do i need to implement any interfaces ?

Right now what i'm doing is, on uploading i'm calling some action mthod. Within that method, using the value of
getUploadContentType() i'm deciding whether to throw back the error or not. Still not sure about restricting minimum and maximum size allowed.
12 years ago
Please let me know how to do the file upload validation programatically instead of interceptors ?

I want to allow file type of xls only, Min size and max size

Thanks,
Sakthi Priya
12 years ago
Hi

How do i assign different property in my controller class for each checkboxes of my checkbox list. Please give me some idea.

Say i'm building a list in my controller class to display the list of checkboxes in jsp like below



And in my jsp


After selecting the checkboxes among Apple / Banana / Grapes in UI, how do i assign or make sure in my controller class which are the checkboxes are selected. I mean how do i assign different property in my controller class for each checkbox.

Thanks,
Sakthi
12 years ago
And do you have any idea on the other doubt that i asked?


Is there a way to set the width / alignment of each checkbox among the checkbox list. When i'm displaying some 20-30 checkboxes, next to next checkboxes are getting displayed and looking ugly.

It is better if i come to know how can i set to display only 3 checkboxes with lables in a row


12 years ago
Yes David, It worked



Thanks
12 years ago
No David, its not working. I tried as


and also


Getting the below eror:
SEVERE: Servlet.service() for servlet jsp threw exception
tag 'checkboxlist', field 'list', name 'downloadColList': The requested list key '%{getText('employee.label.number'), {getText('employee.label.extension')}' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
12 years ago
Yes, its working. But only the lastly given label is displaying with only one checkbox. when i give as


only one checkbox is displayed with label First Name

David Newton wrote:That's not a valid OGNL expression--you're opening it twice. Remove the second "%{".

12 years ago
And my another doubt is :

Is there a way to set the width / alignment of each checkbox among the checkbox list. When i'm displaying some 20-30 checkboxes, next to next checkboxes are getting displayed and looking ugly.

It is better if i come to know how can i set to display only 3 checkboxes with lables in a row

Thanks
12 years ago
I want to create list of checkboxes using s:checkboxlist tag, where in the properties has to read from Application Resources property file. As the values are static i dont want to populate the list in my action class and display it in jsp. Please let me know how can i do it? I'm using as



for displaying single property the above code is working fine.



which is not working.
12 years ago
Hi David,

I didnt edited any of my content later i submitted at the first time. The code that i posted in my first post is the one that i was using exactly in my prj.

I didnt look into this problem again, as my project requirement is changed.

But still i wanted to try it out, as it may help at some point.
12 years ago
No David, Even after removing var attribute the output is same.
12 years ago
am using struts 2.1
12 years ago
Can anyone please let me know how to build list/select box in a jsp with someObj as its options?

Problem:
Say i've a Person object which has Telephone object in it

How do i iterate this and build a select/list box in my jsp? I want to display the items in my select box in the format
Name TN-Extn (Eg) George 17037234444-122

I tried like

Its not displaying any value in it. But its creating entries of 5 in the list box. My Page view source gives


Please let me what is wrong in my code

Thanks



12 years ago
Hi,

Could any one please let me know how to restrict the uploading file type to be of xls only ? I do not want to do in javascript or in action class by substringing the filename and throw the error msg.

I would like to know how/what to add in struts.xml inside my action tag


Shall i use the above code inside my action tag, though my struts.xml doesnt contain any <interceptors> tag ? What is the xls format type to be given inside <param> tag ?
12 years ago
Hi Yash,

As i already told as the values are just static i dont want to populate the values in Action class.

And anyone please let me know how to preset some particular radio button on page load?
12 years ago