Hi Ramarao,

I suggest you to return null in search.searchItems() if the input is empty
(and use ajax to refresh only the component "search", elsewhere give an
outcome that redirects to the page of results.

for the ajax use

<tc:link ...>

<tc:attribute name="renderedPartially" value="search" />

</tc:link>
I didn't try it yet but it should work ifaoif your outcome is null. Take a
look at the demo app for examples.


p.s: maybe there's a better solution, I'm a beginner in tobago too.

Regards,
Zied

2007/7/20, Ramarao Venkata <[EMAIL PROTECTED]>:

Hi,

I has a tc:in and a tc:link.  when we click on the link the form is
submited even though no value value in tc:in.
When there is no value in tc:in and pressed on <tc:link i should not
submit instead i should display an alert message.

With in tc:in when i press enter i need to invoke the action specified in
tc:link. do i need register for any key listener

My code is written as below

<tc:cell>
    <tc:in id="search" width="130px"
        value="#{search.searchText}"
        suggestMethod = "#{search.suggestSearch}" />
    <tc:link image="img/search.gif"
             action="#{search.searchItems}" />
</tc:cell>


kindly suggest a solution.

regards
Ramarao













--
Zied Hamdi
zatreex.sourceforge.net

Reply via email to