Re: Tomahawk 20-1.1.14: NestedNullException / BaseSortableModel.sort() contract violation / commandSortHeader and missing custom Comparator

2017-07-28 Thread Mike Kienenberger
Note that while we have no current plans to release a new version of
tomahawk, we would be supportive of any volunteer jumping in, taking
over maintenance and new development of tomahawk, and rolling a
release.

On Fri, Jul 28, 2017 at 7:43 AM, Mike Kienenberger <mkien...@gmail.com> wrote:
> We don't currently have any committers actively working on tomahawk.
>
> The original JIRA for that was
> https://issues.apache.org/jira/browse/TOMAHAWK-952 and it looks like I
> only started to do the groundwork add that support.
>
> As this was 10 years ago, I don't really remember any details about it.
>
> My clients have long ago switched over to primefaces.  I have only one
> legacy app in maintenance mode that uses tomahawk, so I doubt I will
> ever revisit working on this.
>
> Your best bet is to file a bug and propose a fix in the form of a
> unified diff.  While someone (maybe me) will apply that fix, I don't
> know if we have any plans to do an official tomahawk release any time
> soon.
>
> From my email, it looks like part of the problem was determining how
> to maintain backwards compatibility short of subclassing the model.  I
> guess you could try a delegating approach.  Sorry, but I doubt I will
> be of any more help than that.
>
>
> On Tue, Jul 25, 2017 at 8:01 AM, s-awinte <s-awi...@haw-landshut.de> wrote:
>> Hi,
>>
>> I'm currently trying to use a  Tomahawk tag inside
>>  with auto sorting, similar
>> to the example here:
>> https://wiki.apache.org/myfaces/Working_with_auto_sortable_tables
>>
>> Problem is, the tag's "propertyName" references to a string property of an
>> attribute of a given entity object (which itself does not extend
>> BaseSortableModel) and the entity's attribute is optional (nullable), which
>> will lead to a NestedNullException:
>>
>> ERROR [org.apache.myfaces.component.html.ext.SortableModel]...
>> org.apache.commons.beanutils.NestedNullException: Null property value for
>> 'attribute.shortName' on bean class 'class
>> com.my.app.model.food.exotic.fruit'
>> ...
>> javax.faces.FacesException: java.lang.IllegalArgumentException: Comparison
>> method violates its general contract!
>> at
>> javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2352)
>> ...
>> Caused by: java.lang.IllegalArgumentException: Comparison method violates
>> its general contract!
>> at java.util.TimSort.mergeLo(TimSort.java:777) [rt.jar:1.8.0_60]
>> at java.util.TimSort.mergeAt(TimSort.java:514) [rt.jar:1.8.0_60]
>> at java.util.TimSort.mergeCollapse(TimSort.java:439) [rt.jar:1.8.0_60]
>> at java.util.TimSort.sort(TimSort.java:245) [rt.jar:1.8.0_60]
>> at java.util.Arrays.sort(Arrays.java:1512) [rt.jar:1.8.0_60]
>> at java.util.ArrayList.sort(ArrayList.java:1454) [rt.jar:1.8.0_60]
>> at java.util.Collections.sort(Collections.java:175) [rt.jar:1.8.0_60]
>> at
>> org.apache.myfaces.component.html.ext.BaseSortableModel.sort(BaseSortableModel.java:201)
>> [tomahawk20-1.1.14.jar:1.1.14]
>> at
>> org.apache.myfaces.component.html.ext.BaseSortableModel.setComparator(BaseSortableModel.java:62)
>> [tomahawk20-1.1.14.jar:1.1.14]
>> at
>> org.apache.myfaces.component.html.ext.SortableModel.setSortCriteria(SortableModel.java:143)
>> [tomahawk20-1.1.14.jar:1.1.14]
>> at
>> org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.createDataModel(AbstractHtmlDataTable.java:1643)
>> [tomahawk20-1.1.14.jar:1.1.14]
>> at
>> org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:932)
>> [tomahawk20-1.1.14.jar:1.1.14]
>> at
>> org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getDataModel(AbstractHtmlDataTable.java:1597)
>> [tomahawk20-1.1.14.jar:1.1.14]
>> at
>> org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlDataTableHack.java:103)
>> [tomahawk20-1.1.14.jar:1.1.14]
>> at sun.reflect.GeneratedMethodAccessor32969.invoke(Unknown Source)
>> [:1.8.0_60]
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> [rt.jar:1.8.0_60]
>> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
>> ...
>>
>>
>> As I understand it, the row Objects of a sortable  column are
>> being automatically wrapped in SortableModel, which brings its own
>> "RowDataComparator" via BaseSortableModel.sort(), which seems to be
>>
>> a) not null-safe (for the wrapped model)
>> b) not supporting nulls first/last
>> c) in this case vi

Re: Tomahawk 20-1.1.14: NestedNullException / BaseSortableModel.sort() contract violation / commandSortHeader and missing custom Comparator

2017-07-28 Thread Mike Kienenberger
We don't currently have any committers actively working on tomahawk.

The original JIRA for that was
https://issues.apache.org/jira/browse/TOMAHAWK-952 and it looks like I
only started to do the groundwork add that support.

As this was 10 years ago, I don't really remember any details about it.

My clients have long ago switched over to primefaces.  I have only one
legacy app in maintenance mode that uses tomahawk, so I doubt I will
ever revisit working on this.

Your best bet is to file a bug and propose a fix in the form of a
unified diff.  While someone (maybe me) will apply that fix, I don't
know if we have any plans to do an official tomahawk release any time
soon.

>From my email, it looks like part of the problem was determining how
to maintain backwards compatibility short of subclassing the model.  I
guess you could try a delegating approach.  Sorry, but I doubt I will
be of any more help than that.


On Tue, Jul 25, 2017 at 8:01 AM, s-awinte  wrote:
> Hi,
>
> I'm currently trying to use a  Tomahawk tag inside
>  with auto sorting, similar
> to the example here:
> https://wiki.apache.org/myfaces/Working_with_auto_sortable_tables
>
> Problem is, the tag's "propertyName" references to a string property of an
> attribute of a given entity object (which itself does not extend
> BaseSortableModel) and the entity's attribute is optional (nullable), which
> will lead to a NestedNullException:
>
> ERROR [org.apache.myfaces.component.html.ext.SortableModel]...
> org.apache.commons.beanutils.NestedNullException: Null property value for
> 'attribute.shortName' on bean class 'class
> com.my.app.model.food.exotic.fruit'
> ...
> javax.faces.FacesException: java.lang.IllegalArgumentException: Comparison
> method violates its general contract!
> at
> javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2352)
> ...
> Caused by: java.lang.IllegalArgumentException: Comparison method violates
> its general contract!
> at java.util.TimSort.mergeLo(TimSort.java:777) [rt.jar:1.8.0_60]
> at java.util.TimSort.mergeAt(TimSort.java:514) [rt.jar:1.8.0_60]
> at java.util.TimSort.mergeCollapse(TimSort.java:439) [rt.jar:1.8.0_60]
> at java.util.TimSort.sort(TimSort.java:245) [rt.jar:1.8.0_60]
> at java.util.Arrays.sort(Arrays.java:1512) [rt.jar:1.8.0_60]
> at java.util.ArrayList.sort(ArrayList.java:1454) [rt.jar:1.8.0_60]
> at java.util.Collections.sort(Collections.java:175) [rt.jar:1.8.0_60]
> at
> org.apache.myfaces.component.html.ext.BaseSortableModel.sort(BaseSortableModel.java:201)
> [tomahawk20-1.1.14.jar:1.1.14]
> at
> org.apache.myfaces.component.html.ext.BaseSortableModel.setComparator(BaseSortableModel.java:62)
> [tomahawk20-1.1.14.jar:1.1.14]
> at
> org.apache.myfaces.component.html.ext.SortableModel.setSortCriteria(SortableModel.java:143)
> [tomahawk20-1.1.14.jar:1.1.14]
> at
> org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.createDataModel(AbstractHtmlDataTable.java:1643)
> [tomahawk20-1.1.14.jar:1.1.14]
> at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:932)
> [tomahawk20-1.1.14.jar:1.1.14]
> at
> org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getDataModel(AbstractHtmlDataTable.java:1597)
> [tomahawk20-1.1.14.jar:1.1.14]
> at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlDataTableHack.java:103)
> [tomahawk20-1.1.14.jar:1.1.14]
> at sun.reflect.GeneratedMethodAccessor32969.invoke(Unknown Source)
> [:1.8.0_60]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [rt.jar:1.8.0_60]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
> ...
>
>
> As I understand it, the row Objects of a sortable  column are
> being automatically wrapped in SortableModel, which brings its own
> "RowDataComparator" via BaseSortableModel.sort(), which seems to be
>
> a) not null-safe (for the wrapped model)
> b) not supporting nulls first/last
> c) in this case violating the Comparator contract
>
> Regardless of the contract violation problem (probably due to a
> NestedNullException inside RowDataComparator or because
> BaseSortableModel.sort() never returning -1), I'd like in general to be able
> to use a custom Comparator here, which can handle nested nulls and
> implements a customized comparison, but  does not seem
> to support this.
>
> Most references I find, completely ignore the commandSortHeader auto-sorting
> and do the implement a custom backing Bean.sort(), an approach I'd like to
> avoid, if possible.
>
> There would seem to exist a solution for the problem in this somewhat dated
> example here, but it's unclear to me, if it ever managed to make it into
> tomahawk's code base:
> http://grokbase.com/t/myfaces/dev/073ev810b8/sortablemodel-and-t-datatable-changes-improvements
>
> In Trinidad, it would seem, that there was a similar (now resolved) 

[COMMUNITY] Henning Nöth - Committer

2017-03-31 Thread Mike Kienenberger
The MyFaces PMC is proud to announce a new addition to our community.

Please welcome Henning Nöth as the newest MyFaces committer!
Henning is an active member of the MyFaces community, especially in
MyFaces Tobago.

Welcome & regards,
Mike


[COMMUNITY] Dennis Kieselhorst - PMC member

2017-02-06 Thread Mike Kienenberger
The MyFaces PMC is proud to announce an addition to our project
management committee.

Please welcome Dennis Kieselhorst as the newest MyFaces PMC Member!
Dennis has been an active committer and community member in the
MyFaces community for the last two years and his inclusion into the
PMC is long overdue!

Welcome & regards,
Mike


Re: CVE-2016-5019: MyFaces Trinidad view state deserialization security vulnerability

2016-09-29 Thread Mike Kienenberger
Clarification: The first line in this CVE [1] was a copy error
during message composition and is not part of the CVE.  This line can
make it sound as if CVE-2016-5019 is only an information disclosure
vulnerability rather than a deserialization attack vector.  I
apologize for the confusion.

On Thu, Sep 29, 2016 at 11:50 AM, Mike Kienenberger <mkien...@gmail.com> wrote:
> CVE-2016-5019 Apache MyFaces Trinidad information disclosure vulnerability
>
> Severity: Important
>
> Vendor:
> The Apache Software Foundation
>
> Versions Affected:
> Trinidad from 1.0.0 to 1.0.13
> Trinidad from 1.2.1 to 1.2.14
> Trinidad from 2.0.0 to 2.0.1
> Trinidad from 2.1.0 to 2.1.1
>
> Description:
>
> Trinidad’s CoreResponseStateManager both reads and writes view state
> strings using
> ObjectInputStream/ObjectOutputStream directly.  By doing so, Trinidad
> bypasses the
> view state security features provided by the JSF implementations - ie. the 
> view
> state is not encrypted and is not MAC’ed.
>
> Trinidad’s CoreResponseStateManager will blindly deserialize untrusted
> view state
> strings, which makes Trinidad-based applications vulnerable to deserialization
> attacks.
>
> Mitigation:
>
> All users of Apache Trinidad should upgrade to either 2.1.2, 2.0.2, or
> 1.2.15 and
> enable view state encryption using org.apache.myfaces.USE_ENCRYPTION and 
> related
> web configuration parameters.
> See http://wiki.apache.org/myfaces/Secure_Your_Application for details.
>
> Upgrading all Commons Collections jars on the class path to 3.2.2/4.1
> will prevent
> certain well-known vectors of attack, but will not entirely resolve this 
> issue.
>
> References:
> https://issues.apache.org/jira/browse/TRINIDAD-2542
>
> This issue was discovered by Teemu Kääriäinen and reported by Andy Schwartz


CVE-2016-5019: MyFaces Trinidad view state deserialization security vulnerability

2016-09-29 Thread Mike Kienenberger
CVE-2016-5019 Apache MyFaces Trinidad information disclosure vulnerability

Severity: Important

Vendor:
The Apache Software Foundation

Versions Affected:
Trinidad from 1.0.0 to 1.0.13
Trinidad from 1.2.1 to 1.2.14
Trinidad from 2.0.0 to 2.0.1
Trinidad from 2.1.0 to 2.1.1

Description:

Trinidad’s CoreResponseStateManager both reads and writes view state
strings using
ObjectInputStream/ObjectOutputStream directly.  By doing so, Trinidad
bypasses the
view state security features provided by the JSF implementations - ie. the view
state is not encrypted and is not MAC’ed.

Trinidad’s CoreResponseStateManager will blindly deserialize untrusted
view state
strings, which makes Trinidad-based applications vulnerable to deserialization
attacks.

Mitigation:

All users of Apache Trinidad should upgrade to either 2.1.2, 2.0.2, or
1.2.15 and
enable view state encryption using org.apache.myfaces.USE_ENCRYPTION and related
web configuration parameters.
See http://wiki.apache.org/myfaces/Secure_Your_Application for details.

Upgrading all Commons Collections jars on the class path to 3.2.2/4.1
will prevent
certain well-known vectors of attack, but will not entirely resolve this issue.

References:
https://issues.apache.org/jira/browse/TRINIDAD-2542

This issue was discovered by Teemu Kääriäinen and reported by Andy Schwartz


[ANNOUNCE][CVE-2016-5019] Apache MyFaces Trinidad 1.2.15 released

2016-09-29 Thread Mike Kienenberger
The Apache MyFaces team is pleased to announce the release of Apache
MyFaces Trinidad 1.2.15.

MyFaces Trinidad is a feature-rich renderkit for JavaServer(tm) Faces
that provides an extendibles framework and extensive skinning support.
This version is designed to be used with the JSF 1.2 specification and
works with either Mojarra or MyFaces.

CVE-2016-5019:
Trinidad’s CoreResponseStateManager both reads and writes view state
strings using
ObjectInputStream/ObjectOutputStream directly.  By doing so, Trinidad
bypasses the
view state security features provided by the JSF implementations - ie. the view
state is not encrypted and is not MAC’ed.  Trinidad’s
CoreResponseStateManager will
blindly deserialize untrusted view state strings, which makes Trinidad-based
applications vulnerable to deserialization attacks.

Apache MyFaces Trinidad is available in both binary and source
distributions, and there are examples available as well:

* http://myfaces.apache.org/trinidad/download.html

Apache MyFaces Trinidad is available in the central Maven repository
under Group ID "org.apache.myfaces.trinidad"

Release Notes - MyFaces Trinidad - Version 1.2.15

Bug
[TRINIDAD-2542] - CVE-2016-5019: MyFaces Trinidad view state
deserialization security vulnerability

[TRINIDAD-195] - Two requests at the same time throw an exception
when the server just started
[TRINIDAD-943] - handle session timeout
[TRINIDAD-1683] - client-side convertNumber causes loss of precision
[TRINIDAD-1804] - Resources not found(404) errors
[TRINIDAD-1960] - NullPointerException in
LocaleInfoScriptlet.getSupportedLocaleVariant
[TRINIDAD-2009] - tr:table selectAll also selects disabled chekcboxes
[TRINIDAD-2017] - Trinidad statemananger needs to store everything
on the client, when HTML_Basic is used, in combination with standard
client-side state-saving
[TRINIDAD-2021] - Wrong behavior in TrNumberFormat
[TRINIDAD-2023] - CheckSerializationConfigurator should use the
Trinidad specific ObjectInputStream (ObjectInputStreamResolveClass)
class
[TRINIDAD-2024] - UIXCollection holding only to application data
[TRINIDAD-2028] - Should reset value on component at the beginning of decode
[TRINIDAD-2033] - trh:tableLayout tag doc should call out
table-layout:fixed as desirable for programmatically-resizable cell
contents
[TRINIDAD-2036] - While ResourceServlet references files of type
"ico", they won't load because CoreRenderKitResourceLoader doesn't
register them
[TRINIDAD-2039] - Icons are created if the string for the resource
is an empty string in Trinidad 1.2
[TRINIDAD-2045] - UIXCollection should release the reference to
the model at the very end of processSaveState
[TRINIDAD-2047] - UIXCollection saves the stamp state when there is no stamp
[TRINIDAD-2048] - ComponentUtils.getScopedIdForComponent() is not
producing consistent scoped IDs for components relocated during tag
execution
[TRINIDAD-2051] - NPE in BAseChangeManager
[TRINIDAD-2057] - UIXTree/UIXTreeTable/UIXTable RowKeySets require
that their attributes are only fetched when the component is in
context
[TRINIDAD-2061] - add a utility method in PartialPageUtils to send
a  ppr response
[TRINIDAD-2097] - tr:selectOneListBox - item not selected - wrong
item of selected item returned by SimpleSelectOneRenderer.resolveIndex
[TRINIDAD-2110] - workaround for jsf portlet bridge 2.0 nullviewstatetoken
[TRINIDAD-2173] - tr:table component renders navigation bar
wrongly for unknown row count

Improvement

[TRINIDAD-1729] - provide a hook for for an external decorator of
Skin InputStreamProvider

New Feature

[TRINIDAD-1457] - Need the ability to bypass the Cache on ResourceServlet
[TRINIDAD-2062] - Need to add a utility method to
ExternalContextUtils to get the writer from the ExternalContext

regards,

Mike Kienenberger


[ANNOUNCE][CVE-2016-5019] Apache MyFaces Trinidad 2.1.2 released

2016-09-29 Thread Mike Kienenberger
The Apache MyFaces team is pleased to announce the release of Apache
MyFaces Trinidad 2.1.2.
.
MyFaces Trinidad is a feature-rich renderkit for JavaServer(tm) Faces
that provides an extendibles framework and extensive skinning support.
This version is designed to be used with the JSF 2.1 specification.

CVE-2016-5019:
Trinidad’s CoreResponseStateManager both reads and writes view state
strings using
ObjectInputStream/ObjectOutputStream directly.  By doing so, Trinidad
bypasses the
view state security features provided by the JSF implementations - ie. the view
state is not encrypted and is not MAC’ed.  Trinidad’s
CoreResponseStateManager will
blindly deserialize untrusted view state strings, which makes Trinidad-based
applications vulnerable to deserialization attacks.

Apache MyFaces Trinidad is available in both binary and source
distributions, and there are examples available as well:

* http://myfaces.apache.org/trinidad/download.html

Apache MyFaces Trinidad is available in the central Maven repository
under Group ID "org.apache.myfaces.trinidad"

Release Notes - MyFaces Trinidad - Version 2.1.2

Bug
[TRINIDAD-2542] - CVE-2016-5019: MyFaces Trinidad view state
deserialization security vulnerability

[TRINIDAD-2228] - java.lang.UnsupportedOperationException
[TRINIDAD-2282] - In validateLength, a default hintRange message
is displayed instead of hintMaximum even when minimum value is not set
[TRINIDAD-2436] - We should update Table's selection state during
invoke application phase
[TRINIDAD-2445] - Prevent exceptions from propagating out of the
ServletFilter
[TRINIDAD-2541] - Check UTF-8 encoding in example files

Improvement

[TRINIDAD-2239] - Improve the ancestor based change filtering
mechanism by introducing a formal ComponentChangeFilter
[TRINIDAD-2441] - URLUtil to escape a URL and remove invalid characters
[TRINIDAD-2540] - Align Trinidad 2.1.x so it can be editable using
Netbeans 8

regards,

Mike Kienenberger


[ANNOUNCE][CVE-2016-5019] Apache MyFaces Trinidad 2.0.2 released

2016-09-29 Thread Mike Kienenberger
The Apache MyFaces team is pleased to announce the release of Apache
MyFaces Trinidad 2.0.2.

MyFaces Trinidad is a feature-rich renderkit for JavaServer(tm) Faces
that provides an extendibles framework and extensive skinning support.
This version is designed to be used with the JSF 2.0 specification and
works with either Mojarra or MyFaces.

CVE-2016-5019:
Trinidad’s CoreResponseStateManager both reads and writes view state
strings using
ObjectInputStream/ObjectOutputStream directly.  By doing so, Trinidad
bypasses the
view state security features provided by the JSF implementations - ie. the view
state is not encrypted and is not MAC’ed.  Trinidad’s
CoreResponseStateManager will
blindly deserialize untrusted view state strings, which makes Trinidad-based
applications vulnerable to deserialization attacks.

Apache MyFaces Trinidad is available in both binary and source
distributions, and there are examples available as well:

* http://myfaces.apache.org/trinidad/download.html

Apache MyFaces Trinidad is available in the central Maven repository
under Group ID "org.apache.myfaces.trinidad"

Release Notes - MyFaces Trinidad - Version 2.0.2

Bug
[TRINIDAD-2542] - CVE-2016-5019: MyFaces Trinidad view state
deserialization security vulnerability

[TRINIDAD-2218] - Need an ability for the WindowManager
implementation to be executed before all Configurators and filters and
to complete teh response
[TRINIDAD-2224] - Client DateTimeConverter _fix2DYear does not
handle th_TH locale
[TRINIDAD-2230] - adjustments to the UIXComponentBase
subscribeToEvent and unsubscribeFromEvent implementation
[TRINIDAD-2233] - x-frame-options header not working in trinidad
[TRINIDAD-2245] - ForEach tag throws ArrayIndexOfBoundsException
when the end attribute is same as the size of the List
[TRINIDAD-2252] -
ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper does not
override non-abstract retargetMethodExpressions() causing composite
component actions not to fire
[TRINIDAD-2260] - tr:inputListOfValues - no ReturnEvent is fired
when using facelets
[TRINIDAD-2262] - UIXComponentBase calls setInView(false) before
the component is actually removed from tree
[TRINIDAD-2263] - StateManagerImp.saveView should not check
current request token
[TRINIDAD-2285] - avoid exceptions in design time for agent rules
[TRINIDAD-2286] - alias wrongly specified in base-desktop.css
[TRINIDAD-2289] - function _pprControlCapture() causes an error in
IE8 when it tries to focus on a PPR'd element
[TRINIDAD-2299] - f:convertnumber throws error when the number
input by user has leading or trailing grouping separator char
[TRINIDAD-2301] - avoid exceptions in design time when wrong style
sheet name is specified in trinidad-skins.xml
[TRINIDAD-2303] - State saving skips facets (component resources).
[TRINIDAD-2309] - perf: change the concurrenthashmap to arraymap
and fix the golden files
[TRINIDAD-2327] - update RenderingContext.getIcon() documentation
[TRINIDAD-2329] - remove acc datatable=0 from non data tables
[TRINIDAD-2340] - LocaleElementsResourceLoader init dependency on
request path
[TRINIDAD-2348] - HeadRenderer renders meta tags in wrong order for IE
[TRINIDAD-2349] - TreeRenderer renders duplicate IDs
[TRINIDAD-2393] - GlobalConfiguratorImpl will not always clean up resources
[TRINIDAD-2408] - TrPage._getTextContent is not working in IE10
[TRINIDAD-2525] - IE 11 - Unsupported JavaScript methods are used
in Trinidad

Improvement

[TRINIDAD-2172] - pseudo classes missing from CSSGenerationUtils
[TRINIDAD-2186] - Clirr runner tests should work off last revision
rather then a fixed label
[TRINIDAD-2226] - Provide mechanism to reload skin definitions
from trinidad-skins.xml
[TRINIDAD-2235] - Skinning: stable names for generated style sheets
[TRINIDAD-2248] - Change component templating scheme to generate
superclasses of templated components rather than the templated
components themselves
[TRINIDAD-2253] - Ability to synchronize UI view size with model cache size`
[TRINIDAD-2292] - Update Clirr Runner tests to check against Trinidad 2.0.0
[TRINIDAD-2330] - Add support for base64 encoded images in skin files.
[TRINIDAD-2391] - Enhancements to allow for custom FileUpload code
[TRINIDAD-2392] - Ability to control skin and compression programatically
[TRINIDAD-2394] - LabeledFacesMessage is not appropriately serializable

New Feature

[TRINIDAD-2234] - Pregeneration of skin style sheets

regards,

Mike Kienenberger


Re: addResource to add CSS JS - Only working on PostBack

2016-04-19 Thread Mike Kienenberger
You've probably already figured it out, but for anyone reading this
thread later, what Leonardo said explains it.

Component encodeEnd is called during the time that the response is
rendered (between before and after phase listeners).   "After" is too
late.

On Tue, Apr 19, 2016 at 2:41 PM, fischman_98
 wrote:
> Mike, Thanks...yeah were all good with the understanding of the Lifecycle...
>
> I'm just curious why the addResource call *WORKS* in an /encodeEnd /of a
> Custom Component, which is fired in the */Render Response/* phase,
>
> but...
>
> *DOES NOT WORK* when the addResource is called directly from a PhaseListener
> during the same */Render Response/* phase...
>
> Any thoughts?
>
>
>
> --
> View this message in context: 
> http://myfaces.10567.n7.nabble.com/addResource-to-add-CSS-JS-Only-working-on-PostBack-tp121593p121623.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: addResource to add CSS JS - Only working on PostBack

2016-04-19 Thread Mike Kienenberger
I guess it probably doesn't help -- it looks like your phase listener
was already using RENDER_RESPONSE.

On Tue, Apr 19, 2016 at 3:13 PM, Mike Kienenberger <mkien...@gmail.com> wrote:
> There is only a RENDER_RESPONSE phase for the initial request in a
> phase listener, but all of the phases in a postback.
>
> Does that help?
>
>
> On Tue, Apr 19, 2016 at 2:09 PM, fischman_98
> <mfisc...@powerconsultantsinc.com> wrote:
>> *FYI*: When added the call to addResource in encodeEnd method of a Custom
>> Component it works on both /*initial request*/ and /*postback */.
>>
>> Here's the initial request;
>>
>> RESTORE_VIEW(1) :: Before
>> RESTORE_VIEW(1) :: After
>> RENDER_RESPONSE(6) :: Before
>> *AddResource Here!*
>> RENDER_RESPONSE(6) :: After
>>
>> Same code I had in the listener in the encodeEnd;
>>
>> AddResource ar = AddResourceFactory.getInstance(facesContext);
>> ar.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN,
>> "window.open()");
>> System.out.println("AddResource Here!");
>>
>> Soany thoughts why it works from the component and not from the phase
>> listener?
>>
>> Thanks.
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://myfaces.10567.n7.nabble.com/addResource-to-add-CSS-JS-Only-working-on-PostBack-tp121593p121619.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: addResource to add CSS JS - Only working on PostBack

2016-04-19 Thread Mike Kienenberger
There is only a RENDER_RESPONSE phase for the initial request in a
phase listener, but all of the phases in a postback.

Does that help?


On Tue, Apr 19, 2016 at 2:09 PM, fischman_98
 wrote:
> *FYI*: When added the call to addResource in encodeEnd method of a Custom
> Component it works on both /*initial request*/ and /*postback */.
>
> Here's the initial request;
>
> RESTORE_VIEW(1) :: Before
> RESTORE_VIEW(1) :: After
> RENDER_RESPONSE(6) :: Before
> *AddResource Here!*
> RENDER_RESPONSE(6) :: After
>
> Same code I had in the listener in the encodeEnd;
>
> AddResource ar = AddResourceFactory.getInstance(facesContext);
> ar.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN,
> "window.open()");
> System.out.println("AddResource Here!");
>
> Soany thoughts why it works from the component and not from the phase
> listener?
>
> Thanks.
>
>
>
>
> --
> View this message in context: 
> http://myfaces.10567.n7.nabble.com/addResource-to-add-CSS-JS-Only-working-on-PostBack-tp121593p121619.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: FW: Tomcat Security Exceptions on deployment of example war (reformatted)

2016-03-30 Thread Mike Kienenberger
MyFaces is a project staffed by volunteers.   While things are
normally fixed rather quickly, it all depends on the various
individuals involved with that particular area and their available
free time.

One thing that would greatly speed up the process is if you were to
submit a unified diff patch fixing the problem.

On Wed, Mar 30, 2016 at 11:28 AM, Neil Richards  wrote:
> Hi,
>
> As you can imagine this has become a bit of a showstopper for me. I've added
> a bug report but as yet it has not been assigned or commented on etc. Just
> wondering how long these issues take to fix? Assume we're talking months?
> Need to have some idea to determine how to move forward.
>
> Many thanks,
> Neil
>
> -Original Message-
> From: Werner Punz [mailto:werner.p...@gmail.com]
> Sent: 04 March 2016 07:36
> To: users@myfaces.apache.org
> Subject: Re: FW: Tomcat Security Exceptions on deployment of example war
> (reformatted)
>
> Hi this is clearly a bug.
> Can you please put a bugreport on
>
> https://issues.apache.org/jira/browse/MYFACES
>
> Werner
>
>
>
> Am 02.03.16 um 23:12 schrieb Neil Richards:
>> Hi,
>>
>> I've been having trouble deploying my MyFaces(2.2.9) app on Tomcat 8
>> with the security manager enabled, so I then tried deploying the
>> myfaces-example-simple-1.1.14.war and had the same problem. I need the
>> security manager enabled as I am deploying in production on a shared
> Tomcat
>> instance and the hosts will not allow the   RuntimePermissions on
>> org.apache.catalina.core, org.apache.catalina.servlets or
>> org.apache.jasper.compiler. These are the stack traces I get:
>>
>> 02-Mar-2016 22:08:54.902 INFO [localhost-startStop-1]
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass Security
>> Violation, attempt to use Re stricted Class:
>> org.apache.catalina.servlets.DefaultServlet
>>   java.security.AccessControlException: access denied
>> ("java.lang.RuntimePermission"
>> "accessClassInPackage.org.apache.catalina.servlets")
>>  at
>> java.security.AccessControlContext.checkPermission(AccessControlContex
>> t.java
>> :472)
>>  at
>> java.security.AccessController.checkPermission(AccessController.java:884)
>>  at
>> java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>>  at
>> java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
>>  at
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClass
>> Loader
>> Base.java:1243)
>>  at
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClass
>> Loader
>> Base.java:1142)
>>  at java.lang.Class.forName0(Native Method)
>>  at java.lang.Class.forName(Class.java:264)
>>  at
>> org.apache.myfaces.ee6.MyFacesContainerInitializer.isDelegatedFacesSer
>> vlet(M
>> yFacesContainerInitializer.java:280)
>>  at
>> org.apache.myfaces.ee6.MyFacesContainerInitializer.onStartup(MyFacesCo
>> ntaine
>> rInitializer.java:150)
>>  at
>>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
>> 5244)
>>  at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
>>  at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
>> java:7
>> 25)
>>  at
>> org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:131)
>>  at
>>
> org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.
>> java:153)
>>  at
>>
> org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.
>> java:143)
>>  at java.security.AccessController.doPrivileged(Native Method)
>>  at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:699)
>>  at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
>>  at
>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:939)
>>  at
>> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1812)
>>  at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>  at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
>> ava:11
>> 42)
>>  at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
>> java:6
>> 17)
>>  at java.lang.Thread.run(Thread.java:745)
>>
>> 02-Mar-2016 22:08:59.435 INFO [localhost-startStop-1]
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass Security
>> Violation, attempt to use Re stricted Class:
>> org.apache.jasper.compiler.JspRuntimeContext
>>   java.security.AccessControlException: access denied
>> ("java.lang.RuntimePermission"
>> "accessClassInPackage.org.apache.jasper.compiler")
>>  at
>> java.security.AccessControlContext.checkPermission(AccessControlContex
>> t.java
>> :472)
>>  at
>> 

Re: No tag defined for name

2015-12-17 Thread Mike Kienenberger
It looks right to me.

Is "commons/paging.xhtml" the only component not working?
Do other components in "components/commons/" work?
Do other components in "components" work?


My app uses .../resources/component/thing.xhtml" but moving "thing.xhtml"
to "component/common" seems to still work.   I didn't try renaming
"component" to "components" and I suppose my test of the process may have
been flawed.   This was under MyFaces 2.1.14.

Maybe creating a simple test app would help you track it down, or at least
provide an example to use for opening a JIRA issue.   It'd be helpful to
know if it's only a problem with MyFaces 2.2.x or if it wasn't working for
you under 2.1.x either.

On Thu, Dec 17, 2015 at 10:40 AM, Chris Baumgartner <
chris.baumgart...@fujifilm.com> wrote:

> Hello,
>
> I have a JSF application that has been using Mojarra for the past 2
> years. I am attempting to switch to MyFaces 2.2.9, but I am having
> problems.
>
> It doesn't seem to like my composite components. I am getting numerous
> exceptions like:
>
> javax.faces.view.facelets.TagException: /views/records/records.xhtml
> @81,57  Tag Library supports namespace:
> http://java.sun.com/jsf/composite/components/common, but no tag was
> defined for name: paging
>
> This worked in Mojarra, but for some reason is not working in MyFaces.
>
> My namespace declarations in records.xhtml look like:
>
>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;>
> http://www.w3.org/1999/xhtml;
>  xmlns:c="http://java.sun.com/jsp/jstl/core;
>  xmlns:common="http://java.sun.com/jsf/composite/components/common
> "
>  xmlns:h="http://java.sun.com/jsf/html;
>  xmlns:f="http://java.sun.com/jsf/core;
>  xmlns:ui="http://java.sun.com/jsf/facelets;>
> 
>
>
> My project structure looks like:
>
> webapp/resources/components/common/paging.xhtml
> webapp/templates/template.xhtml
> webapp/views/records/records.xhtml
>
>
> Any ideas on what is causing this?
>
> Thanks.
>
>
> --
>
> Chris Baumgartner
> Java Software Developer
> FUJIFILM Medical Systems U.S.A., Inc.
> TeraMedica Division
> 10400 Innovation Drive, Suite 200
> Milwaukee, WI 53226
> Office: (414) 908-7724
> www.teramedica.com
>
> --
> NOTICE: This message, including any attachments, is only for the use of the
> intended recipient(s) and may contain confidential and privileged
> information, or information otherwise protected from disclosure by law.  If
> the reader of this message is not the intended recipient, you are hereby
> notified that any use, disclosure, copying, dissemination or distribution
> of this message or any of its attachments is strictly prohibited.  If you
> received this message in error, please contact the sender immediately by
> reply email and destroy this message, including all attachments, and any
> copies thereof.
>


[COMMUNITY] Paul Nicolucci - PMC member

2015-07-15 Thread Mike Kienenberger
The MyFaces PMC is proud to announce an addition to our project
management committee.

Please welcome Paul Nicolucci as the newest MyFaces PMC Member!  Paul
has been an active committer and community member in the MyFaces
community for years.

Welcome  regards,
Mike


[COMMUNITY] Thomas Andraschko - Committer

2015-07-02 Thread Mike Kienenberger
The MyFaces PMC is proud to announce a new addition to our community.

Please welcome Thomas Andraschko as the newest MyFaces committer!
Thomas is a long-time active member of the MyFaces community,
especially in MyFaces Core, and has worked in the past on MyFaces
External Validator and MyFaces Extensions CDI.   Thomas is also part
of the Apache DeltaSpike community, a related JSF project at the
Apache Software Foundation.

Welcome  regards,
Mike


[COMMUNITY] Bill Lucy - Committer

2015-06-23 Thread Mike Kienenberger
The MyFaces PMC is proud to announce a new addition to our community.

Please welcome Bill Lucy as the newest MyFaces committer!
Bill is an active member of the MyFaces community, especially in
MyFaces Core..

Welcome  regards,
Mike


Re: Comparison chart for Tomahawk-Trinidad Tags

2015-06-11 Thread Mike Kienenberger
Be aware that we don't have any active Trinidad developers right now.
We have a number of people using Trinidad and opening issues, but no
one has stepped forward to provide patches:   ASF projects are
self-serve projects - if you need something, build on what others
have done and provide the changes.

I would think that porting t:selectitems to trinidad would be an easy
task if something doesn't already exist.

Open an issue and submit a patch, and I'll commit it for you.

You might also want to start an equivalent tag comparison chart in the
wiki, which we could eventually move into the Trinidad project page.


On Thu, Jun 11, 2015 at 10:42 AM, Daniel Küppers dan...@tetralog.com wrote:
 Hello myfaces users,

 im currently migrating from a mixed jsf 1.2 setup with tomahawk, sandbox and
 trinidad to jsf 2.2 with only trinidad.
 So i want to know, if there is any comparison chart for equivalent tags that
 i can lookup? For example, t:SelectItems are not present in trinidad.

 Maybe someone knows and is willing to help.

 Best regards

 Daniel


Re: HtmlRendererUtils.writePrettyLineSeparator() is missing in 2.2

2015-05-27 Thread Mike Kienenberger
On Wed, May 27, 2015 at 2:06 PM, khush N kbnavl...@gmail.com wrote:
 Thanks Mike for the response! Do you guys provide Richfaces support as well?

No, you'd have to ask at the Richfaces support area or in stackoverflow.


Re: HtmlRendererUtils.writePrettyLineSeparator() is missing in 2.2

2015-05-22 Thread Mike Kienenberger
I'm pretty sure it was used internally to support the
org.apache.myfaces.PRETTY_HTML parameter, which was removed on
November 13, 2013.

https://issues.apache.org/jira/browse/MYFACES-3822

This issue also includes remove unused params like:

org.apache.myfaces.PRETTY_HTML
Reason : never worked well, modern browsers has support for debugging,
makes rendering slow.

You can find the complete change-set here:

http://svn.apache.org/viewvc?view=revisionrevision=1541762

One possibility is to navigate from the change-set to the previous
version of HtmlRendererUtils which contained
writePrettyLineSeparator() and copy that method (or the entire file)
into your project.

http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?view=markuppathrev=1519698

but since the method does very little, you are probably better off not
using it at all and calling
facesContext.getResponseWriter().write(LINE_SEPARATOR); directly.

if 
(org.apache.myfaces.shared.config.MyfacesConfig.getCurrentInstance(facesContext.getExternalContext()).isPrettyHtml())
{
facesContext.getResponseWriter().write(LINE_SEPARATOR);
}

On Fri, May 22, 2015 at 2:48 PM, khush N kbnavl...@gmail.com wrote:
 Hi,

 I am using myfaces 2.2.7 version and found that
 HtmlRendererUtils.writePrettyLineSeparator() method is missing. The method
 is present in 2.1 version. Can anyone tell me the alternate of
 HtmlRendererUtils.writePrettyLineSeparator in 2.2?

 I also could not find the method in DEPRECATED tab in api docs.

 Thanks!


Re: How do I send my query to the myfaces team? eom

2015-05-21 Thread Mike Kienenberger
Khush,

You just did.

Sending a message to either users@myfaces.apache.org (for questions or
comments on how to use MyFaces products) or d...@myfaces.apache.org
(for questions and comments on the development of MyFaces products)
will reach us.


On Thu, May 21, 2015 at 5:59 PM, khush N kbnavl...@gmail.com wrote:



[COMMUNITY] Hazem Saleh - PMC member

2015-05-15 Thread Mike Kienenberger
The MyFaces PMC is proud to announce an addition to our project
management committee.

Please welcome Hazem Saleh as the newest MyFaces PMC Member!  Hazem
has been an active committer and community member in the MyFaces
community for years and his inclusion into the PMC is long overdue!

Welcome  regards,
Mike


[COMMUNITY] Ross Clewley - Committer

2015-05-15 Thread Mike Kienenberger
The MyFaces PMC is proud to announce a new addition to our community.

Please welcome Ross Clewley as the newest MyFaces committer!
Ross is an active member of the MyFaces community, especially in
MyFaces Portlet Bridge.
.

Welcome  regards,
Mike


[COMMUNITY] Dennis Kieselhorst - Committer

2015-05-12 Thread Mike Kienenberger
The MyFaces PMC is proud to announce a new addition to our community.

Please welcome Dennis Kieselhorst as the newest MyFaces committer!
Matt is an active member of the MyFaces community, especially in
MyFaces Tobago and MyFaces Core.

Welcome  regards,
Mike


Re: Technical Problem using t:jsvaluechangelistener

2015-04-29 Thread Mike Kienenberger
My apologies for the late reply.

Can you provide a simplfied example project demonstrating this problem?


On Wed, Apr 8, 2015 at 12:26 AM, Saeed Taghizadeh
saeed.taghizadeh.compu...@gmail.com wrote:
 Dear Sir/Madam,

 We are using t:panelGrid in our project. Inside this component we have
 t:selectOneMenu component. we have attached a t:jsvaluechangelistener to
 this component in order to update some UI Components using java Script. But
 the java script method that is used in t:jsvaluechangelistener is not
 called. When we use h:panelGrid instead of t:panelGrid there is not any
 problem, but because of some technical issues we are obligated to use
 t:panelGrid. Also, I should mention that we are using JSF 2 in our project.

 Thank you very much for your time and consideration.

 I am looking forward to hearing from you.

 Additional info:
 myfaces 2.2.7 lib

 tomahawk 20-1.1.14 lib


Re: h:inputFile required attribute don't work

2015-04-29 Thread Mike Kienenberger
My apologies for the late reply.

Any chance you can create an issue for this in our JIRA issue tracker
and submit a patch with a fix?


On Tue, Apr 14, 2015 at 10:37 AM, Vojtěch Zavřel vojtech.zav...@aura.cz wrote:
 Hi,
  it seems to me, that the required attribute of h:inputFile is not working.
 The reason is, that there is always an instance of javax.servlet.http.Part
 in submitted value and there should be something like part.getSize() = 0 in
 getConvertedValue() or maybe overriden isEmpty method of UIInput class where
 is basic types emptiness check.

 You can repeat that problem just on a simple form with h:inputFile, with
 required=true without any validator.

 h:form id=inputForm enctype=multipart/form-data

!-- inputFile tag to upload file --
 Upload File
 h:inputFile id=file
  label=file
  value=#{inputBean.part}
  required=true
  requiredMessage=File not selected !!
 /h:inputFile
 h:message style=color: red for=file /br /

 h:commandButton id=submit
  action=#{inputBean.uploadFile}
  value=upload file /br /
 /h:form

 Testing on Tomcat 7.0.59, MyFaces 2.2.6

 --
 Mgr. Vojtěch Zavřel
 System architect
  AURA, s.r.o.
 Úvoz 499/56
 602 00 Brno
 Czech Republic

 Tel.: +420 544 508 181
 Fax: +420 544 508 112
 E-mail: vojtech.zav...@aura.cz
 Internet: www.aura.cz
  Certifikace ISO 9001, ISO 8000, ISO 27001 a ČOS 051622 (AQAP 2110)



Re: Commons: mc:exporterActionListener: Converters

2015-04-29 Thread Mike Kienenberger
Sorry for the late reply.

I don't use the commons exporter, but you could take a look at the
source code and determine if there's something more you can do.

http://svn.apache.org/repos/asf/myfaces/commons/trunk/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/

The data conversion is specifically handled in

http://svn.apache.org/repos/asf/myfaces/commons/trunk/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java
in getStringValue().

It looks like you might be able to define converters for the base data
types under some situations, but I haven't tried it.
We are certainly willing to apply patches to improve the API if you
have something specific in mind.

It also looks like we are lacking in decent documentation for this
component, and we'd gladly accept contributions in that area as well.


On Sun, Apr 12, 2015 at 7:13 PM, Rafael Santini raf...@santini.eti.br wrote:
 Hi,

 I have a datatable with data types others than string, like Date and
 BigDecimal. When the datatable is exported to XLS, the data is written as
 raw data, like 2015-04-12 00:00:00.0 instead of 12/04/2015 (dd/mm/) and
 250.00 instead of 250,00 (##0.00 - locate pt_BR). Am I missing something or
 this is a limitation of mc:exporterActionListener?

 Thanks,

 Rafael Santini



ApacheCon CFP closes June 25

2014-06-13 Thread Mike Kienenberger
 Dear MyFaces enthusiast,

As you may be aware, ApacheCon will be held this year in Budapest, on
November 17-23. (See http://apachecon.eu for more info.)

The Call For Papers for that conference is still open, but will be
closing soon. We need you talk proposals, to represent MyFaces at
ApacheCon. We need all kinds of talks - deep technical talks, hands-on
tutorials, introductions for beginners, or case studies about the
awesome stuff you're doing with MyFaces.

Please consider submitting a proposal, at
http://events.linuxfoundation.org//events/apachecon-europe/program/cfp

Thanks!


Re: How to disable label warnings?

2014-03-28 Thread Mike Kienenberger
On Fri, Mar 28, 2014 at 1:52 PM, Howard W. Smith, Jr.
smithh032...@gmail.com wrote:
 I just remembered that I had this issue, too, when I migrated from Mojarra
 to MyFaces. My quick/easy fix was to use TextPad, search all *.xhtml files
 in my project for h:outputLabel, and replce with h:outputText. I don't use
 outputLabel, i add label to my PrimeFaces UI components, as/when necessary.


What Howard suggests is the best solution.

Having h:outputLabel without a for attribute is meaningless.   If
you are not attaching the label, you should be using h:outputText
instead of h:outputLabel.


Re: problem wit hvisualize a size of colletion into a datatable

2014-02-20 Thread Mike Kienenberger
Calling arbitrary methods like size() isn't supported in EL 2.1,
although I think it might be in EL 2.2.

Here's the way to do it that will work in any version of JSF.

xmlns:jstl=http://java.sun.com/jsp/jstl/functions;

[...]
 h:outputText
value=#{jstl:length(item.professors)} tot
projects/



On Thu, Feb 20, 2014 at 11:21 AM, maurojava mauro2java2...@gmail.com wrote:
 From the projectController , i have a method: getCollectionProject that
 return a ListProject .
 Each project contains a list of Professor .
 SO into the last line i would  show the amount of professors for the project
 .

 The var item rappresent a project.
 project contains a ListProfessor
 i  write #{item.professors.size()} for get the amount of professors for
 the project valutated form each iteration .


 Whi into the last outputText :
h:outputText value=#{item.professors.size()} tot projects/

 it shows only the words tot projects and not show the value of listSize?


 

 h:form

 h:outputText value=List/
 h:dataTable value=#{projectController.collectionProject}
 var=item
 h:column
 f:facet name=header
 h:outputText value=Id/
 /f:facet
 h:outputText value=#{item.id}/
 /h:column
 h:column
 f:facet name=header
 h:outputText value=name of project/
 /f:facet
 h:outputText value=#{item.name}/
 /h:column

  h:column
 f:facet name=header
 h:outputText value=numbers of professors/
 /f:facet
  h:outputText value=#{item.professors.size()} tot
 projects/
 /h:column


 /h:dataTable
 /h:form



 --
 View this message in context: 
 http://myfaces.10567.n7.nabble.com/problem-wit-hvisualize-a-size-of-colletion-into-a-datatable-tp117242.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: problem wit hvisualize a size of colletion into a datatable

2014-02-20 Thread Mike Kienenberger
A J2EE container should already provide jars with this functionality.

http://en.wikipedia.org/wiki/Java_EE_version_history#Java_EE_6_.28December_10.2C_2009.29

I'm not sure about tomee.  Probably better to ask that question on the
Tomee mailing list.


On Thu, Feb 20, 2014 at 1:37 PM, maurojava mauro2java2...@gmail.com wrote:
 Tank you  .
 I use tomee so for use jstl i have to add the jars of jstl to web-inf/lib ?
  Il giorno 20/feb/2014 18.42, Mike Kienenberger [via MyFaces] 
 ml-node+s10567n117243...@n7.nabble.com ha scritto:

 Calling arbitrary methods like size() isn't supported in EL 2.1,
 although I think it might be in EL 2.2.

 Here's the way to do it that will work in any version of JSF.

 xmlns:jstl=http://java.sun.com/jsp/jstl/functions;

 [...]
  h:outputText
 value=#{jstl:length(item.professors)} tot
 projects/



 On Thu, Feb 20, 2014 at 11:21 AM, maurojava [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=117243i=0
 wrote:

  From the projectController , i have a method: getCollectionProject that
  return a ListProject .
  Each project contains a list of Professor .
  SO into the last line i would  show the amount of professors for the
 project
  .
 
  The var item rappresent a project.
  project contains a ListProfessor
  i  write #{item.professors.size()} for get the amount of professors
 for
  the project valutated form each iteration .
 
 
  Whi into the last outputText :
 h:outputText value=#{item.professors.size()} tot projects/
 
  it shows only the words tot projects and not show the value of listSize?
 
 
  
 
  h:form
 
  h:outputText value=List/
  h:dataTable
 value=#{projectController.collectionProject}
  var=item
  h:column
  f:facet name=header
  h:outputText value=Id/
  /f:facet
  h:outputText value=#{item.id}/
  /h:column
  h:column
  f:facet name=header
  h:outputText value=name of project/
  /f:facet
  h:outputText value=#{item.name}/
  /h:column
 
   h:column
  f:facet name=header
  h:outputText value=numbers of
 professors/
  /f:facet
   h:outputText value=#{item.professors.size()}
 tot
  projects/
  /h:column
 
 
  /h:dataTable
  /h:form
 
 
 
  --
  View this message in context:
 http://myfaces.10567.n7.nabble.com/problem-wit-hvisualize-a-size-of-colletion-into-a-datatable-tp117242.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/problem-wit-hvisualize-a-size-of-colletion-into-a-datatable-tp117242p117243.html
  To unsubscribe from problem wit hvisualize a size of colletion into a
 datatable, click 
 herehttp://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=117242code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDExNzI0MnwtMTExNzE4NzYyNQ==
 .
 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/problem-wit-hvisualize-a-size-of-colletion-into-a-datatable-tp117242p117244.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: java.lang.IllegalArgumentException - object is of type java.lang.String; expected type: mauro.entity.Heart

2014-01-20 Thread Mike Kienenberger
If you don't answer our questions, we cannot help you.

On Mon, Jan 20, 2014 at 6:30 AM, maurojava mauro2java2...@gmail.com wrote:
 Please i not have resolved .i have tried many times but i get errors



 --
 View this message in context: 
 http://myfaces.10567.n7.nabble.com/java-lang-IllegalArgumentException-object-is-of-type-java-lang-String-expected-type-mauro-entity-Heat-tp116991p117013.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: java.lang.IllegalArgumentException - object is of type java.lang.String; expected type: mauro.entity.Heart

2014-01-20 Thread Mike Kienenberger
On Mon, Jan 20, 2014 at 11:03 AM, Jim May jim.webg...@gmail.com wrote:
 JSF Select components cannot have specific objects as selected values. You
 need a converter or make the selected value a string.

His question is about errors returned from his converter, so that's not it :)


Re: java.lang.IllegalArgumentException - object is of type java.lang.String; expected type: mauro.entity.Heart

2014-01-16 Thread Mike Kienenberger
What is the method signature for #{bodyController.selected.heart} ?

What are the types being assigned in
#{heartController.itemsAvailableSelectOne}?

My guess is that your SelectItem value field is a String, not a Heart.

On Thu, Jan 16, 2014 at 5:53 AM, maurojava mauro2java2...@gmail.com wrote:


 hi . i try a simple application jsf CRUD with 2 entity .
 When i try to insert a entity i get the following exception :

 Caused by:
 java.lang.IllegalArgumentException - object is of type java.lang.String;
 expected type:


 object is of type java.lang.String; expected type: mauro.entity.Heart

 viewId=/body/Create.xhtml
 location=/home/utente_javaee7/NetBeansProjects/progetti_nuovnetbeans/Study_relations_JPA/build/web/body/Create.xhtml
 phaseId=RENDER_RESPONSE(6)

 Caused by:
 java.lang.IllegalArgumentException - object is of type java.lang.String;
 expected type: mauro.entity.Heart
 at
 mauro.jsf.HeartController$HeartControllerConverter.getAsString(HeartController.java:225)

 how resolve???


 read at :
 http://pastebin.com/rsFJes66

 tank you mauro



 --
 View this message in context: 
 http://myfaces.10567.n7.nabble.com/java-lang-IllegalArgumentException-object-is-of-type-java-lang-String-expected-type-mauro-entity-Heat-tp116991.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: JSF 2.3

2014-01-14 Thread Mike Kienenberger
I am not an expert in action framework concepts, despite having used
struts for several years :) but I have some practical experience with
Struts, an action-based framework.   So hopefully I can comment on the
benefits of an action-based framework from the perspective a
component-based mindset.

I started writing web apps in a pure component-based web framework
(WebObjects/Objective C) back in the 90s, and around the year 2000,
give or take a couple years, wrote a major web application in
WebObjects/Java, which I continue to maintain to this day.   At some
point, maybe around 2005 or 2006, a political decision was pushed down
from above to switch the project to Struts, an action-based framework.

Eventually, the project was converted over to struts (which took
longer than developing the project in the first place, despite knowing
exactly what it was supposed to do), and it continues to run in struts
until this day.   Now there is a strong recommendation that the
project be switched over to JSF, which you might think that I, as a
component-based development mindset person, would agree, especially
since all of my other projects are in JSF these days.

However, as I considered the conversiion, I realized that the
action-based style provides some benefits for a public-facing
needs-to-be-secure-and-error-free application.

On a JSF page, anything that's a bean can have its methods called and
its values set.   There's no contract enforced between the view and
controller layer, so the designer has to insure that view beans aren't
providing non-view-bean access.   There's also no correspondence
between calling an action method and determining what field values
(component value bindings) are related to that method.

In Struts, you explicitly define which methods are actions (not every
public String or public void is neccessarily supposed to be an
action) and more importantly which fields (by defining the form) are
tied to which actions.   These value containers are completely
isolated from the real values, like UIInput.getSubmittedValue().   All
of this is enforced by the framework rather than designed-in by the
developer.This adds a lot more work, but will eliminate certain
classes of development errors due to the fact that you cannot break
the contract.   This is something that you probably could make happen
in JSF right now with enough extra work.

Action based framework action methods also operate on the idea of a
pipeline.   You don't call a single method, you call a chain of
methods, each of which, like the unix shell do one small job, then
forward to task on to the next thing.   Not being an
action-framework-mindset person, I probably don't fully take advantage
of what this is supposed to allow you to do.   it seems to me that it
is rare that a web form action can be broken up into many sharable
sequential input-output-based subtasks, other than processing a page
submit, then initializing the next page.  I used it a little bit to
add page-based state management to my application (webobjects, like
most component-based frameworks, was stateful, but struts was not
stateful).

I also cheated and used velocity as my view framework instead of
JSPs (just like I cheated and used facelets as my view framework in
JSF 1.1, which gave me a little bit more of a component-based
presentation layer. (velocity macros).

Explicitly initializing a page still seems good to me, even after 10
or 11 years of using JSF.

Integration and unit testing for a struts project currently is far
easier than testing a JSF project because of the explicit contract and
statelessness.

In an ideal world, I guess I'd like to upgrade this struts project so
that I am using facelets as the view templating system (rather than
velocity).   I'd like the project to remain stateless (my page state
system is more than adequate for the few things that need to retain
state).   I'd like to keep the explicit forced declaration of what
form values belong to which actions, and how those values are
validated for that action.  I don't want to lose my ability to test,
and maybe it is my own fault for not looking harder, but I haven't
found a good way to test JSF pages after all this time.  I'm not sure
if I care about action chaining, but I like explicit page
initialization.

So I'm glad to see that action support is being considered for JSF
2.3.   I think the explicit action/form declarations can be helpful.
 I'm glad that MyFaces is working on statelessness.   At some point,
it may indeed be practical to upgrade this project to JSF without
losing all of the benefits that I now, years later, see that struts
has provided.   I definitely didn't see any benefits when I initially
switched.

Hope this helps.


On Tue, Jan 14, 2014 at 6:24 AM, Christian Beikov
christian.bei...@gmail.com wrote:
 Could you explain what the actual benefits of the action based programming
 style are? I am missing the purpose/use cases for the actual need of such a
 feature.

 Thanks 

Re: MyFaces 2.2: another release, soon?

2014-01-14 Thread Mike Kienenberger
2.0, 2.1, and 2.2 were all released at the same time.

On Tue, Jan 14, 2014 at 5:17 PM, Howard W. Smith, Jr.
smithh032...@gmail.com wrote:
 Will there be another release of MyFaces 2.2, since MyFaces Core 2.1.14 and
 2.0.20 were released?

 I would assume that MyFaces 2.1.14 release fixes would be included in
 MyFaces 2.2, too.

 right?


Re: FacesServlet.service() method eating too much time while serving requests (high self-time) ?!

2013-09-09 Thread Mike Kienenberger
43% seems too high a result for a method that only calls other methods and
does nothing itself.
Something is still being misrepresented in your results.  Finding what that
is will likely clear up your question.


On Mon, Sep 9, 2013 at 3:38 PM, Ertio Lew ertio...@gmail.com wrote:

 As pointed out by @mkienenb in his answer at StackOverflow[here
 http://stackoverflow.com/a/18700523/530153], during the above profiling
 test I excluded the org.apache.myfaces methods, so I did a fresh
 profiling test  I'm posting below the new result snapshot.

 [image: enter image description here]

 But you can still see that a lot of time overhead is caused due to Self
 times of Myfaces/JSF methods. I'm sure that my code isn't being included
 in these self times because while profiling I filtered out only the core
 Java classes, so all my methods are included  also I can see them in the
 snapshot. For e.g. px10.channelController.init() is the method that
 retrieves from database  process all data to be shown for page.


 On Tue, Sep 10, 2013 at 12:26 AM, Mike Kienenberger mkien...@gmail.comwrote:

 And by here I am suggesting the myfaces mailing lists in case it wasn't
 clear.

 On Mon, Sep 9, 2013 at 2:47 PM, Mike Kienenberger mkien...@gmail.com
 wrote:
  Trying to have a discussion on StackOverflow using comments isn't the
  best approach.   Go ahead and make your comments on here if you would
  like to continue discussing the situation.





Re: Logging

2013-07-31 Thread Mike Kienenberger
We made an unfortunate decision (and I was a primary instigator of it
so I only have myself to blame) to use java.util.logging (JUL) for
Myfaces a while back.

If you want it to log via log4j, you will have to use slf4j or some
other bridge mechanism to translate the events into log4j.

http://www.slf4j.org/legacy.html

http://blog.mycila.com/2011/01/jdk-logging-per-webapp.html (see bottom)

There is no way to use log4j instead of JUL that doesn't come with a
performance hit.   Logback is another option that could work with
slf4j that reduces the the performance hit.

There is also no trivial way to configure logging under JUL -- you
have to write code to do it.

Since you are using Tomcat, slf4j is probably the easiest solution for
you.   Other containers, like weblogic, make it much harder to get
working.


On Wed, Jul 31, 2013 at 11:43 AM, l.pe...@senat.fr l.pe...@senat.fr wrote:
 Dear all,

 this is certainl a very simple question for most of you but...

 ... how do you configure myfaces logging ?

 I usually use log4j for my apps.

 I tried do create a commons-logging.properties file containing

 org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

 I also tried lines such as :

 org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl.level = FINEST
 org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl.handlers =
 java.util.logging.ConsoleHandler

 ...but still do not get all logging output.

 Thanks in advance,

 Ludovic
 (using MyFaces 2.1.12, OWB 1.1.6, CODI 1.05 on Tomcat 7.0.32)

 |
 | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
 |



Re: Consume a ASP.Net Service with windows Authentification from JSF

2013-07-25 Thread Mike Kienenberger
I really don't know the details of how it works, but the jcifs servlet
filter is sufficient to allow NTLM domain-authenticated connections from
both IE and Firefox to a JSF application most of the time, providing
all of your web.xml settings are correct.   I'm not exactly certain
how that would play out for connecting to an ASP.NET RESTful service
instead.

If nothing else, the source code should give you some idea of what's
going on in a transaction.

On Thu, Jul 25, 2013 at 3:06 AM, Georg Füchsle giofy...@googlemail.com wrote:
 Thank you both,
 I will try the jcifs first.

 The autentication method ist NTLM. I assume the Autentification header is
 part of the http-Headers. Is this header only sent from a specially
 configured browser. Because I try with my own machine and own Browser

 Thanks
 Gio.


 2013/7/24 Jim May jim.webg...@gmail.com

 You would need to find a way to set the authentication header. I dont know
 how easily that is with windows authentication. Maybe painful. You may have
 to switch the authentication method OR setup something like oauth that uses
 tokens so that the two apps trust each other.
 On Jul 24, 2013 5:46 AM, Georg Füchsle giofy...@googlemail.com wrote:

  I have to make calls to an customers ASP.NET RESTful Service. This
 service
  is protecetd by a windows authentification.
 
  As far as I assume, this means, the user will use a browser on a windows
  computer inside their company. They open my web-app that is hosted
 outside
  their company. From this web-Apap I call again the REST-Service inside
 this
  company. To have permission to the service I have to send the user
  authentification data.
 
  My question: What do I (in the JSF-web-app outside the company) have to
 do
  to deliver the user-information towards the REST-service?
 
  Has anybody done something like this?
 
 
  Thanks in advance,
 
  Gio
 



Re: Consume a ASP.Net Service with windows Authentification from JSF

2013-07-24 Thread Mike Kienenberger
It's hard to guess what exactly you need, but you might be able to do
it with something like jcifs, although it has seemed somewhat flakey
in our environment.

http://jcifs.samba.org/
http://jcifs.samba.org/src/docs/ntlmhttpauth.html

This lists some other alternatives.
http://stackoverflow.com/questions/576850/alternatives-for-jcifs-ntlm-library

On Wed, Jul 24, 2013 at 5:46 AM, Georg Füchsle giofy...@googlemail.com wrote:
 I have to make calls to an customers ASP.NET RESTful Service. This service
 is protecetd by a windows authentification.

 As far as I assume, this means, the user will use a browser on a windows
 computer inside their company. They open my web-app that is hosted outside
 their company. From this web-Apap I call again the REST-Service inside this
 company. To have permission to the service I have to send the user
 authentification data.

 My question: What do I (in the JSF-web-app outside the company) have to do
 to deliver the user-information towards the REST-service?

 Has anybody done something like this?


 Thanks in advance,

 Gio


Re: Add 'Stateless JSF' to MyFaces Core? Is it really necessary?

2013-06-19 Thread Mike Kienenberger
On Wed, Jun 19, 2013 at 7:00 PM, Leonardo Uribe lu4...@gmail.com wrote:
 It is good to know how a user expect to use this feature, so I'll keep in
 mind it the suggestions.

While I didn't previously have any need for stateless JSF, I might
need it in the future.

I've been asked to consider converting a struts/velocity web app I
wrote many years ago to JSF.  Conversion of velocity struts to
facelets is straight-forward.  However, struts is stateless, and
attempting to convert a struts application to stateful JSF would be
painful, as every struts request/response is independent of the next
one.   I'm kind of hoping that stateless JSF might work out better.


Re: JSF 2.2

2013-06-18 Thread Mike Kienenberger
 2013/6/18 Ian Trimble ian.trim...@oracle.com:
 I can't find anything about JSF 2.2 on the site, the latest I see is MyFaces 
 2.1.21. Is it too early to expect JSF 2.2? Are there plans for MyFaces to 
 support JSF 2.2?

On Tue, Jun 18, 2013 at 1:53 PM, Leonardo Uribe lu4...@gmail.com wrote:
 There are work in progress for MyFaces 2.2, but it will take some
 time. There are some features already working, but they require some
 review before close the issue.

What Leonardo is saying is that, while Myfaces 2.2 is being worked on
and is now our trunk branch, we have not yet released 2.2 as it is not
yet a complete implementation.

So we don't yet have a download link that you can point it for WTP.
End users need to build the jars from svn, or grab one of our
automated builds from a maven repository.

It's unlikely we will make a release until trunk can pass the JSF 2.2 TCK.


Re: primefaces p:filejUpload not work with myfaces

2013-04-19 Thread Mike Kienenberger
Something to be aware of that I hit yesterday.

The MyFaces Tomahawk extensions filter conflicted with Richfaces 4
(but worked with Richfaces 3) file upload.

If you are using Tomahawk, you might have something similar happening
with Primefaces.

https://issues.jboss.org/browse/RF-10928

On Fri, Apr 19, 2013 at 10:31 AM, Howard W. Smith, Jr.
smithh032...@gmail.com wrote:
 I'm looking at your project now, and will let you know, ASAP.


 On Fri, Apr 19, 2013 at 10:24 AM, maurojava mauro2java2...@gmail.comwrote:

 i attach a war project that it work but on glassfsih .
 Not for tomee .
  .
 it use mojarra implementation of jsf2 and primefaces .
 deploy it in glassfsih and it work.
 But i would to modify for use myfaces + primefaces into tomee .
 mauro


 
  __
  If you reply to this email, your message will be added to the
  discussion below:
 
 http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114636.html
  To unsubscribe from primefaces p:filejUpload not work with myfaces,
  click here.
  NAML



 MYPRIMEFACESUPLOAD.war (2M) 
 http://myfaces.10567.n7.nabble.com/attachment/114641/0/MYPRIMEFACESUPLOAD.war
 




 --
 View this message in context:
 http://myfaces.10567.n7.nabble.com/primefaces-p-filejUpload-not-work-with-myfaces-tp114620p114641.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread Mike Kienenberger
My converters are in separate classes, and I have never declared a
converter static.

Maybe your problem is that you are missing the no-arg constructor for
the converter.
Maybe that was why it worked when it was static.

Was there additional information in java.lang.InstantiationException,
like a root cause?


The two things I would try are
1)  move it to a separate class
2) add a no-arg constructor


I haven't really written many converters since the annotation support
was added, but this is what one of the few I did write looks like.
This was a quick proof of concept thing, so I didn't take the time to
debug why @FacesConverter(forClass = ) wasn't working for me but
instead manually specified a converter id in the one place I used the
converter.


package org.gamenet.conferencePlanner.data.converter;

@FacesConverter(org.gamenet.conferencePlanner.data.converter.SessionConverter)
public class SessionConverter implements Converter {

@Override
public Object getAsObject(FacesContext context, UIComponent
component, String key) {
[...]
}

}

@Override
public String getAsString(FacesContext context, UIComponent
component, Object value) {
[...]
}

}

On Sat, Apr 13, 2013 at 7:40 AM, Howard W. Smith, Jr.
smithh032...@gmail.com wrote:
 In an effort to remove 'static' declarations throughout my app (to help
 JVM's GC), I removed 'static' from the definition of the Converter class
 below. So that resulted in the infamous error below:

 Apr 13, 2013 4:10:38 AM org.apache.myfaces.application.ApplicationImpl
 internalCreateConverter
 SEVERE: Could not instantiate converter
 jsf.CustomerController$CustomerControllerConverter
 java.lang.InstantiationException:
 jsf.CustomerController$CustomerControllerConverter
 at java.lang.Class.newInstance0(Unknown Source)
 at java.lang.Class.newInstance(Unknown Source)
 at
 org.apache.myfaces.application.ApplicationImpl.internalCreateConverter(ApplicationImpl.java:1626)
 at
 org.apache.myfaces.application.ApplicationImpl.createConverter(ApplicationImpl.java:1545)
 at
 javax.faces.application.ApplicationWrapper.createConverter(ApplicationWrapper.java:158)

 I assume 'static' is necessary, because only one copy of the class is
 created per application. Correct? So, can I define the class as a
 @Singleton @Lock(READ) to resolve the issue?

 Per NetBeans generated JSF controller/bean code, the Converter is usually
 defined in the same .java file as the controller or @ManagedBean. Honestly,
 I do 'not' want to use addConverter() or converterId=... in the xhtml. I
 prefer to use @FacesConverter, since this has been working for me
 throughout the app.


 package jsf;

 import jpa.entities.Customer;
 import jpa.session.CustomerFacade;

 import java.io.Serializable;
 import javax.ejb.EJB;
 import javax.faces.bean.ManagedBean;
 import javax.faces.bean.RequestScoped;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.FacesConverter;

 @ManagedBean(name = customerController)
 @RequestScoped
 public class CustomerController implements Serializable {

 @EJB
 private jpa.session.CustomerFacade ejbFacade;

 public CustomerController() {
 }

 @FacesConverter(forClass = Customer.class)
 public class CustomerControllerConverter implements Converter {

 public Object getAsObject(FacesContext facesContext,
 UIComponent component, String value) {
 if (value == null || value.length() == 0) {
 return null;
 }
 /*
  * 2012-07-10 when user enters invalid/incomplete value
 (e.g. irene, see below) in AutoComplete
  *
 WARNING: For input string: irene
 java.lang.NumberFormatException: For input string: irene
 at
 java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
 at java.lang.Integer.parseInt(Integer.java:492)
 at java.lang.Integer.valueOf(Integer.java:582)
 at
 jsf.pointOfContact.pf_PointOfContactController$PointOfContactControllerConverter.getKey(pf_PointOfContactController.java:1625)
 at
 jsf.pointOfContact.pf_PointOfContactController$PointOfContactControllerConverter.getAsObject(pf_PointOfContactController.java:1620)
 at
 org.primefaces.component.autocomplete.AutoCompleteRenderer.getConvertedValue(AutoCompleteRenderer.java:529)
 at
 javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030)
 at
 javax.faces.component.UIInput.validate(UIInput.java:960)
  *
  */
 try {
 Integer test = getKey(value);
 } catch 

Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread Mike Kienenberger
Yes, that's how I linked my database layer to my converters in JSF 1.x
-- using the Java
API to pull the database beans out of the JSF context.

On Sat, Apr 13, 2013 at 1:04 PM, Howard W. Smith, Jr.
smithh032...@gmail.com wrote:
 On Sat, Apr 13, 2013 at 1:00 PM, José Luis Cetina maxtorz...@gmail.comwrote:

 When i dont want to use codi I use jndi lookup, it is to easy to use and
 portable. I create a simple method for retrive my ejbs without using codi
 instead i use jndi using only the name of the ejb class.


 Recently, I added the following after listening in on that other/earlier
 topic/thread on myfaces or openejb list. The code below allowed me to
 remove CODI dependency. :)

 /*
  *
 http://docs.oracle.com/javaee/6/api/javax/enterprise/inject/spi/BeanManager.html
  * http://struberg.wordpress.com/2012/03/20/why-is-openwebbeans-so-fast/
  */
 @SuppressWarnings(unchecked)
 public T T getBean(ClassT type) {
 BeanT bean = (BeanT)
 beanManager.resolve(beanManager.getBeans(type));
 CreationalContextT  creationalContext =
   beanManager.createCreationalContext(bean);

 return (T) beanManager.getReference(bean, type, creationalContext);
 }


Re: Problem converting custom components from mojarra to myfaces

2013-02-15 Thread Mike Kienenberger
On Fri, Feb 15, 2013 at 4:25 AM, Karl Kildén karl.kil...@gmail.com wrote:
 I was just hoping for some advice on how to solve it.

 Must I branch the logic in the code?

 if (myfaces) {
 }
 else {
 }

You'll have to be more specific in order for us to help you.
Handling differences in component ids will be different on the server
java code than it will be on the client javascript code.   Give us
specific examples, including code, of what is not working for you.


Re: Problem with commandButton is not redirectioning

2012-10-31 Thread Mike Kienenberger
This really isn't a question specific to MyFaces.   The primefaces
forums might be a more appropriate place since you are dealing with
primefaces components.

However,

Have you set a breakpoint on setSubmit() to see what is calling it?

My guess is that either actionStatisticsEventUserCategory has a scope
that loses the changes, or that you have more than one object calling
setSubmit().

You should also add some kind of messages component to the page to
display any errors that might be generated.


Re: Tomahawk Partial rerender datatable column

2012-10-26 Thread Mike Kienenberger
I'm not sure why you had *textVehicleName*

If it can work, it should simply be

a4j:support event=onchange reRender=textVehicleName/

If that doesn't work, it probably can't be done with a4j and JSF 1.2.
 I'm fairly certain I did something similar back when I was using the
Richfaces 3.3 a4j and JSF 1.2.


On Fri, Oct 26, 2012 at 12:20 PM, daniel ccss danielcc...@gmail.com wrote:
 Thanks Leonardo,

 Im not using rich faces, and I'm using tomahawk with JSF 1.2 so f:ajax do
 not exists, I will migrate to JSF 2, but right now I cant, so is a way to
 accomplish this columna partial update inside a datatable without rendering
 the hole t:datatable?

 For ajax we are using: %@ taglib uri=https://ajax4jsf.dev.java.net/ajax;
 prefix=a4j%

 Thanks hope someone knows a way

 P.D: I already erase the a4j:region and it doesn´t work


 On Fri, Oct 26, 2012 at 9:53 AM, Leonardo Uribe lu4...@gmail.com wrote:

 Hi

 I think in this case the problem is related to richfaces. In this page:


 http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/a4j_region.html

 Says this:

 ... Starting from RichFaces 3.2.0 the a4j:region can be used together
 with iterative components (e.g. rich:column or rich:scrollableDataTable
  , etc.). It became possible to re-render a particular row in a table
 without
 updating the whole table and without any additional listeners. ...

 In JSF 2.0, f:ajax works well with tomahawk, and the code between tomahawk
 1.2 and 2.0 is very similar, so I would assume the limitation is related to
 a4j:region tag.

 Maybe write the code without wrap the t:outputText inside a a4j:region
 could
 work.

 regards,

 Leonardo Uribe

 2012/10/26 daniel ccss danielcc...@gmail.com:
  Thanks Michael,
 
  I want to update the outputtext value that is in the same row of the
  selectBooleanCheckbox inside a datatable, yes in RichFaces is easy to do
  this, partial update of the datapage, but I'm using Tomahawk JSF 1.2, and
  right now we can´t migrate.
 
  Yes as a matter of fact I put the region around the outputtext as a test,
  sorry about that.
 
  I don´t want to update the hole datatable, if I rerender the hole
 datatable
  using this a4j:support event=onchange reRender=*data*/ it works,
 the
  value of the outputtext is updated on the change event of the
  selectBooleanCheckbox because the hole datatable is rerender, but I dont
  want to rerender the hole datatable, I only want to update the the
  outputtext that is in the same row of the selectBooleanCheckbox that was
  checked.
 
  Really hope you can help me
 
 
 
  On Fri, Oct 26, 2012 at 1:07 AM, Michael Heinen mhn4...@googlemail.com
 wrote:
 
  Do you want to update a complete column or a single cell in the same
 row?
  Which versions (MyFaces, Richfaces) do you use?
 
  Richfaces doesn't like the forceId attribute in many cases. Try to
 remove
  it from the datatable.
  And the region around the outputtext with textVehiclename does not make
  any sense.
 
  Michael
 
 
  Am 26.10.2012 04:23, schrieb daniel ccss:
 
  Anybody
 
  On Thu, Oct 25, 2012 at 8:54 AM, daniel ccss danielcc...@gmail.com
  wrote:
 
   Hi, hope you can help me, Is there a way of update only one column of
 the
  datatable using a4j, not updating all the datatable.
 
  Im Using myfaces (Tomahawk)
 
 
  This is what I have, a h:selectBooleanCheckbox that when is clicked
 the
  onchange event is fire and rerender an h:outputText
 
 
t:dataTable id=data forceId=true
  binding=#{VehicleBean.**dataTableVehicle}
var=vehicleTable
  value=#{VehicleBean.**vehicleList} preserveDataModel=false
   rows=10
 t:column
a4j:region
   h:selectBooleanCheckbox .
 a4j:support event=onchange reRender=*
  textVehicleName*/
 
   /h:selectBooleanCheckbox
   /a4j:region
  /t:column
 
 t:column
 a4j:region
   t:outputText id=*textVehicleName*
 
  value=#{vehicleTable.name}/
 /a4j:region
   /t:column
  /t:dataTable
 
  That code doesn´t work, If I put the outputText outside the datatable
 or
  if i refresh al the datatable it works, but I don´t want to update all
  the
  datatable, I want a partial rerender of only one column, hope you can
  help
  me thanks!!!
 
 
 



Re: Tomahawk Partial rerender datatable column

2012-10-26 Thread Mike Kienenberger
Yeah, you really need to upgrade to a newer version.   I know
richfaces has a lot of dependencies, but couldn't you install it in
your project and only use the a4j tags?

Here's one last thing you might try.

Chances are that the problem is that the old a4j doesn't understand
table id formats.

Unfortunately, I've found that ajax updates require a real component
with an identical id to be found server-side.

Maybe you could hardcode the specific id to your current table item.

You could try something like :form:dataTable[#{n}].textVehicleName
where n is the current row id number (t:dataTable rowIndexVar=n)

Not sure if the old a4j understands a leading : as an absolute tag name.

It's also possible that it's looking for the id the this format:


On Fri, Oct 26, 2012 at 12:35 PM, daniel ccss danielcc...@gmail.com wrote:
 Thanks Mike, yes that is what  I have, it was a copy/paste error:

 *a4j:support event=onchange reRender=textVehicleName/*

 Yes I have done that with richfaces is very simple, but this project is
 old, and right now I don´t have time to migrate, so There is not a way
 for accomplish this, update a single column of a t:datatable with ajax,
 using JSF 1.2 and Tomahawk??  I have to refresh the hle datatable???

 Hope someone has done this, thanks!



 On Fri, Oct 26, 2012 at 10:29 AM, Mike Kienenberger mkien...@gmail.comwrote:

 I'm not sure why you had *textVehicleName*

 If it can work, it should simply be

 a4j:support event=onchange reRender=textVehicleName/

 If that doesn't work, it probably can't be done with a4j and JSF 1.2.
  I'm fairly certain I did something similar back when I was using the
 Richfaces 3.3 a4j and JSF 1.2.


 On Fri, Oct 26, 2012 at 12:20 PM, daniel ccss danielcc...@gmail.com
 wrote:
  Thanks Leonardo,
 
  Im not using rich faces, and I'm using tomahawk with JSF 1.2 so f:ajax do
  not exists, I will migrate to JSF 2, but right now I cant, so is a way to
  accomplish this columna partial update inside a datatable without
 rendering
  the hole t:datatable?
 
  For ajax we are using: %@ taglib uri=
 https://ajax4jsf.dev.java.net/ajax;
  prefix=a4j%
 
  Thanks hope someone knows a way
 
  P.D: I already erase the a4j:region and it doesn´t work
 
 
  On Fri, Oct 26, 2012 at 9:53 AM, Leonardo Uribe lu4...@gmail.com
 wrote:
 
  Hi
 
  I think in this case the problem is related to richfaces. In this page:
 
 
 
 http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/a4j_region.html
 
  Says this:
 
  ... Starting from RichFaces 3.2.0 the a4j:region can be used together
  with iterative components (e.g. rich:column or
 rich:scrollableDataTable
   , etc.). It became possible to re-render a particular row in a table
  without
  updating the whole table and without any additional listeners. ...
 
  In JSF 2.0, f:ajax works well with tomahawk, and the code between
 tomahawk
  1.2 and 2.0 is very similar, so I would assume the limitation is
 related to
  a4j:region tag.
 
  Maybe write the code without wrap the t:outputText inside a a4j:region
  could
  work.
 
  regards,
 
  Leonardo Uribe
 
  2012/10/26 daniel ccss danielcc...@gmail.com:
   Thanks Michael,
  
   I want to update the outputtext value that is in the same row of the
   selectBooleanCheckbox inside a datatable, yes in RichFaces is easy to
 do
   this, partial update of the datapage, but I'm using Tomahawk JSF 1.2,
 and
   right now we can´t migrate.
  
   Yes as a matter of fact I put the region around the outputtext as a
 test,
   sorry about that.
  
   I don´t want to update the hole datatable, if I rerender the hole
  datatable
   using this a4j:support event=onchange reRender=*data*/ it works,
  the
   value of the outputtext is updated on the change event of the
   selectBooleanCheckbox because the hole datatable is rerender, but I
 dont
   want to rerender the hole datatable, I only want to update the the
   outputtext that is in the same row of the selectBooleanCheckbox that
 was
   checked.
  
   Really hope you can help me
  
  
  
   On Fri, Oct 26, 2012 at 1:07 AM, Michael Heinen 
 mhn4...@googlemail.com
  wrote:
  
   Do you want to update a complete column or a single cell in the same
  row?
   Which versions (MyFaces, Richfaces) do you use?
  
   Richfaces doesn't like the forceId attribute in many cases. Try to
  remove
   it from the datatable.
   And the region around the outputtext with textVehiclename does not
 make
   any sense.
  
   Michael
  
  
   Am 26.10.2012 04:23, schrieb daniel ccss:
  
   Anybody
  
   On Thu, Oct 25, 2012 at 8:54 AM, daniel ccss danielcc...@gmail.com
 
   wrote:
  
Hi, hope you can help me, Is there a way of update only one column
 of
  the
   datatable using a4j, not updating all the datatable.
  
   Im Using myfaces (Tomahawk)
  
  
   This is what I have, a h:selectBooleanCheckbox that when is
 clicked
  the
   onchange event is fire and rerender an h:outputText
  
  
 t:dataTable id=data forceId=true
   binding=#{VehicleBean

Re: No client-side switching for PanelTabbedPane

2012-09-05 Thread Mike Kienenberger
If you manually specify the dynamicTabs.js script on your page, does it work?

On Wed, Sep 5, 2012 at 9:07 AM, Sergio Vieira Rolanski
sergio.strate...@gmail.com wrote:
 I just upgraded MyFaces/Tomahawk to version 2.0. Got it 98% working, one of
 the things that is giving me problems is that PanelTabbedPane component is
 not doing client-side tab switching. Looking at the request and the
 generated HTML, noticed MyFaces is not adding the dynamicTabs.js to the
 response.

 My configuration for web.xml: (which I copied from the tomahawk example WAR
 file)

 context-param
 descriptionDefault adicionado para evitar mensagem no
 log/description
 param-nameorg.apache.myfaces.CHECK_EXTENSIONS_FILTER/param-name
 param-valuetrue/param-value
 /context-param
 context-param
 descriptionDefault adicionado para evitar mensagem no
 log/description
 param-nameorg.apache.myfaces.ADD_RESOURCE_CLASS/param-name

 param-valueorg.apache.myfaces.renderkit.html.util.DefaultAddResource/param-value
 /context-param
 context-param
 descriptionDefault adicionado para evitar mensagem no
 log/description
 param-nameorg.apache.myfaces.RESOURCE_VIRTUAL_PATH/param-name
 param-value/faces/myFacesExtensionResource/param-value
 /context-param

 !-- Servlet padrão do MyFaces --
 servlet
 servlet-nameFacesServlet/servlet-name
 servlet-classjavax.faces.webapp.FacesServlet/servlet-class
 load-on-startup1/load-on-startup
 /servlet

 servlet-mapping
 servlet-nameFacesServlet/servlet-name
 url-pattern*.jsf/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameFacesServlet/servlet-name
 url-pattern/faces/*/url-pattern
 /servlet-mapping

 !-- 5. MyFaces --
 filter
 filter-nameMyFacesFilter/filter-name

 filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class
 /filter

 filter-mapping
 filter-nameMyFacesFilter/filter-name
 url-pattern*.jsf/url-pattern
 /filter-mapping

 filter-mapping
 filter-nameMyFacesFilter/filter-name
 url-pattern/faces/*/url-pattern
 /filter-mapping


Re: No client-side switching for PanelTabbedPane

2012-09-05 Thread Mike Kienenberger
Please open an issue in our issue tracker with this information.

If you feel up to up, feel free to provide a patch as well as that
will make getting it fixed happen faster.


On Wed, Sep 5, 2012 at 12:13 PM, Sergio Vieira Rolanski
ser...@strategos.com.br wrote:
 Yes, it does work.


 2012/9/5 Mike Kienenberger mkien...@gmail.com

 If you manually specify the dynamicTabs.js script on your page, does it
 work?

 On Wed, Sep 5, 2012 at 9:07 AM, Sergio Vieira Rolanski
 sergio.strate...@gmail.com wrote:
  I just upgraded MyFaces/Tomahawk to version 2.0. Got it 98% working, one
 of
  the things that is giving me problems is that PanelTabbedPane component
 is
  not doing client-side tab switching. Looking at the request and the
  generated HTML, noticed MyFaces is not adding the dynamicTabs.js to the
  response.
 
  My configuration for web.xml: (which I copied from the tomahawk example
 WAR
  file)
 
  context-param
  descriptionDefault adicionado para evitar mensagem no
  log/description
 
 param-nameorg.apache.myfaces.CHECK_EXTENSIONS_FILTER/param-name
  param-valuetrue/param-value
  /context-param
  context-param
  descriptionDefault adicionado para evitar mensagem no
  log/description
  param-nameorg.apache.myfaces.ADD_RESOURCE_CLASS/param-name
 
 
 param-valueorg.apache.myfaces.renderkit.html.util.DefaultAddResource/param-value
  /context-param
  context-param
  descriptionDefault adicionado para evitar mensagem no
  log/description
  param-nameorg.apache.myfaces.RESOURCE_VIRTUAL_PATH/param-name
  param-value/faces/myFacesExtensionResource/param-value
  /context-param
 
  !-- Servlet padrão do MyFaces --
  servlet
  servlet-nameFacesServlet/servlet-name
  servlet-classjavax.faces.webapp.FacesServlet/servlet-class
  load-on-startup1/load-on-startup
  /servlet
 
  servlet-mapping
  servlet-nameFacesServlet/servlet-name
  url-pattern*.jsf/url-pattern
  /servlet-mapping
 
  servlet-mapping
  servlet-nameFacesServlet/servlet-name
  url-pattern/faces/*/url-pattern
  /servlet-mapping
 
  !-- 5. MyFaces --
  filter
  filter-nameMyFacesFilter/filter-name
 
 
 filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class
  /filter
 
  filter-mapping
  filter-nameMyFacesFilter/filter-name
  url-pattern*.jsf/url-pattern
  /filter-mapping
 
  filter-mapping
  filter-nameMyFacesFilter/filter-name
  url-pattern/faces/*/url-pattern
  /filter-mapping



Re: Redirecting JUL Logging to other logging systems -- do we need to revisit our logging methodology?

2012-09-03 Thread Mike Kienenberger
1) Because I already have logging configured using log4j, and I have
dependencies on JCL and log4j and slf4j from other libraries.

2) Because there is no easy way to configure logging from the classpath.

3) Because the default output of JUL is two lines instead of one.
Also, some other issues:

- JUL only has SEVERE, a combining of FATAL and ERROR.
- SL4J has parametrized logging
- SLF4J's message formatter is 10 times faster than
java.util.Formatter. It actually makes a measurable difference at the
end. – Ceki Jun 4 '09 at 16:16

I could solve 1) by changing my SLF4J configuration

I have solved 2) before -- A google search turns up my class and
configuration to fix that problem
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4958543).   But
that's not what I call configuring.

I have not looked into 3) yet.   I'm sure there's a way to do it, but
it looks like yet another class to maintain.
http://stackoverflow.com/questions/194765/how-do-i-get-java-logging-output-to-appear-on-a-single-line
-- so, yes, you write yet another class.   I'll still trying to
determine how you install the new formatter class.


But none of this is really relevant.   The question isn't whether I
should use JUL.   The question is whether MyFaces should.

I too voted for JUL in a large part to remove the dependency.   But we
also thought back then that end-users could configure JUL to log to
other logging systems.   They can, but we now know that it forces an
unacceptable performance hit.

Furthermore, you don't configure JUL.  You subclass it.   Which means
you've traded a dependency on a well-known logging system for a
situation in which everyone is writing and maintaining their own
custom logging classes.



On Mon, Sep 3, 2012 at 10:31 AM, Werner Punz werner.p...@gmail.com wrote:
 Just a minor sidequestion, why do you use the SLF4JBridgeHandler JUL layer
 instead of JUL directly?

 Werner


 Am 23.08.12 16:40, schrieb Mike Kienenberger:

 Did you ever say something you really regretted?

 I really regret saying that I strongly preferred JUL over SL4J on the
 logging vote two years back[1].

 [1]
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c8f985b960906060447g30bb216ew62102b39be2a1...@mail.gmail.com%3E

 I am currently using the SLF4JBridgeHandler for JUL during
 development, and incurring the performance hits.

 Barring other events, my plans are to default back to JUL logging for
 production.

 How are other people handling this?  I know at the time of the
 discussion many people were switching to SL4J or still using log4j or
 JCL, all of which would have the same performance issues.

 Is it time to revisit our logging yet again, now that we know the
 theoretical flexibility of JUL didn't live up to the practical reality
 of using it?

 slf4j and myfaces

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906050818q6c74e615u2edc7cc2ec9f5...@mail.gmail.com%3E

 [VOTE] jul instead of commons-logging

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906091132y10cd0dadu4eb4a36dda6ae...@mail.gmail.com%3E

 [VOTE] use of jul or commons logging on myfaces core 2.0

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200910.mbox/%3cf6c92360909301905g104297a5m3bba5fb3d057...@mail.gmail.com%3E

 https://issues.apache.org/jira/browse/MYFACES-2378





Re: Creating runtime Navigation Cases

2012-09-03 Thread Mike Kienenberger
I don't use JSCookMenu, but I took a different approach for navigation.

Rather than creating navigation cases and adding them to the
RuntimeConfig, you can create your own navigation handler.   If the
navigation case matches your rules, perform the navigation..
Otherwise, delegate back to the original navigation handler.

On Mon, Sep 3, 2012 at 10:37 AM, Sergio Vieira Rolanski
ser...@strategos.com.br wrote:
 Hi,

 I'm dynamically creating a menu (JSCookMenu) by reading the menu and
 submenus from the database.

 I'm also create navigation cases and add them to RuntimeConfig, this was
 working just fine with MyFaces/Tomahawk 1.1.

 I'm trying to upgrade to MyFaces/Tomahawk 2.0 and this dynamic menu
 creation code only works when I'm in development mode by setting
 javax.faces.PROJECT_STAGE to development.

 Is this intended behaviour?

 --
 Sergio


Re: Creating runtime Navigation Cases

2012-09-03 Thread Mike Kienenberger
Actually, that's probably exactly the reason, now that you point it out.

Configuration files are not re-read in production mode, so calling
setNavigationRulesChanged() won't have any effect.



On Mon, Sep 3, 2012 at 1:13 PM, Sergio Vieira Rolanski
sergio.strate...@gmail.com wrote:
 That is nice idea.

 Nevertheless, I'm calling runtimeConfig.setNavigationRulesChanged(true);
 and MyFaces doesn't seem to take into account, unless MyFaces is in
 development mode. So, it seems like a bug to me.

 2012/9/3 Mike Kienenberger mkien...@gmail.com

 I don't use JSCookMenu, but I took a different approach for navigation.

 Rather than creating navigation cases and adding them to the
 RuntimeConfig, you can create your own navigation handler.   If the
 navigation case matches your rules, perform the navigation..
 Otherwise, delegate back to the original navigation handler.

 On Mon, Sep 3, 2012 at 10:37 AM, Sergio Vieira Rolanski
 ser...@strategos.com.br wrote:
  Hi,
 
  I'm dynamically creating a menu (JSCookMenu) by reading the menu and
  submenus from the database.
 
  I'm also create navigation cases and add them to RuntimeConfig, this was
  working just fine with MyFaces/Tomahawk 1.1.
 
  I'm trying to upgrade to MyFaces/Tomahawk 2.0 and this dynamic menu
  creation code only works when I'm in development mode by setting
  javax.faces.PROJECT_STAGE to development.
 
  Is this intended behaviour?
 
  --
  Sergio



Re: Creating runtime Navigation Cases

2012-09-03 Thread Mike Kienenberger
I would say it's intended behavior.   In a production system,
configuration files do not get reloaded.

However, I suspect you're now in the realm of non-specified JSF
design.   The way that the Runtime configuration works is specific to
the MyFaces implementation.

The portable solution is to write a NavigationHandler rather than to
try to populate the navigation case rules.



On Mon, Sep 3, 2012 at 1:40 PM, Sergio Vieira Rolanski
ser...@strategos.com.br wrote:
 Do you know if that is the intended behaviour or is it a bug?

 (Just want to be sure, before I open a bug report.)

 2012/9/3 Mike Kienenberger mkien...@gmail.com

 Actually, that's probably exactly the reason, now that you point it out.

 Configuration files are not re-read in production mode, so calling
 setNavigationRulesChanged() won't have any effect.



 On Mon, Sep 3, 2012 at 1:13 PM, Sergio Vieira Rolanski
 sergio.strate...@gmail.com wrote:
  That is nice idea.
 
  Nevertheless, I'm calling
 runtimeConfig.setNavigationRulesChanged(true);
  and MyFaces doesn't seem to take into account, unless MyFaces is in
  development mode. So, it seems like a bug to me.
 
  2012/9/3 Mike Kienenberger mkien...@gmail.com
 
  I don't use JSCookMenu, but I took a different approach for navigation.
 
  Rather than creating navigation cases and adding them to the
  RuntimeConfig, you can create your own navigation handler.   If the
  navigation case matches your rules, perform the navigation..
  Otherwise, delegate back to the original navigation handler.
 
  On Mon, Sep 3, 2012 at 10:37 AM, Sergio Vieira Rolanski
  ser...@strategos.com.br wrote:
   Hi,
  
   I'm dynamically creating a menu (JSCookMenu) by reading the menu and
   submenus from the database.
  
   I'm also create navigation cases and add them to RuntimeConfig, this
 was
   working just fine with MyFaces/Tomahawk 1.1.
  
   I'm trying to upgrade to MyFaces/Tomahawk 2.0 and this dynamic menu
   creation code only works when I'm in development mode by setting
   javax.faces.PROJECT_STAGE to development.
  
   Is this intended behaviour?
  
   --
   Sergio
 



Re: Save component state

2012-08-31 Thread Mike Kienenberger
How is the list returned from getCities() being used?
Why is the list being serialized in a state?

Maybe this below was why and posting the code may help.
 In the facescomponent class i use statehelper to save the state of the 2
 selectonemenu's, but i have a problem:


One thing to keep in mind is that Myfaces has no control over
serializing and instantiating foreign objects.

Chances are that you either shouldn't be serializing it in the first
place, or you should be converting it to an explictly-serializable
form (like a standard list) first.


On Thu, Aug 30, 2012 at 11:31 AM, José Luis Cetina maxtorz...@gmail.com wrote:
 Hi. I have a problem using myfaces 2.1.8 + openjpa 2.2.0 + primefaces
 3.4-SNAPSHOT.

 I dont know if asked this in openjpa list or here, anyway, i hope somebody
 can help me.

 I have 2 SelectOneMenu in a composite component(cc), this cc has a
 componentType in a facescomponent class.

 The first selectonemenu have a change event in the cc, when this event is
 fired the second selectonemenu load data from the database.

 In the facescomponent class i use statehelper to save the state of the 2
 selectonemenu's, but i have a problem:

 This is the scenario:

 I have this in my database:

 Table country:
 id name
 1  Spain
 2  Mexico
 3  USA

 Table cities:
 id fk name
 1  3  New York
 2  3  LA

 When my page load the country selectonemenu show all the countries without
 problem (i retrive them using openjpa),  in the cities selectonemenu's show
 nothing because Spain doesnt have cities, well then if i select Mexico my
 valuechangelistener method execute and load all the cities, but Mexico
 doesnt have nothing in the database then again nothing showed  as expected,
 then if a select USA the cities are retrived OK and they are shown in the
 cities selectonemenu although if i select another city like Spain i can see
 this error (my valuechangelistener never get called again):

 java.lang.InstantiationException:
 org.apache.openjpa.kernel.DelegatingResultList
 java.lang.InstantiationException:
 org.apache.openjpa.kernel.DelegatingResultList  at
 java.lang.Class.newInstance0(Class.java:357)at
 java.lang.Class.newInstance(Class.java:325) at
 javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1842)
at
 javax.faces.component._DeltaStateHelper.restoreState(_DeltaStateHelper.java:616)
 at
 javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:2021) 
   at
 org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:661)
 at
 org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:680)
 at
 org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:680)
 at
 org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:680)
 at
 org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreView(DefaultFaceletsStateManagementStrategy.java:330)
 at
 org.apache.myfaces.application.StateManagerImpl.restoreView(StateManagerImpl.java:130)
   at
 org.apache.myfaces.shared.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
 at
 org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:2109)
at
 org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:300)
 at
 com.ocpsoft.pretty.faces.application.PrettyViewHandler.restoreView(PrettyViewHandler.java:109)
   at
 org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.WindowContextAwareViewHandler.restoreView(WindowContextAwareViewHandler.java:122)
  at
 org.apache.myfaces.extensions.cdi.jsf.impl.CodiViewHandler.restoreView(CodiViewHandler.java:99)
  at
 javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83)
   at
 javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83)
   at
 org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:127)
   at
 org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
  at
 org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
   at
 org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(CodiLifecycleWrapper.java:95)
at
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
 com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145) at
 

Re: f:selectItem escape attribute doesn't work ?

2012-08-31 Thread Mike Kienenberger
Have you tried tracing what is happening through the debugger?
My guess is that there's a bug in the t:selectOneRadio renderer.
It seems like it would be straightforward to determine the cause and
submit a patch.
You might even be able to find the problem by examining the
t:selectOneRadio encoding code.

On Wed, Aug 8, 2012 at 6:49 AM, Patrick Meyer patrick.me...@o2.pl wrote:
 Hi,

 I would like to format selectItem label with html tags in  selectOneRadio 
 component. But the label is not rendered as HTML. What I'm doing wrong?

 lt;t:selectOneRadio id=idRadioJSF layout=spread gt;
 lt;f:selectItem itemValue=1 
 itemLabel=#{controller.formatLabel('test')} escape=false /gt;
 lt;/t:selectOneRadiogt;

 lt;t:radio index=0 for=idRadioJSF id=testRADIOJSF0 /gt;


 My Method looks like :

 public String formatLabel(String label){

 return  lt;span class=\description\gt;+label+lt;/spangt; ;

  }

 Browser render it like :

 lt;input id=page:tabRepeat:0:parameterRepeat:0:testRADIOJSF0 type=radio 
 name=page:tabRepeat:0:parameterRepeat:0:idRadioJSF value=1 /gt;
 lt;label for=page:tabRepeat:0:parameterRepeat:0:testRADIOJSF0gt; 
 amp;lt;span 
 class=amp;quot;descriptionamp;quot;amp;gt;testamp;lt;/spanamp;gt;lt;/labelgt;



  I'm using Myfaces ver 2.1.1 and Tomahawk lib.

 Regards,
 Patrick





Re: Redirecting JUL Logging to other logging systems -- do we need to revisit our logging methodology?

2012-08-27 Thread Mike Kienenberger
There's definitely value limiting dependencies.   But there's also the
reality that even though MyFaces code doesn't directly use JCL, its
dependencies do, so you have to have it anyway.

The SL4J library can emulate the JCL interface, so here's a way to
support SL4J without adding a dependency for it, if a dependency is
the real concern.   I have to have that emulation jar in my classpath
in any case for the other JCL producers.

Using logback isn't an option for me.   I've read the docs, and it
seems like LevelChangePropagator would do what was advertised.  I
doubt the claim would be made if it were not true.

I'm surprised no other JSF 2 users have commented on how they handle
the JUL logging dependency.

On Mon, Aug 27, 2012 at 12:23 AM, Matt Benson gudnabr...@gmail.com wrote:
 There still may be some value in not introducing dependencies in the
 case of projects that implement Java EE specifications.  Has anyone
 verified whether
 http://logback.qos.ch/manual/configuration.html#LevelChangePropagator
 improves JUL performance as advertised?

 Matt

 On Thu, Aug 23, 2012 at 2:02 PM, Ertio Lew ertio...@gmail.com wrote:
 Yes, things change with time  may be it didn't mattered too much that time
 but today SL4J is the need as it is widely adopted now.

 So +1 for SL4J !

 On Fri, Aug 24, 2012 at 12:17 AM, Mike Kienenberger 
 mkien...@gmail.comwrote:

 Well, that and at the time, it seemed like JUL would let us do
 everything SL4J claimed to do.   But as I stated earlier, the
 theoretical promises of JUL pluggability didn't live up to the real
 use conditions.


 On Thu, Aug 23, 2012 at 2:46 PM, Mike Kienenberger mkien...@gmail.com
 wrote:
  When we took the vote two years ago, I at least didn't really
  understand the need.
 
  Someone did bring up that point, but as a group we felt that
  reinventing the wheel didn't make a lot of sense.   SL4J was new, and
  I for one didn't understand the advantages of using it.
 
  If we were to vote again today, I would be strongly in favor of using
  SL4J as the logging mechanism.
 
 
 
  On Thu, Aug 23, 2012 at 2:38 PM, Ertio Lew ertio...@gmail.com wrote:
  Why doesn't Myfaces allows the flexibility to plug in your desired
 logging
  SL4J implementation instead of restricting users to JUL/ Commons
 logging or
  otherwise incurring the overheads of using bridgeHandlers etc ?!
 
  On Thu, Aug 23, 2012 at 8:10 PM, Mike Kienenberger mkien...@gmail.com
 wrote:
 
  Did you ever say something you really regretted?
 
  I really regret saying that I strongly preferred JUL over SL4J on the
  logging vote two years back[1].
 
  [1]
 
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c8f985b960906060447g30bb216ew62102b39be2a1...@mail.gmail.com%3E
 
  I am currently using the SLF4JBridgeHandler for JUL during
  development, and incurring the performance hits.
 
  Barring other events, my plans are to default back to JUL logging for
  production.
 
  How are other people handling this?  I know at the time of the
  discussion many people were switching to SL4J or still using log4j or
  JCL, all of which would have the same performance issues.
 
  Is it time to revisit our logging yet again, now that we know the
  theoretical flexibility of JUL didn't live up to the practical reality
  of using it?
 
  slf4j and myfaces
 
 
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906050818q6c74e615u2edc7cc2ec9f5...@mail.gmail.com%3E
 
  [VOTE] jul instead of commons-logging
 
 
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906091132y10cd0dadu4eb4a36dda6ae...@mail.gmail.com%3E
 
  [VOTE] use of jul or commons logging on myfaces core 2.0
 
 
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200910.mbox/%3cf6c92360909301905g104297a5m3bba5fb3d057...@mail.gmail.com%3E
 
  https://issues.apache.org/jira/browse/MYFACES-2378
 



Redirecting JUL Logging to other logging systems -- do we need to revisit our logging methodology?

2012-08-23 Thread Mike Kienenberger
Did you ever say something you really regretted?

I really regret saying that I strongly preferred JUL over SL4J on the
logging vote two years back[1].

[1] 
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c8f985b960906060447g30bb216ew62102b39be2a1...@mail.gmail.com%3E

I am currently using the SLF4JBridgeHandler for JUL during
development, and incurring the performance hits.

Barring other events, my plans are to default back to JUL logging for
production.

How are other people handling this?  I know at the time of the
discussion many people were switching to SL4J or still using log4j or
JCL, all of which would have the same performance issues.

Is it time to revisit our logging yet again, now that we know the
theoretical flexibility of JUL didn't live up to the practical reality
of using it?

slf4j and myfaces
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906050818q6c74e615u2edc7cc2ec9f5...@mail.gmail.com%3E

[VOTE] jul instead of commons-logging
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906091132y10cd0dadu4eb4a36dda6ae...@mail.gmail.com%3E

[VOTE] use of jul or commons logging on myfaces core 2.0
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200910.mbox/%3cf6c92360909301905g104297a5m3bba5fb3d057...@mail.gmail.com%3E

https://issues.apache.org/jira/browse/MYFACES-2378


Re: Redirecting JUL Logging to other logging systems -- do we need to revisit our logging methodology?

2012-08-23 Thread Mike Kienenberger
When we took the vote two years ago, I at least didn't really
understand the need.

Someone did bring up that point, but as a group we felt that
reinventing the wheel didn't make a lot of sense.   SL4J was new, and
I for one didn't understand the advantages of using it.

If we were to vote again today, I would be strongly in favor of using
SL4J as the logging mechanism.



On Thu, Aug 23, 2012 at 2:38 PM, Ertio Lew ertio...@gmail.com wrote:
 Why doesn't Myfaces allows the flexibility to plug in your desired logging
 SL4J implementation instead of restricting users to JUL/ Commons logging or
 otherwise incurring the overheads of using bridgeHandlers etc ?!

 On Thu, Aug 23, 2012 at 8:10 PM, Mike Kienenberger mkien...@gmail.comwrote:

 Did you ever say something you really regretted?

 I really regret saying that I strongly preferred JUL over SL4J on the
 logging vote two years back[1].

 [1]
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c8f985b960906060447g30bb216ew62102b39be2a1...@mail.gmail.com%3E

 I am currently using the SLF4JBridgeHandler for JUL during
 development, and incurring the performance hits.

 Barring other events, my plans are to default back to JUL logging for
 production.

 How are other people handling this?  I know at the time of the
 discussion many people were switching to SL4J or still using log4j or
 JCL, all of which would have the same performance issues.

 Is it time to revisit our logging yet again, now that we know the
 theoretical flexibility of JUL didn't live up to the practical reality
 of using it?

 slf4j and myfaces

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906050818q6c74e615u2edc7cc2ec9f5...@mail.gmail.com%3E

 [VOTE] jul instead of commons-logging

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906091132y10cd0dadu4eb4a36dda6ae...@mail.gmail.com%3E

 [VOTE] use of jul or commons logging on myfaces core 2.0

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200910.mbox/%3cf6c92360909301905g104297a5m3bba5fb3d057...@mail.gmail.com%3E

 https://issues.apache.org/jira/browse/MYFACES-2378



Re: Redirecting JUL Logging to other logging systems -- do we need to revisit our logging methodology?

2012-08-23 Thread Mike Kienenberger
Well, that and at the time, it seemed like JUL would let us do
everything SL4J claimed to do.   But as I stated earlier, the
theoretical promises of JUL pluggability didn't live up to the real
use conditions.


On Thu, Aug 23, 2012 at 2:46 PM, Mike Kienenberger mkien...@gmail.com wrote:
 When we took the vote two years ago, I at least didn't really
 understand the need.

 Someone did bring up that point, but as a group we felt that
 reinventing the wheel didn't make a lot of sense.   SL4J was new, and
 I for one didn't understand the advantages of using it.

 If we were to vote again today, I would be strongly in favor of using
 SL4J as the logging mechanism.



 On Thu, Aug 23, 2012 at 2:38 PM, Ertio Lew ertio...@gmail.com wrote:
 Why doesn't Myfaces allows the flexibility to plug in your desired logging
 SL4J implementation instead of restricting users to JUL/ Commons logging or
 otherwise incurring the overheads of using bridgeHandlers etc ?!

 On Thu, Aug 23, 2012 at 8:10 PM, Mike Kienenberger mkien...@gmail.comwrote:

 Did you ever say something you really regretted?

 I really regret saying that I strongly preferred JUL over SL4J on the
 logging vote two years back[1].

 [1]
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c8f985b960906060447g30bb216ew62102b39be2a1...@mail.gmail.com%3E

 I am currently using the SLF4JBridgeHandler for JUL during
 development, and incurring the performance hits.

 Barring other events, my plans are to default back to JUL logging for
 production.

 How are other people handling this?  I know at the time of the
 discussion many people were switching to SL4J or still using log4j or
 JCL, all of which would have the same performance issues.

 Is it time to revisit our logging yet again, now that we know the
 theoretical flexibility of JUL didn't live up to the practical reality
 of using it?

 slf4j and myfaces

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906050818q6c74e615u2edc7cc2ec9f5...@mail.gmail.com%3E

 [VOTE] jul instead of commons-logging

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200906.mbox/%3c2332f63b0906091132y10cd0dadu4eb4a36dda6ae...@mail.gmail.com%3E

 [VOTE] use of jul or commons logging on myfaces core 2.0

 http://mail-archives.apache.org/mod_mbox/myfaces-dev/200910.mbox/%3cf6c92360909301905g104297a5m3bba5fb3d057...@mail.gmail.com%3E

 https://issues.apache.org/jira/browse/MYFACES-2378



Re: h:outputStylesheet

2012-06-13 Thread Mike Kienenberger
My mistake.  I misread the updated code.   Even though . and / are
allowed, the security bug is fixed since the combinations of ..,
../ and /.. are still disallowed.

Sorry for the false alarm -- I should have tested it myself first,
which I just did with 2.1.7.

On Tue, Jun 12, 2012 at 4:20 PM, Mike Kienenberger mkien...@gmail.com wrote:
 See issue https://issues.apache.org/jira/browse/MYFACES-3454

 It's not a good idea to change the behavior back.   It introduces a
 security hole.

 http://mail-archives.apache.org/mod_mbox/www-announce/201202.mbox/%3c4f33ed1f.4070...@apache.org%3E


 On Tue, Jun 12, 2012 at 4:06 PM, Martin Koci
 martin.kocicak.k...@gmail.com wrote:
 Hi,

 it is not possible to use / in library name. Try

 1) outputStylesheet library=css name=test/my.css

 2) or set context param

 org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME

 to

 true




 José Luis Cetina píše v Út 12. 06. 2012 v 15:00 -0500:
 If i use
 outputStylesheet library=css name=my.css  (in my h:head tag) works ok
 with this structure folder
 resources/
 css/
 my.css


 But if i create an other folder into css this stop to work
 resources/
 css/
 test/
 my.css

 outputStylesheet library=css/test name=my.css  (in my h:head tag) this
 doesnt work in myfaces 2.1.7 but in mojarra 2.1.7 yes.

 Is this a bug??




Re: h:outputStylesheet

2012-06-12 Thread Mike Kienenberger
See issue https://issues.apache.org/jira/browse/MYFACES-3454

It's not a good idea to change the behavior back.   It introduces a
security hole.

http://mail-archives.apache.org/mod_mbox/www-announce/201202.mbox/%3c4f33ed1f.4070...@apache.org%3E


On Tue, Jun 12, 2012 at 4:06 PM, Martin Koci
martin.kocicak.k...@gmail.com wrote:
 Hi,

 it is not possible to use / in library name. Try

 1) outputStylesheet library=css name=test/my.css

 2) or set context param

 org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME

 to

 true




 José Luis Cetina píše v Út 12. 06. 2012 v 15:00 -0500:
 If i use
 outputStylesheet library=css name=my.css  (in my h:head tag) works ok
 with this structure folder
 resources/
 css/
 my.css


 But if i create an other folder into css this stop to work
 resources/
 css/
 test/
 my.css

 outputStylesheet library=css/test name=my.css  (in my h:head tag) this
 doesnt work in myfaces 2.1.7 but in mojarra 2.1.7 yes.

 Is this a bug??




Re: t:validateRegExpr gives NoSuchMethodException with Facelets

2012-06-02 Thread Mike Kienenberger
I use Facelets 1.1.14 with tomahawk 1.19 and Myfaces 1.2.9 right now.

One thing you should make sure is that you are using the JSF 1.2
version of Tomahawk.  Also 1.1.15 is pretty old -- I would upgrade to
the latest tomahawk version.



On Sat, Jun 2, 2012 at 2:59 AM, M. Huber d...@gmx.de wrote:
 Hi!

 I am using MyFaces Tomahawk 1.1.15 on Mojarra JSF 1.2 Impl with Facelets 
 1.1.11. Almost everything seems fine but when I use t:validateRegExpr I get:

 java.lang.NoSuchMethodException: 
 org.apache.myfaces.validator.ValidatorBaseTagHandler.init(com.sun.facelets.tag.TagConfig)

 The ValidatorBaseTagHandler contained in the Tomahawk JAR defines

 org.apache.myfaces.validator.ValidatorBaseTagHandler.init(com.sun.facelets.tag.
  jsf. TagConfig)

 instead. I also had a look at Facelets 1.1.15 JAR (which is the latest 1.1.x 
 I could find on the net) and it does not seem to define 
 com.sun.facelets.tag.jsf.TagConfig either. Am I using the wrong Facelets 
 version? Which version of Facelets goes with Tomahawk 1.1.15 and JSF 1.2?

 Many thanks

 Martin
 --
 NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
 Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a


Re: commandlink not working in panelgrid

2012-05-10 Thread Mike Kienenberger
This is one of the basic concepts that you learn as you work with JSF
-- for a UICommand component to perform its action, it must be
rendered on the initial view, and it must also be rendered on the view
created to process the submit.

So whatever condition you use for rendered must involve objects that
exist longer than request scope.

Also, static class variables are not available for use in the EL
expression.   I believe non-public class instance variables are also
not available, but I think public ones are.   To be on the safe side,
you should provide a bean getter for any variable you want to access
from the EL expression.

So for resources.LOGIN_TYPE_MY_ACCOUNT to work, you would need to
provide a getLOGIN_TYPE_MY_ACCOUNT() { return LOGIN_TYPE_MY_ACCOUNT; }
method on your resources bean.


On Wed, May 9, 2012 at 4:46 PM, Lim Hock-Chai
lim.hock-c...@usamobility.com wrote:
 I should probably clarify by saying, it shows the link but just will not fire 
 the action when click on it.  Another word, the rendered test is successful 
 on panelgrid (hence the link is shown), but the test failed when clicked on 
 the link.  Scratch my head on this for two days.  Learn a new 
 tricks-of-the-trade, priceless...



 -Original Message-
 From: Lim Hock-Chai [mailto:lim.hock-c...@usamobility.com]
 Sent: Wednesday, May 09, 2012 3:36 PM
 To: MyFaces Discussion
 Subject: RE: commandlink not working in panelgrid

 Finally got it to work inside panelgrid.  I don't understand it but it works. 
  Shasi, I think you are right about the problem is caused by rendered 
 attribute being evaluated as false when clicked.  Below is what I did to get 
 it to work.  Hopefully you or someone can explain why.

 The code change that I made to get it to work is on this line only:
 h:panelGrid  rendered=#{not empty sessionScope.MyAccountLoginType and 
 sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT }

 It works if I change it to this:
 h:panelGrid  rendered=#{ sessionScope.MyAccountLoginType=='MA'}
 Note : value of MA is what I have in my message bundle 
 resources.LOGIN_TYPE_MY_ACCOUNT.  Just to be sure, I did h:outputText 
 value=#{resources.LOGIN_TYPE_MY_ACCOUNT} / and it output value of MA 
 correctly.  Not sure why I can't use it to perform the rendered test.

 I tried below and non of them work.  But I don't know why:
 h:panelGrid  rendered=#{not empty sessionScope.MyAccountLoginType and 
 sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT }

 h:panelGrid  rendered=#{not empty sessionScope.MyAccountLoginType and 
 sessionScope.MyAccountLoginType=='MA' }

 h:panelGrid  rendered=${not empty sessionScope.MyAccountLoginType and 
 sessionScope.MyAccountLoginType=='MA' }


 -Original Message-
 From: Lim Hock-Chai [mailto:lim.hock-c...@usamobility.com]
 Sent: Wednesday, May 09, 2012 1:52 PM
 To: MyFaces Discussion
 Subject: RE: commandlink not working in panelgrid

 I added an onclick=alert(#{not empty sessionScope.MyAccountLoginType and 
 sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT }) on the 
 commandlink element and the alert showing value of true when I click on the 
 link.


                h:panelGrid
                                rendered=#{not empty 
 sessionScope.MyAccountLoginType and
                                                                        
 sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT }
                        h:outputText value= /
                        h:outputText value=|/
                        h:commandLink
                                immediate=true
                                onclick=alert(#{not empty 
 sessionScope.MyAccountLoginType and 
 sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT })
                                style=CURSOR: pointer
                                
 action=#{commonTaskBean.fromMSAMBackToMyAccount}
                                h:outputText value=My Account/
                        /h:commandLink
                        h:outputText value=|/
                /h:panelGrid

 -Original Message-
 From: Shasi Mitra [mailto:shasimi...@yahoo.com]
 Sent: Wednesday, May 09, 2012 1:36 PM
 To: MyFaces Discussion
 Subject: Re: commandlink not working in panelgrid

 After u click the link also the expression in the rendered attribute is 
 evaluated. That time it should be returning Faldo and hence ur action isn't 
 being fired. If u remove all the rendered attributes or keep ur bean in 
 session scope, it should work. Try printing the expression u gave in the 
 rendered attribute and check.

 Sent from my iPhone

 On May 9, 2012, at 11:59 PM, Lim Hock-Chai lim.hock-c...@usamobility.com 
 wrote:

 I tried both session and request scopes.  Both failed to work.  The thing is 
 that the commandlink is showing on the page, which would mean that the 
 rendered condition in the panelGroup or panelgrid is ok.  It just that when 
 I click on the link that is inside the 

Re: FacesMessage Severity for 'success'

2012-04-10 Thread Mike Kienenberger
On Tue, Apr 10, 2012 at 9:37 AM, Dennis Hörsch hoer...@his.de wrote:
 does anybody know why there is no severity for success messages?
 Is that a special case that nobody needs?

 We have a workaround to save/display them separated of the standard faces
 messages.

What's wrong with SEVERITY_INFO?


Re: FacesMessage Severity for 'success'

2012-04-10 Thread Mike Kienenberger
The severity levels can be used however they make the most sense in
your application.

For example, what you call a hint, I generally put in WARN severity
(although I probably only have one hint message).   I use INFO for
saved successfully messages.

You are however free to pick whatever levels you like for whatever
organization of messages makes the most sense.  My recommendation is
that you use INFO as the severity.

On Tue, Apr 10, 2012 at 2:19 PM, Hoersch, Dennis hoer...@his.de wrote:
 On Tue, Apr 10, 2012 at 9:37 AM, Dennis Hörsch hoer...@his.de wrote:
 does anybody know why there is no severity for success messages?
 Is that a special case that nobody needs?

 We have a workaround to save/display them separated of the standard faces
 messages.

What's wrong with SEVERITY_INFO?

 In my opinion/understanding 'Info' is something like a hint ('Note that ... 
 '). 'Success' is used by us for messages like '... saved successfully', 'The 
 job is finished' which are styled a bit different.


 ---
 HIS Hochschul-Informations-System GmbH
 Goseriede 9 | 30159 Hannover | www.his.de

 Dennis Hörsch
 Unternehmensbereich Hochschul-IT
 Arbeitsbereich Entwicklung
 Telefon +49 (0)511 1220-403 | Fax +49 (0)511 1220-250
 E-Mail hoer...@his.de

 Registergericht: Amtsgericht Hannover, HRB 6489
 Geschäftsführer: Prof. Dr. Martin Leitner
 Vorsitzender des Aufsichtsrats: Prof. Dr. Rolf-Dieter Postlep


Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread Mike Kienenberger
I don't have much experience with them, but Apache Geronimo and, to a
lesser degree, Apache Tomcat would be alternatives to Glassfish.
There may be others.

2012/3/13 José Luis Cetina maxtorz...@gmail.com:
 Let me tell you that the example deploy and RAN without any problem and i
 dont move any line of code, i only deploy in tomcat without any problem, i
 want to use apache  product's like myfaces, CODI, etc, i want to know if
 you can give me an objective suggestion with what Application Server i can
 use with your products, i have the opportunity for choose.

 Thanks


 2012/3/13 Gerhard Petracek gerhard.petra...@gmail.com

 hi jose,

 you can run the generated demos with a servlet container like jetty (see
 the comment in the generated pom.xml file), tomcat,... .
 by default the myfaces-core profile is activated.

 we just need to know if your implementation works with such a generated
 application.
 esp. because glassfish adds further complexity with the mentioned
 classloader-config (e.g. with this config-entries you can't use
 myfaces-core and owb in parallel - that's a known classloading issue
 of glassfish).

 regards,
 gerhard



 2012/3/13 José Luis Cetina maxtorz...@gmail.com

  I downloaded the example number 11 and i run the project without any
  problem, but i can see that the project is using Mojarra Profile as JSF
  Impl (the log sayed to me Mojarra...). Then if i change to use MyFaces
  chossing the myfaces profile and adding these lines to my
  g*lassfish-web.xml
  *:
 
  class-loader delegate=false/
  property name=useBundledJsf value=true/
 
  then i got an *exception *and i CANT run the project:
 
  Here is the *glassfish log:*
  -
 
  Launching GlassFish on Felix platform
  Información: Running GlassFish Version: GlassFish Server Open Source
  Edition 3.1.2 (build 23)
  Información: Grizzly Framework 1.9.46 started in: 78ms - bound to [
  0.0.0.0:8080]
  Información: Grizzly Framework 1.9.46 started in: 56ms - bound to [
  0.0.0.0:8181]
  Información: Grizzly Framework 1.9.46 started in: 106ms - bound to [
  0.0.0.0:3700]
  Información: Grizzly Framework 1.9.46 started in: 120ms - bound to [
  0.0.0.0:4848]
  Información: Grizzly Framework 1.9.46 started in: 146ms - bound to [
  0.0.0.0:7676]
  Información: The Admin Console is already installed, but not yet loaded.
  Información: Registered
  org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
  persistence-type = replicated in BackingStoreFactoryRegistry
  Información: GlassFish Server Open Source Edition 3.1.2 (23) tiempo de
  inicio: Felix (2,441ms), servicios de inicio(1,240ms), total(3,681ms)
  Información: JMX005: JMXStartupService had Started JMXConnector on
  JMXService URL service:jmx:rmi://
  192.168.1.209:8686/jndi/rmi://192.168.1.209:8686/jmxrmi
  Información: Hibernate Validator 4.2.0.Final
  Información: Grizzly Framework 1.9.46 started in: 49ms - bound to [
  0.0.0.0:8080]
  Información: SEC1002: Security Manager is OFF.
  Información: SEC1010: Entering Security Startup Service
  Información: SEC1143: Loading policy provider
  com.sun.enterprise.security.provider.PolicyWrapper.
  Información: SEC1115: Realm [admin-realm] of classtype
  [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
  created.
  Información: SEC1115: Realm [file] of classtype
  [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
  created.
  Información: SEC1115: Realm [certificate] of classtype
  [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm]
  successfully created.
  Información: SEC1011: Security Service(s) Started Successfully
  Información: WEB0169: Created HTTP listener [http-listener-1] on
 host/port
  [
  0.0.0.0:8080]
  Información: WEB0169: Created HTTP listener [http-listener-2] on
 host/port
  [
  0.0.0.0:8181]
  Información: WEB0169: Created HTTP listener [admin-listener] on
 host/port [
  0.0.0.0:4848]
  Información: WEB0171: Created virtual server [server]
  Información: WEB0171: Created virtual server [__asadmin]
  Información: WEB0172: Virtual server [server] loaded default web module
 []
  Información: WELD-000900 1.1.4 (Final)
  Grave: Exception while loading the app
  *Grave: Exception while loading the app :
 
 
 org.jboss.weldx.transaction.UserTransaction$1513261869$Proxy$_$$_Weld$Proxy$
  cannot be cast to javassist.util.proxy.ProxyObject*
  *java.lang.ClassCastException:
 
 
 org.jboss.weldx.transaction.UserTransaction$1513261869$Proxy$_$$_Weld$Proxy$
  cannot be cast to javassist.util.proxy.ProxyObject*
  at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:245)
  at
 
 
 org.jboss.weld.bean.builtin.ee.AbstractEEBean.init(AbstractEEBean.java:43)
  at
 
 
 org.jboss.weld.bean.builtin.ee.UserTransactionBean.init(UserTransactionBean.java:52)
  at
 
 
 org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:177)
  at
 
 

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-12 Thread Mike Kienenberger
You are correct in that it is a serious error.   Having both jars in
your path will result in identically-named, but differently-operating
classes to be present in your application.

You need to configure Glassfish to disable the RI, or you need to
remove the myfaces jars.

2012/3/12 José Luis Cetina maxtorz...@gmail.com:
 Well sorry, really this says: ERROR Both MyFaces and the RI are on your
 classpath. Please make sure to use only one of the two JSF-implementations.

 Grave: Both MyFaces and the RI are on your classpath. Please make sure to
 use only one of the two JSF-implementations.

 2012/3/12 Shasi Mitra shasimi...@yahoo.com

 It's just a warning rite? You can go ahead with your development. It
 doesn't  affect anything.

 Sent from my iPhone

 On Mar 12, 2012, at 10:10 PM, José Luis Cetina maxtorz...@gmail.com
 wrote:

  Im triying to start a new project for first time with myfaces, i always
  used Mojarra but know i want to change but im having problems at the
 start:
 
  My only requierement is use Glassfish 3.1.2.1.
 
  Hi i have this WARNING:
 
  *Both MyFaces and the RI are on your classpath. Please make sure to use
  only one of the two JSF-implementations.*
 
  Why this happend if im using only jars from myfaces?? maybe for
 glassfish i
  think, i have these in my *glassfish-web.xml* file, under WEB-INF folder:
 
  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE glassfish-web-app PUBLIC -//GlassFish.org//DTD GlassFish
  Application Server 3.1 Servlet 3.0//EN 
  http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd;
  glassfish-web-app error-url=
     !--Para establecer el charset a utf8 y remover el mensaje de:
 PWC4011:
  Unable to set request character encoding to UTF-8 from context--
     parameter-encoding default-charset=UTF-8/
     *class-loader delegate=false/*
  *    property name=useBundledJsf value=true/*
     !--class-loader delegate=true/--
     jsp-config
         property name=keepgenerated value=true
             descriptionKeep a copy of the generated servlet class' java
  code./description
         /property
     /jsp-config
  /glassfish-web-app
 
      
 
  This is my web.xml
 
  ?xml version=1.0 encoding=UTF-8?
  web-app version=3.0 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
  http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd;
     context-param
         param-namejavax.faces.PROJECT_STAGE/param-name
         param-valueDevelopment/param-value
     /context-param
     context-param
         param-namecom.ocpsoft.pretty.DEVELOPMENT/param-name
         param-valuetrue/param-value
     /context-param
     context-param
         param-namejavax.faces.STATE_SAVING_METHOD/param-name
         param-valueserver/param-value
     /context-param
     context-param
         param-name
 
 javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE/param-name
         param-valuetrue/param-value
     /context-param
      context-param
         param-namejavax.faces.FACELETS_SKIP_COMMENTS/param-name
         param-valuetrue/param-value
     /context-param
     context-param
 
 
 param-namecom.sun.faces.enableMissingResourceLibraryDetection/param-name
         param-valuetrue/param-value
     /context-param
     listener
         *
 
 listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class
  *
     /listener
     servlet
         servlet-nameFaces Servlet/servlet-name
         servlet-classjavax.faces.webapp.FacesServlet/servlet-class
         load-on-startup1/load-on-startup
     /servlet
     servlet-mapping
         servlet-nameFaces Servlet/servlet-name
         url-pattern/faces/*/url-pattern
     /servlet-mapping
     session-config
         session-timeout
             30
         /session-timeout
     /session-config
     welcome-file-list
         welcome-filefaces/index.xhtml/welcome-file
     /welcome-file-list
  /web-app
 
      
 
  Here are my libraries:
 
  --MYFACES
  myfaces-api-2.1.6.jar
  myfaces-impl-2.1.6.jar
  commons-beanutils-1.8.3.jar
  commons-digester-1.8.jar
  commons-logging-1.8.jar
  commons-codec-1.1.1.jar
  commons-collections-3.2.jar
  --MYFACES CODI
  myfaces-extcdi-alternative-implementation-module-1.0.4
  myfaces-extcdi-bv1-module-api-1.0.4
  myfaces-extcdi-bv1-module-impl-1.0.4
  myfaces-extcdi-core-alternative-configuration-1.0.4
  myfaces-extcdi-core-api-1.0.4
  myfaces-extcdi-core-impl-1.0.4
  myfaces-extcdi-jpa1-module-api-1.0.4
  myfaces-extcdi-jpa1-module-impl-1.0.4
  myfaces-extcdi-jsf20-module-api-1.0.4
  myfaces-extcdi-jsf20-module-impl-1.0.4
  myfaces-extcdi-jsf-alternative-configuration-1.0.4
  myfaces-extcdi-message-module-api-1.0.4
  myfaces-extcdi-message-module-impl-1.0.4
  myfaces-extcdi-scripting-module-api-1.0.4
  myfaces-extcdi-scripting-module-impl-1.0.4
 
 
  I dont know if because the WARNING i 

JSF 1.2: #{object.class.name} not allowed

2012-03-09 Thread Mike Kienenberger
I got this error earlier today.

/pages/notAuthorized.xhtml @42,172 value= to access page
'#{page.unauthorizedPage.class.name}' The identifier [class] is not a
valid Java identifier as required by section 1.19 of the EL
specification (Identifier ::= Java language identifier). This check
can be disabled by setting the system property
org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.

It seems rather odd to me that .class is not an allowed EL
expression component since Object obviously implements getClass().


Re: Clarification needed for Tomahawk datatable tag

2012-01-06 Thread Mike Kienenberger
You're welcome.

Using the panelGrid columns=1 suggestion would probably do the same thing.


On Fri, Jan 6, 2012 at 4:21 AM, Arunagiri Kaliappan 
arunagiri.kaliap...@viterra.ca wrote:

 Hi Mike,

 Thanks for your suggestion.
 The problem got resolved by butting f:verbatimbr/f:verbatim between
 every display of components inside t:columns

 For example:

t:columns value=#{pc_TestNewView.orderListData} var=*column*
h:inputText value=#{row.orderNo} rendered=#{row.orderNo eq
column.orderNo}/
 f:verbatimbr/f:verbatim

h:inputText value=#{row.productName} rendered=#{row.orderNo eq
column.orderNo}/
 f:verbatimbr/f:verbatim

h:inputText value=#{row.price} rendered=#{row.orderNo eq
column.orderNo}/
 f:verbatimbr/f:verbatim

h:inputText value=#{row.qty} rendered=#{row.orderNo eq
column.orderNo}/
/t:columns

 Thanks  Regards,
 Arunagiri K




 Arunagiri Kaliappan

 Chennai

 Mailto:arunagiri.kaliap...@viterra.ca
 www.viterra.ca


 This e-mail and any attachment(s) are confidential and may be privileged.
 If you are not the intended recipient please notify me immediately by
 return
 e-mail, delete this e-mail and do not copy, use or disclose it.

 [image: Inactive hide details for Mike Kienenberger mkien...@gmail.com]Mike
 Kienenberger mkien...@gmail.com



 *Mike Kienenberger mkien...@gmail.com*

 01/05/2012 11:35 AM


 To

 Arunagiri Kaliappan arunagiri.kaliap...@viterra.ca
 cc

 MyFaces Discussion users@myfaces.apache.org
 Subject

 Re: Clarification needed for Tomahawk datatable tag
 I'm not an expert, but I suspect this may just be due to newspaperColumns
 or standard html wrapping.   You might try looking at the raw html for the
 generated table source for the 1,2, 3 item cases and see if there's some
 pattern in there.

 A couple of other things to try:

 See what happens if you get rid of newspaperColumns (or use a constant
 value).

 See what happens if you put your t:column data inside of an h:panelGrid
 columns=1 component.


 On Thu, Jan 5, 2012 at 7:37 AM, Arunagiri Kaliappan *
 arunagiri.kaliap...@viterra.ca* arunagiri.kaliap...@viterra.ca wrote:

Hi,

Further to the below mail related to our application(JSF Portlet
application), following are the required details:
*
JSP file:*
t:dataTable id=*data* styleClass=*standardTable*
headerClass=*standardTable_Header*
footerClass=*standardTable_Header*
rowClasses=*standardTable_Row1,standardTable_Row2*
columnClasses=*standardTable_Column* var=*row*
value=#{pc_TestNewView.orderListData} preserveDataModel=*false*
newspaperColumns=#{pc_TestNewView.orderListSize}

t:columns value=#{pc_TestNewView.orderListData} var=*column*
h:inputText value=#{row.orderNo} rendered=#{row.orderNo eq
column.orderNo}/
h:inputText value=#{row.productName} rendered=#{row.orderNo eq
column.orderNo}/
h:inputText value=#{row.price} rendered=#{row.orderNo eq
column.orderNo}/
h:inputText value=#{row.qty} rendered=#{row.orderNo eq
column.orderNo}/
/t:columns
/t:dataTable

In the above JSP file, we are iterating the list of objects of type
Order in our example.

*
Java file (Backing bean):*
*
private* DataModel orderDataModel;*
private* *static* *final* ArrayListOrder *orderList* = 
 *new*ArrayListOrder(Arrays.
*asList*(
*
new* Order(A001, Intel CPU, *new* BigDecimal(700.00), 
 *new*BigDecimal(1)),
*
new* Order(A002, Harddisk 10TB, *new* BigDecimal(500.00), 
 *new*BigDecimal(2)),
*
new* Order(A003, Dell Laptop, *new* BigDecimal(11600.00), 
 *new*BigDecimal(8)),
*
new* Order(A004, Samsung LCD, *new* BigDecimal(5200.00), 
 *new*BigDecimal(3)),
*
new* Order(A005, A4Tech Mouse, *new* BigDecimal(100.00), 
 *new*BigDecimal(10;
*
public* DataModel getOrderListData() {*
if*(*null* == orderDataModel) {
orderDataModel = *new* ListDataModel(getOrders());
}*
return* orderDataModel;
}
*
private* ListOrder getOrders() {*
return* *orderList*;
}
*
public* *int* getOrderListSize() {*
return* *orderList*.size();
}
*
Details:*
In the above backing bean .java file, we have populated the
listdatamodel with the help of the arraylist(orderlist) as hardcoded above.
Please note that we have used 5 items in a list.

Also, we have tested with one, two and three items in a list. We have
attached the respective screenshots for your reference.



Please do the needful.

Thanks  Regards,
Arunagiri K


*(See attached file: Data table with 1 list item.gif)(See attached
file: Data table with 2 list items.gif)(See attached file: Data table with
3 list items.gif)(See attached file: Data table with 5 list items.gif)*




Arunagiri Kaliappan

Chennai
*

 **Mailto:arunagiri.kaliap...@viterra.ca*Mailto:arunagiri.kaliap...@viterra.ca
*
**www.viterra.ca* http

Re: Bean-members marked with transient are not reset to null after request.

2012-01-06 Thread Mike Kienenberger
What is the scope of your bean containing the transient members?

On Fri, Jan 6, 2012 at 8:35 AM, Georg Füchsle giofy...@googlemail.com wrote:
 Hallo!

 I had to switch the state-saving method from client to server. After
 this change bean-members marked with transient are not reset to null
 after request.

 I use jsf1.2 (sun ri) with tomahawk and Facelets.

 To exclude bean memberes from state-saving I usually marked these
 members with 'transient':
 For example:
 private transient List... myList;

 At least when these beans where saved via t:saveState ... / after
 any request these values had been reset to null.
 Now for another reason I had to switch the state saving from client to server.
 After tis change the transient memberes are not reset after a request.


 I tried both context-parameters:

  context-param
    param-namecom.sun.faces.serializeServerState/param-name
    param-valuetrue/param-value
  /context-param
  context-param
    param-nameorg.apache.myfaces.SERIALIZE_STATE_IN_SESSION/param-name
    param-valuetrue/param-value
  /context-param

 I hoped when using a serverside serialization these values should be
 reset. But it won't.

 Can anybody give me a hint how to get the same behaviour as with clien
 state saving?

 Thanks Gio


Re: Clarification needed for Tomahawk datatable tag

2012-01-05 Thread Mike Kienenberger
I'm not an expert, but I suspect this may just be due to newspaperColumns
or standard html wrapping.   You might try looking at the raw html for the
generated table source for the 1,2, 3 item cases and see if there's some
pattern in there.

A couple of other things to try:

See what happens if you get rid of newspaperColumns (or use a constant
value).

See what happens if you put your t:column data inside of an h:panelGrid
columns=1 component.


On Thu, Jan 5, 2012 at 7:37 AM, Arunagiri Kaliappan 
arunagiri.kaliap...@viterra.ca wrote:

  Hi,

 Further to the below mail related to our application(JSF Portlet
 application), following are the required details:

 *JSP file:*
  t:dataTable id=*data* styleClass=*standardTable*
  headerClass=*standardTable_Header*
  footerClass=*standardTable_Header*
  rowClasses=*standardTable_Row1,standardTable_Row2*
  columnClasses=*standardTable_Column* var=*row*
  value=#{pc_TestNewView.orderListData} preserveDataModel=*false*
  newspaperColumns=#{pc_TestNewView.orderListSize}

  t:columns value=#{pc_TestNewView.orderListData} var=*column*
  h:inputText value=#{row.orderNo} rendered=#{row.orderNo eq
 column.orderNo}/
  h:inputText value=#{row.productName} rendered=#{row.orderNo eq
 column.orderNo}/
  h:inputText value=#{row.price} rendered=#{row.orderNo eq
 column.orderNo}/
  h:inputText value=#{row.qty} rendered=#{row.orderNo eq
 column.orderNo}/
  /t:columns
  /t:dataTable

 In the above JSP file, we are iterating the list of objects of type
 Order in our example.


 *Java file (Backing bean):*

 *private* DataModel orderDataModel;
 *private* *static* *final* ArrayListOrder *orderList* = 
 *new*ArrayListOrder(Arrays.
 *asList*(

  *new* Order(A001, Intel CPU, *new* BigDecimal(700.00), 
 *new*BigDecimal(1)),
  *new* Order(A002, Harddisk 10TB, *new* BigDecimal(500.00), 
 *new*BigDecimal(2)),
  *new* Order(A003, Dell Laptop, *new* BigDecimal(11600.00), 
 *new*BigDecimal(8)),
  *new* Order(A004, Samsung LCD, *new* BigDecimal(5200.00), 
 *new*BigDecimal(3)),
  *new* Order(A005, A4Tech Mouse, *new* BigDecimal(100.00), 
 *new*BigDecimal(10;

 *public* DataModel getOrderListData() {
  *if*(*null* == orderDataModel) {
  orderDataModel = *new* ListDataModel(getOrders());
  }
  *return* orderDataModel;
 }

 *private* ListOrder getOrders() {
  *return* *orderList*;
 }

 *public* *int* getOrderListSize() {
  *return* *orderList*.size();
 }

 *Details:*
 In the above backing bean .java file, we have populated the listdatamodel
 with the help of the arraylist(orderlist) as hardcoded above. Please note
 that we have used 5 items in a list.

 Also, we have tested with one, two and three items in a list. We have
 attached the respective screenshots for your reference.


 Please do the needful.

 Thanks  Regards,
 Arunagiri K


 *(See attached file: Data table with 1 list item.gif)**(See attached
 file: Data table with 2 list items.gif)**(See attached file: Data table
 with 3 list items.gif)**(See attached file: Data table with 5 list
 items.gif)*




 Arunagiri Kaliappan

 Chennai

 Mailto:arunagiri.kaliap...@viterra.ca
 www.viterra.ca


 This e-mail and any attachment(s) are confidential and may be privileged.
 If you are not the intended recipient please notify me immediately by
 return
 e-mail, delete this e-mail and do not copy, use or disclose it.

 [image: Inactive hide details for Mike Kienenberger mkien...@gmail.com]Mike
 Kienenberger mkien...@gmail.com



 *Mike Kienenberger mkien...@gmail.com*

 01/04/2012 11:37 AM


 To

 MyFaces Discussion users@myfaces.apache.org
 cc

 Arunagiri Kaliappan arunagiri.kaliap...@viterra.ca
 Subject

 Re: Clarification needed for Tomahawk datatable tag
 Can you describe how the output is different when the number is greater
 than 3 and when the number is less than 4?

 On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan *
 arunagiri.kaliap...@viterra.ca* arunagiri.kaliap...@viterra.ca wrote:

Hi,

In our project (Portal application with JSF 1.1) , we are in need of
showing the columns vertically and also the number of columns is dynamic in
nature.
We are using *Apache MyFaces Tomahawk* library for the above mentioned
requirement.

We have used *t:datatable* and *t:columns* tags. We have used the
same datamodel (list datamodel which is made up of ArrayList which in turn
contains objects) for both datatable and columns tags value attribute. But,
the columns are displayed correctly only when the *number of columns
is 3 and above*. For the columns below 3, the display is not proper.

Can you please suggest as how to proceed further?

Please do the needful.

Thanks  Regards,
Arunagiri K



Arunagiri Kaliappan

Chennai
*

 **Mailto:arunagiri.kaliap...@viterra.ca*Mailto:arunagiri.kaliap...@viterra.ca
*
**www.viterra.ca* http://www.viterra.ca/


This e-mail and any attachment(s) are confidential and may be
privileged.
If you

Re: Clarification needed for Tomahawk datatable tag

2012-01-04 Thread Mike Kienenberger
Can you describe how the output is different when the number is greater
than 3 and when the number is less than 4?

On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan 
arunagiri.kaliap...@viterra.ca wrote:

 Hi,

 In our project (Portal application with JSF 1.1) , we are in need of
 showing the columns vertically and also the number of columns is dynamic in
 nature.
 We are using *Apache MyFaces Tomahawk* library for the above mentioned
 requirement.

 We have used *t:datatable* and *t:columns* tags. We have used the
 same datamodel (list datamodel which is made up of ArrayList which in turn
 contains objects) for both datatable and columns tags value attribute. But,
 the columns are displayed correctly only when the *number of columns is 3
 and above*. For the columns below 3, the display is not proper.

 Can you please suggest as how to proceed further?

 Please do the needful.

 Thanks  Regards,
 Arunagiri K



 Arunagiri Kaliappan

 Chennai

 Mailto:arunagiri.kaliap...@viterra.ca
 www.viterra.ca


 This e-mail and any attachment(s) are confidential and may be privileged.
 If you are not the intended recipient please notify me immediately by
 return
 e-mail, delete this e-mail and do not copy, use or disclose it.




Re: Clarification needed for Tomahawk datatable tag

2012-01-04 Thread Mike Kienenberger
I think we're going to have to see your actual page code to help any
further.

On Wed, Jan 4, 2012 at 1:01 PM, Aramudhan Divakaran 
aramudhan.divaka...@viterra.ca wrote:

 Hi Mike,

 The output format is same for less than 3 and greater than 4.

 When we add test1, test2 and test3 values the data are not in the proper
 format. After adding test4 the formatting looks fine.

 Output will looks like below, the added values should display vertically.

 Label 1 Test1 Test2 Test3 Test4 
 Label 2 OutputvalueLab2 OutputvalueLab2 OutputvalueLab2 OutputvalueLab2
 ...
 Label 3 OutputvalueLab3 OutputvalueLab3 OutputvalueLab3 OutputvalueLab3
 ...
 Label 4 OutputvalueLab4 OutputvalueLab4 OutputvalueLab4 OutputvalueLab4
 ...
 Label 5 OutputvalueLab5 OutputvalueLab5 OutputvalueLab5 OutputvalueLab5
 ...



 Thanks  Regards,
 Aramudhan.D


 Aramudhan Divakaran

 Chennai

 Mailto:aramudhan.divaka...@viterra.ca

 www.viterra.ca


 This e-mail and any attachment(s) are confidential and may be privileged.
 If you are not the intended recipient please notify me immediately by
 return
 e-mail, delete this e-mail and do not copy, use or disclose it.

 [image: Inactive hide details for Mike Kienenberger mkien...@gmail.com]Mike
 Kienenberger mkien...@gmail.com



 *Mike Kienenberger mkien...@gmail.com*

 01/04/2012 11:07 PM
 Please respond to
 MyFaces Discussion users@myfaces.apache.org



 To

 MyFaces Discussion users@myfaces.apache.org
 cc

 Arunagiri Kaliappan arunagiri.kaliap...@viterra.ca
 Subject

 Re: Clarification needed for Tomahawk datatable tag
 Can you describe how the output is different when the number is greater
 than 3 and when the number is less than 4?

 On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan 
 arunagiri.kaliap...@viterra.ca wrote:

  Hi,
 
  In our project (Portal application with JSF 1.1) , we are in need of
  showing the columns vertically and also the number of columns is dynamic
 in
  nature.
  We are using *Apache MyFaces Tomahawk* library for the above mentioned
  requirement.
 
  We have used *t:datatable* and *t:columns* tags. We have used the

  same datamodel (list datamodel which is made up of ArrayList which in
 turn
  contains objects) for both datatable and columns tags value attribute.
 But,
  the columns are displayed correctly only when the *number of columns is 3
  and above*. For the columns below 3, the display is not proper.

 
  Can you please suggest as how to proceed further?
 
  Please do the needful.
 
  Thanks  Regards,
  Arunagiri K
 
 
 
  Arunagiri Kaliappan
 
  Chennai
 
 
 Mailto:arunagiri.kaliap...@viterra.ca
  www.viterra.ca
 
 

  This e-mail and any attachment(s) are confidential and may be privileged.
  If you are not the intended recipient please notify me immediately by
  return
  e-mail, delete this e-mail and do not copy, use or disclose it.
 
 




Re: comment block within panelGrid, unexpected result - MyFaces Core 2.0

2011-12-27 Thread Mike Kienenberger
Yes, the behavior is considered normal, because a comment is just a
piece of literal text in the generated html.   Html Comments have no
special meaning to JSF.

As Thomas stated, you can use skip_comments to remove all comments
from your generated html.

You can also use ui:remove/ui:remove tags to mark a section of the
page as removed.



On Fri, Dec 23, 2011 at 4:06 AM, Thomas Andraschko
zoi...@googlemail.com wrote:
 Hi,

 we noticed the same behavior.
 If you set 
 javax.faces.FACELETS_SKIP_COMMENTShttp://myfaces.apache.org/core21/myfaces-impl/webconfig.html#javax_faces_FACELETS_SKIP_COMMENTSto
 true, all comments will be skipped.


 2011/12/23 Ibra ibra...@gmail.com


 Hello team,

 I am working with MyFaces Core 2.0 API 2.0.2 and I obtained an unexpected
 behaviour when I run   the next code:

 h:panelGrid id=tabla columns=2
    h:outputText value=a11/
    h:outputText value=Si os veis cabalgando solos, que nos cause temor,
 no os separeis de mi /
    h:outputText value=b11/
    !-- --
    h:outputText value=lo que hacemos en la vida, tiene su eco en la
 eternidad./
 /h:panelGrid

 The result was 3 rows, instead 2 rows, because one cell was filled with
 comment block. Is it normal?

 --
 View this message in context:
 http://old.nabble.com/comment-block-within-panelGrid%2C-unexpected-result---MyFaces-Core-2.0-tp33026382p33026382.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




JSF2: Behavior change for ui:params

2011-12-15 Thread Mike Kienenberger
Under JSF 1.2 and Facelets, you could specify a ui:param value as a child
of ui:decorate, and it would be used in any included files.
Under JSF 2.1, the ui:param value evaluates to null in the included files
unless it is passed as a child of the ui:include.

Is this a bug or a spec-required change in behavior?

===  template.xhtml =
html
...
 ui:insert name=body /
...
/html
===  template.xhtml =


===  somepage.xhtml =
ui:decorate template=/pages/include/template.xhtml
...

  ui:define name=body
ui:param name=sourcePage value=#{sourcePageBeanExpression} /

  // This included page would have a null sourcePage  (worked under
JSF1.2/Facelets)
 ui:include src=includedFragment.xhtml
 /ui:include

  // This included page would have a valid sourcePage
 ui:include src=includedFragment.xhtml
   ui:param name=sourcePage
value=#{sourcePageBeanExpression} /
 /ui:include

  /ui:define
ui:decorate
===  somepage.xhtml =


===  includedFragment.xhtml =
ui:composition xmlns=http://www.w3.org/1999/xhtml;
...

  ui:param name=myBean
value=#{sourcePage.specificIncludedBeanBehavior}/

h:outputText value=#{myBean.valueString} /
h:panelGrid binding=#{myBean.messagePanel} /
etc

/ui:composition
===  includedFragment.xhtml =


Re: JSF2: Behavior change for ui:params

2011-12-15 Thread Mike Kienenberger
Outside of ui:define body is actually the original state of the JSF 1.2
template -- I had moved it around while trying to debug the problem, and
forgot to move it back when writing up this email.


Are you saying that if I have ui:param outside of ui:define body, it
should work for files included in ui:define body?



=== What somepage.xhtml really looked like under JSF 1.2
=
ui:decorate template=/pages/include/
template.xhtml
...
ui:param name=sourcePage value=#{sourcePageBeanExpression} /

   ui:define name=body
===  somepage.xhtml =


On Thu, Dec 15, 2011 at 10:59 AM, Leonardo Uribe lu4...@gmail.com wrote:

 Hi

 The javadoc of ui:param says this:

 ...Use this tag to pass parameters to an included file (using
 ui:include), or a template (linked to either a composition or
 decorator). Embed ui:param tags in either ui:include, ui:composition,
 or ui:decorate to pass the parameters. ...

 In myfaces this was explained in [1] . Before that change ui:param
 just added a param to the current variable resolver, just like c:set
 does, but note that is not what the spec says. Use ui:param inside
 ui:decorate but not inside ui:define.

 regards,

 Leonardo Uribe

 [1]
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/201106.mbox/%3CBANLkTi=h52lhhuxk_mo8qojhexsndh9...@mail.gmail.com%3E

 2011/12/15 Mike Kienenberger mkien...@gmail.com:
  Under JSF 1.2 and Facelets, you could specify a ui:param value as a child
  of ui:decorate, and it would be used in any included files.
  Under JSF 2.1, the ui:param value evaluates to null in the included files
  unless it is passed as a child of the ui:include.
 
  Is this a bug or a spec-required change in behavior?
 
  ===  template.xhtml =
  html
  ...
  ui:insert name=body /
  ...
  /html
  ===  template.xhtml =
 
 
  ===  somepage.xhtml =
  ui:decorate template=/pages/include/template.xhtml
  ...
 
   ui:define name=body
 ui:param name=sourcePage value=#{sourcePageBeanExpression} /
 
   // This included page would have a null sourcePage  (worked
 under
  JSF1.2/Facelets)
  ui:include src=includedFragment.xhtml
  /ui:include
 
   // This included page would have a valid sourcePage
  ui:include src=includedFragment.xhtml
ui:param name=sourcePage
  value=#{sourcePageBeanExpression} /
  /ui:include
 
   /ui:define
  ui:decorate
  ===  somepage.xhtml =
 
 
  ===  includedFragment.xhtml =
  ui:composition xmlns=http://www.w3.org/1999/xhtml;
  ...
 
   ui:param name=myBean
  value=#{sourcePage.specificIncludedBeanBehavior}/
 
 h:outputText value=#{myBean.valueString} /
 h:panelGrid binding=#{myBean.messagePanel} /
 etc
 
  /ui:composition
  ===  includedFragment.xhtml =



Re: JSF2: Behavior change for ui:params

2011-12-15 Thread Mike Kienenberger
Outside of ui:define body is actually the original state of the JSF 1.2
template -- I had moved it around while trying to debug the problem, and
forgot to move it back when writing up this email.


Are you saying that if I have ui:param outside of ui:define body, it
should work for files included in ui:define body?



=== What somepage.xhtml really looked like under JSF 1.2
=
ui:decorate template=/pages/include/
template.xhtml
...

ui:param name=sourcePage value=#{sourcePageBeanExpression} /

   ui:define name=body
===  somepage.xhtml =


On Thu, Dec 15, 2011 at 10:59 AM, Leonardo Uribe lu4...@gmail.com wrote:

 Hi

 The javadoc of ui:param says this:

 ...Use this tag to pass parameters to an included file (using
 ui:include), or a template (linked to either a composition or
 decorator). Embed ui:param tags in either ui:include, ui:composition,
 or ui:decorate to pass the parameters. ...

 In myfaces this was explained in [1] . Before that change ui:param
 just added a param to the current variable resolver, just like c:set
 does, but note that is not what the spec says. Use ui:param inside
 ui:decorate but not inside ui:define.

 regards,

 Leonardo Uribe

 [1]
 http://mail-archives.apache.org/mod_mbox/myfaces-dev/201106.mbox/%3CBANLkTi=h52lhhuxk_mo8qojhexsndh9...@mail.gmail.com%3E

 2011/12/15 Mike Kienenberger mkien...@gmail.com:
  Under JSF 1.2 and Facelets, you could specify a ui:param value as a child
  of ui:decorate, and it would be used in any included files.
  Under JSF 2.1, the ui:param value evaluates to null in the included files
  unless it is passed as a child of the ui:include.
 
  Is this a bug or a spec-required change in behavior?
 
  ===  template.xhtml =
  html
  ...
  ui:insert name=body /
  ...
  /html
  ===  template.xhtml =
 
 
  ===  somepage.xhtml =
  ui:decorate template=/pages/include/template.xhtml
  ...
 
   ui:define name=body
 ui:param name=sourcePage value=#{sourcePageBeanExpression} /
 
   // This included page would have a null sourcePage  (worked
 under
  JSF1.2/Facelets)
  ui:include src=includedFragment.xhtml
  /ui:include
 
   // This included page would have a valid sourcePage
  ui:include src=includedFragment.xhtml
ui:param name=sourcePage
  value=#{sourcePageBeanExpression} /
  /ui:include
 
   /ui:define
  ui:decorate
  ===  somepage.xhtml =
 
 
  ===  includedFragment.xhtml =
  ui:composition xmlns=http://www.w3.org/1999/xhtml;
  ...
 
   ui:param name=myBean
  value=#{sourcePage.specificIncludedBeanBehavior}/
 
 h:outputText value=#{myBean.valueString} /
 h:panelGrid binding=#{myBean.messagePanel} /
 etc
 
  /ui:composition
  ===  includedFragment.xhtml =



Re: JSF2: Behavior change for ui:params

2011-12-15 Thread Mike Kienenberger
Well, it's not working :-)   I've spent a couple of days now trying to
track this one down.

As I said before, the best I can determine is that the value of
sourcePage evaluates to null while in the included fragment in body -- I
am thinking that the scope of ui:param is the cause of the problem.
Explicitly adding it as a ui:param for ui:include seems to make it work
again.

I will try to track it down further once I figure out where in the codebase
the ui:param stuff is handled.  If that fails, I'll see if I can create a
simple failing example test project.



On Thu, Dec 15, 2011 at 11:27 AM, Leonardo Uribe lu4...@gmail.com wrote:

 Hi

 Yes, because ui:param defines a param for the template.

 regards,

 Leonardo Uribe



Re: JSF2: Behavior change for ui:params

2011-12-15 Thread Mike Kienenberger
Spam Assassin keeps bouncing my emails...
===

Well, it's not working :-)   I've spent a couple of days now trying to
track this one down.

As I said before, the best I can determine is that the value of
sourcePage evaluates to null while in the included fragment in body -- I
am thinking that the scope of ui:param is the cause of the problem.
Explicitly adding it as a ui:param for ui:include seems to make it work
again.

I will try to track it down further once I figure out where in the codebase
the ui:param stuff is handled.  If that fails, I'll see if I can create a
simple failing example test project.




On Thu, Dec 15, 2011 at 11:27 AM, Leonardo Uribe lu4...@gmail.com wrote:

 Hi

 Yes, because ui:param defines a param for the template.

 regards,

 Leonardo Uribe



Re: JSF2: Behavior change for ui:params

2011-12-15 Thread Mike Kienenberger
Yes, that issue just confirms that the interaction between
ui:include/ui:decorate/ui:composition is very confusing :-)  I remember
reading through it before when the discussion was active.

I am replacing ui:include src= with ui:decorate template= -- it seems
like a strange way to do it, but no error so far, and I can move on to my
next JSF2.0/richfaces4 conversion issue :-)

Thanks.


On Thu, Dec 15, 2011 at 11:49 AM, Leonardo Uribe lu4...@gmail.com wrote:

 Hi

 When you use ui:include, inside myfaces a new template context is created,
 and all template logic including template params are isolated, which
 means
 params passed or earlier ui:define or ui:insert declarations will be
 ignored.

 So it is expected ui:param definitions does not pass through ui:include,
 unless
 you define a ui:param inside ui:include and declare in a explicit way that
 this param will be used inside that template. Other option is use
 ui:decorate instead ui:include, so the same template context will be used
 to resolve your template.

 The issue related to this behavior is:

 https://issues.apache.org/jira/browse/MYFACES-2753
 Trivial multi-level templating does not work if ui:include is used

 regards,

 Leonardo Uribe



Re: JSF2: Behavior change for ui:params

2011-12-15 Thread Mike Kienenberger
Yes, that issue just confirms that the interaction between
ui:include/ui:decorate/ui:composition is very confusing :-)  I
remember reading through it before when the discussion was active.

I am replacing ui:include src= with ui:decorate template= -- it
seems like a strange way to do it, but no error so far, and I can move
on to my next JSF2.0/richfaces4 conversion issue :-)

Thanks.


Re: Functionality that returns the Jsf-Version?

2011-10-28 Thread Mike Kienenberger
You'll have to look at the archives to find the exact code, but in the
past, there has been code used to detect the difference between JSF
1.1 and 1.0, and possibly 1.2.

Use reflection to find a method that only exists in the later versions.
The standalone facelets library for JSF 1.x did this.

On Fri, Oct 28, 2011 at 4:12 AM, Georg Füchsle giofy...@googlemail.com wrote:
 Thanks Kito,

 thats great! Now I can control if really the expected jsf.jar is loaded!

 Regards,

 Georg

 2011/10/27 Kito Mann kito.m...@virtua.com:
 Hello Georg,

 There isn't a standard API for revealing the JSF version, but you can
 reveal the location of the JSF API JAR:

 System.out.println(JSF API Location: 
 + FacesContext.class.getProtectionDomain().getCodeSource());

 This will print out the path to the JAR that contains the FacesContext.

 I've found this useful in WAS 7 and 8 for determining the location of the
 JSF classes are being loaded.
 ---
 Kito D. Mann | twitter: kito99 | Author, JSF in Action
 Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
 http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter:
 jsfcentral
 +1 203-404-4848 x3

 * Listen to the latest headlines in the JSF and Java EE newscast:
 http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast
 * Keep up with the aftermath of the Oracle/Sun merger:
 http://www.mergerspeak.com



 On Thu, Oct 27, 2011 at 6:43 AM, Georg Füchsle 
 giofy...@googlemail.comwrote:

 Hallo!

 My WebApp needs to use Jsf with the Version 1.2.15B02. In WAS7 I
 achieved this by using shared Libraries. Unfortunately often we forget
 to switch on these shared libs. In this case the App runs but on later
 sites there will be mistakes due to different cashing of Managed
 beans.
 Therefore I would like to output the Jsf-Version to a system information
 page.
 Can anybody show me a function that returns the Jsf-Version?
 Gerald once advised me to load special functions that only exist in
 the new version of Jsf and to surround this with try-catch-brackets.
 If the new function is not loaded, there will be used an older Jsf
 version.

 To do this I should find information which functions are new in which
 version.
 Especially I should recognize if an older version than Jsf1.2-15B02
 (mojarra) is used.

 Can anybody give me a link?

 Thanks Georg





Re: is i18n messages suppose to be html escaped?

2011-10-20 Thread Mike Kienenberger
I don't know about the escaping, but #(msg.foo} is a shortcut for
outputText is only true functionally, and then only in the generic
sense that both will put text on the page.  Ie, #{msg.foo} will
evaluate to a literal piece of text, but it is not the same thing as
using an outputText component.

It would be the same kind of thing as saying that
System.error.println(foo) is a shortcut to log.debug(foo)

On Wed, Oct 19, 2011 at 5:08 AM, Ted r6squee...@gmail.com wrote:
 oh and in addition to the inconsistency between the 2 example strings, I
 just checked, to the best of my knowledge #{msg.foo} is a short cut for
 outputText tag,

 The outputText tag, according to the jsf javadocs, says it is true by
 default.

 So, if that's true, shouldn't  be escaped to quot; by default? or are 
 special for some reason?

 On Wed, Oct 19, 2011 at 8:02 PM, Ted r6squee...@gmail.com wrote:

 thanks, but I posted 2 strings, one was escaped while the other was not.
 Shouldn't it at least consistently escape or not escape?


 On Wed, Oct 19, 2011 at 4:11 PM, Kito Mann kito.m...@virtua.com wrote:

 Ted,

 The strings will only be escaped if the component you're using escapes the
 text. If you're just embedding the expression in the page, it's not going
 to
 be escaped, but you can use h:outputText -- this allows you to control
 whether or not you want the text escaped.
 ---
 Kito D. Mann | twitter: kito99 | Author, JSF in Action
 Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
 consulting
 http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
 twitter:
 jsfcentral
 +1 203-404-4848 x3

 * Listen to the latest headlines in the JSF and Java EE newscast:

 http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast
 * Keep up with the aftermath of the Oracle/Sun merger:
 http://www.mergerspeak.com



 On Tue, Oct 18, 2011 at 11:36 PM, Ted r6squee...@gmail.com wrote:

  I'm using string tables and to i18n some messages using jsf and I've got
  some unexpected behavior
 
  if I have a string table
 
  string1=boldasdf/bold
  string2=my cow is brown
 
  if I then go on to a jsf page and do
 
  #{msg.string1}
  #{msg.string2}
 
  the result I get is
 
  lt;boldgt;asdflt;/boldgt;
  my cow is brown
 
  My expectation is that the quote should have been converted to quot;
  shouldn't it? (either that or at least the 's should not have been
  escaped...)
 
  anyone know anything about this?
  --
  Ted.
 




 --
 Ted.




 --
 Ted.



Re: JSF application very slow with HTTPS

2011-04-11 Thread Mike Kienenberger
I also use jetty-6.1.22.   My environment is almost identical to
yours, give or take a minor version number.

On Mon, Apr 11, 2011 at 7:49 AM, Michael Heinen mhn4...@googlemail.com wrote:
  Hi,

 My JSF application is very slow via HTTPS.
 Some parts are 15 times slower compared to HTTP

 I measured the response times of the xhtml requests with Fiddler (locally
 and over network)

 Result for a very large page (512 KB) with a big datatable without ajax
 usage:
 --  local access with HTTP:  1 sec
 --  local access with HTTPS: 15-16 sec

 Other pages are factor 2-4 slower, with or without ajax.
 The time is spent in htmlTableRenderer.encodeInnerHtml. Data is of course
 available, there is no additional backend access.

 The simple download of xhtml files or other files is NOT (noticeable)
 slower.
 Other non JSF applications running on the same servers are also not slower
 with HTTPS.

 Before I start profiling:
 - Does anybody have an idea where I should look at?
 - Are there any known JSF or webApp settings that influence https
 performance?

 Environment:
  Facelets
  myFaces 1.2.9
  tomahawk12_1.1.10
  richfaces 3.3.3
  tomcat 6.0.29
  jdk 1.6.0_23

 Regards,
 Michael



Re: TagAttributeException after migration to jetty

2011-04-11 Thread Mike Kienenberger
Is it possible that it's a conflict between Jetty 7 and the facelets el-ri.jar?

I know at one point, we moved the facelets el-api.jar into a
build-only classpath, but I think we still have the el-ri.jar in the
deployment library path.


On Mon, Apr 11, 2011 at 10:55 AM, Michael Heinen mhn4...@googlemail.com wrote:
  This is a follow-up discussion for JSF application very slow with HTTPS
  in order to no hijack my own thread.

 I want to compare the performance of my app with tomcat and jetty.
 Environment:
   Facelets
   myFaces 1.2.9
   tomahawk12_1.1.10
   richfaces 3.3.3


 The app runs fine with all Tomcat 6 versions.
 Unfortunately I cannot access it with various jetty versions (7.3.x, 7.2.x,
 7.1.X, 6.1.22) because nested EL expressions are not working.

 Stack from 6.1.22 (edited):

 com.sun.facelets.tag.TagAttributeException: /pages/foo.xhtml @43,114
 title=#{MyController.myButtonEnabled?msgs['key1']:MyController.myButton2Enabled?msgs['key3']:msgs['key4']}
 Error Parsing:
 #{MyController.myButtonEnabled?msgs['key1']:MyController.myButton2Enabled?msgs['key3']:msgs['key4']}
    at
 com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
    at
 com.sun.facelets.tag.jsf.ComponentRule$ValueExpressionMetadata.applyMetadata(ComponentRule.java:69)
    at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
    at
 com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:76)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:124)
    at
 com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
    at
 com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39)
    at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
    at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
    at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
    at
 com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
    at com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:66)
    at
 com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
    at
 com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:136)
    at
 com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337)
    at
 com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307)
    at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)
    at
 com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)
    at
 com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
    at
 com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:124)
    at
 com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
    at
 com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39)
    at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
    at 

Re: JSF application very slow with HTTPS

2011-04-11 Thread Mike Kienenberger
Or you can go with something a lot simpler and start with the free
profiler provided in the H2Database jar.

import org.h2.util;
...
Profiler profiler = new Profiler();
profiler.startCollecting();
// application code
System.out.println(profiler.getTop(3));

http://www.h2database.com/html/performance.html#application_profiling

For my own use, I've pulled out the three relevant classes and removed
the unnecessary methods if you don't want to grab the entire package,
although that's really trivial to do as well.It's about 350 lines
of code total.

On Mon, Apr 11, 2011 at 12:12 PM, Mark Struberg strub...@yahoo.de wrote:
 Ah sorry, have overread that:
 The time is spent in
 htmlTableRenderer.encodeInnerHtml

 I'd start the application with YourKit profiler and do some profiling.

 You can get a free yourkit test license (14 days I think) for evaluation.

 LieGrue,
 strub

 --- On Mon, 4/11/11, Michael Heinen mhn4...@googlemail.com wrote:

 From: Michael Heinen mhn4...@googlemail.com
 Subject: Re: JSF application very slow with HTTPS
 To: MyFaces Discussion users@myfaces.apache.org
 Date: Monday, April 11, 2011, 3:45 PM
   Fat? Well there is a lot of EL
 in this table, nearly in all cells,
 e.g. for column widths, values, styles etc.
 The EL is always hitting backing beans, some with
 additional map access.

 But the real problem is the poor HTTPS performance compared
 to HTTP.
 It should not be caused by the app and also not by JSF or
 Tomcat of course.
 There should be a little overhead for additional
 handshaking, but not
 for the rendering!
 Could this be caused by a buffering whereever?

 Mark (or anybody else), did you compare your app with http
 and https?
 Just wondering whether this is a problem only in my app.

 Regards,
 Michael



 Am 11.04.2011 17:27, schrieb Mark Struberg:
  Btw another question: 1s local response time? How fat
 is this page?
 
  We have a really big page in production with 1400
 lines in a dataTable - and it renders in 450 ms...
 
  How many back-and-forth requests do you see if you
 open firebug?
  Do you have some EL involved which isn't hitting the
 backing bean but directly goes into the database? Something
 in this direction...
 
  LieGrue,
  strub
 
  --- On Mon, 4/11/11, Mike Kienenbergermkien...@gmail.com
 wrote:
 
  From: Mike Kienenbergermkien...@gmail.com
  Subject: Re: JSF application very slow with HTTPS
  To: MyFaces Discussionusers@myfaces.apache.org
  Cc: Michael Heinenmhn4...@googlemail.com
  Date: Monday, April 11, 2011, 2:20 PM
  I also use
  jetty-6.1.22.   My environment is
 almost
  identical to
  yours, give or take a minor version number.
 
  On Mon, Apr 11, 2011 at 7:49 AM, Michael
 Heinenmhn4...@googlemail.com
  wrote:
    Hi,
 
  My JSF application is very slow via HTTPS.
  Some parts are 15 times slower compared to
 HTTP
 
  I measured the response times of the xhtml
 requests
  with Fiddler (locally
  and over network)
 
  Result for a very large page (512 KB) with a
 big
  datatable without ajax
  usage:
  --  local access with HTTP:  1 sec
  --  local access with HTTPS: 15-16 sec
 
  Other pages are factor 2-4 slower, with or
 without
  ajax.
  The time is spent in
  htmlTableRenderer.encodeInnerHtml. Data is of
 course
  available, there is no additional backend
 access.
 
  The simple download of xhtml files or other
 files is
  NOT (noticeable)
  slower.
  Other non JSF applications running on the same
 servers
  are also not slower
  with HTTPS.
 
  Before I start profiling:
  - Does anybody have an idea where I should
 look at?
  - Are there any known JSF or webApp settings
 that
  influence https
  performance?
 
  Environment:
    Facelets
    myFaces 1.2.9
    tomahawk12_1.1.10
    richfaces 3.3.3
    tomcat 6.0.29
    jdk 1.6.0_23
 
  Regards,
  Michael
 





Re: JSF application very slow with HTTPS

2011-04-11 Thread Mike Kienenberger
Yes, I know that this method has drawbacks, but it's still a good
alternative in this case as he knows what methods are involved, and he
has access to the source code so he can change it at the
htmlTableRenderer.encodeInnerHtml. Data method.

Not everyone wants to try to set up and learn YourKit, nor evaluate
it or buy it or any of the other serious profilers.

If you've already got a profiler installed and are familiar with it,
go with that.  :)  This is a quick-and-dirty solution that's often
worked for me.   I've got the eclipse profiler installed, and I've had
YourKit installed before, but this is often the simplest path for me.

You can have the results back from this in the time it takes to 1)
download the h2database jar and drop it into your project, 2) change
the code, 3) recompile the app, 4) run it.

On Mon, Apr 11, 2011 at 12:31 PM, Mark Struberg strub...@yahoo.de wrote:
 yea, but most of the time you

 a) don't exactly know what you r looking for
 b) don't like to change your code
 c) will get the the lifecycle wrappers back as 'most expensive' methods...

 LieGrue,
 strub

 --- On Mon, 4/11/11, Mike Kienenberger mkien...@gmail.com wrote:

 From: Mike Kienenberger mkien...@gmail.com
 Subject: Re: JSF application very slow with HTTPS
 To: MyFaces Discussion users@myfaces.apache.org
 Cc: Mark Struberg strub...@yahoo.de
 Date: Monday, April 11, 2011, 4:27 PM
 Or you can go with something a lot
 simpler and start with the free
 profiler provided in the H2Database jar.

 import org.h2.util;
 ...
 Profiler profiler = new Profiler();
 profiler.startCollecting();
 // application code
 System.out.println(profiler.getTop(3));

 http://www.h2database.com/html/performance.html#application_profiling

 For my own use, I've pulled out the three relevant classes
 and removed
 the unnecessary methods if you don't want to grab the
 entire package,
 although that's really trivial to do as well.
 It's about 350 lines
 of code total.

 On Mon, Apr 11, 2011 at 12:12 PM, Mark Struberg strub...@yahoo.de
 wrote:
  Ah sorry, have overread that:
  The time is spent in
  htmlTableRenderer.encodeInnerHtml
 
  I'd start the application with YourKit profiler and do
 some profiling.
 
  You can get a free yourkit test license (14 days I
 think) for evaluation.
 
  LieGrue,
  strub
 
  --- On Mon, 4/11/11, Michael Heinen mhn4...@googlemail.com
 wrote:
 
  From: Michael Heinen mhn4...@googlemail.com
  Subject: Re: JSF application very slow with HTTPS
  To: MyFaces Discussion users@myfaces.apache.org
  Date: Monday, April 11, 2011, 3:45 PM
    Fat? Well there is a lot of EL
  in this table, nearly in all cells,
  e.g. for column widths, values, styles etc.
  The EL is always hitting backing beans, some with
  additional map access.
 
  But the real problem is the poor HTTPS performance
 compared
  to HTTP.
  It should not be caused by the app and also not by
 JSF or
  Tomcat of course.
  There should be a little overhead for additional
  handshaking, but not
  for the rendering!
  Could this be caused by a buffering whereever?
 
  Mark (or anybody else), did you compare your app
 with http
  and https?
  Just wondering whether this is a problem only in
 my app.
 
  Regards,
  Michael
 
 
 
  Am 11.04.2011 17:27, schrieb Mark Struberg:
   Btw another question: 1s local response time?
 How fat
  is this page?
  
   We have a really big page in production with
 1400
  lines in a dataTable - and it renders in 450
 ms...
  
   How many back-and-forth requests do you see
 if you
  open firebug?
   Do you have some EL involved which isn't
 hitting the
  backing bean but directly goes into the database?
 Something
  in this direction...
  
   LieGrue,
   strub
  
   --- On Mon, 4/11/11, Mike Kienenbergermkien...@gmail.com
  wrote:
  
   From: Mike Kienenbergermkien...@gmail.com
   Subject: Re: JSF application very slow
 with HTTPS
   To: MyFaces Discussionusers@myfaces.apache.org
   Cc: Michael Heinenmhn4...@googlemail.com
   Date: Monday, April 11, 2011, 2:20 PM
   I also use
   jetty-6.1.22.   My environment is
  almost
   identical to
   yours, give or take a minor version
 number.
  
   On Mon, Apr 11, 2011 at 7:49 AM, Michael
  Heinenmhn4...@googlemail.com
   wrote:
     Hi,
  
   My JSF application is very slow via
 HTTPS.
   Some parts are 15 times slower
 compared to
  HTTP
  
   I measured the response times of the
 xhtml
  requests
   with Fiddler (locally
   and over network)
  
   Result for a very large page (512 KB)
 with a
  big
   datatable without ajax
   usage:
   --  local access with HTTP:  1 sec
   --  local access with HTTPS: 15-16
 sec
  
   Other pages are factor 2-4 slower,
 with or
  without
   ajax.
   The time is spent in
   htmlTableRenderer.encodeInnerHtml. Data
 is of
  course
   available, there is no additional
 backend
  access.
  
   The simple download of xhtml files or
 other
  files is
   NOT (noticeable)
   slower.
   Other non JSF applications running on
 the same
  servers
   are also not slower

Re: Clarification please, which project is myfaces?

2011-03-29 Thread Mike Kienenberger
Tomahawk is also another component library.  It is not obsolete.

On Tue, Mar 29, 2011 at 10:45 AM, Mark Struberg strub...@yahoo.de wrote:
 Hi!

 The Apache MyFaces2 core project is an ALv2 licensed open source 
 implementation of the JSF2 specification (JSR-314).

 The older MyFaces jars implemented older JSF specs.

 MyFaces also contains a few sub-projects which are loosely related to JSF:

  * Trinidad is a component library for JSF. It can be used on any JSF 
 container you like, e.g. on Mojarra (Suns JSF implementation)

  * Tobago is also a component library

  * there are also a few 'extensions' projects like Orchestra, EXTVAL, 
 EXTSCRIPT and CODI which provide utility functionality for JSF applications.

 If you need a JSF container (e.g. for use in a WAR file in your tomcat or 
 jetty servlet engine), then you need myfaces-api.jar[1] and myfaces-impl.jar 
 [2]


 LieGrue,
 strub


 [1] http://repo2.maven.org/maven2/org/apache/myfaces/core/myfaces-api/2.0.4/
 [2] http://repo2.maven.org/maven2/org/apache/myfaces/core/myfaces-impl/2.0.4/


 --- On Tue, 3/29/11, java4dev java4...@gmail.com wrote:

 From: java4dev java4...@gmail.com
 Subject: Clarification please, which project is myfaces?
 To: users@myfaces.apache.org
 Date: Tuesday, March 29, 2011, 2:13 PM
 Hello

 I am new into web development. I have read the
 javaeetutorial a couple of books about JSF and while
 struggling with every little problem on my way I found out
 about MyFaces,
 but I am confused.
 In the http://myfaces.apache.org/ there are mentioned several
 projects.

 I googled around a litlte searching for differences about
 the projects and found this 2 year old enty
 http://www.mail-archive.com/users@myfaces.apache.org/msg47038.html

 According to this, Tomahawk is obsolete and Trinidad is the
 release of Myfaces.
 is this still valid?

 best regards
 Nikolas








Re: a4j:support and a4j:actionparam

2011-03-10 Thread Mike Kienenberger
I doubt it matters whether you are using tomahawk or richfaces or
something else.

Have you tried f:setPropertyActionListener target=#{VDBean.foo}
value=true / yet?

On Thu, Mar 10, 2011 at 8:05 AM, daniel ccss danielcc...@gmail.com wrote:
 Anyone?


 On Wed, Mar 9, 2011 at 5:06 PM, daniel ccss danielcc...@gmail.com wrote:

 Thanks Myke but I'm using myfaces tomahawk, not richfaces.

 I also tried a more simple code:

 In the JSP:

     h:commandButton value=seleccionar
 actionListener=#{VisitaDomiciliarBean.seleccionar} id=seleccionarLink
 style=display:none
     f:param name=booleanActividad
 value=true/
     /h:commandButton

 In the BackingBean:

     FacesContext context = FacesContext.getCurrentInstance();
     String paramVaule =

 (String)context.getExternalContext().getRequestParameterMap().get(booleanActividad);

     System.out.println(paramVaule);- null



 But it returns null, what I'm missing?




Re: a4j:support and a4j:actionparam

2011-03-10 Thread Mike Kienenberger
You need to put something similar to

xmlns:f=http://java.sun.com/jsf/core;

at the top of your template file.

I don't remember the exact syntax for that under jsp -- I use facelets
for everything.

However, I would think you would get the same error for f:param and f:attribute.

On Thu, Mar 10, 2011 at 12:17 PM, daniel ccss danielcc...@gmail.com wrote:
 Yes but I don´t know if is the JSF version I'm using or something else
 because I get a compilation error that says:

 Error(461): f:setPropertyActionListener no es una etiqueta registrada en
 ese espacio de nombres.

 In english: Error(461): f:setPropertyActionListener is not a registered tag
 in that namespace

 Thanks

 I also try:


 1-
 JSP:
     h:commandButton value=seleccionar
 actionListener=#{VDBean.seleccionar} id=seleccionarLink
     f:param name=foo value=true/
     /h:commandButton
 BB:

  MapString,String params =
 context.getExternalContext().getRequestParameterMap();
  String action = params.get(foo);
  System.out.println(test1:  +foo); Null
 2-
 JSP:
    h:commandButton value=seleccionar
 actionListener=#{VDBean.seleccionar} id=seleccionarLink
         f:attribute name=foo value=true /
    /h:commandButton
 BB:
  action =
 (String)actionEvent.getComponent().getAttributes().get(foo);
     System.out.println(test2:  + foo); Null

 3-
 JSP:
    h:commandButton value=seleccionar
 actionListener=#{VDBean.seleccionar} id=seleccionarLink
  a4j:actionparam assignTo=#{VDBean.foo} value=true id=foo
 /
   /h:commandButton
 BB:
     System.out.println(test3:  + this.foo); false (the initial
 value)



 Please help! I only need to pass a parameter when a button is clicked to the
 backingbean, but something so simple in teory is not working!



 On Thu, Mar 10, 2011 at 9:27 AM, Mike Kienenberger mkien...@gmail.com
 wrote:

 I doubt it matters whether you are using tomahawk or richfaces or
 something else.

 Have you tried f:setPropertyActionListener target=#{VDBean.foo}
 value=true / yet?

 On Thu, Mar 10, 2011 at 8:05 AM, daniel ccss danielcc...@gmail.com
 wrote:
  Anyone?
 
 
  On Wed, Mar 9, 2011 at 5:06 PM, daniel ccss danielcc...@gmail.com
  wrote:
 
  Thanks Myke but I'm using myfaces tomahawk, not richfaces.
 
  I also tried a more simple code:
 
  In the JSP:
 
      h:commandButton value=seleccionar
  actionListener=#{VisitaDomiciliarBean.seleccionar}
  id=seleccionarLink
  style=display:none
      f:param name=booleanActividad
  value=true/
      /h:commandButton
 
  In the BackingBean:
 
      FacesContext context = FacesContext.getCurrentInstance();
      String paramVaule =
 
 
  (String)context.getExternalContext().getRequestParameterMap().get(booleanActividad);
 
      System.out.println(paramVaule);- null
 
 
 
  But it returns null, what I'm missing?
 
 




Re: a4j:support and a4j:actionparam

2011-03-09 Thread Mike Kienenberger
I have not used a4j:actionparam, but under richfaces, I have successfully used

a4j:support
 f:setPropertyActionListener target=#{target1} value=#{value1} /
 f:setPropertyActionListener target=#{target2} value=#{value2} /
/a4j:support

Perhaps that will do what you need.

On Wed, Mar 9, 2011 at 5:32 PM, daniel ccss danielcc...@gmail.com wrote:
 Hi, i have this code:

                                *a4j:region*

 *h:selectBooleanCheckbox*value=#{subtipo.seleccionado}  id=checks
                                        disabled=#{VDBean.modoEdicion ==
 false} onchange=call some javascript code 

                                        *a4j:support* event=onchange
 status=statustablaSubtipoVisita

 actionListener=#{VDBean.select}
                                                     reRender=checks,
 tablaActividadesVisita 
                                                    * a4j:actionparam
 assignTo=#{VDBean.foo} value=true id=foo /*


                                        /a4j:support
                                    /h:selectBooleanCheckbox
                                /a4j:region

 In the VDBean I have a String foo variable with the get and set methods but
 when access the foo variable in the VDBean (scope: session) select method it
 has the initial value false. Why the actionParam do not set the foo
 variable value??

 Can anyone help me?

 Thanks



Failure to refocus on a field after a richfaces IE ajax submit

2011-02-18 Thread Mike Kienenberger
I realize that this is a little off-topic, but I don't have any more
ideas on debugging or solving it.

I have a form with an input text (with an a4j:support to submit on
blur), a backup button (change number) with an a4j:support to submit
on click, and a second button (add) with another a4j:support to submit
on click.

When the second button is clicked, after the ajax submit, the focus
needs to go back to the input text field.
oncomplete=#{rich:element('newNumberInput')}.focus() 

That works fine in Firefox.   The inputText gets focus.
In Internet Explorer (6, 7, 8), the first button is semi-highlighted
(but not focused), leaving the page with no component focused.

Obviously an ie bug, but any ideas on a workaround?

I'm posting a simplified example which demonstrates the problem,
although the problem seems clear enough.


!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
  body
!-- Text above this line is ignored --
ui:composition
 xmlns=http://www.w3.org/1999/xhtml;
 xmlns:ui=http://java.sun.com/jsf/facelets;
 xmlns:jstl=http://java.sun.com/jsp/jstl/functions;
 xmlns:h=http://java.sun.com/jsf/html;
 xmlns:f=http://java.sun.com/jsf/core;
 xmlns:a4j=http://richfaces.org/a4j;
 xmlns:rich=http://richfaces.org/rich;

  ui:param name=page value=#{testBeanRefocusAfterAjaxSubmitBean}/

h:form id=myForm

h:panelGroup id=entirePage


a4j:region 
id=changeNumberForm
h:inputText id=newNumberInput
 required=true
 value=#{page.newNumber}

a4j:support id=newNumberInputA4J

event=onblur

onsubmit=if (#{rich:element('newNumberInput')}.value == '')
return false

actionListener=#{page.changeNumber}

disableDefault=true

 /
/h:inputText
h:commandButton id=changeNumberButton

tabindex=-1
value=Change Number
a4j:support 
id=changeNumberButtonA4J
event=onclick

actionListener=#{page.changeNumber}
disableDefault=true
/
/h:commandButton
/a4j:region

h:commandButton 
id=addButton
value=Add
a4j:support 
id=addButtonA4J

event=onclick

oncomplete=#{rich:element('newNumberInput')}.focus() 

actionListener=#{page.add}

disableDefault=true

reRender=entirePage /
/h:commandButton

/h:panelGroup

/h:form

/ui:composition

!-- Text below this line is ignored --
  /body
/html




import javax.faces.event.ActionEvent;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class TestBeanRefocusAfterAjaxSubmit {
protected static final Log log =
LogFactory.getLog(TestBeanRefocusAfterAjaxSubmit.class);

transient private String newNumber;

public String getNewNumber() {
return newNumber;
}
public void setNewNumber(String newNumber) {
this.newNumber = newNumber;
}

// ActionListeners

public void changeNumber(ActionEvent event) {
log.info(changeNumber);
}

public void add(ActionEvent event) {
log.info(add);
}
}


Re: composite components: optional method-expression-attributes

2010-10-27 Thread Mike Kienenberger
I seem to vaguely recall from the facelets mailing lists long ago that
you had to sometimes pass method bindings as two separate parameters.
One for the object, and one for the method name.

#{object}.#{method}

Sorry I can't be of more help, but maybe it'll get you going in the
right direction.



On Wed, Oct 27, 2010 at 9:42 AM, Thomas Möller
thomas.moel...@continentale.de wrote:

 Hi,

 what is the recommended way how to deal with optional attributes that refer
 to a method expression?

 For example imagine a simple component that uses a commandLink and has two
 attributes: action and actionListener:

 cc:interface
  cc:attribute name=action method-signature=java.lang.String action()
 default=??? /
  cc:attribute name=actionListener method-signature=void
 actionListener(javax.faces.event.ActionEvent) default=??? /
 /cc:interface

 cc:implementation
  tr:commandLink action=#{cc.attrs.action}
 actionListener=#{cc.attrs.actionListener} /
 /cc:implementation

 My problems:
 1) omitting the defaults results in NullPointerExceptions
 2) the spec says that a default-attribute must evaluate to a
 java.lang.String

 What is the solution for this simple problem?

 Thanks in advance.
 --
 View this message in context: 
 http://old.nabble.com/composite-components%3A-optional-method-expression-attributes-tp30067392p30067392.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: composite components: optional method-expression-attributes

2010-10-27 Thread Mike Kienenberger
While trying to find a reference to what I wrote about, I came across
this posting.

There's a number of ideas kicked back and forth there, and the one on
using f:attribute for your action and actionListener might work for
you.

http://www.icefaces.org/JForum/posts/list/8006.page



On Wed, Oct 27, 2010 at 3:31 PM, Mike Kienenberger mkien...@gmail.com wrote:
 I seem to vaguely recall from the facelets mailing lists long ago that
 you had to sometimes pass method bindings as two separate parameters.
 One for the object, and one for the method name.

 #{object}.#{method}

 Sorry I can't be of more help, but maybe it'll get you going in the
 right direction.



 On Wed, Oct 27, 2010 at 9:42 AM, Thomas Möller
 thomas.moel...@continentale.de wrote:

 Hi,

 what is the recommended way how to deal with optional attributes that refer
 to a method expression?

 For example imagine a simple component that uses a commandLink and has two
 attributes: action and actionListener:

 cc:interface
  cc:attribute name=action method-signature=java.lang.String action()
 default=??? /
  cc:attribute name=actionListener method-signature=void
 actionListener(javax.faces.event.ActionEvent) default=??? /
 /cc:interface

 cc:implementation
  tr:commandLink action=#{cc.attrs.action}
 actionListener=#{cc.attrs.actionListener} /
 /cc:implementation

 My problems:
 1) omitting the defaults results in NullPointerExceptions
 2) the spec says that a default-attribute must evaluate to a
 java.lang.String

 What is the solution for this simple problem?

 Thanks in advance.
 --
 View this message in context: 
 http://old.nabble.com/composite-components%3A-optional-method-expression-attributes-tp30067392p30067392.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





Re: Tomahawk installation - infinite redirect when configuring extension filters

2010-10-20 Thread Mike Kienenberger
The /faces/myFacesExtensionResource mapping is used to return various
static (or dynamically generated) resources needed -- javascripts,
images, etc -- by Tomahawk and MyFaces.  For example, the generated
image for the captcha component.


On Wed, Oct 20, 2010 at 4:04 AM, Benjamin Mark be...@bemar.de wrote:
 Hi Leonardo,

 thx for that hint. Sadly its not working. I still have the infinite redirect
 when I connect to my project by Web UI.
 So it seems there is a incompatability with seam or richfaces or something
 is missing.

 But I dont understand that part

        * Remember map the FacesServet to the
 org.apache.myfaces.RESOURCE_VIRTUAL_PATH
        * value (default /faces/myFacesExtensionResource, so map
 FacesServlet to /faces/*
        * could be used or better /faces/myFacesExtensionResource/*) so the
        * ServeResourcePhaseListener can serve resources.

 Maybe thats the missing thing. I also have absolutely no path in my project
 which contains faces in it or is this the ressource path inside the
 tomahawk jar?

 The t:equalField method from tomahawk is working. I guess there is no
 Extensionfilter necassary. But when
 I try to access methods which have to be rendered like t:captcha its not
 working because the config needs
 the extension filters.

 So currently I can't use the full capacity of tomahawk :(

 Thx
 Ben



 -Ursprüngliche Nachricht-
 Von: Leonardo Uribe [mailto:lu4...@gmail.com]
 Gesendet: Dienstag, 19. Oktober 2010 19:38
 An: MyFaces Discussion
 Betreff: Re: Tomahawk installation - infinite redirect when configuring
 extension filters

 Hi

 If ExtensionsFilter does not work for your particulat configuration, you can
 use TomahawkFacesContextWrapper strategy instead. It is useful in situations
 like this one, where ExtensionsFilter just does not fit well. To do that you
 must set the following web.xml config params:

   context-param
     param-nameorg.apache.myfaces.CHECK_EXTENSIONS_FILTER/param-name
     param-valuefalse/param-value
   /context-param

   context-param

 param-nameorg.apache.myfaces.DISABLE_TOMAHAWK_FACES_CONTEXT_WRAPPER/param
 -name
     param-valuefalse/param-value
   /context-param

 There is additional details here:

 http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core/src/main/java/or
 g/apache/myfaces/webapp/filter/TomahawkFacesContextWrapper.java

 regards,

 Leonardo Uribe

 2010/10/19 Jakob Korherr jakob.korh...@gmail.com

 Hi,

 Then I guess it is some sort of incompatibility with Seam. However I
 am sorry, I've never really used it, so I don't know why this is
 happening..

 Regards,
 Jakob

 2010/10/19 Benjamin Mark be...@bemar.de:
  Hi,
 
  thx for your help but it doesn't helped. Already the same problem with
  infinite redirect:
 
  Thats the actuall web.xml
 
  ?xml version=1.0 ?
  web-app xmlns=http://java.sun.com/xml/ns/javaee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
    xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
    version=2.5
 
    !-- RichFaces --
 
    context-param
        param-nameorg.richfaces.SKIN/param-name
        param-valueblueSky/param-value
    /context-param
 
    !-- Suppress spurious stylesheets --
 
    context-param
        param-nameorg.richfaces.CONTROL_SKINNING/param-name
        param-valuedisable/param-value
    /context-param
 
    context-param
        param-nameorg.richfaces.CONTROL_SKINNING_CLASSES/param-name
        param-valuedisable/param-value
    /context-param
 
    !--
        Change load strategy to DEFAULT to disable sending scripts/styles
 as
        packs
    --
 
    context-param
        param-nameorg.richfaces.LoadStyleStrategy/param-name
        param-valueALL/param-value
    /context-param
 
    context-param
        param-nameorg.richfaces.LoadScriptStrategy/param-name
        param-valueALL/param-value
    /context-param
 
    !-- Seam --
 
    listener
 
 listener-classorg.jboss.seam.servlet.SeamListener/listener-class
    /listener
 
    filter
        filter-nameSeam Filter/filter-name
        filter-classorg.jboss.seam.servlet.SeamFilter/filter-class
    /filter
 
    filter-mapping
        filter-nameSeam Filter/filter-name
        url-pattern/*/url-pattern
    /filter-mapping
 
    servlet
        servlet-nameSeam Resource Servlet/servlet-name
 
 
 servlet-classorg.jboss.seam.servlet.SeamResourceServlet/servlet-class
    /servlet
 
    servlet-mapping
        servlet-nameSeam Resource Servlet/servlet-name
        url-pattern/seam/resource/*/url-pattern
    /servlet-mapping
 
    !-- Facelets development mode (disable in production) --
 
    context-param
        param-namefacelets.DEVELOPMENT/param-name
        param-value@debug@/param-value
    /context-param
 
    !-- JSF --
 
    context-param
        param-namejavax.faces.DEFAULT_SUFFIX/param-name
        param-value.xhtml/param-value
    /context-param
 
    servlet
        servlet-nameFaces Servlet/servlet-name
        

Re: inputHtml

2010-09-20 Thread Mike Kienenberger
The first thing I'd recommend trying is upgrading Myfaces from 1.2.5 to 1.2.9.
You might also try downgrading Facelets to 1.1.14.   I'm not sure what
the official status of 1.1.15 is.

MF 1.2.9, Facelets 1.1.14, and TH 12-1.1.9 is what I use.

On Mon, Sep 20, 2010 at 7:43 AM, Ken McArthur ken.mcart...@adsea.com wrote:
 Hi,

 Has anyone successfully used Tomahawk  inputHtml with MyFaces
 implementation 1.2.5, Tomahawk 12-1.1.9, and Facelets 1.1.15?

 When I try something simple like:

   t:inputHtml id=page_content_value1
               valueChangeListener=#{pageContentAction.valueChange}
               converter=trimConverter
               value=#{pageContentDO.value}/
 ...
   h:commandButton
              action=#{pageContentAction.insert}
              value=#{bundle.form_submit_updt}
              styleClass=cmdBtn1/


 When I put some data in the inputHtml box and click commandButton:
   valueChangeListener never gets called
   converter gets called with empty string
   pageContentDO.value setter method never gets called

 This code worked fine with earlier release of MyFaces and Tomahawk so
 I'm wondering when it went bad and how far back I have to go to get
 inputHtml working again.  Maybe I'm attempting to use bad combination
 of MyFaces and Tomahawk.  What is latest release combination of
 MyFaces and Tomahawk is anyone seeing inputHtml work?

 Thanks for any ideas you may have,
 Ken



 --
 303-619-6607
 dynoSite creator
 adsea.com



Re: Fw:a question for facelets validate

2010-09-02 Thread Mike Kienenberger
You need MyFaces Tomahawk 1.1.9 for JSF 1.2, not simply 1.1.9.   Using
1.1.9 for JSF 1.1 with 1.2.7 will cause this error.

tomahawk12-1.1.9-bin.tar.gz
http://myfaces.apache.org/tomahawk/download.html

2010/9/1 loshamo losh...@163.com:


 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
  xmlns:ui=http://java.sun.com/jsf/facelets;
  xmlns:h=http://java.sun.com/jsf/html;
  xmlns:f=http://java.sun.com/jsf/core;
  xmlns:t=http://myfaces.apache.org/tomahawk;
  xmlns:v=http://shale.apache.org/validator;
  xmlns:a4j=https://ajax4jsf.dev.java.net/ajax;
body
f:view
h:form id=form1
   t:outputLabel for=id value=asdasd/t:outputLabel
   t:inputText id=id required=true /t:inputText
   t:message for=id/t:message
   t:commandButton value=submit/t:commandButton
  /h:form
/f:view
/body
 /html
 when i do not set the value of 'asdasd' then validate message is 
 'form1:asdasd'  is required  
 why there has the message form1:  ?
 tomahawk  version is 1.1.9 and myface version is 1.2.7
 thanks for your answer !



 您想拥有和网易免费邮箱一样强大的软件吗?


Re: double click problem in JSF

2010-08-31 Thread Mike Kienenberger
If you do a search for jsf double submit on google, you find a number of
hits.

The shale or seam token is one possibility if you are already using those
frameworks.

One here sounded very interesting:

==
http://forums.sun.com/thread.jspa?threadID=665472

 BasheerShaik http://forums.sun.com/profile.jspa?userID=645731
Posts:3
Registered: 8/17/06
* Re: JSF How to prevent double click ?
 Aug 17, 2006 4:50 PM
http://forums.sun.com/thread.jspa?messageID=4345078#4345078 (reply 13 of
47)  (In reply to #10
http://forums.sun.com/thread.jspa?messageID=4294753#4294753 ) *
==


Another possibility, although I haven't read it through:

http://jroller.com/mert/entry/jsf_preventing_double_form_submit


On Tue, Aug 31, 2010 at 1:33 AM, yogeen honnavar yog...@yahoo.com wrote:

 Scott,

 Yes am also trying javascript solution. but the problem is for
 h:commandlink onclick event is generated by myfaces. and am not successful
 at trying to catch double click event also since the form is being submitted
 even though i catch double click event and say return. can u pls give some
 code snippet to handle this using javascript.

 also i read about shale s:token and some other solutions being used to
 solve this problem. any idea ?

 regards
 -yogeen

 --- On Mon, 30/8/10, Scott O'Bryan darkar...@gmail.com wrote:

  From: Scott O'Bryan darkar...@gmail.com
  Subject: Re: double click problem in JSF
  To: MyFaces Discussion users@myfaces.apache.org
  Date: Monday, 30 August, 2010, 6:22 PM
  Yogeen,
 
  This is standard link behavior.  Short of writing
  JavaScript to
  intercept the event and handle double click, here is not
  much I think
  you can do.
 
  Sent from my iPhone
 
  On Aug 29, 2010, at 9:45 PM, yogeen honnavar yog...@yahoo.com
  wrote:
 
   Dear users,
  
   We are using myfaces-1.1.5 with tomcat. We have a
  problem, when a user double clicks on a h:commandlink 2
  submissions are sent to the server and hence the application
  reports an error. Can anybody suggest a solution to the
  double click problem.
  
   regards
   -yogeen
  
  
 





  1   2   3   4   5   6   7   8   9   10   >