Yes it is (assuming Tap 4.0 here, but probably a similar method for
3.0). I use something along the lines of:

    IForm form = (IForm)
cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE);
    boolean inForm = (form != null);

    if (inForm) {
        // ... do something
    } else {
        // ... do something else
    }

If you need mor elaboration, or have trouble, try checking out the
source code for the For component 
(/framework/src/java/org/apache/tapestry/components/ForBean.java) in the
Tapestry distribution.

Cheers,
Joe

-----Original Message-----
From: Tony De Keizer [mailto:[EMAIL PROTECTED] 
Sent: 29 October 2005 03:16
To: Tapestry users
Subject: Checking if component is in a Form inside the components code

Is it possible for component java code to check if it is imbedded inside
a form component and if so trigger a form submit ?

Regards
========================================
Tony De Keizer


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.6/151 - Release Date:
28/10/2005

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

Reply via email to