[
https://issues.jboss.org/browse/RF-13739?page=com.atlassian.jira.plugin.s...
]
Michal Petrov commented on RF-13739:
------------------------------------
Hmm, something's weird with the renderers.
The placeholder element is getting rendered twice: once in its usual space and once just
before its parent.
{code}
<span id="form:placeholder">…</span>
<form id="form" name="form" method="post" …>
…
<input type="text" name="input1" id="input1"
class="rf-plhdr customPlaceholderClass">
…
<input type="text" name="input3" id="input3"
class="rf-plhdr customPlaceholderClass">
<span id="form:placeholder">…</span>
</form>
{code}
RF-12589 introduced a workaround for {{AbstractPlaceholder}} which makes the placeholder
render before its parent, but that should only happen if the parent is
{{<h:inputText>}} or the like. In the end there should be only one element (works
correctly in 4.3.x showcase).
{{PlaceholderRendererBase}}:
{code}
@Override
public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
AbstractPlaceholder placeholder = (AbstractPlaceholder) component;
// skip direct rendering for nested usage (workaround for RF-12589)
if (placeholder.getSelector() == null || placeholder.getSelector().isEmpty()) {
return;
}
}
{code}
I assume this is what makes sure only one element is rendered but the method is never
called because it is overridden by doEncodeEnd of {{PlaceholderRenderer}}. There have
been some changes with encodeEnd and doEncodeEnd in 4.5, looks like this was overlooked.
Placeholder in collapsibleSubTable template
-------------------------------------------
Key: RF-13739
URL:
https://issues.jboss.org/browse/RF-13739
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-misc
Affects Versions: 4.5.0.Alpha3
Environment: RichFaces 4.5.0-SNAPSHOT
Metamer 4.5.0-SNAPSHOT
Mojarra 2.2.6-jbossorg-4
JBoss AS 8.1.0.Final
Java(TM) SE Runtime Environment 1.7.0_25-b15 @ Linux
Firefox 30.0 @ Linux x86_64
Reporter: Matej Novotny
Assignee: Michal Petrov
Labels: needs-qe
Fix For: 4.5.0.Beta1
Placeholder selector set to empty string ({{selector=""}}) does not work when
nested inside richCollapsibleSubTable template. The expected result is that all inputs
will contains the placeholder text, however none of them does. If you set selector to a
specific ID, the test succeeds.
This only happens when you attach the placeholder to {{<textarea>}} or
{{<input>}}.
For both cases we have facelets and tests in Metamer and [Jenkins
job|https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/RichFaces/view/...]
which runs the tests.
Link to
[
facelet|https://github.com/richfaces/richfaces-qa/blob/master/metamer/app...]
and
[
test|https://github.com/richfaces/richfaces-qa/blob/master/metamer/ftest/...]
for textarea.
Link to
[
facelet|https://github.com/richfaces/richfaces-qa/blob/master/metamer/app...]
and
[
test|https://github.com/richfaces/richfaces-qa/blob/master/metamer/ftest/...]
for input.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)