Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing two values to setProperty  RSS feed

 
Kumar Navin
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,
I am using a bean in my JSP page. Have a get/set property defined in the bean. But I want to set two values for the property. It is giving an error. How do I accomplish that? I tried the following code:-
In my Bean Class:
public void setMyProperty(int i,int s){}
In my jsp Page:
<jsp:useBean id="some" class="PackageName.ClassName" />
<jsp:setProperty name="some" property="MyProperty" value="3,9" />

Thanks.

-Navin.
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kumar,
I guess you can achive this by calling this method..instead of using jsp:setproperty
ex,

some.setMyProperty(3,9);

Cheers
Praful
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!