Raul,
I tried it allready but it still doesn't work.

Yes, you 're right I'm confused with setting properties in my java file




Raul Raja Martinez wrote:
I'm not a 100% sure that it might be your problem but try removing IRequestCycle cycle, from your listenerDocId method so that your listeners has only one String argument as you declare in <binding name="parameters" value="docId"/>


Also I think you are confused about setting properties in your java file:

 >     public String docId;
 >     public abstract String getDocId();
 >     public abstract void setDocId(String docId);

should only be

 >     public abstract String getDocId();
 >     public abstract void setDocId(String docId);


there is no need to declare instance variables at all for your properties, they will get created at runtime by Tapestry when your class gets enhanced. Same for lour "siteNo List".


Ernst Thielmann wrote:

My class looks like this

public abstract class Home extends BasePage implements PageBeginRenderListener
{
    public String docId;
    public abstract String getDocId();
    public abstract void setDocId(String docId);

    public void listenerDocId( IRequestCycle cycle
                             , String docId){
        setDocId(docId);

    }

    public List siteNo;

    public List getSiteNo() {
        return siteNo;
    }
    public void setSiteNo(List siteNo) {
        this.siteNo = siteNo;
    }
    public void pageBeginRender(PageEvent event){

        siteNo =new ArrayList();
        String n ="<";
        siteNo.add(n);
        for (int i=1; i<4; i++){
            siteNo.add(Integer.toString(i));
        }
        n =">";
        siteNo.add(n);
    }

    @InjectObject("engine-service:image")
    public abstract IEngineService getImageService();
    public abstract String getBild ();
    public String getImageUrl() {
        ShowImages test = new ShowImages();
        test.show();

        return getImageService().getLink( false,
                new Object[] { Integer.toString(101) }).getURL();
    }
    public abstract String getImageId();
    public void onOk() {
        throw new RedirectException(getImageUrl());
    }
    public void doClick(IRequestCycle cycle
            , String seitenNr)
    {

        Galery params = new Galery();
        params.setSiteNo(seitenNr);
    }

    public ILinkRenderer getPreviewLinkRenderer() {
        PopupLinkRenderer linkRender = new PopupLinkRenderer();
        linkRender.setFeatures( "resizable"
                +    ",scrollbars"
                +    ",top=50"
                +    ",left=200"
                +    ",height=700"
                +    ",width=650"
        ) ;
        return linkRender;
    }

}

Peter Svensson wrote:

What does you class look like?

Br,
PS

On 2/7/06, Ernst Thielmann <[EMAIL PROTECTED]> wrote:

I have a problem to get the value from an html input
What is the best way to get the value, in my .java? The value of this
field is changing at runtime by Javascript. I want to get this value.

I tried the following thing:

.html
================
<html>
<body jwcid="@Body" >
<form jwcid="form">
    <input jwcid="docId" name="docId" value=""/>
    <span jwcid="listenerDocId"/>
... some other stuff
</form>
</body>
</html>

.page
================
....
<component id="docId" type="TextField">
</component>
<component id="listenerDocId"     type="InvokeListener">
    <binding name="listener" value="listener:listenerDocId"/>
    <binding name="parameters"     value="docId"/>
</component>
....
If I use <binding name="parameters"     value="literal:docId"/>  it
works fine, but if I try to get the value I get this error:

"Exception invoking listener method listenerDocId of component Home: No
listener method named 'listenerDocId' suitable for no listener
parameters found in [EMAIL PROTECTED]"


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






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




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




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

Reply via email to