Hi Tony,

In which render phase are trying to access the client id? It may help if you 
post parts of your code. Injecting the component to access the client id works 
for me (for the following common pattern):

@Environmental
private JavaScriptSupport javaScriptSupport;

@Component
private Select mySelect;

@AfterRender
public void afterRender() {
  
javaScriptSupport.require("my-module").invoke("init").with(mySelect.getClientId());
}


This snippet will inject the generated client id in your JS module as a 
parameter of the init function.

Best,
Thilo





Am 24.07.15 17:43 schrieb "Tony Nelson" unter <tnel...@starpoint.com>:

>I have a small form in a zone.
>
>When an error occurs in the event handler, I need to execute some javascript, 
>which I’m adding with the ajaxResponseRender.
>
>I can’t figure out how to access the clientId of the component that will be 
>rendered.
>
>If I try to use the Injected component, I get NULL for the client id.
>
>If I try to allocate the client id with javascript support, then the one that 
>is actually used has ‘_0’ appended to it.
>
>I tried changing my event method to void, and adding onSuccess and onFailure.
>
>What is the correct way to get to the client id that will be rendered in an 
>ajax handler?
>
>Thanks in advance,
>Tony
>
>Since 1982, Starpoint Solutions has been a trusted source of human capital and 
>solutions. We are committed to our clients, employees, environment, community 
>and social concerns.  We foster an inclusive culture based on trust, respect, 
>honesty and solid performance. Learn more about Starpoint and our social 
>responsibility at http://www.starpoint.com/social_responsibility
>
>This email message from Starpoint Solutions LLC is for the sole use of  the 
>intended recipient(s) and may contain confidential and privileged  
>information.  Any unauthorized review, use, disclosure or distribution is 
>prohibited.  If you are not the intended recipient, please contact the sender 
>by reply email and destroy all copies of the original message.  Opinions, 
>conclusions and other information in this message that do not relate to the 
>official business of Starpoint Solutions shall be understood as neither given 
>nor endorsed by it.

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

Reply via email to