In the count sample component 

http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/parameters.html


public class Count
{
    @Parameter
    private int _start = 1;

    @Parameter(required = true)
    private int _end;


    //added by me
    @Parameter(required = true)
    private String _stext;
    
    @Parameter
    private int _value;

    private boolean _increment;

    @SetupRender
    void initializeValue()
    {
        _value = _start;

        _increment = _start < _end;
    }

    @AfterRender
    boolean next()
    {
        if (_increment)
        {
            int newValue = _value + 1;

            if (newValue <= _end)
            {
                _value = newValue;
                return false; 
            }
        }
        else
        {
            int newValue = _value - 1;

            if (newValue >= _end)
            {
                _value = newValue;
                return false; 
            }
        }

        return true;
    }

I added the stext parameter for the sake of test,you don't need even to
declare getter and setter for parameters, in the page that uses the
component you write down simply:

<t:count end="3" stext="4">Ho!</t:count>

and both parameters 'end' and 'stext' will go on with no problems....

but if I write

<t:count end="3" stext="mytext">Ho!</t:count>

then I get the following enlighting message:

"Could not convert 'mytext' into a component parameter binding: Class
org.compramaestra.pages.TreeDemo does not contain a property named 'mytext'
(within property expression 'mytext'). Available properties: class,
componentResources, message, node, treeNodes."

So what? the argument is supposed to be the parameter? I'm totally lost
,bear in mind that 

<t:count end="3" stext="4">Ho!</t:count> does not complain at all


Thanks a lot if any can save me!

tapestry 5.0.11



-- 
View this message in context: 
http://www.nabble.com/T5-Component-question-based-on-the-Count-component-in-documentation-tp16917580p16917580.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to