You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jakob Praher <jp...@yahoo.de> on 2003/02/12 17:51:33 UTC

[XMLForm] xf:itemset how to do it?

hi all,
or shall I say, hi noone?

... hopefully this one will be answered ...

allthough I have done it like in the samples, I have some problems
getting xf:itemset bound to existing values of the model.

here's the story:

class MyBean {
	
	Map allLanguages;
	
	MyBean( ) {
		initAllLanguaes( ) ;
	}
	public initAllLanguages( ) {

		allLanguages = new HashMap ( );
		allLanguages.put( "deu", "German" );
		allLanguages.put( "fin", "Finish" );
		allLanguages.put( "sve", "Swedish" );
		....
	}

	public Set allLanguages( ) {
		return allLangues.entrySet( );
	}
}
<xf:itemset nodeset="/allLanguages">
	<xf:caption ref="value"/>
	<xf:value ref="key"/>
</xf:itemset>

is there anything else which the bindings depend on.
looking at the XMLTransformer, I don't understand JXPath at full detail
right now, so I wanted to ask to save time.

thanks

-- Jakob


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


Re: [XMLForm] xf:itemset how to do it?

Posted by ivelin <iv...@apache.org>.
yes, this should work.


-=Ivelin=-
----- Original Message ----- 
From: "Jakob Praher" <jp...@yahoo.de>
To: <co...@xml.apache.org>
Sent: Wednesday, February 12, 2003 10:51 AM
Subject: [XMLForm] xf:itemset how to do it?


> hi all,
> or shall I say, hi noone?
> 
> ... hopefully this one will be answered ...
> 
> allthough I have done it like in the samples, I have some problems
> getting xf:itemset bound to existing values of the model.
> 
> here's the story:
> 
> class MyBean {
> 
> Map allLanguages;
> 
> MyBean( ) {
> initAllLanguaes( ) ;
> }
> public initAllLanguages( ) {
> 
> allLanguages = new HashMap ( );
> allLanguages.put( "deu", "German" );
> allLanguages.put( "fin", "Finish" );
> allLanguages.put( "sve", "Swedish" );
> ....
> }
> 
> public Set allLanguages( ) {
> return allLangues.entrySet( );
> }
> }
> <xf:itemset nodeset="/allLanguages">
> <xf:caption ref="value"/>
> <xf:value ref="key"/>
> </xf:itemset>
> 
> is there anything else which the bindings depend on.
> looking at the XMLTransformer, I don't understand JXPath at full detail
> right now, so I wanted to ask to save time.
> 
> thanks
> 
> -- Jakob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


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


Re: [XMLForm] xf:itemset how to do it?

Posted by Jakob Praher <jp...@yahoo.de>.
Am Mit, 2003-02-12 um 18.20 schrieb Sylvain Wallez:
> Jakob Praher wrote:
> 
> >hi all,
> >or shall I say, hi noone?
> >
> >... hopefully this one will be answered ...
> >
> >allthough I have done it like in the samples, I have some problems
> >getting xf:itemset bound to existing values of the model.
> >
> >here's the story:
> >
> >class MyBean {
> >	
> >	Map allLanguages;
> >	
> >	MyBean( ) {
> >		initAllLanguaes( ) ;
> >	}
> >	public initAllLanguages( ) {
> >
> >		allLanguages = new HashMap ( );
> >		allLanguages.put( "deu", "German" );
> >		allLanguages.put( "fin", "Finish" );
> >		allLanguages.put( "sve", "Swedish" );
> >		....
> >	}
> >
> >	public Set getAllLanguages( ) {
> >		return allLangues.entrySet( );
> >	}
> >}
> ><xf:itemset nodeset="/allLanguages">
> >	<xf:caption ref="value"/>
> >	<xf:value ref="key"/>
> ></xf:itemset>
> >
> >is there anything else which the bindings depend on.
> >looking at the XMLTransformer, I don't understand JXPath at full detail
> >right now, so I wanted to ask to save time.
> >  

> 
> Shouldn't allLanguages() be named getAllLanguages() in order to be a 
> valid JavaBean property ?
> 
surely, just one of my typos. In my .java file it is calles
getAllLanguages( ), but thanks for the pointer.

> Sylvain


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


Re: [XMLForm] xf:itemset how to do it?

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Jakob Praher wrote:

>hi all,
>or shall I say, hi noone?
>
>... hopefully this one will be answered ...
>
>allthough I have done it like in the samples, I have some problems
>getting xf:itemset bound to existing values of the model.
>
>here's the story:
>
>class MyBean {
>	
>	Map allLanguages;
>	
>	MyBean( ) {
>		initAllLanguaes( ) ;
>	}
>	public initAllLanguages( ) {
>
>		allLanguages = new HashMap ( );
>		allLanguages.put( "deu", "German" );
>		allLanguages.put( "fin", "Finish" );
>		allLanguages.put( "sve", "Swedish" );
>		....
>	}
>
>	public Set allLanguages( ) {
>		return allLangues.entrySet( );
>	}
>}
><xf:itemset nodeset="/allLanguages">
>	<xf:caption ref="value"/>
>	<xf:value ref="key"/>
></xf:itemset>
>
>is there anything else which the bindings depend on.
>looking at the XMLTransformer, I don't understand JXPath at full detail
>right now, so I wanted to ask to save time.
>  
>

Shouldn't allLanguages() be named getAllLanguages() in order to be a 
valid JavaBean property ?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



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