cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josema Alonso" <alo...@aafunky.com>
Subject Re: dynamic XMLForm taking inout data from previous steps?
Date Tue, 29 Oct 2002 22:07:14 GMT
> I tried to figure how the xf:repeat and xf:group tags work, maybe that's
the
> way to go. Still not much info about it anyway.
I think I've almost got it:
<xf:repeat nodeset="languages[position() &lt;= /descriptionsNumber]"
id="descriptionLangs">
    <xf:textbox ref="." class="info">
        <xf:caption>Language (code):</xf:caption>
    </xf:textbox>
</xf:repeat>

And I have in the model bean:
...
private int descriptionsNumber = 1;
private List languages = new ArrayList();
...
public InsertBean () {
    initLanguages();
}

public void initLanguages() {
    languages.add("en");
    languages.add("es");
}
...

And the 'descriptionsNumber' is filled on a previous step in the form
wizard.
But...oh yes, there's a but, I can only generate in the repeat as many input
boxes as elements the 'languages' ArrayList have. It seems that it doesn't
show more than two of them no matter the number I put to fill the
'descriptionsNumber' field. If I put 1, it shows just one field, if I put 2,
it shows two fields, if I put three or more, it only shows two anyway. I
guess that's because the ArrayList only have two elements and the rest of
the calls return null.
Is there a workaround?
I think I'll try looking at the source code of the transformer...

Best.



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message