You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kameswari <j....@gmail.com> on 2008/05/12 14:47:22 UTC

problem in html with 2 forms

Iam having a HTMl page with 2 tapestry forms in it.
After entering some values in the Text Boxes in the 1st form and perform
some action like clicking a button in the 2nd form ,the values in the 1st
form is not retained and it disappears.

In order to aviod it, Iam using "Onchange" event and update the values while
changing the values in the 1st form using @EventListener component like
@EventListener(events = "onchange", targets =
  {
      "field1"
  })
  public void updateComponents(IRequestCycle pCycle, BrowserEvent pEvent)
  {
    String compID = pEvent.getComponentId();
    pCycle.getResponseBuilder().updateComponent(compID);
  }

This retains the value but after entering some value in the text box i need
to click outside the form and then only able the perform action in the 2nd
form.

So, I tried using "onmouseout" event like 
@EventListener(events = "onclick", targets =
  {
      "field1"
  })
  public void updateComponents(IRequestCycle pCycle, BrowserEvent pEvent)
  {
    String compID = pEvent.getComponentId();
    pCycle.getResponseBuilder().updateComponent(compID);
  }

but updateComponents method is not getting called sometimes and the value
disappears.
Can someone provide me a solution for this problem.
-- 
View this message in context: http://www.nabble.com/problem-in-html-with-2-forms-tp17186887p17186887.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org