Thanks for clarifying that. > Pass the component's clientside id as a context parameter to your handler > method.
Is there a way, server-side, i can map the clientside id context to the component so i can know wich id is what? I'm asking this cause, using your suggestion i would have to pass more than one client id since i might have to load information on more than one component and without that mapping i wouldn't know where to put the information. Well, i guess i could try to send the name and id in context but that seems too complicated. Thiago's suggestion: > Tapestry) have a clientId parameter, so you can provide your own id instead > of letting Tapestry generate it for you. I guess this can solve your > problem. Doesn't solve the problem since, don't know why using t:clientId="country" on the tag isn't working and the id is still being generated. might be a conflict with some other component with same id, i guess, although i don't see it. On Wed, Aug 26, 2009 at 3:29 PM, Ulrich Stärk<u...@spielviel.de> wrote: > The problem here is that you are trying to access the component's clientId > without the component being rendered (in your case from an XHR). The > clientId is only accurate after the component has rendered itself. See > http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/ClientElement.html > Pass the component's clientside id as a context parameter to your handler > method. > > Uli > > On 26.08.2009 16:10 schrieb Bruno Santos: >> >> Hi all, >> >> My name is Bruno and I'm new to this mailing list and new to tapestry. >> >> I've been banging my head hard and googling (probably been using wrong >> keywords) for an answer for this, why is getClientId returning null, >> isn't it suppose to return the client id? If it ain't, is there a >> workaround? >> >> Code: >> >> �...@injectcomponent >> private Select country; >> >> �...@onevent(component = "country", value = "change") >> public JSONObject onChangeOperatorEvent(String value) { >> ... >> JSONObject finalJsonObject = new JSONObject(); >> finalJsonObject.put("clientId", country.getClientId()); >> >> return finalJsonObject; >> } >> >> >> ----------------- >> >> <select t:type="select" >> t:id="country" encoder="countryEncoder" >> model="countryModel" t:mixins="ck/OnEvent" t:event="change" >> t:onCompleteCallback="handleSelectAjaxRequest"/> >> >> >> ------------------ >> >> I tried with textfield also, same result. I guess @InjectComponent >> isn't enough. Can someone help me clarify this? >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org