Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?
I dont know why how this is so implemented but It is very normal that the user may be busy reading some section of website or be away for 20 minutes, as he comes back interacts with opened pages, how would I make that work without the state ? I think this is a common requirement for any public websites. You could just add an ajax poll components and ping the server all 5 minutes - so the session will only be destroyed if all tabs from your application are closed.
Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?
Good suggestion Thomas, For myself I would need this: 1 Hour: Keep session alive with p:poll 1 Hour: Render p:idleMonitor instead and warn for activity and session destroy in x minutes. The switch to a idleMonitor would require that you check the submitted request parameters and this way know if poll component triggered the request or the user. A plain p:poll is unacceptable for our system for security reasons. On 13 February 2014 09:26, Thomas Andraschko andraschko.tho...@gmail.comwrote: I dont know why how this is so implemented but It is very normal that the user may be busy reading some section of website or be away for 20 minutes, as he comes back interacts with opened pages, how would I make that work without the state ? I think this is a common requirement for any public websites. You could just add an ajax poll components and ping the server all 5 minutes - so the session will only be destroyed if all tabs from your application are closed.
A beatiful web site on jsf and JSF2.2
http://jsflive.wordpress.com/ Hi have found the web site above with many post on jsf2.2 . -- View this message in context: http://myfaces.10567.n7.nabble.com/A-beatiful-web-site-on-jsf-and-JSF2-2-tp117149.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object borderObj; boolean alignVertical = false; int border = 0; if (null != component.getAttributes().get(layout)) { alignStr = (String) component.getAttributes().get(layout); alignVertical = alignStr.equalsIgnoreCase(pageDirection); } if (null != component.getAttributes().get(BORDER)) { borderObj = component.getAttributes().get(BORDER); border = (Integer) borderObj; } Converter converter = null; if (component instanceof ValueHolder) { converter = ((ValueHolder)component).getConverter(); } renderBeginText(component, border, alignVertical, context, true); IteratorSelectItem items = RenderKitUtils.getSelectItems(context, component); Object currentSelections = getCurrentSelectedValues(component); Object[] submittedValues = getSubmittedSelectedValues(component); MapString, Object attributes = component.getAttributes(); OptionComponentInfo optionInfo = new OptionComponentInfo((String) attributes.get(disabledClass), (String) attributes.get(enabledClass), (String) attributes.get(unselectedClass), (String) attributes.get(selectedClass), Util.componentIsDisabled(component), isHideNoSelection(component)); int idx = -1; while (items.hasNext()) { SelectItem curItem = items.next(); idx++; // If we come across a group of options, render them as a nested // table. if (curItem instanceof SelectItemGroup) { // write out the label for the group. if (curItem.getLabel() != null) { if (alignVertical) { writer.startElement(TR, component); } writer.startElement(TD, component); writer.writeText(curItem.getLabel(), component, LABEL); writer.endElement(TD); if (alignVertical)
Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?
Karl, p:poll introduces security concerns? Please elaborate/clarify. Thanks. On Feb 13, 2014 3:39 AM, Karl Kildén karl.kil...@gmail.com wrote: Good suggestion Thomas, For myself I would need this: 1 Hour: Keep session alive with p:poll 1 Hour: Render p:idleMonitor instead and warn for activity and session destroy in x minutes. The switch to a idleMonitor would require that you check the submitted request parameters and this way know if poll component triggered the request or the user. A plain p:poll is unacceptable for our system for security reasons. On 13 February 2014 09:26, Thomas Andraschko andraschko.tho...@gmail.com wrote: I dont know why how this is so implemented but It is very normal that the user may be busy reading some section of website or be away for 20 minutes, as he comes back interacts with opened pages, how would I make that work without the state ? I think this is a common requirement for any public websites. You could just add an ajax poll components and ping the server all 5 minutes - so the session will only be destroyed if all tabs from your application are closed.
Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?
It's just that if you just do p:poll every five minutes they are never logged out from activity. This has actually caused us to fail a security screening in the past. 1. Users use security system before leaving office, forgets to logout and the PC does not lock from inactivity either 2. In the middle of the night a burglar breaks in and has direct access to system because p:poll has kept stuff warm for him 3. Lose Customer To clarify our users might just leave with computer logged on and system logged on so session timeout is essential. In general they actually want really short session timeouts but the tricky part is that for some pages they want 1H or similar. When they work on those pages they can't just lose the session so we warn them in advance. Might be enough to just use p:idleMonitor. Our solution is homemade because we don't have primefaces in that product so I was brainstorming when I mentioned it. For us it's DWR that keeps the session alive but in the future it will be p:push. TLDR: If you use p:poll don't forget that users may forget to logout and p:poll will disable session timeout. On 13 February 2014 12:52, Howard W. Smith, Jr. smithh032...@gmail.comwrote: Karl, p:poll introduces security concerns? Please elaborate/clarify. Thanks. On Feb 13, 2014 3:39 AM, Karl Kildén karl.kil...@gmail.com wrote: Good suggestion Thomas, For myself I would need this: 1 Hour: Keep session alive with p:poll 1 Hour: Render p:idleMonitor instead and warn for activity and session destroy in x minutes. The switch to a idleMonitor would require that you check the submitted request parameters and this way know if poll component triggered the request or the user. A plain p:poll is unacceptable for our system for security reasons. On 13 February 2014 09:26, Thomas Andraschko andraschko.tho...@gmail.com wrote: I dont know why how this is so implemented but It is very normal that the user may be busy reading some section of website or be away for 20 minutes, as he comes back interacts with opened pages, how would I make that work without the state ? I think this is a common requirement for any public websites. You could just add an ajax poll components and ping the server all 5 minutes - so the session will only be destroyed if all tabs from your application are closed.
Composite components in myfaces 2.2.
Hi! I just upgraded from 2.1 to 2.2 and have rendering problem because xml doctype and html tag are rendered right before composite component. These break the layout and should just be swallowed. Thanks for any advice!
Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object borderObj; boolean alignVertical = false; int border = 0; if (null != component.getAttributes().get(layout)) { alignStr = (String) component.getAttributes().get(layout); alignVertical = alignStr.equalsIgnoreCase(pageDirection); } if (null != component.getAttributes().get(BORDER)) { borderObj = component.getAttributes().get(BORDER); border = (Integer) borderObj; } Converter converter = null; if (component instanceof ValueHolder) { converter = ((ValueHolder)component).getConverter(); } renderBeginText(component, border, alignVertical, context, true); IteratorSelectItem items = RenderKitUtils.getSelectItems(context, component); Object currentSelections = getCurrentSelectedValues(component); Object[] submittedValues = getSubmittedSelectedValues(component); MapString, Object attributes = component.getAttributes(); OptionComponentInfo optionInfo = new OptionComponentInfo((String) attributes.get(disabledClass), (String) attributes.get(enabledClass), (String) attributes.get(unselectedClass), (String) attributes.get(selectedClass), Util.componentIsDisabled(component), isHideNoSelection(component)); int idx = -1; while (items.hasNext()) { SelectItem curItem = items.next(); idx++; // If we
Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
in tomee you can also use mojarra but I'd just keep my component portable with myfaces if possible Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-02-13 13:23 GMT+01:00 Thomas Andraschko andraschko.tho...@gmail.com: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object borderObj; boolean alignVertical = false; int border = 0; if (null != component.getAttributes().get(layout)) { alignStr = (String) component.getAttributes().get(layout); alignVertical = alignStr.equalsIgnoreCase(pageDirection); } if (null != component.getAttributes().get(BORDER)) { borderObj = component.getAttributes().get(BORDER); border = (Integer) borderObj; } Converter converter = null; if (component instanceof ValueHolder) { converter = ((ValueHolder)component).getConverter(); } renderBeginText(component, border, alignVertical, context, true); IteratorSelectItem items = RenderKitUtils.getSelectItems(context, component); Object currentSelections = getCurrentSelectedValues(component); Object[] submittedValues = getSubmittedSelectedValues(component); MapString, Object attributes = component.getAttributes(); OptionComponentInfo optionInfo = new OptionComponentInfo((String) attributes.get(disabledClass), (String) attributes.get(enabledClass), (String) attributes.get(unselectedClass),
Aw: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
I didn't expect anyone to rewrite that code, i just wanted to present the whole problem :-) As i said, i'd accept a MyFaces port too, it's just that my shots at a solution were unsuccessful. For example I tried to extend from Tobago's MenuRenderer instead of Mojarra's, but it said that MenuRenderer in Tobago is final, although I'm not sure that that's the correct approach in the first place. Gesendet: Donnerstag, 13. Februar 2014 um 13:23 Uhr Von: Thomas Andraschko andraschko.tho...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object borderObj; boolean alignVertical = false; int border = 0; if (null != component.getAttributes().get(layout)) { alignStr = (String) component.getAttributes().get(layout); alignVertical = alignStr.equalsIgnoreCase(pageDirection); } if (null != component.getAttributes().get(BORDER)) { borderObj = component.getAttributes().get(BORDER); border = (Integer) borderObj; } Converter converter = null; if (component instanceof ValueHolder) { converter = ((ValueHolder)component).getConverter(); } renderBeginText(component, border, alignVertical, context, true); IteratorSelectItem items = RenderKitUtils.getSelectItems(context, component); Object currentSelections = getCurrentSelectedValues(component); Object[] submittedValues = getSubmittedSelectedValues(component); MapString, Object attributes = component.getAttributes(); OptionComponentInfo optionInfo = new OptionComponentInfo((String) attributes.get(disabledClass), (String) attributes.get(enabledClass), (String) attributes.get(unselectedClass), (String) attributes.get(selectedClass), Util.componentIsDisabled(component), isHideNoSelection(component)); int idx = -1; while (items.hasNext()) { SelectItem curItem = items.next(); idx++; // If we come
Aw: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
Agreed, i really don't want to deploy Mojarra to TomEE. Problem is I don't know how to port the Mojarra dependent code to MyFaces. It starts with me not knowing which MyFaces maven dependencies i need to import to replace the old imports.. Gesendet: Donnerstag, 13. Februar 2014 um 13:25 Uhr Von: Romain Manni-Bucau rmannibu...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE in tomee you can also use mojarra but I'd just keep my component portable with myfaces if possible Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau[http://fr.linkedin.com/in/rmannibucau] Github: https://github.com/rmannibucau[https://github.com/rmannibucau] 2014-02-13 13:23 GMT+01:00 Thomas Andraschko andraschko.tho...@gmail.com: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object borderObj; boolean alignVertical = false; int border = 0; if (null != component.getAttributes().get(layout)) { alignStr = (String) component.getAttributes().get(layout); alignVertical = alignStr.equalsIgnoreCase(pageDirection); } if (null != component.getAttributes().get(BORDER)) { borderObj = component.getAttributes().get(BORDER); border = (Integer) borderObj; } Converter converter = null; if (component instanceof ValueHolder) { converter = ((ValueHolder)component).getConverter(); } renderBeginText(component, border, alignVertical, context, true); IteratorSelectItem items = RenderKitUtils.getSelectItems(context, component); Object currentSelections = getCurrentSelectedValues(component); Object[] submittedValues = getSubmittedSelectedValues(component); MapString, Object attributes = component.getAttributes(); OptionComponentInfo optionInfo = new OptionComponentInfo((String) attributes.get(disabledClass), (String)
Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object borderObj; boolean alignVertical = false; int border = 0; if (null != component.getAttributes().get(layout)) { alignStr = (String) component.getAttributes().get(layout); alignVertical = alignStr.equalsIgnoreCase(pageDirection); } if (null != component.getAttributes().get(BORDER)) { borderObj = component.getAttributes().get(BORDER); border = (Integer) borderObj; } Converter
Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
Have you considered a custom tagHandler / composite component instead? I took a quick look but I don't recognize much sorry. On 13 February 2014 14:09, Howard W. Smith, Jr. smithh032...@gmail.comwrote: I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object borderObj; boolean alignVertical = false; int border = 0; if (null != component.getAttributes().get(layout)) { alignStr = (String)
Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?
Very interesting, Karl, and thanks for the clarification! +1 at the responses on this thread. They interested me, because for security implementation in my app is - 15 minutes session expiration (web.xml) - meta refresh tag in head tag that redirects page to view expired 'page' (got that concept/code from BalusC on stackoverflow.com) but some months ago, an enduser requested a 'keep-alive session' requirement on a page that will 'not' end his session while he using the 'payroll' page to do his work. He did not want to have to keep logging in, and having to make filter selection via p:calendar begin/end dates of payroll period, and then scroll down to job/employee that was last marked as paid. So, i found some keep-alive-session code (by BalusC on stackoverflow.com) and refactored app/page a bit to keep the session alive until he logs out of the app or until he navigates to another page. well, now that you all are talking about this, this reminds me of a recent discussion on tomcat list about (re)designing webapp to allow enduser to login and resume his work. I like that concept, and that might be the best approach to address 'security concerns'. There would be no need to p:poll, p:push, etc... just to keep the session alive or to push a message to client to 'end' the session and logout user (sometime ago, i developed some p:push + java bean code that did that, but not using that implementation in the app). polling to keep session alive seems to be the easiest way to 'satisfy' the enduser, but definitely not the most-secure, as you said earlier. this discussion may motivate me to refactor my app a bit, accordingly. thank you all! On Thu, Feb 13, 2014 at 7:07 AM, Karl Kildén karl.kil...@gmail.com wrote: It's just that if you just do p:poll every five minutes they are never logged out from activity. This has actually caused us to fail a security screening in the past. 1. Users use security system before leaving office, forgets to logout and the PC does not lock from inactivity either 2. In the middle of the night a burglar breaks in and has direct access to system because p:poll has kept stuff warm for him 3. Lose Customer To clarify our users might just leave with computer logged on and system logged on so session timeout is essential. In general they actually want really short session timeouts but the tricky part is that for some pages they want 1H or similar. When they work on those pages they can't just lose the session so we warn them in advance. Might be enough to just use p:idleMonitor. Our solution is homemade because we don't have primefaces in that product so I was brainstorming when I mentioned it. For us it's DWR that keeps the session alive but in the future it will be p:push. TLDR: If you use p:poll don't forget that users may forget to logout and p:poll will disable session timeout. On 13 February 2014 12:52, Howard W. Smith, Jr. smithh032...@gmail.com wrote: Karl, p:poll introduces security concerns? Please elaborate/clarify. Thanks. On Feb 13, 2014 3:39 AM, Karl Kildén karl.kil...@gmail.com wrote: Good suggestion Thomas, For myself I would need this: 1 Hour: Keep session alive with p:poll 1 Hour: Render p:idleMonitor instead and warn for activity and session destroy in x minutes. The switch to a idleMonitor would require that you check the submitted request parameters and this way know if poll component triggered the request or the user. A plain p:poll is unacceptable for our system for security reasons. On 13 February 2014 09:26, Thomas Andraschko andraschko.tho...@gmail.com wrote: I dont know why how this is so implemented but It is very normal that the user may be busy reading some section of website or be away for 20 minutes, as he comes back interacts with opened pages, how would I make that work without the state ? I think this is a common requirement for any public websites. You could just add an ajax poll components and ping the server all 5 minutes - so the session will only be destroyed if all tabs from your application are closed.
Aw: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
I don't think a TagHandler or a custom component can do what that code does. It's used to display a Select in a very specific way. Gesendet: Donnerstag, 13. Februar 2014 um 14:29 Uhr Von: Karl Kildén karl.kil...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE Have you considered a custom tagHandler / composite component instead? I took a quick look but I don't recognize much sorry. On 13 February 2014 14:09, Howard W. Smith, Jr. smithh032...@gmail.comwrote: I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert (writer != null); String alignStr; Object
Composite component does not render
See http://stackoverflow.com/questions/21582937/composite-component-in-jsf-2-2-will-not-render/21757729#21757729
Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
do you have a screen capture or some type of demo of the Select component? On Thu, Feb 13, 2014 at 8:39 AM, Rene Perschon chummer_r...@gmx.net wrote: I don't think a TagHandler or a custom component can do what that code does. It's used to display a Select in a very specific way. Gesendet: Donnerstag, 13. Februar 2014 um 14:29 Uhr Von: Karl Kildén karl.kil...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE Have you considered a custom tagHandler / composite component instead? I took a quick look but I don't recognize much sorry. On 13 February 2014 14:09, Howard W. Smith, Jr. smithh032...@gmail.com wrote: I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String CLASS = class; /** Representing the style string. */ private static final String STYLE = style; /** Representing the valign string. */ private static final String VALIGN = valign; // -- Public Methods @Override public void encodeEnd(FacesContext
Re: Composite component does not render
Hello Johannesburg, Your namespace is incorrect. It should be: xmlns:meg=http://java.sun.com/jsf/composite/components/topNav; Assuming that you the folder [Web root]/resources/components/topNav is where your component is. On Thursday, February 13, 2014, Johannes Murth johannes.mu...@gmail.com wrote: See http://stackoverflow.com/questions/21582937/composite-component-in-jsf-2-2-will-not-render/21757729#21757729
Re: myfaces 2.2 foe replace myfaces 2.1 into tomee
btw if you use the tomee-maven-plugin then you can automatically 'tune' the lib folders with something like this: build plugins plugin groupIdorg.apache.openejb.maven/groupId artifactIdtomee-maven-plugin/artifactId version${tomee.mavenplugin.version}/version configuration ... libs libmysql:mysql-connector-java:${mysql-connector.version}/lib libremove:myfaces-api/lib libremove:myfaces-impl/lib /libs /configuration for adding jars to your tomee plugin, just use the maven GAV coordinates. If it starts with remove:xxx, then it will remove all the jars starting with this string. LieGrue, strub On Wednesday, 12 February 2014, 19:02, Karl Kildén karl.kil...@gmail.com wrote: Try starting it outside of your IDE. If that works remove and reconnect IDE to a fresh TomEE on another path with the desired changes under /lib On 12 February 2014 18:48, maurojava mauro2java2...@gmail.com wrote: my jsk is : jdk1.7.0_25 my tomee :tomee 1.6.0 plus i have added myfaces-api2.2jar and myfaces-impl2.2.jar to tomee/lib i have removed myfaces 2.1 impl and api i not use codi -- View this message in context: http://myfaces.10567.n7.nabble.com/myfaces-2-2-foe-replace-myfaces-2-1-into-tomee-tp117127p117135.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: @FlowScoped, @Named and @ManagedBean
Hi Thanks for the example. It helps to clarify the problem. The definition of the flow has a problem: @Produces @FlowDefinition public Flow defineFlow(@FlowBuilderParameter FlowBuilder flowBuilder) { String flowId = flux; flowBuilder.id(, flowId); flowBuilder.viewNode(flowId, / + flowId + / + flowId + .xhtml). markAsStartNode(); /*flowBuilder.returnNode(returnFromFlux). fromOutcome(#{flowScopedBean.return});*/ return flowBuilder.getFlow(); } In this part: flowBuilder.viewNode(flowId, / + flowId + / + flowId + .xhtml). markAsStartNode(); you are using the flow id as a viewNodeId. That confuses the navigation algorithm because the spec says that an outcome can be a flowId, and in that sense a flowId is a global identifier that cannot be reused. The fix is just set another id: flowBuilder.viewNode(start, / + flowId + / + flowId + .xhtml). markAsStartNode(); The example only requires some small changes in FlowScopedBean and that's it. regards, Leonardo Uribe 2014-02-13 6:03 GMT-05:00 l.pe...@senat.fr l.pe...@senat.fr: On 13/02/2014 01:44, Leonardo Uribe wrote: [...] This is an edge case. Theorically it should work. Could you please provide the stack trace, so I can investigate it further?. Please find attached a mini maven project reproducing the «bug» (or maybe a PBKAC there :-) ). If you just build and debug it, you will be in the situation I just described. If you disable the Flux description bean (I just comment the @Produces and @FlowDefinition annotations to do that) and rename src/main/webapp/flux/flux-flow-empty.xml or src/main/webapp/flux/flux-flow-simple.xml to src/main/webapp/flux/flux-flow.xml you will be able to test the other situations I described. Thanks again ! Ludovic | | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT. |
Re: myfaces 2.2 foe replace myfaces 2.1 into tomee
escuse me Mark i not know maven how i can make the last your indication: - for adding jars to your tomee plugin, just use the maven GAV coordinates. If it starts with remove:xxx, then it will remove all the jars starting with this string. --- how i can put the jars dor tomme plugin using the GAV coordinates? 2014-02-13 18:44 GMT+01:00 Mark Struberg [via MyFaces] ml-node+s10567n117170...@n7.nabble.com: btw if you use the tomee-maven-plugin then you can automatically 'tune' the lib folders with something like this: build plugins plugin groupIdorg.apache.openejb.maven/groupId artifactIdtomee-maven-plugin/artifactId version${tomee.mavenplugin.version}/version configuration ... libs libmysql:mysql-connector-java:${mysql-connector.version}/lib libremove:myfaces-api/lib libremove:myfaces-impl/lib /libs /configuration for adding jars to your tomee plugin, just use the maven GAV coordinates. If it starts with remove:xxx, then it will remove all the jars starting with this string. LieGrue, strub On Wednesday, 12 February 2014, 19:02, Karl Kildén [hidden email]http://user/SendEmail.jtp?type=nodenode=117170i=0 wrote: Try starting it outside of your IDE. If that works remove and reconnect IDE to a fresh TomEE on another path with the desired changes under /lib On 12 February 2014 18:48, maurojava [hidden email]http://user/SendEmail.jtp?type=nodenode=117170i=1 wrote: my jsk is : jdk1.7.0_25 my tomee :tomee 1.6.0 plus i have added myfaces-api2.2jar and myfaces-impl2.2.jar to tomee/lib i have removed myfaces 2.1 impl and api i not use codi -- View this message in context: http://myfaces.10567.n7.nabble.com/myfaces-2-2-foe-replace-myfaces-2-1-into-tomee-tp117127p117135.html Sent from the MyFaces - Users mailing list archive at Nabble.com. -- If you reply to this email, your message will be added to the discussion below: http://myfaces.10567.n7.nabble.com/myfaces-2-2-foe-replace-myfaces-2-1-into-tomee-tp117127p117170.html To unsubscribe from myfaces 2.2 foe replace myfaces 2.1 into tomee, click herehttp://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=117127code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDExNzEyN3wtMTExNzE4NzYyNQ== . NAMLhttp://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://myfaces.10567.n7.nabble.com/myfaces-2-2-foe-replace-myfaces-2-1-into-tomee-tp117127p117173.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: @FlowScoped, @Named and @ManagedBean
On 13/02/2014 19:01, Leonardo Uribe wrote: Hi Thanks for the example. It helps to clarify the problem. The definition of the flow has a problem: @Produces @FlowDefinition public Flow defineFlow(@FlowBuilderParameter FlowBuilder flowBuilder) { String flowId = flux; flowBuilder.id(, flowId); flowBuilder.viewNode(flowId, / + flowId + / + flowId + .xhtml). markAsStartNode(); /*flowBuilder.returnNode(returnFromFlux). fromOutcome(#{flowScopedBean.return});*/ return flowBuilder.getFlow(); } In this part: flowBuilder.viewNode(flowId, / + flowId + / + flowId + .xhtml). markAsStartNode(); you are using the flow id as a viewNodeId. That confuses the navigation algorithm because the spec says that an outcome can be a flowId, and in that sense a flowId is a global identifier that cannot be reused. The fix is just set another id: flowBuilder.viewNode(start, / + flowId + / + flowId + .xhtml). markAsStartNode(); The example only requires some small changes in FlowScopedBean and that's it. ok for this one, I will try it tomorrow. And can you tell me what was wrong with XML file (or the empty XML file) ? Thank you, Ludovic | | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT. |
Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?
Thanks a lot Leonardo for the solution. Played somewhat with it, looks like it'll works for me. The data survives session destroys. What is this attributes map otherwise really meant for, to maintain JSF internal viewstate ? Is it safe for me to use it like that ? Looks like a hack infact:) I could use the attributes map to store values/ objects, can't I just use this map to store the viewscoped beans simply? On Thu, Feb 13, 2014 at 11:05 AM, Leonardo Uribe lu4...@gmail.com wrote: Hi In JSF 2.2 it was decided to store view scope beans always in session (take a look at the description of @ViewScoped annotation in the javadoc). But you can just call facesContext.getViewRoot() and use the attribute map. Just remember the values there must be Serializable or implement StateHolder. In my understanding, this was done in this way to support @PreDestroy annotation when the session is expired. regards, Leonardo Uribe 2014-02-12 23:28 GMT-05:00 user 01 user...@gmail.com: I'm using Myfaces 2.2 with Client-side state saving. I see that the ViewScoped beans data stored in viewmap is lost after the user session is destroyed. I came to know, not sure if it is correct, that this is the expected behavior but then what's the way to avoid view expired exceptions after session destroy? My problem is that I destroy the user session pretty quickly after some inactivity period(like after 20 minutes) but I want the viewscope data to survive even after that(when using client saving) so that when the user comes back after session destroy, he doesn't need to do a page refresh. I dont know why how this is so implemented but It is very normal that the user may be busy reading some section of website or be away for 20 minutes, as he comes back interacts with opened pages, how would I make that work without the state ? I think this is a common requirement for any public websites. I think the internally used jsf viewstate is not lost, if I use client side state saving(as my pages still work), but then why are those viewscoped beans scoped that were also serialized to page along with the viewstate. If this the designed behavior, Is there any way I could make the view scoped data survive session expiration ?
Re: myfaces 2.2 foe replace myfaces 2.1 into tomee
GAV = groupId + artifactId + version. See the sample of the mysql connector libmysql:mysql-connector-java:${mysql-connector.version}/lib For myfaces this would be liborg.apache.myfaces.core:myfaces-api:${myfaces.version}/lib LieGrue, strub On Thursday, 13 February 2014, 19:09, maurojava mauro2java2...@gmail.com wrote: escuse me Mark i not know maven how i can make the last your indication: - for adding jars to your tomee plugin, just use the maven GAV coordinates. If it starts with remove:xxx, then it will remove all the jars starting with this string. --- how i can put the jars dor tomme plugin using the GAV coordinates? 2014-02-13 18:44 GMT+01:00 Mark Struberg [via MyFaces] ml-node+s10567n117170...@n7.nabble.com: btw if you use the tomee-maven-plugin then you can automatically 'tune' the lib folders with something like this: build plugins plugin groupIdorg.apache.openejb.maven/groupId artifactIdtomee-maven-plugin/artifactId version${tomee.mavenplugin.version}/version configuration ... libs libmysql:mysql-connector-java:${mysql-connector.version}/lib libremove:myfaces-api/lib libremove:myfaces-impl/lib /libs /configuration for adding jars to your tomee plugin, just use the maven GAV coordinates. If it starts with remove:xxx, then it will remove all the jars starting with this string. LieGrue, strub On Wednesday, 12 February 2014, 19:02, Karl Kildén [hidden email]http://user/SendEmail.jtp?type=nodenode=117170i=0 wrote: Try starting it outside of your IDE. If that works remove and reconnect IDE to a fresh TomEE on another path with the desired changes under /lib On 12 February 2014 18:48, maurojava [hidden email]http://user/SendEmail.jtp?type=nodenode=117170i=1 wrote: my jsk is : jdk1.7.0_25 my tomee :tomee 1.6.0 plus i have added myfaces-api2.2jar and myfaces-impl2.2.jar to tomee/lib i have removed myfaces 2.1 impl and api i not use codi -- View this message in context: http://myfaces.10567.n7.nabble.com/myfaces-2-2-foe-replace-myfaces-2-1-into-tomee-tp117127p117135.html Sent from the MyFaces - Users mailing list archive at Nabble.com. -- If you reply to this email, your message will be added to the discussion below: http://myfaces.10567.n7.nabble.com/myfaces-2-2-foe-replace-myfaces-2-1-into-tomee-tp117127p117170.html To unsubscribe from myfaces 2.2 foe replace myfaces 2.1 into tomee, click herehttp://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=117127code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDExNzEyN3wtMTExNzE4NzYyNQ== . NAMLhttp://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://myfaces.10567.n7.nabble.com/myfaces-2-2-foe-replace-myfaces-2-1-into-tomee-tp117127p117173.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Aw: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
Yes, here it is. It's a two-stage component which displays a hierarchical (2 levels) selection choice. Gesendet: Donnerstag, 13. Februar 2014 um 16:57 Uhr Von: Howard W. Smith, Jr. smithh032...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE do you have a screen capture or some type of demo of the Select component? On Thu, Feb 13, 2014 at 8:39 AM, Rene Perschon chummer_r...@gmx.net wrote: I don't think a TagHandler or a custom component can do what that code does. It's used to display a Select in a very specific way. Gesendet: Donnerstag, 13. Februar 2014 um 14:29 Uhr Von: Karl Kildén karl.kil...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE Have you considered a custom tagHandler / composite component instead? I took a quick look but I don't recognize much sorry. On 13 February 2014 14:09, Howard W. Smith, Jr. smithh032...@gmail.com wrote: I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /** Representing the class string. */ private static final String
Re: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
Rene, I at least can't see anything. Another thing to think about it what impl stuff you have actually worked with? I mean mojarra should have about the same stuff as myfaces? To make myself clear, what does the components and stuff you extend really belong to? Shouldn't be impossible to find equivalents in myfaces... On 14 February 2014 08:45, Rene Perschon chummer_r...@gmx.net wrote: Yes, here it is. It's a two-stage component which displays a hierarchical (2 levels) selection choice. Gesendet: Donnerstag, 13. Februar 2014 um 16:57 Uhr Von: Howard W. Smith, Jr. smithh032...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE do you have a screen capture or some type of demo of the Select component? On Thu, Feb 13, 2014 at 8:39 AM, Rene Perschon chummer_r...@gmx.net wrote: I don't think a TagHandler or a custom component can do what that code does. It's used to display a Select in a very specific way. Gesendet: Donnerstag, 13. Februar 2014 um 14:29 Uhr Von: Karl Kildén karl.kil...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE Have you considered a custom tagHandler / composite component instead? I took a quick look but I don't recognize much sorry. On 13 February 2014 14:09, Howard W. Smith, Jr. smithh032...@gmail.com wrote: I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static
Aw: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
of course, no attachments https://dl.dropboxusercontent.com/u/16379590/screens/custom_1.png https://dl.dropboxusercontent.com/u/16379590/screens/custom_2.png Gesendet: Donnerstag, 13. Februar 2014 um 16:57 Uhr Von: Howard W. Smith, Jr. smithh032...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE do you have a screen capture or some type of demo of the Select component? On Thu, Feb 13, 2014 at 8:39 AM, Rene Perschon chummer_r...@gmx.net wrote: I don't think a TagHandler or a custom component can do what that code does. It's used to display a Select in a very specific way. Gesendet: Donnerstag, 13. Februar 2014 um 14:29 Uhr Von: Karl Kildén karl.kil...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE Have you considered a custom tagHandler / composite component instead? I took a quick look but I don't recognize much sorry. On 13 February 2014 14:09, Howard W. Smith, Jr. smithh032...@gmail.com wrote: I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute; import com.sun.faces.renderkit.AttributeManager; import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.renderkit.html_basic.MenuRenderer; import com.sun.faces.util.RequestStateManager; import com.sun.faces.util.Util; /** * {@inheritDoc}. */ public class CustomSelectManyCheckboxListRenderer extends MenuRenderer { /** {@inheritDoc}. */ private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX); /** Representing the border string. */ private static final String BORDER = border; /** Representing the tr string. */ private static final String TR = tr; /** Representing the td string. */ private static final String TD = td; /** Representing the label string. */ private static final String LABEL = label; /** Representing the newline string. */ private static final String NEWLINE = \n; /** Representing the tab string. */ private static final String TAB = \t; /**
Aw: Re: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE
Well the imports of com.sun.faces are offending, starting with MenuRenderer from which our custom renderer extends.. I've already tried to just swap the imports (for example for Apache Tobago's MenuRenderer, but it's final). I barely know about com.sun.faces and i've never used MyFaces before, so it's really hard for me to figure out the equivalents here Gesendet: Freitag, 14. Februar 2014 um 08:49 Uhr Von: Karl Kildén karl.kil...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE Rene, I at least can't see anything. Another thing to think about it what impl stuff you have actually worked with? I mean mojarra should have about the same stuff as myfaces? To make myself clear, what does the components and stuff you extend really belong to? Shouldn't be impossible to find equivalents in myfaces... On 14 February 2014 08:45, Rene Perschon chummer_r...@gmx.net wrote: Yes, here it is. It's a two-stage component which displays a hierarchical (2 levels) selection choice. Gesendet: Donnerstag, 13. Februar 2014 um 16:57 Uhr Von: Howard W. Smith, Jr. smithh032...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE do you have a screen capture or some type of demo of the Select component? On Thu, Feb 13, 2014 at 8:39 AM, Rene Perschon chummer_r...@gmx.net wrote: I don't think a TagHandler or a custom component can do what that code does. It's used to display a Select in a very specific way. Gesendet: Donnerstag, 13. Februar 2014 um 14:29 Uhr Von: Karl Kildén karl.kil...@gmail.com An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE Have you considered a custom tagHandler / composite component instead? I took a quick look but I don't recognize much sorry. On 13 February 2014 14:09, Howard W. Smith, Jr. smithh032...@gmail.com wrote: I think Leonardo, Gerhard, or one of the other committers may provide her some good help, just to get another MyFaces user, especially when one is migrating from Mojarra to MyFaces. @Renee, +1 your goal/request. I migrated from Mojarra to MyFaces, first, and then 2 months later, I migrated from Glassfish to tomee (and JSF managed beans to CDI managed beans at same time). Thomas, Romain, Mark Struberg, and others provided great help and motivation. Apache tomee, MyFaces, tomcat user mail lists are definitely the place to be. But I didn't have code dependent on the Mojarra library like you do. Still, it took me about a week to migrate from Mojarra to MyFaces. Thomas and Leonardo motivated me to start the migration after reading about the performance comparison between Mojarra and MyFaces. Mark Struberg blog, why is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-) I love high performance, that's why I opted to use MyFaces, tomee, OpenWebBeans, and JUEL. Wishing you much success. On Feb 13, 2014 7:23 AM, Thomas Andraschko andraschko.tho...@gmail.com wrote: I don't think that anyone will port your complete code and give you a complete solution ;) The biggest problem is AFAIR that the renderer implementations are not in the API packages. So you have to rebuild all this functionality without dependencies to the Impl. e.g. Attribute,AttributeManager - String[] with attribute namens Move all the utils functions to your own code (Util.componentIsDisabled, RenderKitUtils.getSelectItems. etc.) The most code doesn't really depent on the IMPL code. 2014-02-13 12:44 GMT+01:00 Rene Perschon chummer_r...@gmx.net: Hi everyone! I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now the problem is that this application contains a custom component which was unfortunately coded with hard dependencies on com.sun.faces classes (maven dependency jsf-impl). Now my question is how can i port this component in such a way that it is independent from any concrete JSF implementation (or at least in such a way that it works with MyFaces). Here's the component: import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UINamingContainer; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.model.SelectItem; import javax.faces.model.SelectItemGroup; import com.sun.faces.renderkit.Attribute;