Re: How to use nested iterate...through ArrayList

2007-02-13 Thread Siva Sajja

It would be good to identify if you can show your bean structure too.. This
more or less seems to be a problem with the structure of bean you are trying
to access.


On 2/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



Hi I am trying to nested:iterate fro looping through am hashMap of
Hashmap of ArratListUserDefinedObject

But I get property cnt cannot be found error. When looping through the
object of arrayList, I was able to loop through the forst two hashmaps 
print out their keys, but printing out the values in ArrayList is a
problem.


Below Is the code.

nested:iterate id=a4idBreakMap name=SearchResultBean
property=jspDisplayA4idSummaryMap indexId=count
   !-- IF MAP IS NOT EMPTY, LOOP THROUGH IT --
   nested:notEmpty name=a4idBreakMap
property=value
   nested:define name=a4idBreakMap id=mapA4id
property=key /
   c:if test='${pageScope.mapA4id ==
pageScope.mainLoopA4id}'
   nested:iterate name=a4idBreakMap
id=tableLevelMap property=value
   !--nested:define name=tableLevelMap
property=value id=loopCntId /--
   tr
   td class=blanknbsp;/td
   tdnested:write
name=tableLevelMap property=key //td
   nested:iterate
name=a4idBreakMap id=cntLevelList 
   nested:define
name=cntLevelList id=cntId property=value/
   tdnested:write
name=cntId property=cnt //td
   /nested:iterate

   /tr
   /nested:iterate
   trtd colspan=10nbsp;/td/tr
   trtd colspan=10nbsp;/td/tr
   trtd colspan=10nbsp;/td/tr
   /c:if
   /nested:notEmpty
/nested:iterate


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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




Re: Checking html:checkbox based on database value?

2006-12-26 Thread Siva Sajja

Have a map which contains a map of service id to roles or role to service
ids whichever u feel is most relevant.

-Siva

On 12/21/06, Mallik [EMAIL PROTECTED] wrote:



Hi friends
my problem is i have to ArrayLists
one contains total services and another contains assigned services to a
role.
when we select a role, assigned services from the total services should be
selected.
In a database table i have serviceids for each service and in another
table,
what are the serviceids for a roleid.
how can i do this can anybody help me please.
thanks in advance

ur's
Mallik
--
View this message in context:
http://www.nabble.com/Checking-%3Chtml%3Acheckbox%3E-based-on-database-value--tf2863931.html#a8003324
Sent from the Struts - User mailing list archive at Nabble.com.


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




Re: object modify in collection index

2006-05-18 Thread Siva Sajja

Yes,

You are the changing the properties by reference. So whatever change you do
on the object you are getting will be replicated across all its instances
(so the collection also).



On 5/18/06, Raghuveer [EMAIL PROTECTED] wrote:



Yes,
i have modified like this.It is working and giving me the result properly.

((TestObject)arlCollection .get(3)).setPart(strPart);

Is this correct ?

-Original Message-
From: Pradyumna kumar, Jena (J.) [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 18, 2006 2:57 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: object modify in collection index





I have 5 objects(java beans) in Collection.

I need retrive object from index 3 in collection modify it and add to
same
index.

 why do u need to add?? We are just getting the reference for that
object and the object is still in the collection.

What is best collection for this requirement.

At present i tried this with arraylist.
But in addition to object with 3 rd index modified i am getting one more
object added in Arraylist i.e 6 objects in collection.


As per below code the modified object at index 3 is updated in
arlCollectionOrderRfq collection. But how about the same collection in
actionform in my struts application. This collection of objects is a
method
in Struts ActionForm


ArrayList arlCollection = orderPartsActionForm.getArlCollection();
if(arlCollection !=null  arlCollection .size()0){
obg = (TestObject)arlCollection .get(3);
obg.setPart(strPart);


}//end if


-
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: File upload using html:file tag fails..java.lang.IllegalArgumentException:

2006-05-11 Thread siva sajja

hope you have given your form declaration as

html:form action=/uploadFile method=post enctype=multipart/form-data



kommineni Anita [EMAIL PROTECTED] 写道:  David,
U are right...But If I change that to post I get

java.lang.NoClassDefFoundError:org/apache/commons/io/output/DeferredFileOutputStream
,
though I have the necessary jar's in place.

Thanks,
/Anita

--- David Evans  wrote:

 Just a guess, as i don't use the struts html tags,
 but shouldn't that
 method=get be method=post? you can't get a multi
 part form.

 dave



-
雅虎免费邮箱-3.5G容量,20M附件



Re: Basic Logic:iterate question

2006-05-11 Thread siva sajja

Logic iterate can be used only over a collection of elements.
Check whether the property userRoles in the bean returned by
LookUpConstants.SESSION_OBJECT is a collection.

Also the property names used in bean:write(role) is different from the
property name used in logic:iterate(userRoles) which I feel has some
mismatch.

hope this info helps.


On 5/11/06, josh t [EMAIL PROTECTED] wrote:


Greetings everyone:

  Objective: Retrieve an object from the session that contains a
Collection of String for userRoles.  Iterate through userRoles, and if one
of the roles equals SUPER include a href.


  So this is what I have, but doesn't seem to be correct:

  

  logic:iterate id=role
 name=%=LookupConstants.SESSION_OBJECT%
 property=userRoles scope=session

  logic:equal name=role property=SUPER
  a href=test.do class=BodyLinkbtest/b/abr /
/logic:equal
  /logic:iterate

  .

  Note: I can get the session value just fine, when i do the following:
  bean:write name=%=LookupConstants.SESSION_OBJECT% property=role
scope=session /
  Can you please let me know what I'm doing wrong within the iterte block?


-
Get amazing travel prices for air and hotel in one click on Yahoo!
FareChase



Re: [OT] calling js function with list backed form value

2006-05-04 Thread siva sajja

Hi

Here you are using a normal input tag from html which has no knowledge of
any of the struts functionalities(mapped back properties). Use html:text
instead

Cheers,
Siva.

Shoukat, Faisal wrote:


Hi,

I have a list backed action form and want to call a javascript function
with
one of the parameters to the function being a value from the list backed
action form.

My js function is as such:

bean:define id=jsFunction
 javascript:calculate('%=benefits[ + index.intValue() + ].value%',
'bean:write name=benefit
property=benMaxRange/',
'bean:write name=benefit
property=benMinRange/',
'bean:write name=benefit property=benRange/',
'bean:write name=benefit property=label/')
/bean:define

The value I want substituted into the function is %=benefits[ +
index.intValue() + ].value%

My input text tag is as such which calls the function:

input type=text name=%=benefit[+index.intValue()+].value%
value= size=20 onblur=%=jsFunction%/

Can anyone help with explaining how to get the value from the input text
box
of the form and send it to the function. The text boxes name is dynamic
thus
causes me problems.

The html source shows the following: benefit[0].value in the function and
not the actual value.

Thanks

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





--DISCLAIMER--
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.

If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient.

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each
reserve the right to monitor all e-mail communications through its
networks.

Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the
sender is authorized to state them to be the views of any such entity.

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




Re: [OT] calling js function with list backed form value

2006-05-04 Thread siva sajja

Hi

Try replacing the code

javascript:calculate('%=benefits[ + index.intValue() +
].value%',...with
javascript:calculate('%= benefits[index.intValue()].value%',... (removing
the string concatenation)

Hope this will help

Cheers,
Siva.

On 5/4/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:


If I use the html; text property the only diff would be
html:text property=%=benefits[+index.intValue()+].value%
size=20
onblur=%=jsFunction%/

I still have the same problem. If I put this in then the value becomes
[object]

Thanks

-Original Message-
From: vijay venkataraman [mailto:[EMAIL PROTECTED]
Sent: 04 May 2006 13:12
To: Struts Users Mailing List
Subject: Re:[OT] calling js function with list backed form value

In your JS function can you add 'this' as one of the parameter. Then in
your js function you can get the value from the element.
Like input type=text onclick=return someFunction(this)/ which
implies the element on which the event occured.
Note: I have never used bean:xxx tags and  don't know much about it.
My thoughts.

Thanks,
Vijay Venkataraman

Shoukat, Faisal wrote:

Hi,

I have a list backed action form and want to call a javascript function
with
one of the parameters to the function being a value from the list backed
action form.

My js function is as such:

bean:define id=jsFunction
 javascript:calculate('%=benefits[ + index.intValue() + ].value%',
'bean:write name=benefit
property=benMaxRange/',
'bean:write name=benefit
property=benMinRange/',
'bean:write name=benefit property=benRange/',
'bean:write name=benefit property=label/')
/bean:define

The value I want substituted into the function is %=benefits[ +
index.intValue() + ].value%

My input text tag is as such which calls the function:

input type=text name=%=benefit[+index.intValue()+].value%
value= size=20 onblur=%=jsFunction%/

Can anyone help with explaining how to get the value from the input text
box
of the form and send it to the function. The text boxes name is dynamic
thus
causes me problems.

The html source shows the following: benefit[0].value in the function and
not the actual value.

Thanks

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





--DISCLAIMER--
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.

If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient.

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each
reserve the right to monitor all e-mail communications through its
networks.

Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the
sender is authorized to state them to be the views of any such entity.

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





The Northgate IS Content Screening and Inspection system has scanned this
message for malicious and inappropriate content and none was found. Please
take care
when opening attachments even when these are expected and from known and
trusted
sources.




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