Component design question
Component design question
- Subject: Component design question
- From: Pascal Robert <email@hidden>
- Date: Sun, 25 Oct 2009 16:03:30 -0400 (EDT)
I'm working on my WOTwitter tutorial and I have a question about the design. I think the tutorial should have two re-usable component : one to upload the new post, and the other to show the older tweets. So I have made a ERXTwitterNewPostComponent component that have :
- A AjaxUpdateContainer component that have a string who shows the number of chars typed (just like the Web Twitter client on twitter.com)
- A WOText component to hold the content of the new post
- A AjaxObserveField component to update the chars count
- A AjaxSubmitButton to call an method
This is working fine, but the question I have is about the action called by the submit button. What I was about to do is to use performParentAction so that the actual submit to Twitter is done in the parent. Why? Because you might need to do something else with the content, in my case I'm calling bit.ly API to transform any URLs found in the content to a shorter URL.
If you were using such a component, how would use it? I do plan to give back to the community.
--
-------------------------------------------------------
Pascal Robert
http://www.macti.ca
http://www.linkedin.com/in/macti
Skype: MacTICanada
AIM/iChat : MacTICanada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden