Я вижу эту странную вещь: я создаю новый составной компонент, но переданное в него поле имеет нулевое значение, когда оно находится внутри внутри другого составного компонента.
Во-первых, вот результат, показывающий, как это значение, которое я передаю, работает везде, кроме самого глубокого уровня:
вывод
Код: Выделить всё
page xhtml = "hello!"
outer component = "hello!"
inner component direct = "hello!"
inner component value = "hello!"
include = "hello!"
inner component direct = "hello!"
inner component value = ""
Вот различные биты:
Код: Выделить всё
ApplicationControllerКод: Выделить всё
@ApplicationScoped
@Named
public class ApplicationController implements Serializable {
@Getter @Setter private String input = "hello!";
}
Код: Выделить всё
page.xhtmlКод: Выделить всё
base xhtml = "#{applicationController.input}"
Код: Выделить всё
outerComponent.xhtmlКод: Выделить всё
outer component = "#{cc.attrs.controller.input}"
Код: Выделить всё
includedFile.xhtmlКод: Выделить всё
include = "#{cc.attrs.controller.input}"
Код: Выделить всё
innerComponent.xhtmlКод: Выделить всё
inner component direct = "#{applicationController.input}"
inner component value = "#{cc.attrs.value}"
Подробнее здесь: https://stackoverflow.com/questions/798 ... er-composi
Мобильная версия