You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christian Barth <ch...@buerobarth.de> on 2006/01/11 17:48:52 UTC

XSP - What wrong??

Hi! I get an Error, that "merkmal2" cannot be resolved. Why?

<xsp:logic>
	Set keys = gewichte.keySet();
	Iterator key_iter = keys.iterator();
	int index = 0;
	while (key_iter.hasNext()) {
		String merkmal = (String) key_iter.next();
		index++;
		<zeile>
			<spalte>
				<feld typ="text" weite="25%" >
					<xsp:attribute
name="value"><xsp:expr>gewichte.get(merkmal)</xsp:expr></xsp:attribute>
					<xsp:attribute
name="name"><xsp:expr>merkmal</xsp:expr></xsp:attribute>		
					<xsp:attribute
name="beschreibung"><xsp:expr>merkmal</xsp:expr></xsp:attribute>
				</feld>
			</spalte>
		if (key_iter.hasNext()) {
			String merkmal2 = (String) key_iter.next();
			<spalte>
				<feld typ="text" weite="25%" >
					<xsp:attribute
name="value"><xsp:expr>gewichte.get(merkmal2)</xsp:expr></xsp:attribute>
					<xsp:attribute
name="name"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>		
					<xsp:attribute
name="beschreibung"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>
				</feld>
			</spalte>
		}
		</zeile>	
	}
</xsp:logic>	


Greets, Barthi
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


AW: XSP - What wrong??

Posted by Christian Barth <ch...@buerobarth.de>.
It's already solved. Thank you.
It needed another <xsp:logic>-Tag surrounding the second if-Clause.

Barthi

> -----Ursprüngliche Nachricht-----
> Von: Lars Huttar [mailto:lars_huttar@sil.org]
> Gesendet: Freitag, 13. Januar 2006 17:17
> An: users@cocoon.apache.org
> Betreff: Re: XSP - What wrong??
> 
> Did you already figure out the fix to this problem?
> Looking at your code, it seems to me that merkmal2 is defined in every
> context where it's accessed. Maybe if you look at the full generated
> Java code for this XSP page, you can determine why it cannot be resolved.
> 
> The generated Java code is usually in a place like
> C:\Program Files\Apache Group\Tomcat
> 5.5\work\Catalina\localhost\_\cocoon-
> files\org\apache\cocoon\www\mount\gem\error_xsp.java
> (for an xsp page at cocoon\build\webapp\mount\gem\error.xsp).
> 
> Regards,
> Lars
> 
> Christian Barth wrote:
> > Hi! I get an Error, that "merkmal2" cannot be resolved. Why?
> >
> > <xsp:logic>
> > 	Set keys = gewichte.keySet();
> > 	Iterator key_iter = keys.iterator();
> > 	int index = 0;
> > 	while (key_iter.hasNext()) {
> > 		String merkmal = (String) key_iter.next();
> > 		index++;
> > 		<zeile>
> > 			<spalte>
> > 				<feld typ="text" weite="25%" >
> > 					<xsp:attribute
> > name="value"><xsp:expr>gewichte.get(merkmal)</xsp:expr></xsp:attribute>
> > 					<xsp:attribute
> > name="name"><xsp:expr>merkmal</xsp:expr></xsp:attribute>
> > 					<xsp:attribute
> > name="beschreibung"><xsp:expr>merkmal</xsp:expr></xsp:attribute>
> > 				</feld>
> > 			</spalte>
> > 		if (key_iter.hasNext()) {
> > 			String merkmal2 = (String) key_iter.next();
> > 			<spalte>
> > 				<feld typ="text" weite="25%" >
> > 					<xsp:attribute
> > name="value"><xsp:expr>gewichte.get(merkmal2)</xsp:expr></xsp:attribute>
> > 					<xsp:attribute
> > name="name"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>
> > 					<xsp:attribute
> > name="beschreibung"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>
> > 				</feld>
> > 			</spalte>
> > 		}
> > 		</zeile>
> > 	}
> > </xsp:logic>
> >
> >
> > Greets, Barthi
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSP - What wrong??

Posted by Lars Huttar <la...@sil.org>.
Did you already figure out the fix to this problem?
Looking at your code, it seems to me that merkmal2 is defined in every 
context where it's accessed. Maybe if you look at the full generated 
Java code for this XSP page, you can determine why it cannot be resolved.

The generated Java code is usually in a place like
C:\Program Files\Apache Group\Tomcat 
5.5\work\Catalina\localhost\_\cocoon-files\org\apache\cocoon\www\mount\gem\error_xsp.java
(for an xsp page at cocoon\build\webapp\mount\gem\error.xsp).

Regards,
Lars

Christian Barth wrote:
> Hi! I get an Error, that "merkmal2" cannot be resolved. Why?
>
> <xsp:logic>
> 	Set keys = gewichte.keySet();
> 	Iterator key_iter = keys.iterator();
> 	int index = 0;
> 	while (key_iter.hasNext()) {
> 		String merkmal = (String) key_iter.next();
> 		index++;
> 		<zeile>
> 			<spalte>
> 				<feld typ="text" weite="25%" >
> 					<xsp:attribute
> name="value"><xsp:expr>gewichte.get(merkmal)</xsp:expr></xsp:attribute>
> 					<xsp:attribute
> name="name"><xsp:expr>merkmal</xsp:expr></xsp:attribute>		
> 					<xsp:attribute
> name="beschreibung"><xsp:expr>merkmal</xsp:expr></xsp:attribute>
> 				</feld>
> 			</spalte>
> 		if (key_iter.hasNext()) {
> 			String merkmal2 = (String) key_iter.next();
> 			<spalte>
> 				<feld typ="text" weite="25%" >
> 					<xsp:attribute
> name="value"><xsp:expr>gewichte.get(merkmal2)</xsp:expr></xsp:attribute>
> 					<xsp:attribute
> name="name"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>		
> 					<xsp:attribute
> name="beschreibung"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>
> 				</feld>
> 			</spalte>
> 		}
> 		</zeile>	
> 	}
> </xsp:logic>	
>
>
> Greets, Barthi
>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org