bornleo26
Aug 8th, 2007, 09:56 AM
Hello Friends,
We have a custom taglib with the name webapp.Actaully in this project this taglib is being used with struts.Now when i am trying to use the same with spring it gives me bean out of scope error.
To me the problem is that this taglib is implemented using TAgUtils of the struts framework.
I need to get it configured with my spring code and i am badly struck with this.
i am writing code from my jsp and the taglib .... please help me out
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:smvc="http://www.springframework.org/tags/form" version="2.0"
xmlns:webapps="http://www.emdt.ardeo.net/jsp/webapp" *--- *here i am referring the taglib
<tr>
<td><webapps:date name="startDate" property="startDate" defaultValue="today" styleId="startDate"/> </td>
</tr> *----* this is where i am trying to use date tag.
*----* the following is the struts implementation .. i.e. the class
Object formVal = TagUtils.getInstance().lookup(pageContext, name, property, null);
if(super.getSize() == null) super.setSize("11");
if(formVal == null && defaultValue != null) {
if("today".equals(defaultValue)) {
super.setValue(sdf.format(new Date()));
}
}
int retVal = super.doStartTag();
//add javascript button
TagUtils.getInstance().write(pageContext, "<img title='Click to choose date' style='cursor: pointer' src='../images/16x16/date.png' id='" + super.getStyleId() + "_DateTrigger'/>");
return retVal;
-------------------------------
Please if someone can render me some help or some clue to get this done.I shall be highly thankful.
Regards,
Pankaj Chaswal
We have a custom taglib with the name webapp.Actaully in this project this taglib is being used with struts.Now when i am trying to use the same with spring it gives me bean out of scope error.
To me the problem is that this taglib is implemented using TAgUtils of the struts framework.
I need to get it configured with my spring code and i am badly struck with this.
i am writing code from my jsp and the taglib .... please help me out
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:smvc="http://www.springframework.org/tags/form" version="2.0"
xmlns:webapps="http://www.emdt.ardeo.net/jsp/webapp" *--- *here i am referring the taglib
<tr>
<td><webapps:date name="startDate" property="startDate" defaultValue="today" styleId="startDate"/> </td>
</tr> *----* this is where i am trying to use date tag.
*----* the following is the struts implementation .. i.e. the class
Object formVal = TagUtils.getInstance().lookup(pageContext, name, property, null);
if(super.getSize() == null) super.setSize("11");
if(formVal == null && defaultValue != null) {
if("today".equals(defaultValue)) {
super.setValue(sdf.format(new Date()));
}
}
int retVal = super.doStartTag();
//add javascript button
TagUtils.getInstance().write(pageContext, "<img title='Click to choose date' style='cursor: pointer' src='../images/16x16/date.png' id='" + super.getStyleId() + "_DateTrigger'/>");
return retVal;
-------------------------------
Please if someone can render me some help or some clue to get this done.I shall be highly thankful.
Regards,
Pankaj Chaswal