سؤال

Have simple composite component(compositeComponent.jsf),that is embedded to global.jsf page.

The problem is that ajax can't update this component. Neither :componentId, not formId:componentId declaration doesn't work.

Should i write own method generator in my bean for id generation?

see pic. for more info! alt text

هل كانت مفيدة؟

المحلول

Open page in browser, rightclick and choose View Source. Locate the generated HTML of <h:outputText> and determine its generated client ID. You should in fact be using exactly this ID with the : prefix. Let's bet that the first part of the ID turns out to be autogenerated. This can happen if you didn't give your composite component a fixed ID. You need to do this as well:

<my:compositeComponent id="ccId" />

then you can locate it as follows:

<p:ajax update=":ccId:cCart:cId" />
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top