Re: Bean write problem on emebedding an image

2005-11-11 Thread amitava . basak

Write 

html:img src='bean:write name=pollInfo property=imgSrc height=20 
width=20/' /


Just replace the qotes.

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: Javascript + Struts html:hidden write='true' tag problem

2005-08-06 Thread amitava . basak

Duane, 

As far as I understand, disabled is a property of the form which should 
be denoted as

document.forms[0].disabled 

and not just by disabled as you have done in

if(disabled ==true )

change it to:

if( document.forms[0].disabled == true )

and it should work. 

This is the reason the if(...) is always evaluating to false (i.e 
the 'else' case).



Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



Duane Rosengartner [EMAIL PROTECTED] 
08/06/2005 12:13 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
struts-user@jakarta.apache.org
cc

Subject
Javascript + Struts html:hidden write='true' tag problem






I have the following Javascript primarily used to manipulate a CSS style
and make a portion of a form visible. In the process, the achor invoking
the JavaScript passes parameters from a table Row(resultset) displayed.
In this Row, I have two bean properties declared as Java type Boolean.
The toString() on the link resolves to 'true'/'false' correctly. I have
placed alert tags in the javascript and have determined that the 'if'
statements are working correctly also. The problem is that the two
properties are behaving differently in the view, for reasons I cannot
pin down. document.forms[0].disabled shows the correct status of the
Row, document.forms[0].locked always shows false.
 
I suspected 'locked' may be a reserved word, but have rewritten the bean
and supporting code to rename the property, and this has had no effect.
 
Things that DO WORK: The link is passing the correct values to JS, No JS
error being thrown, as it would if the form property were not found. The
visible, not visible works, also a checkbox instead shows the
appropriate checked/not checked condition, so I can assume a page
refresh is not the issue.
 
Any other debug tips would be appreciated.
 
Javascript:
function
PortalFilterForm_AccountDetails(rowId,rewardSummaryId,pin,inUse,disabled
)
{
//alert(rowId =  + rowId + \nrewardSummaryId =  +
rewardSummaryId + \ninUse =  + inUse + \ndisabled =  + disabled);
var detailElement = document.getElementById(accountDetail);
detailElement.style.visibility = visible;
var rid = document.getElementById(rid);
rid.innerHTML = rowId;
document.forms[0].rewardSummaryId.value = rewardSummaryId;
document.forms[0].pin.value = pin;
if(inUse == true){
document.forms[0].locked.checked = true;
//alert(evaluated true);
}
else{
document.forms[0].locked.checked = false;
//alert(evaluated false);
}
if(disabled == true)
document.forms[0].disabled.checked = true;
else
document.forms[0].disabled.checked = false;
//document.forms[0].locked.value = inUse;
//document.forms[0].disabled.value = disabled;
// also tried:
//document.forms[0].locked.value = inUse + ;
//document.forms[0].disabled.value = disabled + ;
}
 
 
JSP - Note the commented out code does not work (hidden write=true). The
checkbox does work on both.. (Boolean type on both)
( Struts API says HTML:hidden requires String, but Boolean can be cast,
and remember I have one working property, plus one not working  ? ? ) 
 
td align=left width=15%   %--html:hidden property=locked
write=true/ --%
html:checkbox property=locked disabled=true/ 
/td
td align=right class=form-td-label  width=15%span
class=form-element-label Disabled /span/td
td align=left   %--html:hidden
property=disabled write=true/--%
html:checkbox property=disabled disabled=true/
/td
*
*
a
href=javascript:PortalFilterForm_AccountDetails(${row_rowNum},${row.rew
ardSummaryId},${row.acctId},${row.inUse},${row.disabled});
class=fancy
%=pageContext.getAttribute(row_rowNum)%/a
 

ForwardSourceID:NT7576 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: html:button validation problem

2005-07-20 Thread amitava . basak

Erol,

The problem is not with html:button but with 'this'. 'this' refers to the 
object from which the function is called. So in your first case 'this' 
refers to the form object whereas in the second case it refers to the 
button object.


Amitava Basak
ASE(T)
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



EROL TEZCAN [EMAIL PROTECTED] 
07/20/2005 05:19 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
sturts_apache_user sturts_apache_user user@struts.apache.org
cc

Subject
html:button validation problem






Hi all,
 
In my JSP page, I defined a html:form like this.
 
html:form action=/CagriAcma.do enctype=multipart/form-data 
onsubmit=return validateCagriAcmaFormu(this)  
 
...
html:submit property=kayit styleClass=buton value=KAYDET /
/html:form 
 
It works fine and does client-side validation truly.
 
But when I used to html:button instead of  html:submit, it gives an error.
 
html:form action=/CagriAcma.do enctype=multipart/form-data 
 
...
html:submit property=kayit styleClass=buton value=KAYDET 
onclick=return validateCagriAcmaFormu(this) /
/html:form 
 
Using a html:button tag, how can I do validation with return validate or 
whatelse?
 
 
Erol

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
ForwardSourceID:NT618A 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: [OT] UML class diagrams

2005-07-15 Thread amitava . basak

Can I have a look at Poseidon. I am using Jude, which is good but I need 
more than just seq and class diags. e.g: component diag..etc. can you mail 
it to me and many like me ?


Amitava Basak
ASE(T)
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



Preeti Iyer [EMAIL PROTECTED] 
07/14/2005 08:23 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
Re: [OT] UML class diagrams






Hi Dave,
You can also try Poseidon or Jude. Both are free. 

--regards.

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


ForwardSourceID:NT5B6A 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: Alternate color in html:iterate

2005-07-14 Thread amitava . basak

1. Have 2 classes in CSS.

2. within iterate write:
tr class='bean name= property=listRowClass /' 
td html:../td
..

/tr

3. In the corresponding form:

 public String getListRowClass() {
  if ( oddRow.equals(listRowClass))
  listRowClass = evenRow;
  else
  listRowClass = oddRow;

  return listRowClass;
  }

Short  sweet isn't it?

(Basuda no comments)

Amitava Basak
ASE(T)
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Problem with html:link

2005-07-14 Thread amitava . basak

I have a html:link action=MyAction 

 in struts config i have  action path=MyAction 
forward=MyGlobalForward 

In global forward i have forward name=MyGlobalForward path=a.jsp


now i have a parameter in the link. the mapping produced is 
MyAction?transId=100922

i want to forward to that page with the parameter appened to the hyperlink 
using this best practice.


Amitava Basak
ASE(T)
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

arraylist problem.

2005-07-04 Thread amitava . basak

I have a condition where I have an arraylist(must) containing a bean and i 
have to display it in my jsp. I cannot use logic:iterate since if the 
arraylist does not contain the bean, the controls are not displayed at 
all. (I have approx 40 controls to be displayed ).


what is the way out? 


Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: dynamic parameter

2005-07-04 Thread amitava . basak

If the problem is with the quotes, 
use
tiles:insert page=bean:message key=\commont.header\/ flush=true 
/

vijay, size is of no help!!

Amitava Basak
ASE(T)
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

html:option

2005-06-14 Thread amitava . basak

I want 
html:option selected=true xxx /html:option

Is there a way out to select a default value at design time?  (I hate 
javascript!!... lol. )


Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

CanBaseTagHandler class be extended?

2005-06-14 Thread amitava . basak

Can the BaseTagHandler class be extended ?? I would like to use disabled 
property from action form using setter methods.

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: Pass parameter to javascript function

2005-06-13 Thread amitava . basak

Avjit its not working!

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: Pass parameter to javascript function

2005-06-13 Thread amitava . basak

Thanks martin, its so simpledidn't click in my mind.

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Pass parameter to javascript function

2005-06-09 Thread amitava . basak

How can I pass parameter in to a javascript function from a html:text 
tag??


eg:
logic: iterate ...  indexId=idx 
html:text property=x name=y onclick=lfnSomething(%=idx%) 
/
...
...



Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Toggle Colors between Rows

2005-06-09 Thread amitava . basak

What is the best way to toggle colors between rows using logic:iterate 
keeping in mind the View (MVCno scriptlets!!) best practice.?

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: Problem with html:select id -- Help me OUT

2005-06-09 Thread amitava . basak

use styleId instead. It gets converted to id

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Onload Action

2005-06-02 Thread amitava . basak

I have a form where there is a grid(plain HTML) which needs to be 
populated via logic:iterate. Is there a way to populate that form before 
the page is loaded( somehow via struts=config ..er??) so that I do 
not need to submit the page onload and call OnLoadAction to populate the 
arraylist logic:iterate from DB?




Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: HOWTO: multiple values field.

2005-05-31 Thread amitava . basak

onclick and ondblclick events on a html:hidden tag are provided ? What 
are its uses if at all? 

Amitava Basak
Tata Consultancy Services Limited


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you