Re: Ajax Double Combo example?

2006-09-26 Thread mhelmstetter

Thanks for the pointer Jesse.  I managed to get my stuff ported over to
Tapestry 4.1, but I'm still having trouble.

I basically copied the code from your TimeTracker example and attempted to
change the Autocompleter to instead be a PropertySelection.  Somehow my
listener is still not getting called.  I'm sure there's something simple
that I'm missing (I hope).

I've included the code below, thanks again for your help.

Here's my Java page class:
public abstract class AjaxTest extends BasePage {

  private static final Log log = LogFactory.getLog(AjaxTest.class);
  
  public abstract Locale getSelectedProject();

  @Component(id = projectChoose, bindings = { model=projectModel,
value=selectedProject,
displayName=message:choose.project, filterOnChange=true,
validators=validators:required})
  public abstract PropertySelection getProjectChoose();

  public IPropertySelectionModel getProjectModel() {
  return new BeanPropertySelectionModel(
  Arrays.asList(Locale.getAvailableLocales()),
  displayCountry);
  }
  
  @EventListener(targets = projectChoose, events = selectOption,
submitForm = profileForm)
  public void projectSelected(IRequestCycle cycle, BrowserEvent event) {
  log.debug(**);
  
  }  
}

and here's my html:
body jwcid=@border title=xxx
  form jwcid=[EMAIL PROTECTED] class=container
clientValidationEnabled=true 
span jwcid=projectChoose/
  /form
/body


Jessek wrote:
 
 You can do the same thing pretty easily in Tapestry 4.1.
 
 http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html
 
 On 9/25/06, mhelmstetter [EMAIL PROTECTED] wrote:


 OK, I think that got me pointed in the right direction, but I'm still
 having
 trouble.

 I tried the AjaxEventSubmit example:
 http://tacos.sourceforge.net/components/AjaxEventSubmit.html

 but my listener does not seem to be invoked when the list selection
 changes.
 Any ideas?

 Thanks,
 mark



 karthik.nar wrote:
 
  in tacos have a look at ajaxevensubmit and hook it to the onchange of
 your
  combo boxes.
 
  On 9/23/06, Mark Helmstetter [EMAIL PROTECTED] wrote:
 
  Are there any examples of how to implement an Ajax enabled double
 combo
  box?  Is there a component that supports this?
 
  I was hoping for something simple for those of us who are uh,
  ajax-challenged...  I looked through Tacos and didn't see anything.
 
  Thanks,
  Mark
 
 
 
 
  --
  Thanks, Karthik
 
 

 --
 View this message in context:
 http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6493297
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Jesse Kuhnert
 Tapestry/Dojo/(and a dash of TestNG), team member/developer
 
 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 

-- 
View this message in context: 
http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6508199
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Ajax Double Combo example?

2006-09-26 Thread mhelmstetter

Yeah, my bad, I tried that shortly after posting the message and still...no
luck.  And yes, it's all lower case onchange. :-)  Any other ideas?


Jessek wrote:
 
 I believe on a native html select element the proper event to listen for
 is
 onchange. That's why I've not hard coded any of the event names into
 Tapestry itself...Wayy too much potential for me f-ing things up ;)
 
 On 9/26/06, mhelmstetter [EMAIL PROTECTED] wrote:


 Thanks for the pointer Jesse.  I managed to get my stuff ported over to
 Tapestry 4.1, but I'm still having trouble.

 I basically copied the code from your TimeTracker example and attempted
 to
 change the Autocompleter to instead be a PropertySelection.  Somehow my
 listener is still not getting called.  I'm sure there's something simple
 that I'm missing (I hope).

 I've included the code below, thanks again for your help.

 Here's my Java page class:
 public abstract class AjaxTest extends BasePage {

   private static final Log log = LogFactory.getLog(AjaxTest.class
 );

   public abstract Locale getSelectedProject();

   @Component(id = projectChoose, bindings = {
 model=projectModel,
 value=selectedProject,
 displayName=message:choose.project,
 filterOnChange=true,
 validators=validators:required})
   public abstract PropertySelection getProjectChoose();

   public IPropertySelectionModel getProjectModel() {
   return new BeanPropertySelectionModel(
   Arrays.asList(Locale.getAvailableLocales()),
   displayCountry);
   }

   @EventListener(targets = projectChoose, events = selectOption,
 submitForm = profileForm)
   public void projectSelected(IRequestCycle cycle, BrowserEvent
 event)
 {
   log.debug(**);

   }
 }

 and here's my html:
 body jwcid=@border title=xxx
   form jwcid=[EMAIL PROTECTED] class=container
 clientValidationEnabled=true 
 span jwcid=projectChoose/
   /form
 /body


 Jessek wrote:
 
  You can do the same thing pretty easily in Tapestry 4.1.
 
  http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html
 
  On 9/25/06, mhelmstetter [EMAIL PROTECTED] wrote:
 
 
  OK, I think that got me pointed in the right direction, but I'm still
  having
  trouble.
 
  I tried the AjaxEventSubmit example:
  http://tacos.sourceforge.net/components/AjaxEventSubmit.html
 
  but my listener does not seem to be invoked when the list selection
  changes.
  Any ideas?
 
  Thanks,
  mark
 
 
 
  karthik.nar wrote:
  
   in tacos have a look at ajaxevensubmit and hook it to the onchange
 of
  your
   combo boxes.
  
   On 9/23/06, Mark Helmstetter [EMAIL PROTECTED] wrote:
  
   Are there any examples of how to implement an Ajax enabled double
  combo
   box?  Is there a component that supports this?
  
   I was hoping for something simple for those of us who are uh,
   ajax-challenged...  I looked through Tacos and didn't see anything.
  
   Thanks,
   Mark
  
  
  
  
   --
   Thanks, Karthik
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6493297
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Jesse Kuhnert
  Tapestry/Dojo/(and a dash of TestNG), team member/developer
 
  Open source based consulting work centered around
  dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 

 --
 View this message in context:
 http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6508199
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Jesse Kuhnert
 Tapestry/Dojo/(and a dash of TestNG), team member/developer
 
 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 

-- 
View this message in context: 
http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6510795
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Ajax Double Combo example?

2006-09-26 Thread mhelmstetter

Oh boy, do I feel stupid.  Well it turns out that I did have javascript
errors, dojo is not defined.  Somehow I've managed to ignore the
javascript errors becuase I've been getting extraneous errors lately since I
started using FoxyProxy.

Anyhow, it turns out that I didn't have the servlet-mapping for /assets/* in
my web.xml which was causing the dojo javascript to not be loaded.  DUH!

No, that's wrong, Cartman. But don't worry. There are no stupid answers,
just stupid people.


Jessek wrote:
 
 Yeah, do a view source on your rendered page. You'll find a section
 towards
 the bottom that attempts to do the event connection on your html select
 list. Do you see any problems in this area?
 
 If you have FireBug installed you can do a lot more, even type in
 javascript
 into the console that will be executed against your current page..So, you
 could in theory manually type in various
 dojo.event.connect(dojo.byId(your
 rendered element id), onfoo, function(e){alert(The event
 fired!);});
 to see which one works :)
 
 On 9/26/06, mhelmstetter [EMAIL PROTECTED] wrote:


 Yeah, my bad, I tried that shortly after posting the message and
 still...no
 luck.  And yes, it's all lower case onchange. :-)  Any other ideas?


 Jessek wrote:
 
  I believe on a native html select element the proper event to listen
 for
  is
  onchange. That's why I've not hard coded any of the event names into
  Tapestry itself...Wayy too much potential for me f-ing things up ;)
 
  On 9/26/06, mhelmstetter [EMAIL PROTECTED] wrote:
 
 
  Thanks for the pointer Jesse.  I managed to get my stuff ported over
 to
  Tapestry 4.1, but I'm still having trouble.
 
  I basically copied the code from your TimeTracker example and
 attempted
  to
  change the Autocompleter to instead be a PropertySelection.  Somehow
 my
  listener is still not getting called.  I'm sure there's something
 simple
  that I'm missing (I hope).
 
  I've included the code below, thanks again for your help.
 
  Here's my Java page class:
  public abstract class AjaxTest extends BasePage {
 
private static final Log log = LogFactory.getLog(
 AjaxTest.class
  );
 
public abstract Locale getSelectedProject();
 
@Component(id = projectChoose, bindings = {
  model=projectModel,
  value=selectedProject,
  displayName=message:choose.project,
  filterOnChange=true,
  validators=validators:required})
public abstract PropertySelection getProjectChoose();
 
public IPropertySelectionModel getProjectModel() {
return new BeanPropertySelectionModel(
Arrays.asList(Locale.getAvailableLocales()),
displayCountry);
}
 
@EventListener(targets = projectChoose, events =
 selectOption,
  submitForm = profileForm)
public void projectSelected(IRequestCycle cycle, BrowserEvent
  event)
  {
log.debug(**);
 
}
  }
 
  and here's my html:
  body jwcid=@border title=xxx
form jwcid=[EMAIL PROTECTED] class=container
  clientValidationEnabled=true 
  span jwcid=projectChoose/
/form
  /body
 
 
  Jessek wrote:
  
   You can do the same thing pretty easily in Tapestry 4.1.
  
   http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html
  
   On 9/25/06, mhelmstetter [EMAIL PROTECTED] wrote:
  
  
   OK, I think that got me pointed in the right direction, but I'm
 still
   having
   trouble.
  
   I tried the AjaxEventSubmit example:
   http://tacos.sourceforge.net/components/AjaxEventSubmit.html
  
   but my listener does not seem to be invoked when the list selection
   changes.
   Any ideas?
  
   Thanks,
   mark
  
  
  
   karthik.nar wrote:
   
in tacos have a look at ajaxevensubmit and hook it to the
 onchange
  of
   your
combo boxes.
   
On 9/23/06, Mark Helmstetter [EMAIL PROTECTED] wrote:
   
Are there any examples of how to implement an Ajax enabled
 double
   combo
box?  Is there a component that supports this?
   
I was hoping for something simple for those of us who are uh,
ajax-challenged...  I looked through Tacos and didn't see
 anything.
   
Thanks,
Mark
   
   
   
   
--
Thanks, Karthik
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6493297
   Sent from the Tapestry - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   --
   Jesse Kuhnert
   Tapestry/Dojo/(and a dash of TestNG), team member/developer
  
   Open source based consulting work centered around
   dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6508199
  Sent from the Tapestry - User

Re: Ajax Double Combo example?

2006-09-25 Thread mhelmstetter

OK, I think that got me pointed in the right direction, but I'm still having
trouble.

I tried the AjaxEventSubmit example:
http://tacos.sourceforge.net/components/AjaxEventSubmit.html

but my listener does not seem to be invoked when the list selection changes. 
Any ideas?

Thanks,
mark



karthik.nar wrote:
 
 in tacos have a look at ajaxevensubmit and hook it to the onchange of your
 combo boxes.
 
 On 9/23/06, Mark Helmstetter [EMAIL PROTECTED] wrote:

 Are there any examples of how to implement an Ajax enabled double combo
 box?  Is there a component that supports this?

 I was hoping for something simple for those of us who are uh,
 ajax-challenged...  I looked through Tacos and didn't see anything.

 Thanks,
 Mark


 
 
 -- 
 Thanks, Karthik
 
 

-- 
View this message in context: 
http://www.nabble.com/Ajax-Double-Combo-example--tf2321902.html#a6493297
Sent from the Tapestry - User mailing list archive at Nabble.com.


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