Andreas

Yes, the Java code generated does not seem to reflect
my *intent* in the XSP (see below) ie. the attributes 
have  been moved outside of the "if" test for some reason
- any ideas how to create a more appropriate code set??

<!-- generated code snippet -->

    xspAttr.addAttribute(
      "",
      "label",
      "label",
      "CDATA",
      String.valueOf(fGraphPtLabel)
    );
  
    xspAttr.addAttribute(
      "",
      "rotate",
      "rotate",
      "CDATA",
      "14"
    );
  
    xspAttr.addAttribute(
      "",
      "rotate",
      "rotate",
      "CDATA",
      "1"
    );
  
    this.contentHandler.startElement(
      "",
      "labels",
      "labels",
      xspAttr
    );
    xspAttr.clear();
   
        this.characters("\n \n      ");    
        this.characters("\n      \n      ");
      
      if ((fGraphPtLabel != null) && (fGraphPtLabel.equals("name"))) {                 
   
        this.characters("\n        ");      
        this.characters("\n      ");      
      } else {      
        this.characters("\n        ");    
        this.characters("\n      ");      
      }

<!-- generated code -->

>>> [EMAIL PROTECTED] 11/06/2003 10:00:53 >>>
Hi Derek,

Derek Hohls wrote:

> Hi
> 
> Can someone explain what is wrong with
> the following code:
> 
>       <labels show="true">
>  
>       <xsp:attribute name="label"><xsp:expr>fGraphPtLabel</xsp:expr></xsp:attribute>
>       
>       <xsp:logic>
>       if ((fGraphPtLabel != null) &amp;&amp; (fGraphPtLabel.equals("name"))) {       
>        
>       </xsp:logic>
>         <xsp:attribute name="rotate">14</xsp:attribute>
>       <xsp:logic>
>       } else {
>       </xsp:logic>
>         <xsp:attribute name="rotate">1</xsp:attribute>
>       <xsp:logic>
>       }
>       </xsp:logic> 
> 
> Gives an output of:
> 
>   <labels show="true" label="null" rotate="14" rotate="1">
> 
> ie. if the fGraphPtLabel is null, the rotate should be equal to 1
> and not 14 as well?!

it seems that your java code is not interpreted as such, and
the if condition is not added to the Java code ...
At a first glance it looks OK - did you take a look at the
generated Java source?

Andreas



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



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.


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

Reply via email to