Custom tag for Marquee in JSF

Hi,
I am trying to develop a custom tag for Marquee in JSF, my usecase is to display a value from managed bean(Dynamically). please find the code below and guide me where i have made mistake
regards
Sandeep
Component class:
package customtags;
import javax.el.ValueExpression;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
public class Marquee extends UIComponentBase {
     public static final String COMPONENT_TYPE = "marqueecomp";
     public static final String RENDERER_TYPE = "marqueeRenderer";
     private Object[] _state = null;
     private String value;
     public String getValue() {
          if (null != this.value) {
               return this.value;
          ValueExpression _ve = getValueExpression("value");
          return (_ve != null) ? (String) _ve.getValue(getFacesContext()
                    .getELContext()) : null;
     public void setValue(String marquee) {
          this.value = marquee;
     public String getFamily() {
          // TODO Auto-generated method stub
          return COMPONENT_TYPE;
//     public void encodeBegin(FacesContext context) throws IOException {
//          ResponseWriter writer = context.getResponseWriter();
//          writer.startElement("marquee", this);
//          writer.write(getValue());
//          writer.endElement("marquee");
     public void restoreState(FacesContext context, Object state) {
          this._state = (Object[]) _state;
          super.restoreState(_context, this._state[0]);
          value = (String) this._state[1];
     public Object saveState(FacesContext _context) {
          if (_state == null) {
               _state = new Object[2];
          state[0] = super.saveState(context);
          _state[1] = value;
          return _state;
Tag Class:
package customtags;
import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.webapp.UIComponentELTag;
public class MarqueeTag extends UIComponentELTag {
     protected ValueExpression marquee;
     public String getComponentType() {
          // TODO Auto-generated method stub
          return Marquee.COMPONENT_TYPE;
     public String getRendererType() {
          // TODO Auto-generated method stub
          return Marquee.RENDERER_TYPE;
     * protected void setProperties(UIComponent component) {
     * super.setProperties(component); Marquee marqComp = (Marquee) component;
     * if (marquee != null) { marqComp.setValue(marquee); } }
     protected void setProperties(UIComponent component) {
          super.setProperties(component);
          Marquee marqComp = null;
          try {
               marqComp = (Marquee) component;
          } catch (ClassCastException cce) {
               throw new IllegalStateException(
                         "Component "
                                   + component.toString()
                                   + " not expected type. Expected: com.foo.Foo. Perhaps you're missing a tag?");
          if (marquee != null) {
               //marqComp.setValueExpression("value", marquee);
               marqComp.setValue("fsdfsdfsdfsdfsd");
     * @return the marquee
     public ValueExpression getMarquee() {
          return marquee;
     * @param marquee
     * the marquee to set
     public void setMarquee(ValueExpression marquee) {
          this.marquee = marquee;
*.tld file*
<?xml version="1.0" encoding="UTF-8"?>
<taglib xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
     version="2.1">
     <tlib-version>1.0</tlib-version>
     <short-name>marqueecomp</short-name>
     <uri>http://tags.org/marquee</uri>
     <tag>
          <name>marqueeTag</name>
<tag-class>customtags.MarqueeTag</tag-class>
<body-content>empty</body-content>
<attribute>
<description><![CDATA[Your description here]]></description>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description><![CDATA[Your description here]]></description>
<name>value</name>
</attribute>
     </tag>
</taglib>
Renderer class:
package customtags;
import java.io.IOException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;
public class MarqueeRenderer extends Renderer {
     public void encodeBegin(final FacesContext facesContext,
final UIComponent component) throws IOException {
super.encodeBegin(facesContext, component);
final ResponseWriter writer = facesContext.getResponseWriter();
writer.startElement("DIV", component);
/*String styleClass =
(String)attributes.get(Shuffler.STYLECLASS_ATTRIBUTE_KEY);
writer.writeAttribute("class", styleClass, null);*/
public void encodeEnd(final FacesContext facesContext,
final UIComponent component) throws IOException {
final ResponseWriter writer = facesContext.getResponseWriter();
writer.endElement("DIV");
in Faces-Config:
<component>
          <display-name>marqueecomp</display-name>
          <component-type>marqueecomp</component-type>
          <component-class>customtags.Marquee</component-class>
          <component-extension>
<renderer-type>marqueeRenderer</renderer-type>
</component-extension>
     </component>
     <render-kit>
<renderer>
<component-family>marqueecomp</component-family>
<renderer-type>marqueeRenderer</renderer-type>
<renderer-class>customtags.MarqueeRenderer</renderer-class>
</renderer>
</render-kit>
In class path --->marquee.taglib.xml
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
<namespace>http://tags.org/marquee</namespace>
<tag>
<tag-name>marqueeTag</tag-name>
<component>
<component-type>marqueecomp</component-type>
<renderer-type>marqueeRenderer</renderer-type>
</component>
</tag>
</facelet-taglib>
*.xhtml file*
<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en"
     xmlns:a4j="http://richfaces.org/a4j"
     xmlns:rich="http://richfaces.org/rich" xmlns:mycomp="http://tags.org/marquee">
<head>
<title>DEBTDOC Home Page</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
     content="A short description of this page." />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="../css/common.css"></link>
<script language="javascript" src="../script/common.js"></script>
</head>
<body>
<f:view>
<mycomp:marqueeTag value="hello World"></mycomp:marqueeTag>

There exist the JSTL SQL taglib, but I don't recommend this. It should only be used for quick development and testing. For database connectivity, rather create a data layer with DAO classes which you on its turn just plug in your business layer (with servlets).

Similar Messages

  • How to use custom tags for integrating FCK Editor?

    Hi All,
    I am looking for the integrating the FCK Editor in my jsp page. any one can please provide the procedure of How to create fckeditor in jsp?
    I have the jar file of fck editor but i am confusing while creating the custom tag for that editor.
    I want like this:
    <FCKeditor:fck ?> like this
    Regards,
    Sateesh

    google answers it all..
    [http://www.jroller.com/coreteam/entry/using_fckeditor_in_jsp_web]
    [http://java.fckeditor.net/properties.html]
    [http://java.fckeditor.net/java-core/tagreference.html]

  • Can i use Custom Tags for Database retrieval (as per MVC pattern)?

    In our project we are dealing with database, and i've used the Cutom Tags for database retrieval (as per the Article from Mr Faisal Khan) and it is working fine. But i have a doubt if it affects the performance in any way . I wanted to know if its recommendable to use Custom Tags for the DB retrieval as per MVC Pattern or shall i create a intermediate bean and then call the bean in custom tag.
    Thanks
    Prakash

    Putting database code in your JSPs certainly couples your view to the database. That's usually not good.
    If it's a simple app, it might be justified.
    When you start having lots of pages and complex business logic it becomes less attractive. - MOD

  • Custom tag for Database cinnectivity

    Hi ,
    Can anyone provide a sample code that can help to create db connectivity using custom tag?
    thanks in advance
    regards,
    mayen

    There exist the JSTL SQL taglib, but I don't recommend this. It should only be used for quick development and testing. For database connectivity, rather create a data layer with DAO classes which you on its turn just plug in your business layer (with servlets).

  • Problem creating custom tags for site that has no outside internet connecti

    I've created a set of custom tags that work fine until we install our app at the customer site. The customer site has no outside Internet access, and so the DOCTYPE is failing since it references the web-jsptaglibrary_1_1.dtd located on Sun's site.
    I tried copying the dtd locally and got it to work, but the solution sucks because this web-jsptaglibrary_1_1.dtd file is referenced in both my taglib.tld file AND the web-jsptaglibrary_1_1.dtd itself. Soooo....I can put in a URL that references it on the local machine, e.g.,
    In the taglib.tld file:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "http://ClientAAA/web-jsptaglibrary_1_1.dtd">
    In the web-jsptaglibrary_1_1.dtd file:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "http://ClientAAA/AdProduction/web-jsptaglibrary_1_1.dtd"
    >
    but that means for every client that uses this app (and we have several) I have to change that URL inside both these files.
    I tried simply changing it to the relative "web-jsptaglibrary_1_1.dtd", e.g.,
    taglib.tld:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "web-jsptaglibrary_1_1.dtd">
    web-jsptaglibrary_1_1.dtd:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "web-jsptaglibrary_1_1.dtd"
    >
    but then it is requiring me to put the dtd in both my web app root directory AND my jakarta/bin directory. I get the following error:
    XML parsing error on file ../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    It seems like I must be missing something here. This shouldn't be this hard. And it seems funny that to use custom tags, you have to have Internet access in the first place.
    Help!!! :)
    Thanks.

    Yeah, I think it's a bit ridiculous that in order to make all the tag library examples and instructions work, you have to have access to the Internet. I haven't seen a single example on how to make it work if there is no Internet access. That's very limiting. And I've tried all sorts of other ways of doing it, such as
    <!DOCTYPE taglib SYSTEM "web-jsptaglibrary_1_1.dtd">
    but even then it won't work because I get an error message saying:
    XML parsing error on file /assets/../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    I just don't think I should have to place this file in the bin directory. There has to be another way. Do I need to modify the dtd somehow? Cuz the dtd has the following line...is this messing it up??
    <!ATTLIST taglib id ID #IMPLIED xmlns CDATA #FIXED "web-jsptaglibrary_1_1.dtd">
    I sure could use some help.

  • Customized Tags for Songs

    I am a bit of an organization freak. I have been using J. River Media Center to play songs, but now that I have an iPod, I am disgruntled because when I copy the songs to my iPod, the images do not come over, and half the songs don't play.
    I am trying to use iTunes now, but I cannot seem to figure out how to show custom tags. For example, in Media Center, I invented new tags that did not exist to allow me to categorize my tracks in different ways. I made a Mood tag, a Principal Instrument tag, a How Discovered tag, a Country tag, a Status tag, a Fave tag, etc. iTunes does not seem to have a way to show these tags or allow me to create them. Am I missing something?
    [email protected]

    But why not? It is a no-brainer. Why not provide people with the convenience of creating their own tags? I think I shall stay with Media Center just for this reason.
    I know I can put tags in the Grouping or Comments field, but this is really a visual inconvenience when you have many tags. For example, I have a song that I want to tag with Piano, Norway, Faves and Upbeat for the purpose of creating separate playlists. I know I can set the smart playlist to say, "Grouping contains Piano" or "Grouping contains Faves", but visually this is an inconvenience, and when you have tons of songs you want to categorize in many different ways, it is more convenient to be able to create separate tags entirely.

  • How to create a custom tag for a custom converter

    In Jdeveloper 11g, I have a project where I have created a custom converter class that impements the javax.faces.convert.Converter class. I have registered the converter with an id in the faces-config.xml file of the project, and the converter works fine by using the <f:converter type="myconverter"> tag. However, the custom converter has a field which I would like to set from the tag itself. Hence, I would like to add an attribute to <f:converter> tag if possible or create a custom tag that has the attribute.
    I have done some reserach and I found that a custom tag can be implemented: I need to create a class which extends from the ConverterTag class or javax.faces.webapp.ConverterElTag class, which I did, but I also need to create ".tld" (tag library) file which defines the tag itself.
    The part about creating the ".tld" file and registring the new tag is what I'm not sure how to do.
    Does someone know how to do this?
    thank you

    Hi frank,
    that's a good document, and it explains how to make a custom converter. I already created the custom converter, it converts a number to any currency pattern. I know java already has a currency converter, but it doesn't support Rupee currency format, and I need that format.
    My converter works, but I would like to pass the pattern of the format through an attribute in a tag. Since f:converter doesn't seem to support that, I created a custom tag which uses my converter, and it enables me to pass a pattern to the converter.
    All of that works, but I need to be able to pass the pattern as an EL expression, and it's not evaluating the expression before passing it to the converter. It just passes the whole expression as a string. I'm thinking It may be something I'm doing wrong.
    this is the tag library definition file:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.2</tlib-version>
    <jsp-version>2.1</jsp-version>
    <short-name>custom</short-name>
    <uri>custom-currency-converter</uri>
    <description>
    custom currency custom tag library
    </description>
    <tag>
    <name>CurrencyConverter</name>
    <tag-class>
    converter.Tag.CurrencyConverterTag
    </tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <name>pattern</name>
    <type>java.util.String</type>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Edited by: Abraham Ciokler on Feb 4, 2011 11:20 AM

  • How to use Custom Tags for Theme and Base Map Definitions

    In Mapviewer documentation I've found the following new feature:
    The XML definition of a theme or base map now supports application-specific
    attribute tags. You can use the Custom Tags option in the theme definition in Map
    Builder to specify tags and their values, which can be interpreted by your application
    but are ignored by MapViewer itself.
    I'm able to define a custom tag in Mapbuilder, but how can I use it in my Application?
    Thanks.

    As he said, you have to use as Platform service to create adapter in OIM.
    tcUserOperationsIntf service = Platform.getService(Thor.API.Operations.tcUserOperationsIntf.class);
    HashMap<String,String> searchmap=new HashMap<String,String>();
    searchmap.put("Users.User ID", userID);
    tcResultSet searchset=service.findAllUsers(searchmap);

  • Custom Tag for Logging?

              I would think that there must be a weblogic custom tag that I can use in my jsp
              to access the weblog.log file - but I can't find any info on it. How should I
              be logging from within jsp's?
              Thanks,
              Dave
              

    You can use the NonCatalogLogger class:
              http://e-docs.bea.com/wls/docs61////javadocs/weblogic/logging/NonCatalogLogger.html
              It's pretty easy to wrap this class in a little wrapper class or custom
              tag.
              Hope that helps,
              Nils
              David Finkbeiner wrote:
              >
              > I would think that there must be a weblogic custom tag that I can use in my jsp
              > to access the weblog.log file - but I can't find any info on it. How should I
              > be logging from within jsp's?
              > Thanks,
              > Dave
              ============================
              [email protected]
              

  • Cannot able to see the class in custom tag for WASD4.0

    I am using an simple custom tag to print name
    my .tld file
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>ST</shortname>
    <uri></uri>
    <tag>
    <name>sortTag</name>
    <tagclass>com.abcea.pos.jspTags.sort.SortTag </tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and my tag class
    package com.abcea.pos.jspTags.sort;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class SortTag extends TagSupport {
         String Name="Hai";
    public int doStartTag() throws JspException {
              return EVAL_BODY_INCLUDE;
    public int doEndTag() throws JspException {
         try {
              pageContext.getOut().write("Hello Name:praveen");
         } catch (IOException e) {
    return     EVAL_PAGE;
    I am getting an error
    JSPG0058E: Unable to load class com.abcea.pos.jspTags.sort.SortTag : org.apache.jasper.JasperException: JSPG0058E: Unable to load class com.abcea.pos.jspTags.sort.SortTag
    You guys might have came across this error ,
    please help me in solving this.

    yap!
    I could see the compiled class in WEB-INF/classes/com/abcea/pos/jspTags/sort/SortTag.class
    in jsp i am calling
    <%@taglib uri="/WEB-INF/lib/SortTag.tld" prefix="ST"%>
    <ST:sortTag/>
    in web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app id="WebApp">
         <display-name>POSWeb</display-name>
         <servlet>
              <servlet-name>LogoutServlet</servlet-name>
              <display-name>LogoutServlet</display-name>
              <servlet-class>com.abcea.pos.role.servlet.LogoutServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>LogoutServlet</servlet-name>
              <url-pattern>/Logout</url-pattern>
         </servlet-mapping>
         <taglib>
    <taglib-uri>/WEB-INF/lib/SortTag.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/SortTag.tld</taglib-location>
    </taglib>
    </web-app>
    I don't know what i am skipping?

  • Custom tag for selecting BW images

    I wish LR had a filter button to select the images converted to grayscale via Treatment command or 'V' button. For now I have to flag 'em either by star rating (and keep in mind not to do that with color photos) or color tagging.

    >ps Do you also have to use such a user name? I'm sure you're a perfectly nice bloke but take an instant dislike to your virtual self for parading such beliefs in this forum. It would be great if you could have a neutral user name.
    Also it might avoid OT, and in appropriate comments form other users, such as the one with 666 in his user name.
    Any long time reader here knows I like a bit of frivolity in the forum, myself, but this seems beyond that.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    See LR Links list at my
    Blog for related sites.

  • Custom tag for backup

    hello!
    i have a question regarding the tag flag in rman. is it possible to create a tag that looks like weekly_2009_46 (46 is the week of the year)? if i use the command
    backup as compressed backupset tag=weekly_YYYY_WW database;
    the tag is weekly_YYYY_WW, but should be weekly_2009_46.
    any ideas? thx!
    best regards,
    christian

    If it is required to have the week component in the TAG, then you could use the following process to capture that and pass it to the rman commands:
    E:\>type yw.sql
    set pages 0
    select to_char(sysdate, 'yyyy_iw') from dual;
    exit
    E:\>type yw.cmd
    @echo off
    for /f %%i in ('sqlplus -s / as sysdba @yw.sql') do @set yw=%%i
    echo backup datafile 4 tag 'weekly_%yw%';
    exit
    ) | rman target /
    E:\>yw
    Recovery Manager: Release 10.2.0.4.0 - Production on Fri Nov 13 11:20:45 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: ORA10G (DBID=4021649597)
    RMAN>
    Starting backup at 13-NOV-09
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=146 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00004 name=E:\ORACLE\ORADATA\ORA10G\USERS01.DBF
    channel ORA_DISK_1: starting piece 1 at 13-NOV-09
    channel ORA_DISK_1: finished piece 1 at 13-NOV-09
    piece handle=E:\ORACLE\FLASH_RECOVERY_AREA\ORA10G\BACKUPSET\2009_11_13\O1_MF_NNNDF_WEEKLY_2009_46_5HV1V7TK_.BKP tag=WEEK
    LY_2009_46 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 13-NOV-09
    RMAN>
    Recovery Manager complete.
    E:\>rman target /
    Recovery Manager: Release 10.2.0.4.0 - Production on Fri Nov 13 11:21:03 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: ORA10G (DBID=4021649597)
    RMAN> list backup summary;
    using target database control file instead of recovery catalog
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    3       B  F  A DISK        13-NOV-09       1       1       NO         WEEKLY_2009_46
    RMAN> exit
    Recovery Manager complete.

  • Query reg adding custom tags in SOAP Header - AXIS Receiver Adapter

    Hi All,
    I need to send custom tags as mentioned below to my traget webservice application. I think I can do this with Receiver AXIS adapter but not sure how it can be done. Can any of you suggest?
                                                  <WSContext>
                   <FromAppId>ABC</FromAppId>
                   <ToAppId>XYZ</ToAppId>
              </WSContext>
    Thanks,

    If you want to add custom tags in the soap header, one possible solution is use XSLT mapping or Java mapping to create header first then do message mapping for mapping the payload structure between your source and target  as usual.
    So in operation mapping you sequence mapping like this... first XSLT mapping for custom tags for the SOAP Header followed by payload mapping.
    Hope that helps.
    Search SDN for XSLT Mapping for soap header. Already we have handled these issues.

  • Custom tag or javascript

    I have few JSP pages with input fields.
    I want to do vaildation for these input fields. (check if empty and popup message) Approach to do the same are:1.Define javascript and include the .js in all the JSPOR 2. Define custom tag for form and use it in all JSP when the <myform:> tag is used,this custom tag will add javascript function in JSP to check the fields in form I am not sure which approach is better.Suggestions are welcome.Thanks

    Javascript can be disabled.
    Whatever approach you use, back it up with validation on the server-side.

  • Custom tag lib with output parameter

    Hi,
    I need a tag libray that gives me a specific element of a Vector.
    Here there is the line I have in my jsp.
    <ct:partizione tronco="${contenitoreCentralineTronco}" indice="index" partizione="tmpPartizione"/>
    ...-contenitoreCentralineTronco is an Object that contains a Vector of other specif objects.
    -indice is the vector index of the specif instance I need.
    -partizione should be the output instance.
    This is part of my tld file:
        <tag>
             <name>partizione</name>
            <tagclass>ss.aspi.classi.centraline.grafica.tagSupport.Partizione</tagclass>
            <bodycontent>empty</bodycontent>
            <info>Estrae una partizione da un vettore di partizioni dato l'indice</info>
            <attribute>
                <name>tronco</name>
                <required>true</required>
                <rtexprvalue>true</rtexprvalue>
            </attribute>
            <attribute>
                <name>indice</name>
                <required>true</required>
            </attribute>
            <attribute>
                <name>partizione</name>
                <required>false</required>
            </attribute>
         </tag>
    ...this is part of the class called by the tag:
         private ContenitoreTroncoBean tronco;
         private Integer indice;
         private ContenitorePartizioneBean partizione;
         public int doStartTag() throws JspException {
              try {
                   Vector<ContenitorePartizioneBean> partizioni = tronco.getPartizioniBean();
                   partizione = partizioni.get(indice);
              }catch (Exception e) {
                   log.error("Errore nell'estrazione della Partizione "+indice);
                   e.printStackTrace();
              return TagSupport.SKIP_BODY;
         //All getter and setter functionsWhen I run the application I get this exception:
    jsp.error.beans.property.conversion
    looking deeper in the class code jenerated from the jsp, I noted that the problem refers to the third attribute of the tag <ct:partizione>.
    It seems It trys to set the attribute "partizione" with the value "tmpPartizione", but partizioni should be an output attribut non input. The varible tmpPartizione doesn't exist... the tag should create it.
    I realized I didn't get how I should create a tag with output parameters.
    Anyone can explane me it?
    Thanks.

    One suggestion: Take a closer look at the EL (expression language)
    It has an excellent syntax for accessing collections/maps
    ${contenitoreCentralineTronco[index]} would exactly what you want, without having to write a custom tag for it.
    If you REALLY want to do this as a custom tag, then you need to treat the input attribute as a String (the name of the variable you are going to create?) Right now your tag declares the attribute partizione as being of type ContenitorePartizioneBean which is probably the cause of the problem - you are passing it a String.
    Cheers,
    evnafets

Maybe you are looking for

  • How can i use a picture as a wallpaper without being zoomed in ?

    Ok this is the problem before iOS 7 was released my wallpaper looks weird Meaning . I had a picture of my daughter and the picture was perfectly adjusted To fit the screen . Well when I updated to the iOS 7 software it zoomed in and it's not Adjusted

  • Webdynpro Component in Guided Procedures

    Hi Experts, I am very new to guided procedures, please help me out. Scenario: One Webdynpro Component with few input fields and btn, btn action saves the data in custom db tables. But, i need to mail the filled form to some approver and from there, i

  • IPad air charger not working?

    Bought on Friday, it's now Sunday evening,... Went to recharge the ipad Air with the original 12w plug and no sign of charging? Tried  the 10w ipad 2 plug with the new lighting cable and no sign of charging. Tried the same cable in ancient iPod Class

  • Has anyone got the calendar and contact sync with MS Outlook to work?

    Office Version:Office 2007Operating System:Windows 7 I've used Outlook for several years. I use the Outlook Connector to link to my hotmail account for mail and Outlook's functionality for contact and calendaring. Recently my appointments seem to hav

  • No of print labels based on Product (printing of shopfloor paper)

    Requirement is to print labels during the confirmation of production orders. Number of print labels is determined based on the Finished Good product. For example Finished Good A --> 1 print label for production order confirmation of 1 unit Finished G