Method attribute with af:declarativeComponent tag ?

Is it possible to use a method attribute when using a declarative component with the af:declarativeComponent tag? (v11.1.1.1.0)
In my jsff, I have defined a method attribute like:
<method-attribute>
    <attribute-name>fileAttached</attribute-name>
    <method-signature>void fileAttached(javax.faces.event.ValueChangeEvent)</method-signature>
    <required>true</required>
</method-attribute>and in my jspx page I'm adding the component like:
<af:declarativeComponent id="dc1"
                         viewId="components/attachments.jsff"
                         fileAttached="#{MyBackingBean.fileAttached}"/>However I get the following exception (ADF is looking for an property, even though i've defined this as a method attribute):
javax.el.PropertyNotFoundException: The class 'com.xxx.MyBackingBean' does not have the property 'fileAttached'.
     at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
     at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
     at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
     at com.sun.el.parser.AstValue.getValue(AstValue.java:118)
     at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
     at oracle.jsp.runtime.OracleUnifiedELRuntime.evaluateValueExpression(OracleUnifiedELRuntime.java:158)
     at oracle.jsp.parse.JspUtils.ExprValue(JspUtils.java:2348)Does the af:declarativeComponent tag support this, or do I have to go through the whole process of:
- define declarative component and new taglib
- generate ADF library jar
- add library jar to project
- import taglib and use tag in my page
to use method attributes?

Yes, I've tried a few different methods here and the signature is definitely correct.
As far as I can tell, when I use the af:declarativeComponent tag, the <component-extension> section of the component is ignored completely. For example, I can have a method-attribute in the <component-extension> extension that is set to required=true, however when if I omit this attribute, the renderer doesn't complain. If I include the attribute (refer to a method) then I get the above exception, because the expression evaluator just wants to evaluate it as a property, regardless of what the <component-extension> inside the jsff says.
Frank, is your example definitely using the af:declarativeComponent tag? I am not creating an ADF library jar and taglib to contain my declarative component - are you?

Similar Messages

  • How to call a method repeatedly with JSP custom tag?

    This senerio is very similar to the usage of StringBuffer.
    I have a problem which can be solved easily with scriptlets:
    <% NameValuePair nvp = new NameValuePair(request.getQueryString()); %>
    <a href="foo.html?<%=nvp.add(name1", "value1").add("name2", "value2").toString();%">">Foo</a>
    <a href="bar.html?<%=new NameValuePair(request.getQueryString()).add("x", 1).add("y", 2).toString()%>">Bar</a>
    But I cannot use scriplets because it's turned off. I can only use jsp custom tag / jstl. How would I implement this functionality with a custom tag? How would the JSP code look like? Our container supports JSP 2.0.
    Thanks.</a>

    hi,
    you can do within 2 step-
    1) use <%@page import="your_java_class"%>
    2)use scriptlet code <%...%> and write coding in this tag.
    means create instance of your java class .
    <% your_java_class obj1=new your_java_class();
         obj1.method_of_your_java_class();
    %>or
    3) you can make javabean to use method of java class.[Best option]
    Thanx
    Ranvijay

  • Why isn't possible to have ID attribute with a root tag

    Hi ,
    Why is it not possible to have a id associated with a Root tag ??
    Thanks in advance.

    CustomClass.mxml
    <Canvas id="i_got_a_root_tag_id" >
    </Canvas>
    Now remember , the id is declared when we declare the class right so even though we don't specify the id in the Application.mxml class , it is a property of the CustomClass.
    Main.mxml
    <Application>
      <CustomClass />
      <CustomClass />
       <Script>
         public function somethingFunction():void
            i_got_a_root_tag_id.addEventListener(Do.SomethingEvent , handleEvent);
    So in the previous example , which instance gets the listener added to it ?  See how root id tags hurt everyone everywhere ?
    If this post was helpful please mark it as such.
    Sincerely ,
      Ubu

  • How to set an attribute of a HTML tag with a value in the Servlet

    I have a HTML page and a Servlet.
    The HTML page sends a request to the Servlet.
    The Servlet has to read the contents of the HTML page. When the Servlet encounters the body tag it should set the bgcolor attribute of the body tag with a string(For eg.a string called color with a value blue) in the servlet.
    After doing this the Servlet has to update the original HTML page with the changes (in the body tag).
    I need a help on this.

    Hi sangee,
    you could get what you want to do by using a Java Server Page instead of both a HTML page and a Servlet.
    I should code something like this:
    <%Strung color="yourColor"%>
    <html><head><title></title></head>
    <body bgcolor="<%=color%>
    </body>
    </html>

  • Topic: Incorrect Tag:Multiple Attributes with Same Collection Type

    I have an Object Type that contains multiple attributes with the same collection type. When I use OracleXML getXML to generate xml, the tag for all elements created for any of the matching types is the tag for the 1st of the similar attributes.
    work_t_v is an object view of a relational schema
    SQL> desc work_t_v
    Name Null? Type
    WORK_ID NUMBER(38)
    TITLE_OF_WORK VARCHAR2(512)
    MESH_HEADINGS MESH_HEADINGS_T
    AUTHORS AUTHORS_T
    COMMENT_ON WORK_REFERENCES_T
    COMMENT_IN WORK_REFERENCES_T
    ERRATUM_IN WORK_REFERENCES_T
    REPUBLISHED_FROM WORK_REFERENCES_T
    REPUBLISHED_IN WORK_REFERENCES_T
    SQL> desc work_references_t
    work_references_t TABLE OF WORK_REFERENCE_T
    Name Null? Type
    REFSOURCE VARCHAR2(255)
    NOTE VARCHAR2(255)select
    work.work_id,
    work.title_of_work,
    work.comment_on comment_on,
    work.comment_in comment_in,
    work.erratum_in erratum_in,
    work.republished_from republished_from,
    work.republished_in republished_in
    from work_t_v work
    where work_id = 99350984
    results in tag of <comment_on> for all the elements built from the work_references_t type (i.e., there are no <comment_in>, <erratum_in>, <republished_from> or <republished_in> elements)
    sample result is:
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [CommentOn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [CommentIn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [ErratumIn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [RepublishedFrom]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [RepublishedIn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    The above xml should be:
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [CommentOn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_IN>
    <COMMENT_IN_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [CommentIn]</REFSOURCE>
    </COMMENT_IN_ITEM>
    </ERRATUM_IN>
    <COMMENT_ON>
    <ERRATUM_IN_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [ErratumIn]</REFSOURCE>
    </ERRATUM_IN_ITEM>
    </ERRATUM_IN>
    <REPUBLISHED_FROM>
    <REPUBLISHED_FROM_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [RepublishedFrom]</REFSOURCE>
    </REPUBLISHED_FROM_ITEM>
    </REPUBLISHED_FROM>
    <REPUBLISHED_IN>
    <REPUBLISHED_IN_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601 [RepublishedIn]</REFSOURCE>
    </REPUBLISHED_IN_ITEM>
    </REPUBLISHED_IN>bracketed portion [] is contained within the refsource string to indicate what type of reference it should be displayed as.
    I also found that if I use the -withDTD parameter to include the dtd, the dtd includes the appropriate elements (comment_in, erratum_in, republished_from and republished_in). However, it incorrectly defines refsource and note multiple times (once for each WORK_REFERENCES_T attribute).
    Are these known problems? Will they be fixed? I'm more concerned about the XML problem than the DTD problem.
    Thanks! -- John Butler
    null

    Using the version of XML SQL Utility that comes with the next XSQL Servlet release 0.9.8.6 I did the following:
    create type foo as object (a number);
    create type foolist as table of foo;
    create view fooview
    as select
    cast(multiset(
    select sal from emp where rownum < 2)
    as foolist) list1,
    cast(multiset(
    select sal from emp where rownum < 2)
    as foolist) list2
    from dual;
    When I request a "SELECT * FROM FOOVIEW"
    through getXML I get:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW num="1">
    <LIST1>
    <LIST1_ITEM>
    <A>800</A>
    </LIST1_ITEM>
    </LIST1>
    <LIST2>
    <LIST2_ITEM>
    <A>800</A>
    </LIST2_ITEM>
    </LIST2>
    </ROW>
    </ROWSET>
    So this appears fixed in the next code drop.
    In the interim, I'll email you the new JAR file until (since it won't be on OTN for a few more days).
    null

  • Incorrect Tag:Multiple Attributes with Same Collection Type

    I have an Object Type that contains multiple attributes with the
    same collection type. When I use OracleXML getXML to generate
    xml, the tag for all elements created for any of the matching
    types is the tag for the 1st of the similar attributes.
    work_t_v is an object view of a relational schema
    SQL> desc work_t_v
    Name Null? Type
    WORK_ID NUMBER(38)
    TITLE_OF_WORK VARCHAR2(512)
    MESH_HEADINGS MESH_HEADINGS_T
    AUTHORS AUTHORS_T
    COMMENT_ON WORK_REFERENCES_T
    COMMENT_IN WORK_REFERENCES_T
    ERRATUM_IN WORK_REFERENCES_T
    REPUBLISHED_FROM WORK_REFERENCES_T
    REPUBLISHED_IN WORK_REFERENCES_T
    SQL> desc work_references_t
    work_references_t TABLE OF WORK_REFERENCE_T
    Name Null? Type
    REFSOURCE VARCHAR2(255)
    NOTE VARCHAR2(255)
    select
    work.work_id,
    work.title_of_work,
    work.comment_on comment_on,
    work.comment_in comment_in,
    work.erratum_in erratum_in,
    work.republished_from republished_from,
    work.republished_in republished_in
    from work_t_v work
    where work_id = 99350984
    results in tag of <comment_on> for all the elements built from
    the work_references_t type (i.e., there are no <comment_in>,
    <erratum_in>, <republished_from> or <republished_in> elements)
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601
    [CommentOn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601
    [CommentIn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601
    [ErratumIn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601
    [RepublishedFrom]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    <COMMENT_ON>
    <COMMENT_ON_ITEM>
    <REFSOURCE>J Infect Dis 1998 Aug;178(2):601
    [RepublishedIn]</REFSOURCE>
    </COMMENT_ON_ITEM>
    </COMMENT_ON>
    bracketed portion [] is contained within the refsource string to
    indicate what type of reference it should be displayed as.
    I also found that if I use the -withDTD parameter to include the
    dtd, the dtd includes the appropriate elements (comment_in,
    erratum_in, republished_from and republished_in). However, it
    incorrectly defines refsource and note multiple times (once for
    each WORK_REFERENCES_T attribute).
    Are these known problems? Will they be fixed? I'm more
    concerned about the XML problem than the DTD problem.
    Thanks! -- John Butler
    null

    Using the version of XML SQL Utility that comes with the next XSQL Servlet release 0.9.8.6 I did the following:
    create type foo as object (a number);
    create type foolist as table of foo;
    create view fooview
    as select
    cast(multiset(
    select sal from emp where rownum < 2)
    as foolist) list1,
    cast(multiset(
    select sal from emp where rownum < 2)
    as foolist) list2
    from dual;
    When I request a "SELECT * FROM FOOVIEW"
    through getXML I get:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW num="1">
    <LIST1>
    <LIST1_ITEM>
    <A>800</A>
    </LIST1_ITEM>
    </LIST1>
    <LIST2>
    <LIST2_ITEM>
    <A>800</A>
    </LIST2_ITEM>
    </LIST2>
    </ROW>
    </ROWSET>
    So this appears fixed in the next code drop.
    In the interim, I'll email you the new JAR file until (since it won't be on OTN for a few more days).
    null

  • Object would have more then one attribute with the tag :VALUE

    I'm creating a new component in Ultiboard - a 100 pin connector.  This connector (Hirose) has 4 rows of 25 pins. Alternate rows are staggered. I'm trying to name each pin with it's appropiate name: A1, A2, A3 ....A50. Then B1, B2, B3 .....B50.
    When I change the VALUE or NUMBER attribute, I get the DRC error  message:
    This action cannot be completed because the resulting Object would have more then one attribute with the tag :VALUE
    Please remove one of the attributes and try again.
    Okay, so I've tried deleting the tag and now I can't name the pin at all. 
    What am I missing?

    You should be in the footprint editor to edit the pin name.  Select tools>>Database>>Database Manager, highlight the component in your database and click on the Edit icon.  In the footprint editor, double click on the pad and a SMT or THT pin Properties dialog appears, select the Attributes tab and highlight the Number row, press the change button and you should be able to change the pin name.   
    Tien P.
    National Instruments

  • Info attribute in jsp page tag

    Is anybody else experiencing a problem with the info attribute in the page
              tag? None of my pages with the info attribute will compile. Every one
              generates a 'Duplicate method declaration/definition' error because the
              Weblogic JSP compiler is generating two 'getServletInfo' methods if the
              attribute is included. If I take the info attribute out they compile fine.
              Here's a sample tag:
              <%@ page info="myfile.jsp (c) 2000, InvoiceLink Corporation. All Rights
              Reserved."
              import="java.util.*,com.invoicelink.invoicer.util.*,java.text.*,
              com.invoicelink.invoicer.data.*"
              errorPage="./ErrorPage.jsp"
              contentType="text/html; charset=ISO-8859-1"
              buffer="8kb" autoFlush="true"
              isThreadSafe="true"
              %>
              Randall Rupp
              BCE Emergis (formerly InvoiceLink Corp.)
              [email protected]
              

    I should note that this is with wl5.1.0 sp6:
              Randall Rupp <[email protected]> wrote in message
              news:39ed9f50$[email protected]..
              > Is anybody else experiencing a problem with the info attribute in the page
              > tag? None of my pages with the info attribute will compile. Every one
              > generates a 'Duplicate method declaration/definition' error because the
              > Weblogic JSP compiler is generating two 'getServletInfo' methods if the
              > attribute is included. If I take the info attribute out they compile
              fine.
              >
              > Here's a sample tag:
              >
              > <%@ page info="myfile.jsp (c) 2000, InvoiceLink Corporation. All Rights
              > Reserved."
              > import="java.util.*,com.invoicelink.invoicer.util.*,java.text.*,
              > com.invoicelink.invoicer.data.*"
              > errorPage="./ErrorPage.jsp"
              > contentType="text/html; charset=ISO-8859-1"
              > buffer="8kb" autoFlush="true"
              > isThreadSafe="true"
              > %>
              >
              > Randall Rupp
              > BCE Emergis (formerly InvoiceLink Corp.)
              > [email protected]
              >
              >
              >
              

  • Error: Attribute binding invalid for tag ganttChart according to TLD

    Hi,
    I am experimenting with writing my first custom tag and getting the stack trace:
    org.apache.jasper.JasperException: /GanttFaces.jsp(18,3) Attribute binding invalid for tag ganttChart according to TLD
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:234)
         org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:989)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
    when using a binding with my custom tag:
    <jg:ganttChart binding="#{ganttFaces.ganttChart}" id="gantt1" .... >
    The error message reads as if I have to make special considerations in the TLD file to enable binding, but I can't find anything about that. Thats how my tld file looks:
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>JGantt</shortname>
    <uri>http://netronic.de/jgantt/taglibJSF</uri>
    <info>My tag library </info>
    <tag>
    <name>ganttChart</name>
    <tagclass>de.netronic.jgantt.server.jsf.JGanttChartTag</tagclass>
    <info>The chart</info>
    <attribute>
         <name>id</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Any idea what I am missing?
    Udo

    In your TLD, I do not see any binding attribute! you ahe to define it
    <attribute>
    <name>binding</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    Afterwards, you should create the setter method in your tag class: setBinding(String binding)

  • Rendering A JPEG image with a custom tag

    Hi All,
    I have dilema. I'm trying to rendering a jpeg in IE/FireFox with a custom tag that I developed. I'm able to access the bean and invoke the getter method to return the InputStream property. But what gets rendered is the byte code not the image. I've tried just about anything I could think off. If any body has an answer I would difinitely appreciate it.
    Thanks,
    Tony
    Below is the jsp, tld, bean and tag.
    ********************************* image.jsp ****************************************
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ taglib uri="/WEB-INF/custom-chtml.tld" prefix="chtml" %>
    <html>
    <head>
    <title>HTML Page</title>
    </head>
    <body bgcolor="#FFFFFF">
    <chtml:img name="photo" property="file"/>
    </body>
    </html>
    ********************************* custom-chtml.tld **********************************
    <?xml version="1.0" encoding="UTF-8"?>
    <!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>chtml</shortname>
    <tag>
    <name>img</name>
    <tagclass>com.struts.taglib.CustomImgTag</tagclass>
    <bodycontent>empty</bodycontent>
    <attribute>
    <name>name</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>property</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    **************************** MemberPhotoBean.java ******************************
    import java.io.InputStream;
    * @author tony
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class MemberPhotoValue {
         private String memberId;
         private int fileSize;
         private InputStream file;
         public MemberPhotoValue() {
         public MemberPhotoValue(String memberId, InputStream file) {
              this.memberId = memberId;
              this.file = file;
         public MemberPhotoValue(String memberId,int fileSize,InputStream file) {
              this.memberId = memberId;
              this.fileSize = fileSize;
              this.file = file;          
         public String getMemberId(){
              return memberId;
         public void setMemberId(String memberId) {
              this.memberId = memberId;
         public int getFileSize() {
              return fileSize;
         public void setFileSize(int fileSize) {
              this.fileSize = fileSize;
         public InputStream getFile(){
              return file;
         public void setFile(InputStream file) {
              this.file = file;
    *************************** CustomTagHandler.java ********************************
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.servlet.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import java.lang.reflect.Method;
    import java.lang.reflect.InvocationTargetException;
    import java.awt.image.*;
    import java.awt.*;
    import javax.swing.ImageIcon;
    import com.sun.image.codec.jpeg.*;
    * JSP Tag Handler class
    * @jsp.tag name = "CustomImg"
    * display-name = "Name for CustomImg"
    * description = "Description for CustomImg"
    * body-content = "empty"
    public class CustomImgTag implements Tag {
         private PageContext pageContext;
         private Tag parent;
         private String property;
         private String name;
         private Class bean;
         public int doStartTag() throws JspException {
              return SKIP_BODY;
         public int doEndTag() throws JspException {
         try {
         ServletResponse response = pageContext.getResponse();
         // read in the image from the bean
         InputStream stream = (InputStream) invokeBeanMethod();
         BufferedImage image = ImageIO.read(stream);          Image inImage = new ImageIcon(image).getImage();
         Graphics2D g = image.createGraphics();
         g.drawImage(inImage,null,null);               
         OutputStream out = response.getOutputStream();
    // JPEG-encode the image
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    encoder.encode(image);               
         out.close();     
    } catch (IOException io) {
              throw new JspException(io.getMessage());
         return EVAL_PAGE;
         public void release(){}
    private InputStream invokeBeanMethod() throws JspException {
         try {
         Object bean = null;
         if (null != pageContext.getAttribute(name)) {
         bean = (Object) pageContext.getAttributename);
         else if (null != pageContext.getSession().getAttribute(name)) {
         bean = (Object) pageContext.getSession().getAttribute(name);
         else if (null != pageContext.getRequest().getAttribute(name)) {
         bean = (Object) pageContext.getRequest().getAttribute(name);
         else {
         throw new JspException("Bean : "+name+" is not found in any pe.");
         Class[] parameters = null;
         Object[] obj = null;               
         Method method = bean.getClass().getMethod("getFile",parameters);
         return (InputStream) method.invoke(bean,obj);
         } catch (NoSuchMethodException ne) {
         throw new JspException("No getter method "+property+" for bean : "+bean);
         } catch (IllegalAccessException ie) {
         throw new JspException(ie.getMessage());
         } catch (InvocationTargetException ie) {
         throw new JspException(ie.toString());
         public void setPageContext(PageContext pageContext) {
              this.pageContext = pageContext;
         public void setParent(Tag parent) {
              this.parent = parent;
         public Tag getParent() {
              return parent;
         public void setProperty(String property) {
              this.property = property;
         public void setName(String name) {
              this.name = name;
    **************************************************************************************

    If you have access to an image editing tool such as photoshop, I would advice you import the image into Phototshop and save it in a different format e.g, GIF format and re-import it into Final Cut Express HD. This could solve your rendering problem if all you need is to use a Still image.
    Ayemenre

  • Please help me with the XML tag reading.

    I have an content.xml with thouthand <table:table-row /> tags.
    How can I read the attributes and values of the tag 150 for example?
    Should I read one tag after the other before I reach 150, or there is a shorter way?
    XML Structure of content.xml as example below.
    In this sample I want to get the row4 and its value D4. Of course I don't know what value have the fourth tag and can't search tag with a value D4. I just know that the Row4 contains the value I need.
    Is there any possibility to read the fourth tag, or I should read from the beginning and increase the counter. If the counter is 4, I should read the value. It seems to me not a good approach, because the files can contain thousands of tags and for each value to go throught the whole xml is resource-intensive.
    <table:table table:name="Sheet1" table:style-
    name="ta1" table:print="false">
    <table:table-column table:style-name="co1" table:
    number-columns-repeated="7" table:default-cell-
    style-name="Default"/>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C1</text:p>
    </table:table-cell>
    <text:p>D1</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C2</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>E2</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C3</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="4"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B4</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>D4</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    <table:table-cell office:value-type="string">
    <text:p>E5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1" table:number-rows-repeated="2">
    <table:table-cell table:number-columns-repeated="7"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell table:number-columns-repeated="4"/>
    <table:table-cell office:value-type="string">
    <text:p>E8</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>G8</text:p>
    </table:table-cell>
    </table:table-row>
    </table:table>

    Thanks for the answer.
    And is there any possibility to get the tag with the value 5. I know that the fifth tag should contain the value I want, in this case 5. But there is an attribute, and if this attribute is not null, then some tags1 can be shifted so that the third tag1 have an attribute tags=2, so I know that there is no the fourth tag and I read the next tag as fifth (with XPath doc/tag[4]).
    Should I read all tags, or there is some other way with the XPath. To search for the first tag with attributes and if its position before the fifth tag, than to decrease the tag-position counter and so on.
    <doc>
    <tag1>1</tag1>
    <tag1>2</tag1>
    <tag1 tags=2>3</tag1>
    <tag1>5</tag1>
    <tag1>6</tag1>
    </doc>Thanks in advance.

  • [JS CS3] Problem with iterating xml tags

    Hello,
    Below is a script that is supposed to find text in a document and then tag it with an xml tag. I have run into a problem, which if I solve in the way I know how, causes another problem.
    When I iterate in a positive direction--i++--the first instance of the text (in this example "abc") is correctly tagged. But the second instance the tag recedes by two characters, that is, tags the three characters prior to the "c." A third instance will recede two more characters, ad nauseam, if my Latin is correct.
    The solution is to iterate backwards, i.e., i--. But this causes another problem. If there is more than one story, then the xml structure reverses the order of the stories. The elements within a story are ordered correctly however.
    So why is this happening and how can I solve it?
    Thanks,
    Tom
    var myDoc = app.activeDocument;
    var findABC = theTextFinder(myDoc,"abc");
    xmlTagIt(myDoc,"abc",UIColors.RED,findABC);
    //*****functions*******
    function xmlTagIt(docRef, tagName,colorOfTag, arrToTag){
        var tagName, colorOfTag,  arrToTag;
        myDoc.xmlViewPreferences.showStructure = true;
        myDoc.xmlViewPreferences.showTaggedFrames =true;
        myDoc.xmlViewPreferences.showTagMarkers = true;
        myDoc.xmlViewPreferences.showTextSnippets =false;
        myDoc.xmlPreferences.defaultStoryTagColor = UIColors.WHITE;
        var rootElement = myDoc.xmlElements.item(0);
        if (myDoc.xmlTags.item(tagName) == null) {
            var tagRef = myDoc.xmlTags.add(tagName, colorOfTag);
      } else {//if tag already exists then stop the script. Avoid double tagging
           myDoc.xmlViewPreferences.showStructure = true;
           alert("You have already run this script.");
           exit();
       }//end else
        //for (var i = arrToTag.length-1; 0 <= i; i--){
        for (var i = 0; i <= arrToTag.length-1;  i++){
            var elementRef = rootElement.xmlElements.add (tagRef,arrToTag[i]);       
         }//end for i
    }//end function xmlTagIt
    function theTextFinder(docRef,textFindIt){//last argument is the string of text to find
        app.findTextPreferences = NothingEnum.NOTHING;
        app.changeTextPreferences = NothingEnum.NOTHING;
        app.findTextPreferences.findWhat = textFindIt;
        var arrTextFindIt = myDoc.findText();
        return arrTextFindIt;
    }//end theTextFinder

    Dave,
    Thanks for the reply.
    I'm not sure what you mean by "convert the references on the fly." You mean find a way to advance two characters forward and tag that? In the script I submitted here I am only searching for "abc," which of course I would not search or at all  in real life. The script uses grep to search for about twenty different typographical errors that typically appear and tags them all.
    Reiterating backwards seems, at first sight the way to go. But I haven't a clue as to how to reverse the order of the stories. I can get an array of stories, and array.reverse() them, but am not sure how to then make the script put this reversed order into the xml structure. Any hints?
    There, of course is bigger problem with the stories. If the document is written with one story created after another then the order of them is top to botom. But if say a text frame edited into the middle of all this, that story is still the last one in the xml structure. At least in one test, that was so. Maybe the way to solve this is to build an array of stories that have as one xml attribute the page it first appears on. Then order the array according to that attribute.
    Any advice you give will be appreciated.
    Thanks,
    Tom

  • Quotes in attributes in a custom tag are failing in weblogic 5.1

    This seems to be on and off behaviour but when my tags are failing I
              have traced it down to the fact that my attributes have quotes in
              them. (By the way I'm running weblogic 5.1 with service pack 10)
              ie:
              <a:foo bar="<%=req.getParemeter("biz")%>">. Escaping the internal
              quotes doesn't seem to help the matter at all.
              After many hours of racking my brain to try and figure out why the
              tags were failing I found a message somewhere in this group which said
              they had the same issue and worked around it by using single qoutes
              around any attribute with a qoute in it ie: <a:foo
              bar='<%=req.getParemeter("biz")%>'>. This work around worked for me as
              well but leaves me with 2 important questions.
              a) According to weblogic this is issue (and I quote from their
              website) "CR 34389: Escaping Quotes was not working in the value tag
              for JSP params; The JSP spec says that quotations (") are to be
              escaped with \" . Fixed quoting problems for double and single quotes.
              " This was supposedly fixed in service pack 9, I'm running service
              pack 10 so what gives???
              b) Since this single qoute thing is not in the JSP spec if I keep it
              like this to get my tags working under my current setup and then we
              eventually migrate to weblogic 6x is there a risk all my tags will
              break?
              

    This seems to be on and off behaviour but when my tags are failing I
              have traced it down to the fact that my attributes have quotes in
              them. (By the way I'm running weblogic 5.1 with service pack 10)
              ie:
              <a:foo bar="<%=req.getParemeter("biz")%>">. Escaping the internal
              quotes doesn't seem to help the matter at all.
              After many hours of racking my brain to try and figure out why the
              tags were failing I found a message somewhere in this group which said
              they had the same issue and worked around it by using single qoutes
              around any attribute with a qoute in it ie: <a:foo
              bar='<%=req.getParemeter("biz")%>'>. This work around worked for me as
              well but leaves me with 2 important questions.
              a) According to weblogic this is issue (and I quote from their
              website) "CR 34389: Escaping Quotes was not working in the value tag
              for JSP params; The JSP spec says that quotations (") are to be
              escaped with \" . Fixed quoting problems for double and single quotes.
              " This was supposedly fixed in service pack 9, I'm running service
              pack 10 so what gives???
              b) Since this single qoute thing is not in the JSP spec if I keep it
              like this to get my tags working under my current setup and then we
              eventually migrate to weblogic 6x is there a risk all my tags will
              break?
              

  • I can load an Applet .class file with an OBJECT tag...

    How can I load a .jar file? I foolishly believed I could replace "myclass.class" with "myjar.jar" in the <PARAM> tag associated with an <OBJECT> tag, and if I had created my manifest file correctly, the Main-Class in my .jar would have its init() method called upon IE load of the web-page. But alas, it is not that simple.
    Is there an incantation of the <OBJECT> tag that is appropriate for .jar files?
    Thanks in advance for any help you can provide in this area.

    Please ignore the duplication. My browser burped, and I can't seem to figure out how to delete a thread.
    See answer posted in other thread.

  • Class as an attribute name in JSP tag file

    I just ran into an issue where I was writing a custom tag to generate a specific set of HTML elements, and wanted to be able to use CSS the same way I had before refactoring it into a tag. So, I included 'class' as an attribute in the custom tag file and deployed.
    On Glassfish v3, this generated a bunch of JasperExceptions in the Javac compilation, complaining about <identifier> expected and reaching the end of file while parsing. I tracked it down, of course, to the use of 'class' as an attribute name, which was reduced to a servlet class defining:
    public String getClass() {
       return this.class;
    public void setClass(String class) {
       this.class = class;
    }I'm curious -- which part of the process messed up here? Is "class" a valid identifier under the Java EE spec, and the translation should have used something like setClass_(String class_)? Or is it invalid, and Netbeans didn't know to mark it as an error before it tried to deploy? (And, of course, that I missed that in the spec, making it my fault.) I couldn't find anything specifically saying that reserved words couldn't be used as JSTL identifiers, so my gut is that the parser messed up. Also, I found a bug report about it for an alternate web container, but no mention of it in the bug trackers for Glassfish, Tomcat or Jasper.
    Where's the blame?

    stdunbar wrote:
    I think that Netbeans messed up. getClass() is, of course, defined on Object and class is a Java keyword.What's to stop the compiler from recognizing that "class" would be a problem and mapping it to an alternate name behind the scenes?
    This is the only documentation I turned up. Maybe this says it's invalid:
    Java EE SpecThe unique name of the attribute being declared. A translation error results if more than one attribute directive appears in the same translation unit with the same name.A translation error results if the value of a name attribute of an attribute directive is equal to the value of the dynamic-attributes attribute of a tag directive or the value of a name-given attribute of a variable directive.

Maybe you are looking for