Adding the leading colon does not help as the Axxxx is the id of the top container provided by the portlet bridge. So part of the actual id.
The main problem in this case is that our ace:ajax component takes raw ids for it's attribute values but does not process them to work with environments like portlets that namespace those ids. For example, in the ace:dataTable - Row Selector Example, the component markup looks like this:
<ace:ajax event="select" render="@this selectForm:status" execute="@this" />
While the special @ references are handled fine, the inclusion of raw ids like "selectForm:status" are not processed to include the namespace. This causes the org.icefaces.ace.component.ajax.AjaxBehaviourRenderer to render out the related widget code like so:
var widget_A6324_selectForm_instantCarTableSingleRow =
new ice.ace.DataTable("A6324:selectForm:instantCarTableSingleRow",
{formId:"A6324:selectForm",
widgetVar:"widget_A6324_selectForm_instantCarTableSingleRow",
clickableHeaderSorting:true,
selectionMode:"single",
instantSelect:true,
behaviors:{select:
{source:"A6324:selectForm:instantCarTableSingleRow",
execute:"A6324:selectForm:instantCarTableSingleRow",
render:"A6324:selectForm:instantCarTableSingleRow selectForm:status",
event:"select"}}});
You can see that the elements like @this get renderered out with the correct portlet namespace but the hard-coded id values like "selectForm:status" do not.
I tracked down the handling of these ids to the org.icefaces.ace.util.ComponentUtils.findClientIds method. This is where the @this type elements are added into the JSON string as well as the raw component ids. To improve the behaviour for raw ids, I added a call to a new method, encodeNameSpace(), that attempts to properly encode the namespace for any raw ids that are encountered. With this change in place, the render behaviour now renders out as:
render:"A6324:selectForm:instantCarTableSingleRow A6324:selectForm:status"
And clicking on the rows properly updates the status. Note that, with Development mode turned on, we still see the following messages:
Oct 10, 2012 9:49:51 PM org.icefaces.ace.util.ComponentUtils findClientIds
INFO: Cannot find component with identifier "A6324:selectForm:status" in view.
Not sure why this is the case. It's not related to portlets because the same message occurs in the non-portlet version of showcase:
Oct 10, 2012 3:13:32 PM org.icefaces.ace.util.ComponentUtils findClientIds
INFO: Cannot find component with identifier "selectForm:status" in view.
and it occurs in both Mojarra and MyFaces. It seems as if the search almost always fails. In any event, the change to encode the namespace allows the client-side widget scripts to work properly.
I ran the trunk against Liferay and see the same thing. Looks to be a problem with rendering out the JavaScript behaviours for the ice.ace.Datatable (formatted slightly for readability):
behaviors:{select:{
source:"A7601:listenerForm:carTableSingleRow",
execute:"A7601:listenerForm:carTableSingleRow listenerForm:eventLog",
render:"A7601:listenerForm:carTableSingleRow listenerForm:eventLog",
event:"select"}}
You can see that the source id has the portlet namespace (A7601) and the first render/execute id has the namespace but the second render/execute id does not have the namespace. This causes the problem of not being able to find it. It's not quickly clear to me where this all gets handled in the rendering code so we may need to assign the JIRA to somebody in the component team.