[JBoss JIRA] (RF-12887) Nodes with types that are not listed in <rich:treeNode> are not rendered
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12887?page=com.atlassian.jira.plugin.s... ]
Brian Leathem edited comment on RF-12887 at 4/11/13 2:02 PM:
-------------------------------------------------------------
Backing bean:
{code}
public class BaseTreeBean implements Serializable {
protected TreeNode rootNode;
public BaseTreeBean() {
DemoTreeNodeData rootNodeData = new DemoTreeNodeData( "rootNode" );
this.rootNode = new DataHolderTreeNodeImpl( null, "root", false, rootNodeData );
TreeNode node1 = new DataHolderTreeNodeImpl( this.rootNode, "1", false, new DemoTreeNodeData();
TreeNode node11 = new DataHolderTreeNodeImpl( node1, "1_1", false, new DemoTreeNodeData() );
TreeNode node12 = new DataHolderTreeNodeImpl( node1, "1_2", false, new DemoTreeNodeData() );
TreeNode node13 = new DataHolderTreeNodeImpl( node1, "1_3", false, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node11, "11_1", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node11, "11_2", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node12, "22_1", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node12, "22_2", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node13, "33_1", true, new DemoTreeNodeData() );
}
public TreeNode getRootNode() {
return this.rootNode;
}
}
{code}
Data holder classes
{code}
public class DemoDataHolder extends DataHolderTreeNodeImpl {
public DemoDataHolder() {
super();
}
public DemoDataHolder( final boolean leaf, final AbstractTreeNodeData data ) {
this( null, null, leaf, data );
}
public DemoDataHolder( final TreeNode parent, final Object key ) {
this( parent, key, true, null );
}
public DemoDataHolder( final TreeNode parent, final Object key, final boolean leaf, final AbstractTreeNodeData data ) {
super( parent, key, leaf, data );
if ( getData() != null ) {
if ( ( getData().getLabel() == null ) && ( getData().getName() == null ) ) {
getData().setName( ( key.toString() ) );
}
if ( key != null ) {
getData().setExpanded( key.toString().startsWith( "1" ) );
getData().setType( key.toString() );
}
}
}
@Override
public String toString() {
return getData().getLabel();
}
}
{code}
{code}
public class DataHolderTreeNodeImpl extends TreeNodeImpl {
private AbstractTreeNodeData data;
private TreeNode parent;
public DataHolderTreeNodeImpl() {
super();
}
public DataHolderTreeNodeImpl( final boolean leaf, final AbstractTreeNodeData data ) {
this( null, null, leaf, data );
}
public DataHolderTreeNodeImpl( final TreeNode parent, final Object key, final boolean leaf ) {
this( parent, key, leaf, null );
}
public DataHolderTreeNodeImpl( final TreeNode parent, final Object key ) {
this( parent, key, true, null );
}
public DataHolderTreeNodeImpl( final TreeNode parent, final Object key, final boolean leaf,
final AbstractTreeNodeData data ) {
super( leaf );
this.parent = parent;
if ( this.parent != null ) {
parent.addChild( key, this );
}
this.data = data;
if ( getData() != null ) {
if ( ( getData().getLabel() == null ) && ( getData().getName() == null ) ) {
getData().setName( ( key.toString() ) );
}
if ( key != null ) {
getData().setExpanded( key.toString().startsWith( "1" ) );
getData().setType( key.toString() );
}
}
}
public AbstractTreeNodeData getData() {
return this.data;
}
public void setData( final AbstractTreeNodeData data ) {
this.data = data;
}
public TreeNode getParent() {
return this.parent;
}
public void setParent( final TreeNode parent ) {
this.parent = parent;
}
}
{code}
Tree node data classes
{code}
public class DemoTreeNodeData extends AbstractTreeNodeData {
private static final long serialVersionUID = 1725923477252098882L;
private static final PresentationLogger log = LoggerFactory.createLogger( DemoTreeNodeData.class );
private static final String ICON = "/images/tree/folder.png";
private static final String ICON_LEAF = "/images/tree/pdf-document.png";
private boolean visible = true;
public DemoTreeNodeData() {
this( null, true, null );
}
public DemoTreeNodeData( final String label ) {
this( label, true, null );
}
public DemoTreeNodeData( final String label, final boolean draggable, final Menu menu ) {
super( label, null );
setIcon( ICON );
setIconLeaf( ICON_LEAF );
}
public DemoTreeNodeData( final String label, final Menu menu ) {
this( label, true, menu );
}
public boolean isVisible() {
return this.visible;
}
public void setVisible( final boolean visible ) {
this.visible = visible;
}
@Override
public String toString() {
return getLabel();
}
}
{code}
{code}
public abstract class AbstractTreeNodeData implements Serializable {
private static final long serialVersionUID = 4265239470205397789L;
private String label;
private String name;
private String icon;
private String iconLeaf;
private boolean expanded;
private String type;
public AbstractTreeNodeData() {
super();
}
public AbstractTreeNodeData( final String label, final String icon ) {
this();
this.label = label;
this.icon = icon;
}
public String getType() {
return this.type;
}
public void setType( final String type ) {
this.type = type;
}
public String getLabel() {
if ( null == this.label ) {
return getName();
}
return this.label;
}
public void setLabel( final String label ) {
this.label = label;
}
public String getName() {
return this.name;
}
public void setName( final String name ) {
this.name = name;
}
public String getIcon() {
return this.icon;
}
public void setIcon( final String icon ) {
this.icon = icon;
}
public String getIconLeaf() {
if ( null == this.iconLeaf ) {
return getIcon();
} else {
return this.iconLeaf;
}
}
public void setIconLeaf( final String iconLeaf ) {
this.iconLeaf = iconLeaf;
}
public boolean isExpanded() {
return this.expanded;
}
public void setExpanded( final boolean expanded ) {
this.expanded = expanded;
}
}
{code}
was (Author: skawajar):
Backing bean:
public class BaseTreeBean implements Serializable {
protected TreeNode rootNode;
public BaseTreeBean() {
DemoTreeNodeData rootNodeData = new DemoTreeNodeData( "rootNode" );
this.rootNode = new DataHolderTreeNodeImpl( null, "root", false, rootNodeData );
TreeNode node1 = new DataHolderTreeNodeImpl( this.rootNode, "1", false, new DemoTreeNodeData();
TreeNode node11 = new DataHolderTreeNodeImpl( node1, "1_1", false, new DemoTreeNodeData() );
TreeNode node12 = new DataHolderTreeNodeImpl( node1, "1_2", false, new DemoTreeNodeData() );
TreeNode node13 = new DataHolderTreeNodeImpl( node1, "1_3", false, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node11, "11_1", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node11, "11_2", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node12, "22_1", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node12, "22_2", true, new DemoTreeNodeData() );
new DataHolderTreeNodeImpl( node13, "33_1", true, new DemoTreeNodeData() );
}
public TreeNode getRootNode() {
return this.rootNode;
}
}
Data holder classes
public class DemoDataHolder extends DataHolderTreeNodeImpl {
public DemoDataHolder() {
super();
}
public DemoDataHolder( final boolean leaf, final AbstractTreeNodeData data ) {
this( null, null, leaf, data );
}
public DemoDataHolder( final TreeNode parent, final Object key ) {
this( parent, key, true, null );
}
public DemoDataHolder( final TreeNode parent, final Object key, final boolean leaf, final AbstractTreeNodeData data ) {
super( parent, key, leaf, data );
if ( getData() != null ) {
if ( ( getData().getLabel() == null ) && ( getData().getName() == null ) ) {
getData().setName( ( key.toString() ) );
}
if ( key != null ) {
getData().setExpanded( key.toString().startsWith( "1" ) );
getData().setType( key.toString() );
}
}
}
@Override
public String toString() {
return getData().getLabel();
}
}
public class DataHolderTreeNodeImpl extends TreeNodeImpl {
private AbstractTreeNodeData data;
private TreeNode parent;
public DataHolderTreeNodeImpl() {
super();
}
public DataHolderTreeNodeImpl( final boolean leaf, final AbstractTreeNodeData data ) {
this( null, null, leaf, data );
}
public DataHolderTreeNodeImpl( final TreeNode parent, final Object key, final boolean leaf ) {
this( parent, key, leaf, null );
}
public DataHolderTreeNodeImpl( final TreeNode parent, final Object key ) {
this( parent, key, true, null );
}
public DataHolderTreeNodeImpl( final TreeNode parent, final Object key, final boolean leaf,
final AbstractTreeNodeData data ) {
super( leaf );
this.parent = parent;
if ( this.parent != null ) {
parent.addChild( key, this );
}
this.data = data;
if ( getData() != null ) {
if ( ( getData().getLabel() == null ) && ( getData().getName() == null ) ) {
getData().setName( ( key.toString() ) );
}
if ( key != null ) {
getData().setExpanded( key.toString().startsWith( "1" ) );
getData().setType( key.toString() );
}
}
}
public AbstractTreeNodeData getData() {
return this.data;
}
public void setData( final AbstractTreeNodeData data ) {
this.data = data;
}
public TreeNode getParent() {
return this.parent;
}
public void setParent( final TreeNode parent ) {
this.parent = parent;
}
}
Tree node data classes
public class DemoTreeNodeData extends AbstractTreeNodeData {
private static final long serialVersionUID = 1725923477252098882L;
private static final PresentationLogger log = LoggerFactory.createLogger( DemoTreeNodeData.class );
private static final String ICON = "/images/tree/folder.png";
private static final String ICON_LEAF = "/images/tree/pdf-document.png";
private boolean visible = true;
public DemoTreeNodeData() {
this( null, true, null );
}
public DemoTreeNodeData( final String label ) {
this( label, true, null );
}
public DemoTreeNodeData( final String label, final boolean draggable, final Menu menu ) {
super( label, null );
setIcon( ICON );
setIconLeaf( ICON_LEAF );
}
public DemoTreeNodeData( final String label, final Menu menu ) {
this( label, true, menu );
}
public boolean isVisible() {
return this.visible;
}
public void setVisible( final boolean visible ) {
this.visible = visible;
}
@Override
public String toString() {
return getLabel();
}
}
public abstract class AbstractTreeNodeData implements Serializable {
private static final long serialVersionUID = 4265239470205397789L;
private String label;
private String name;
private String icon;
private String iconLeaf;
private boolean expanded;
private String type;
public AbstractTreeNodeData() {
super();
}
public AbstractTreeNodeData( final String label, final String icon ) {
this();
this.label = label;
this.icon = icon;
}
public String getType() {
return this.type;
}
public void setType( final String type ) {
this.type = type;
}
public String getLabel() {
if ( null == this.label ) {
return getName();
}
return this.label;
}
public void setLabel( final String label ) {
this.label = label;
}
public String getName() {
return this.name;
}
public void setName( final String name ) {
this.name = name;
}
public String getIcon() {
return this.icon;
}
public void setIcon( final String icon ) {
this.icon = icon;
}
public String getIconLeaf() {
if ( null == this.iconLeaf ) {
return getIcon();
} else {
return this.iconLeaf;
}
}
public void setIconLeaf( final String iconLeaf ) {
this.iconLeaf = iconLeaf;
}
public boolean isExpanded() {
return this.expanded;
}
public void setExpanded( final boolean expanded ) {
this.expanded = expanded;
}
}
> Nodes with types that are not listed in <rich:treeNode> are not rendered
> ------------------------------------------------------------------------
>
> Key: RF-12887
> URL: https://issues.jboss.org/browse/RF-12887
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-tree
> Affects Versions: 4.3.0.Final
> Environment: RichFaces 4.3.0.Final and JSF 2.2
> JBoss AS 7.1.1.Final
> Reporter: Sergey Suvorov
> Priority: Minor
> Labels: waiting_on_user
>
> When using attribute "type" of <rich:treeNode> nodes with different types are not rendered. In the following tree only nodes with types "1", "2" and "1_1" will be rendered
> {code}
> <rich:tree id="tree" nodeType="#{item.data.type}" var="item" value="#{backingBean.rootNode}" toggleType="client" selectionType="ajax">
> <rich:treeNode type="1">
> #{item.data.label}
> </rich:treeNode>
> <rich:treeNode type="2">
> #{item.data.label}
> </rich:treeNode>
> <rich:treeNode type="1_1">
> #{item.data.label}
> </rich:treeNode>
> </rich:tree>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12897) ExtendedPartialViewContextImpl swallows exceptions
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12897?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12897:
-------------------------------
Description:
Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
I just found an older version of Sun's Mojarra where they had the same issue, but the newer versions seem to have fixed it. See this taken from jsf 2.1.4:
{code}
public VisitResult visit(VisitContext context, UIComponent comp) {
try {
if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
// RELEASE_PENDING handle immediate request(s)
// If the user requested an immediate request
// Make sure to set the immediate flag here.
comp.processDecodes(ctx);
} else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
comp.processValidators(ctx);
} else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
comp.processUpdates(ctx);
} else if (curPhase == PhaseId.RENDER_RESPONSE) {
PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
writer.startUpdate(comp.getClientId(ctx));
try {
// do the default behavior...
comp.encodeAll(ctx);
}
catch (Exception ce) {
if (LOGGER.isLoggable(Level.SEVERE)) {
LOGGER.severe(ce.toString());
}
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
ce.toString(),
ce);
}
}
writer.endUpdate();
}
else {
throw new IllegalStateException("I18N: Unexpected " +
"PhaseId passed to " +
" PhaseAwareContextCallback: " +
curPhase.toString());
}
}
catch (IOException ex) {
ex.printStackTrace();
}
// Once we visit a component, there is no need to visit
// its children, since processDecodes/Validators/Updates and
// encodeAll() already traverse the subtree. We return
// VisitResult.REJECT to supress the subtree visit.
return VisitResult.REJECT;
}
}
{code}
was:
Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
I just found an older version of Sun's Mojarra where they had the same issue, but the newer versions seem to have fixed it. See this taken from jsf 2.1.4:
public VisitResult visit(VisitContext context, UIComponent comp) {
try {
if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
// RELEASE_PENDING handle immediate request(s)
// If the user requested an immediate request
// Make sure to set the immediate flag here.
comp.processDecodes(ctx);
} else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
comp.processValidators(ctx);
} else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
comp.processUpdates(ctx);
} else if (curPhase == PhaseId.RENDER_RESPONSE) {
PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
writer.startUpdate(comp.getClientId(ctx));
try {
// do the default behavior...
comp.encodeAll(ctx);
}
catch (Exception ce) {
if (LOGGER.isLoggable(Level.SEVERE)) {
LOGGER.severe(ce.toString());
}
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
ce.toString(),
ce);
}
}
writer.endUpdate();
}
else {
throw new IllegalStateException("I18N: Unexpected " +
"PhaseId passed to " +
" PhaseAwareContextCallback: " +
curPhase.toString());
}
}
catch (IOException ex) {
ex.printStackTrace();
}
// Once we visit a component, there is no need to visit
// its children, since processDecodes/Validators/Updates and
// encodeAll() already traverse the subtree. We return
// VisitResult.REJECT to supress the subtree visit.
return VisitResult.REJECT;
}
}
> ExtendedPartialViewContextImpl swallows exceptions
> --------------------------------------------------
>
> Key: RF-12897
> URL: https://issues.jboss.org/browse/RF-12897
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.2.2.Final
> Environment: Windows 7, JDK 1.6
> Reporter: Cristian Cerb
> Priority: Critical
> Labels: richfaces
> Fix For: 5-Tracking
>
>
> Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
> I just found an older version of Sun's Mojarra where they had the same issue, but the newer versions seem to have fixed it. See this taken from jsf 2.1.4:
> {code}
> public VisitResult visit(VisitContext context, UIComponent comp) {
> try {
> if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
> // RELEASE_PENDING handle immediate request(s)
> // If the user requested an immediate request
> // Make sure to set the immediate flag here.
> comp.processDecodes(ctx);
> } else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
> comp.processValidators(ctx);
> } else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
> comp.processUpdates(ctx);
> } else if (curPhase == PhaseId.RENDER_RESPONSE) {
> PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
> writer.startUpdate(comp.getClientId(ctx));
> try {
> // do the default behavior...
> comp.encodeAll(ctx);
> }
> catch (Exception ce) {
> if (LOGGER.isLoggable(Level.SEVERE)) {
> LOGGER.severe(ce.toString());
> }
> if (LOGGER.isLoggable(Level.FINE)) {
> LOGGER.log(Level.FINE,
> ce.toString(),
> ce);
> }
> }
> writer.endUpdate();
> }
> else {
> throw new IllegalStateException("I18N: Unexpected " +
> "PhaseId passed to " +
> " PhaseAwareContextCallback: " +
> curPhase.toString());
> }
> }
> catch (IOException ex) {
> ex.printStackTrace();
> }
> // Once we visit a component, there is no need to visit
> // its children, since processDecodes/Validators/Updates and
> // encodeAll() already traverse the subtree. We return
> // VisitResult.REJECT to supress the subtree visit.
> return VisitResult.REJECT;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12897) ExtendedPartialViewContextImpl swallows exceptions
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12897?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12897:
-------------------------------
Fix Version/s: 5-Tracking
(was: 4.3.2)
> ExtendedPartialViewContextImpl swallows exceptions
> --------------------------------------------------
>
> Key: RF-12897
> URL: https://issues.jboss.org/browse/RF-12897
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.2.2.Final
> Environment: Windows 7, JDK 1.6
> Reporter: Cristian Cerb
> Priority: Critical
> Labels: richfaces
> Fix For: 5-Tracking
>
>
> Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
> I just found an older version of Sun's Mojarra where they had the same issue, but the newer versions seem to have fixed it. See this taken from jsf 2.1.4:
> public VisitResult visit(VisitContext context, UIComponent comp) {
> try {
> if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
> // RELEASE_PENDING handle immediate request(s)
> // If the user requested an immediate request
> // Make sure to set the immediate flag here.
> comp.processDecodes(ctx);
> } else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
> comp.processValidators(ctx);
> } else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
> comp.processUpdates(ctx);
> } else if (curPhase == PhaseId.RENDER_RESPONSE) {
> PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
> writer.startUpdate(comp.getClientId(ctx));
> try {
> // do the default behavior...
> comp.encodeAll(ctx);
> }
> catch (Exception ce) {
> if (LOGGER.isLoggable(Level.SEVERE)) {
> LOGGER.severe(ce.toString());
> }
> if (LOGGER.isLoggable(Level.FINE)) {
> LOGGER.log(Level.FINE,
> ce.toString(),
> ce);
> }
> }
> writer.endUpdate();
> }
> else {
> throw new IllegalStateException("I18N: Unexpected " +
> "PhaseId passed to " +
> " PhaseAwareContextCallback: " +
> curPhase.toString());
> }
> }
> catch (IOException ex) {
> ex.printStackTrace();
> }
> // Once we visit a component, there is no need to visit
> // its children, since processDecodes/Validators/Updates and
> // encodeAll() already traverse the subtree. We return
> // VisitResult.REJECT to supress the subtree visit.
> return VisitResult.REJECT;
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12897) ExtendedPartialViewContextImpl swallows exceptions
by Cristian Cerb (JIRA)
[ https://issues.jboss.org/browse/RF-12897?page=com.atlassian.jira.plugin.s... ]
Cristian Cerb updated RF-12897:
-------------------------------
Description:
Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
I just found an older version of Sun's Mojarra where they had the same issue, but the newer versions seem to have fixed it. See this taken from jsf 2.1.4:
public VisitResult visit(VisitContext context, UIComponent comp) {
try {
if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
// RELEASE_PENDING handle immediate request(s)
// If the user requested an immediate request
// Make sure to set the immediate flag here.
comp.processDecodes(ctx);
} else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
comp.processValidators(ctx);
} else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
comp.processUpdates(ctx);
} else if (curPhase == PhaseId.RENDER_RESPONSE) {
PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
writer.startUpdate(comp.getClientId(ctx));
try {
// do the default behavior...
comp.encodeAll(ctx);
}
catch (Exception ce) {
if (LOGGER.isLoggable(Level.SEVERE)) {
LOGGER.severe(ce.toString());
}
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
ce.toString(),
ce);
}
}
writer.endUpdate();
}
else {
throw new IllegalStateException("I18N: Unexpected " +
"PhaseId passed to " +
" PhaseAwareContextCallback: " +
curPhase.toString());
}
}
catch (IOException ex) {
ex.printStackTrace();
}
// Once we visit a component, there is no need to visit
// its children, since processDecodes/Validators/Updates and
// encodeAll() already traverse the subtree. We return
// VisitResult.REJECT to supress the subtree visit.
return VisitResult.REJECT;
}
}
was:
Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
> ExtendedPartialViewContextImpl swallows exceptions
> --------------------------------------------------
>
> Key: RF-12897
> URL: https://issues.jboss.org/browse/RF-12897
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.2.2.Final
> Environment: Windows 7, JDK 1.6
> Reporter: Cristian Cerb
> Priority: Critical
> Labels: richfaces
> Fix For: 4.3.2
>
>
> Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
> I just found an older version of Sun's Mojarra where they had the same issue, but the newer versions seem to have fixed it. See this taken from jsf 2.1.4:
> public VisitResult visit(VisitContext context, UIComponent comp) {
> try {
> if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
> // RELEASE_PENDING handle immediate request(s)
> // If the user requested an immediate request
> // Make sure to set the immediate flag here.
> comp.processDecodes(ctx);
> } else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
> comp.processValidators(ctx);
> } else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
> comp.processUpdates(ctx);
> } else if (curPhase == PhaseId.RENDER_RESPONSE) {
> PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
> writer.startUpdate(comp.getClientId(ctx));
> try {
> // do the default behavior...
> comp.encodeAll(ctx);
> }
> catch (Exception ce) {
> if (LOGGER.isLoggable(Level.SEVERE)) {
> LOGGER.severe(ce.toString());
> }
> if (LOGGER.isLoggable(Level.FINE)) {
> LOGGER.log(Level.FINE,
> ce.toString(),
> ce);
> }
> }
> writer.endUpdate();
> }
> else {
> throw new IllegalStateException("I18N: Unexpected " +
> "PhaseId passed to " +
> " PhaseAwareContextCallback: " +
> curPhase.toString());
> }
> }
> catch (IOException ex) {
> ex.printStackTrace();
> }
> // Once we visit a component, there is no need to visit
> // its children, since processDecodes/Validators/Updates and
> // encodeAll() already traverse the subtree. We return
> // VisitResult.REJECT to supress the subtree visit.
> return VisitResult.REJECT;
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12820) AutoComplete Layout Table is broken
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/RF-12820?page=com.atlassian.jira.plugin.s... ]
Jan Papousek reassigned RF-12820:
---------------------------------
Assignee: Jan Papousek (was: Pavol Pitonak)
> AutoComplete Layout Table is broken
> -----------------------------------
>
> Key: RF-12820
> URL: https://issues.jboss.org/browse/RF-12820
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.1.0.Final, 4.2.3.Final, 4.3.0.Final
> Reporter: nathan dennis
> Assignee: Jan Papousek
> Labels: rich:autocomplete
>
> if the parameter layout="table" is passed, the component behaves with undocumented features.
> When typing in the input a selection list is displayed. Mouse over the selection list and the wrong selection is displayed in the input.
> This problem can be recreated in the show case by simply added the layout=”table” parameter to and existing autocomplete component.
> Though in the showcase there is limited selections, if a larger listed is added you can see that the first highlighted row maps to the correct selection +1... the second highlighted row maps to the correct selection to +2 ..etc.. so it appears there is an iterator off somewhere.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12902) RF5 modules simplification
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-12902?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč updated RF-12902:
----------------------------
Original Estimate: 30 minutes
Remaining Estimate: 30 minutes
> RF5 modules simplification
> --------------------------
>
> Key: RF-12902
> URL: https://issues.jboss.org/browse/RF-12902
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: build/distribution
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Fix For: 5.0.0.Alpha1
>
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> * get rid of docs
> ** move the framework-tests.md -> /tests.md
> * remove mobile-compatibility
> * assembly, optimized resources -> dist
> * resources-plugin, build-resources -> build
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months