Skip to content

Commit

Permalink
MYFACES-4624
Browse files Browse the repository at this point in the history
  • Loading branch information
tandraschko committed Aug 22, 2023
1 parent e71fe55 commit 304099d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,12 @@ public void invokeContextCallback(FacesContext context, UIComponent target)
}
}
}


if (target == null && nextExpression == null)
{
return;
}

topCallback.invokeContextCallback(facesContext, previous);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ public void testSearchExpression1() throws Exception
searchContext, "@this:@parent:showName").get(0);
Assertions.assertEquals("mainForm:showName", componentId);

componentId = facesContext.getApplication().getSearchExpressionHandler().resolveClientIds(
searchContext, "@form:inputOutsideForm").get(0);
Assertions.assertEquals("mainForm:inputOutsideForm", componentId);

final SearchExpressionContext currentSearchContext = searchContext;
Assertions.assertThrows(ComponentNotFoundException.class, () ->
{
facesContext.getApplication().getSearchExpressionHandler().resolveClientIds(currentSearchContext, ":inputOutsideForm");
});

componentId = facesContext.getApplication().getSearchExpressionHandler().resolveClientIds(
searchContext, "mainForm:table:0:baseText").get(0);
Assertions.assertEquals("mainForm:table:0:baseText", componentId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
<h:outputText id="topLevelOutputText" value="test" />

<h:panelGrid id="panelGridId" columns="1">

<h:form id="mainForm">

<h:inputText id="inputOutsideForm"></h:inputText>

<h:outputLabel id="labelName" for="name" value="Name: "/>
<div>
<h:inputText id="name" value="NAME"/>
Expand Down

0 comments on commit 304099d

Please sign in to comment.