Re: Trinidad-1107

2012-07-16 Thread Cédric Durmont
Done, see TRINIDAD-1107

Regards,
Cedric Durmont

2012/7/12 Andrew Robinson :
> Okay, thanks. Since the attribute is only used by the DesktopRendered,
> would you mind applying the new attribute to CoreTable instead of
> Table? That way renderkits that extend Trinidad, but not it's core
> renderers will not be broken by the addition of a new attribute.
>
> Thanks.
>
> On Thu, Jul 12, 2012 at 3:40 AM, Cédric Durmont  wrote:
>> Actually the height is set on a  tag containing the . The
>> header&footer are outside the div, so they don't scroll. The JS part
>> is used to keep column widths in sync between header, body and footer,
>> so you can still use percentages in width.
>>
>> Right now I just took the generated code for a scrollable table and
>> put in in w3c validator, the fragment is _almost_ HTML 4.01 valid (2
>> errors in column rendering, which I didn't modify : the validator is
>> complaining about the 'with' and 'nowrap' attributes, both
>> non-existent in the specs)
>> I have one more error in the XHTML validation : my  tags are not
>> closed. I generate them with the following code :
>> ---
>> writer.startElement("col", null);
>> writer.writeAttribute(XhtmlConstants.WIDTH_ATTRIBUTE,
>> colData.getWidth(i), null);
>> writer.endElement("col");
>> ---
>> I could manually add the closing tag, or maybe there's a way to do it
>> using the writer api, but I don't know how.
>>
>> Anyway, the scrollable tr:table has been tested here on IE 8&9,
>> Firefox and Chrome. (Our clients use them with IE, but we're currently
>> validating our app to run on Firefox)
>>
>>
>>
>> 2012/7/12 Andrew Robinson :
>>> Is the height attribute or height style being set on a  HTML
>>> element? If so that is not valid. The TABLE element has no height,
>>> neither an attribute nor support for a CSS height. Some browsers
>>> recognize, others do not, but it is not in the HTML specification as a
>>> current attribute.
>>>
>>> http://www.w3.org/TR/html4/struct/tables.html
>>>
>>> As you can see, the height attribute is deprecated on the TH/TD, but
>>> there is no height attribute on the TABLE element.
>>>
>>> I would rather not add code that is not HTML strict safe if possible
>>> to the rendering.
>>>
>>>
>>> On Tue, Jul 10, 2012 at 10:00 AM, Cédric Durmont  wrote:
>>>> 2012/6/19 Scott O'Bryan :
>>>>
>>>>>   If there is some
>>>>> functionality you'd like to see in Trinidad, please open up a
>>>>> discussion on the dev list about it.  We'd like to hear from you.
>>>>
>>>> Sorry to jump in the conversation that late, I've been quite busy recently.
>>>> I filed a patch in TRINIDAD-1107 quite some time ago. I do know it's
>>>> not the most elegant piece of code I've ever written, and it's still
>>>> far from perfect, but :
>>>> - the new functionality ("height" attribute in tr:table) breaks
>>>> nothing as long as it is not used, so this shouldn't affect Trinidad's
>>>> stability,
>>>> - We use it extensively in one of our softwares. We have 20+ clients
>>>> (something between 50-100 users) using it in production on a daily
>>>> basis and experience no trouble with it
>>>> - More feedback and/or patches (who knows) would only make it better.
>>>>
>>>> I'd be happy to contribute small improvements to Trinidad in the
>>>> future, as long as it's taken into account by the dev team. I don't
>>>> say you should accept blindly anything, but at least give a feedback,
>>>> so I can improve the patch a eventually have it accepted.
>>>>
>>>> Anyway, thanks for your commitment on Trinidad, which is still a neat
>>>> piece of code IMHO.
>>>>
>>>> Regards,
>>>> Cedric Durmont


Re: Trinidad-1107

2012-07-12 Thread Cédric Durmont
Actually the height is set on a  tag containing the . The
header&footer are outside the div, so they don't scroll. The JS part
is used to keep column widths in sync between header, body and footer,
so you can still use percentages in width.

Right now I just took the generated code for a scrollable table and
put in in w3c validator, the fragment is _almost_ HTML 4.01 valid (2
errors in column rendering, which I didn't modify : the validator is
complaining about the 'with' and 'nowrap' attributes, both
non-existent in the specs)
I have one more error in the XHTML validation : my  tags are not
closed. I generate them with the following code :
---
writer.startElement("col", null);
writer.writeAttribute(XhtmlConstants.WIDTH_ATTRIBUTE,
colData.getWidth(i), null);
writer.endElement("col");
---
I could manually add the closing tag, or maybe there's a way to do it
using the writer api, but I don't know how.

Anyway, the scrollable tr:table has been tested here on IE 8&9,
Firefox and Chrome. (Our clients use them with IE, but we're currently
validating our app to run on Firefox)



2012/7/12 Andrew Robinson :
> Is the height attribute or height style being set on a  HTML
> element? If so that is not valid. The TABLE element has no height,
> neither an attribute nor support for a CSS height. Some browsers
> recognize, others do not, but it is not in the HTML specification as a
> current attribute.
>
> http://www.w3.org/TR/html4/struct/tables.html
>
> As you can see, the height attribute is deprecated on the TH/TD, but
> there is no height attribute on the TABLE element.
>
> I would rather not add code that is not HTML strict safe if possible
> to the rendering.
>
>
> On Tue, Jul 10, 2012 at 10:00 AM, Cédric Durmont  wrote:
>> 2012/6/19 Scott O'Bryan :
>>
>>>   If there is some
>>> functionality you'd like to see in Trinidad, please open up a
>>> discussion on the dev list about it.  We'd like to hear from you.
>>
>> Sorry to jump in the conversation that late, I've been quite busy recently.
>> I filed a patch in TRINIDAD-1107 quite some time ago. I do know it's
>> not the most elegant piece of code I've ever written, and it's still
>> far from perfect, but :
>> - the new functionality ("height" attribute in tr:table) breaks
>> nothing as long as it is not used, so this shouldn't affect Trinidad's
>> stability,
>> - We use it extensively in one of our softwares. We have 20+ clients
>> (something between 50-100 users) using it in production on a daily
>> basis and experience no trouble with it
>> - More feedback and/or patches (who knows) would only make it better.
>>
>> I'd be happy to contribute small improvements to Trinidad in the
>> future, as long as it's taken into account by the dev team. I don't
>> say you should accept blindly anything, but at least give a feedback,
>> so I can improve the patch a eventually have it accepted.
>>
>> Anyway, thanks for your commitment on Trinidad, which is still a neat
>> piece of code IMHO.
>>
>> Regards,
>> Cedric Durmont


Trinidad-1107

2012-07-10 Thread Cédric Durmont
2012/6/19 Scott O'Bryan :

>   If there is some
> functionality you'd like to see in Trinidad, please open up a
> discussion on the dev list about it.  We'd like to hear from you.

Sorry to jump in the conversation that late, I've been quite busy recently.
I filed a patch in TRINIDAD-1107 quite some time ago. I do know it's
not the most elegant piece of code I've ever written, and it's still
far from perfect, but :
- the new functionality ("height" attribute in tr:table) breaks
nothing as long as it is not used, so this shouldn't affect Trinidad's
stability,
- We use it extensively in one of our softwares. We have 20+ clients
(something between 50-100 users) using it in production on a daily
basis and experience no trouble with it
- More feedback and/or patches (who knows) would only make it better.

I'd be happy to contribute small improvements to Trinidad in the
future, as long as it's taken into account by the dev team. I don't
say you should accept blindly anything, but at least give a feedback,
so I can improve the patch a eventually have it accepted.

Anyway, thanks for your commitment on Trinidad, which is still a neat
piece of code IMHO.

Regards,
Cedric Durmont


Re: Trinidad is dead -- what do you use instead?

2012-07-03 Thread Cédric Durmont
2012/6/19 Scott O'Bryan :

>   If there is some
> functionality you'd like to see in Trinidad, please open up a
> discussion on the dev list about it.  We'd like to hear from you.

Sorry to jump in the conversation that late, I've been quite busy recently.
I filed a patch in TRINIDAD-1107 quite some time ago. I do know it's
not the most elegant piece of code I've ever written, and it's still
far from perfect, but :
- the new functionality ("height" attribute in tr:table) breaks
nothing as long as it is not used, so this shouldn't affect Trinidad's
stability,
- We use it extensively in one of our softwares. We have 20+ clients
(something between 50-100 users) using it in production on a daily
basis and experience no trouble with it
- More feedback and/or patches (who knows) would only make it better.

I'd be happy to contribute small improvements to Trinidad in the
future, as long as it's taken into account by the dev team. I don't
say you should accept blindly anything, but at least give a feedback,
so I can improve the patch a eventually have it accepted.

Anyway, thanks for your commitment on Trinidad, which is still a neat
piece of code IMHO.

Regards,
Cedric Durmont


Re: Problem with CODI/OWB and PrimeFaces 3.2

2012-04-17 Thread Cédric Durmont
Hi guys,

I'm having the same error here, but I'm not using OWB nor CODI :
-MyFaces 2.0.13 (tried several versions : 2.0.5, 2.0.7, 2.0.9, 2.1.3,
2.1.7. Issue differs slightly with 2.0.5/2.0.7 , but I still get the
exception)
-Trinidad 2.0.1
- jetty 6.1.6 (embedded/standalone), 7.6.2
- I have el-impl 2.2 in my classpath (groupId org.glassfish.web in my pom.xml)



(see stack trace below)


This is the part of my xhtml page that causes the error (when
#{beanProduits.contenuArchives } changes from null to not-null, which
happens in an actionListener during a full jsf cycle) :












Note that if I reload the page, the error does not show up again
(well, until the list is set to null then not-null again)

Do you have any idea, or any workaround like the one in OWB ?

Regards,
Cedric Durmont

==
Stack trace :

java.lang.NoClassDefFoundError: javax/el/ValueReference
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at 
java.io.ObjectStreamClass.getInheritableMethod(ObjectStreamClass.java:1349)
at java.io.ObjectStreamClass.access$2200(ObjectStreamClass.java:52)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:448)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.(ObjectStreamClass.java:413)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at 
org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.writeExternal(ContextAwareTagValueExpression.java:201)
at 
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at 
org.apache.myfaces.shared.util.StateUtils.getAsByteArray(StateUtils.java:273)
at 
org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:851)
at 
org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:886)
at 
org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:886)
at 
org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:886)
at 
org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:886)
at 
org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:886)
at 
org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:886)
at 
org.apache.myfaces.renderkit.ErrorPageWriter.debugHtml(ErrorPageWriter.java:414)
at 
org.apache.myfaces.view.facelets.tag.ui.UIDebug.writeDebugOutput(UIDebug.java:142)
at 
org.apache.myfaces.view.facelets.tag.ui.UIDebug.encodeBegin(UIDebug.java:126)
at 
javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:519)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:710)
at 
org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at 
org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
at 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:70)
at 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:159)
at 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:153)
at 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:82)
at 
org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:656)
at 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll(DocumentRenderer.java:110)
at 
org.apache.myfaces.trinidad.render.Co

Re: [Trinidad] "Best" Javascript package to use in a new render kit

2012-04-01 Thread Cédric Durmont
jquery is my savior in this area. My autosuggest component also
features DnD, plus I've made a range slider and a message panel a la
Toast, all using jquery plugins. I'm also running a highly enhanced
version of Tomahawk's schedule component, with PPR, context menus,
drag'n'drop and such.
Trinidad is a nice and solid library, sometime I just wish it had more
of those fancy components and options you can see on some other libs.
jquery helps a lot, but I'd love to see some enhancements so standard
components (say, automatic filters on tr:table / tr:column...)

Regards,
Cedric

2012/3/30 Walter Mourão :
> Thank you Cedric,
> in fact I'm following a similar path than yours since some years ago. By
> coincidence (or not!) I've created a suggestion box only with
> Trinidad+Facelets+Javascript <http://code.google.com/p/trinidadcomponents/>.
> The problem is from time to time some co-worker or client asks me about
> fancy components (drag'n drop, sliders, etc.) and is quite attractive to
> use it from a ready to run package.
>
> Thanks,
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>
>
>
> On Fri, Mar 30, 2012 at 12:04 PM, Cédric Durmont  wrote:
>
>> Hi Walter,
>>
>> Just my $0.02 here, but at my company we've been using Trinidad for 2
>> years now, and for one of our product we included DojoFaces (we needed
>> the autoSuggest component).
>> We eventually backpedalled and rewrote our own autosuggest component
>> based on Trinidad + facelets, and use sometimes some jquery plugins,
>> all for the following reasons :
>> - dojofaces autosuggest had limitations that were hard to overcome
>> (e.g. it stopped working if I tried to feed it with twice the same
>> value), and didn't work reliably (sometimes the list would not open,
>> for no apparent reason)
>> - dojo is a monolithic lib, which is quite large, to say the least.
>>
>> Anyway, YMMV
>> Regards,
>> Cedric Durmont
>>
>>
>> 2012/3/30 Walter Mourão :
>> > Just a follow-up on my findings so far... I liked very much the template
>> > based approach of DojoFaces <http://www.dojofaces.org/> and it looks to
>> me
>> > I can continue using the things I like in Trinidad (Dialogs, etc.) in
>> > conjunction with DojoFaces components without problems.
>> >
>> > Best regards,
>> >
>> > Walter Mourão
>> > http://waltermourao.com.br
>> > http://arcadian.com.br
>> > http://oriens.com.br
>> >
>> >
>> >> >
>> >>
>>


Re: [Trinidad] "Best" Javascript package to use in a new render kit

2012-03-30 Thread Cédric Durmont
Hi Walter,

Just my $0.02 here, but at my company we've been using Trinidad for 2
years now, and for one of our product we included DojoFaces (we needed
the autoSuggest component).
We eventually backpedalled and rewrote our own autosuggest component
based on Trinidad + facelets, and use sometimes some jquery plugins,
all for the following reasons :
- dojofaces autosuggest had limitations that were hard to overcome
(e.g. it stopped working if I tried to feed it with twice the same
value), and didn't work reliably (sometimes the list would not open,
for no apparent reason)
- dojo is a monolithic lib, which is quite large, to say the least.

Anyway, YMMV
Regards,
Cedric Durmont


2012/3/30 Walter Mourão :
> Just a follow-up on my findings so far... I liked very much the template
> based approach of DojoFaces  and it looks to me
> I can continue using the things I like in Trinidad (Dialogs, etc.) in
> conjunction with DojoFaces components without problems.
>
> Best regards,
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>
>
>> >
>>


[ExtVal] Validations for one action only

2012-01-27 Thread Cédric Durmont
Hello there,

I'm trying to implement a somewhat classical validation scheme : I
have a JSF form ( Myfaces 2.1.5, Trinidad 2.0.2-SNAPSHOT), and I want
to perform some validations but only when I trigger a specific button
/ action.
Other buttons in the page may open dialogs, trigger actionEvents /
valueChangeEvents. There are also some autosubmit input fields
(Trinidad), and I need all these to run without being stopped by the
validation.

I tried to simply use immediate="true" on every button / field where
it was needed, but strangely enough, it didn't stop all of the
validations (esp. the input fields with autosubmit + immediate="true"
act as if they were immediate="false".

Can some folks here give me a hint on the best way to achieve this ?
My validations a a mix on static (this field is numeric, this one's 50
chrs max, etc.) and dynamic ("if value of attribute A is in a specific
list, then B becomes mandatory", "X or Y may be null, but not both")
Getting these to work with Trinidad's client-based validations would
definitely be the icing on the cake !

Thanks,

Cedric Durmont


Re: [Tomahawk] NPE using JsCookMenu on Tomahawk 1.1.11 / JSF2

2012-01-17 Thread Cédric Durmont
Thanks a lot, it works now !
FYI, the dummy file is also missing from ThemeGray...

Regards,
Cédric Durmont

2012/1/17 Leonardo Uribe :
> Hi
>
> It seems "ThemeMiniBlack" does not have the dummy file ;j that helps
> to split the request path. The solution is simple, just add an empty
> file named ;j under
> META-INF/resources/oam.custom.navmenu.jscookmenu.ThemeMiniBlack
> inside tomahawk jar, or just extract the theme, and use styleLibrary,
> imageLibrary and javascriptLibrary to point to a new location that
> includes that file. If you look other themes the file is there. Thanks
> for notice it.
>
> regards,
>
> Leonardo Uribe
>
> 2012/1/17 Cédric Durmont :
>> Hello,
>>
>> Here's my setup :
>> - Myfaces 2.1.5
>> - Trinidad 2.0.0 / 2.0.2-SNAPSHOT (updated yesterday)
>> - Tomahawk .1.1.11, core20 branch (also updated yesterday)
>>
>> I have a simple test page with a facelets template using Tomahawk's 
>> JsCookMenu :
>> [...]
>> 
>> 
>> 
>>        
>> [...]
>>
>> (note that the same page runs fine in another application, which uses
>> a JSF1.2 setup)
>>
>> Upon accessing the page, I get this error :
>>
>> java.lang.NullPointerException
>>
>> viewId=/test.xhtml
>> location=C:\devjava\workspace\authentic\src\main\webapp\test.xhtml
>> phaseId=RENDER_RESPONSE(6)
>> java.lang.NullPointerException
>>        at 
>> org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.addThemeSpecificResourcesWithJSF2ResourceAPI(HtmlJSCookMenuRenderer.java:554)
>>        at 
>> org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.addResourcesToHeaderWithJSF2ResourceAPI(HtmlJSCookMenuRenderer.java:464)
>>        at 
>> org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.processEvent(HtmlJSCookMenuRenderer.java:103)
>>        at 
>> javax.faces.component.UIComponent$EventListenerWrapper.processEvent(UIComponent.java:1522)
>>        at javax.faces.event.SystemEvent.processListener(SystemEvent.java:43)
>>        at 
>> org.apache.myfaces.application.ApplicationImpl._traverseListenerList(ApplicationImpl.java:2250)
>>        at 
>> org.apache.myfaces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:558)
>>        at 
>> org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:98)
>>        at 
>> org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
>>        at 
>> org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
>>        at 
>> org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
>>        at 
>> org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
>>        at 
>> org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:92)
>>        at 
>> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
>>        at 
>> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
>>        at 
>> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:115)
>>        at 
>> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
>>        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
>>        at 
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>>        at 
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
>>        at 
>> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:294)
>>        at 
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
>>        at 
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
>>        at 
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
>>        at 
>> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>>        at 
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
>>        at 
>> org.ap

[Tomahawk] NPE using JsCookMenu on Tomahawk 1.1.11 / JSF2

2012-01-17 Thread Cédric Durmont
Hello,

Here's my setup :
- Myfaces 2.1.5
- Trinidad 2.0.0 / 2.0.2-SNAPSHOT (updated yesterday)
- Tomahawk .1.1.11, core20 branch (also updated yesterday)

I have a simple test page with a facelets template using Tomahawk's JsCookMenu :
[...]




[...]

(note that the same page runs fine in another application, which uses
a JSF1.2 setup)

Upon accessing the page, I get this error :

java.lang.NullPointerException

viewId=/test.xhtml
location=C:\devjava\workspace\authentic\src\main\webapp\test.xhtml
phaseId=RENDER_RESPONSE(6)
java.lang.NullPointerException
at 
org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.addThemeSpecificResourcesWithJSF2ResourceAPI(HtmlJSCookMenuRenderer.java:554)
at 
org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.addResourcesToHeaderWithJSF2ResourceAPI(HtmlJSCookMenuRenderer.java:464)
at 
org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.processEvent(HtmlJSCookMenuRenderer.java:103)
at 
javax.faces.component.UIComponent$EventListenerWrapper.processEvent(UIComponent.java:1522)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:43)
at 
org.apache.myfaces.application.ApplicationImpl._traverseListenerList(ApplicationImpl.java:2250)
at 
org.apache.myfaces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:558)
at 
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:98)
at 
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
at 
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
at 
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
at 
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper._publishPreRenderViewAddResourceEvent(ResourceViewHandlerWrapper.java:105)
at 
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:92)
at 
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
at 
org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
at 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:115)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at 
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:294)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at 
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at 
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at 
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at 
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(Select

Re: Call spring controller from faces-config.xml

2011-11-15 Thread Cédric Durmont
JSF navigation model is meant only for JSF pages.  has to
point to a valid facelets / jsp page.
Not sure of what you're trying to do, anyway. When a jsf outcome is
set, you already have made it past the jsf controller (e.g. the bean +
faces-config.xml itself). Trying to reroute to another controller
sound strange to me.

Don't you just want to call your Spring controller ? Maybe you simply
need h:outputLink / tr:goLink ...

Regards,
Cedric Durmont

2011/11/14 Ashish Kulkarni :
> Hi
> I am trying to integrate Spring 3.0 with current JSF 1.1 project, so i got
> spring added and it works well, now i want to send request from jsf backing
> bean to spring controller, so in my faces-config.xml i changed as below
>
> 
>    /jsf/mysearch/search.jsp
>    
>        go
>        
>         /spring/details
>
>        
>    
>  
>
> I have a Spring controller defined as  @RequestMapping(value = "/details")
> and in my web.xml i have added
> 
> appServlet
> /spring/*
> 
>
> When i direct call URL http://localhost:8080/myapp/spring/details it works
> fine, but when jsf is forwarding this request it adds .faces so the URL
> looks like below
>
> http://localhost:8080/myapp/spring/details.faces
>
> So how can i get it working any ideas
> --
> Ashish
> www.ayurwellness.com
> www.mysoftwareneeds.com
>


Re: [Trinidad] Custom css class is overridden by the trinidad skin

2011-11-02 Thread Cédric Durmont
Juste a wild guess, but add this to your css :
.OraLink {}

Sometimes you have to play with !important keyword to have your styles
applied too...

Regards,
Cedric Durmont

2011/10/28 Harshit Bapna :
> Hello All,
>
> I am facing an issue with the css styling of the trnidad components.
>
> I have written a skin file lets deskapp.css which has some component & ui
> pages styling.
> *I wanted a functionality in which an author of the page can choose to use
> style from the app skin file or override the style by his/her own css file
> loaded in the page.*
>     styleClass="*anchorlinks*" action="#{baseBacking.cancel}"
>              onclick="return cancelClicked();"/>
> Author of the page has defined the styleClass "anchorLinks" in the page but
> it is observed that the Trnidiad rendering module overrides the anchorlinks
> style with the style defined in the deskapp.css skin file.
>
> On observing the html (also from firebug) the class rendered is "anchorlinks
> OraLink"
>           https://bapha01-ac1.ca.com:8443/JCAP/faces/controller?RID=1#>
> ">Cancel
>
>
> trinidad version: 2.0.0
> myfaces version: 2.1.0
>
> *Please guide me how this can be achieved.*
>
> --Harshit
>


Re: PartialSubmit on inputText and selectOneChoice does not work...

2011-08-18 Thread Cédric Durmont
Hi elias82,

A few suggestions/questions :
- replace h:form by tr:form . Can't remember when, but it does cause
bugs sometimes
- what submits the page / triggers a PPR ? Some JS code you didn't
attach ? If you set breakpoints in the 2 ValueChangeListeners, are
both of them triggered ?
- why the immediate ?

Regards,
Cedric


2011/8/13 elia...@libero.it :
> Hi everyone,
> i try to create a simple filter with autocompletion A user put some text
> in an inputText and when its lenght is greater than two words i use a DAO to
> query the database in order to get a lot of suggestions to the user So i'd
> like to refresh this suggestion (i use a selectonechoice component) when i've
> got the result from the query and then to refresh the inputText when the user
> select one of that choice...
>
> My jsf page follows (i put only some components in this example):
>
>                
>            
>                                  partialTriggers="fornitore suggestion" valueChangeListener="#
> {FilterOrder.searchGoogleLike}" autoSubmit="true"/>
>                                    label="Forse cerchi..."
>                    id="suggestion"
>                    autoSubmit="true"
>                    immediate="true"
>                                        partialTriggers="suggestion fornitore"
>                    valueChangeListener="#{FilterOrder.setSuggestionAsChoice}"
>                                    binding="#{FilterOrder.forseCercaviSelect}"
>>
>                    
>                
>            
>        
>
>
>
> An these are the backing bean methods that i invoke (i don't put the query in
> this example):
>
>        private SelectItem[] suggestions;
>
>        public void setSuggestions(SelectItem[] suggestions) {
>        this.suggestions = suggestions;
>    }
>
>    public SelectItem[] getSuggestions() {
>        return suggestions;
>    }
>
>    public void searchGoogleLike(ValueChangeEvent valueChangeEvent) {
>        if (((String)valueChangeEvent.getNewValue()).length() > 2) {
>            SupplierLikeFilterDAO suppLikeDAO = new SupplierLikeFilterDAO();
>            List queryResult = new
> ArrayList();
>            queryResult.addAll(suppLikeDAO.listSupplierLike((String)
> valueChangeEvent.getNewValue()));
>            suggestions = new SelectItem[queryResult.size()];
>            for(int i=0; i                SelectItem si = new SelectItem();
>                si.setValue(queryResult.get(i).getSupName());
>                si.setLabel(queryResult.get(i).getSupName());
>                suggestions[i] = si;
>            }
>        }
>    }
>
>    public void setSuggestionAsChoice(ValueChangeEvent valueChangeEvent) {
>        this.fornitore.resetValue();
>        this.fornitore.setValue(valueChangeEvent.getNewValue());
>    }
>
>
>
> With this code components refresh does not work any idea please???
>


Re: [trinidad 1.2] docs, rowselection, sorting, pagenation, filtering?

2011-07-08 Thread Cédric Durmont
Hi,

1/ I don't know of a good CollectionModel subclassing example. Anyway,
I never really had the need for it. If you need to load rows on demand
and such, you may as well subclass List

2/ Don't forget in your  to set sortable="true" AND
sortProperty="someAttribute", where "someAttribute" is the property
name of the row object (NOT an EL) :

  
...

3/ This is tricky to find. It's a skinning feature. See
http://myfaces.apache.org/trinidad/devguide/skinning.html . You have
to define a subclass of ResourceBundle that provides an array of keys
and translations, like this :
public class Traduction extends ListResourceBundle
{

@Override
protected Object[][] getContents()
{
// TODO Auto-generated method stub
return _CONTENTS;
}
static private final Object[][] _CONTENTS =
{
  {"af_tableSelectMany.SELECT_COLUMN_HEADER", "change me !"},
  {"af_tableSelectOne.SELECT_COLUMN_HEADER", "change me !"},
};
}
The trickiest part of it is that the keys are often not documented,
you have to scan the source code to find them...

4/ Again you should find all you ned in the skinning section
5/ Not that I know of. The 2 bars are rendered as two different html tables
6/ Sounds fine to me. I'd simply use a list and put the filtering
stuff in a bean, though. Unless you plan to componentize your filtered
table

Regards,
Cedric Durmont

2011/7/8 Me Self :
> I have a few questions about the trinidad table component. Hope
> someone can answer at least some of them..
>
> 1) I havent found much documentation other than
> http://myfaces.apache.org/trinidad/devguide/table.html. Is there any
> ADF documentation that would be usefull or is the trinidad version too
> different from the ADF one? In particular Im interested in
> documentation on how to use/subclass CollectionModel.
>
> 2) Sorting: The MyFaces 1.2 book from packt mentions that sorting is
> supported simply by using a List with beans with fields that implement
> Comparable and setting . This dosent work
> for me. Is direct use of CollectionModel required to enable sorting?
>
> 3) Im using rowSelection="multiple". This adds a column with the
> header title "Select". All other text values in the table are backed
> by i18n bundle files. How do I override the default title of the row
> selection column with text from a bundle file?
>
> 4) Nobody I have talked to get the meaning of the "select all" "select
> none" icons above the row selection column. Is there any way to
> override the default icons with text links/buttons or other icons?
>
> 5) The table seems to operate with two control bars. In the top
> control bar I get the pagenation buttons (prev, next, dropdown with
> pagenumbers) and in the sub control bar I get the "select all"/"select
> none" icons. Is there any way to put them on the same line because it
> looks wierd that pagenations buttons are dangling far to the right
> with lots of space between them and the table?
>
> 6) Im planning to add my own filter buttons to the action facet and
> implement a CollectionModel where I can return rows based on the
> selected filters. When the user presses a filter button im going to
> update the model using ajax. Does that sound like standard way of
> doing or are there better options?
>


Re: How to disable core table selection check boxes in trinidad

2011-07-07 Thread Cédric Durmont
Hi Ravi,

I don't think it's possible. A possible workaround is to set
selection="none", then add yourself a column with a checkbox, and use
the row object business rules to set it disabled or not

Regards,
Cedric Durmont

2011/7/7 ravi.boreddy :
>
> Hi All,
>
> I have a core table as below.
>
>  partialTriggers="claimResultSet retainClaimsTableState"
> value="#{claimItemSearchResultsWF002Bean.claimSearchResultsData}"
> var="claimVO" rows="25"
> selectionListener="#{claimItemSearchResultsWF002Bean.selectedRow}"
> rowSelection="multiple" >
>
> With the above code, the JSF will render a table with selection check boxes
> for rows in the table.
>
> My requirement is I would like disable some of the rows selection check
> boxes based on my business rules.
>
> Could you please help on how to get control over selection boxes in
> Trinidad?
>
> I really appeciate if you can respond ASAP.
>
> Thanks in adavance!!!
>
> Thanks & Regards,
> Ravi Boreddy
> --
> View this message in context: 
> http://old.nabble.com/How-to-disable-core-table-selection-check-boxes-in-trinidad-tp32015947p32015947.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: What is wrong with Trinidad's download example?

2011-06-15 Thread Cédric Durmont
Ooops, looks like  is missing...

Regards,
Cedric

2011/6/15 jitechno :
>
> Hello,
> I tried this example,
> http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_fileDownloadActionListener.html
>
> Not with commandLine, not with commandButton I am nat able to fire file save
> dialog. No exceptions, no actions, nothing. Please, advice me, what is wrong
> here?
> Thanks in advance
>
> 
>            
>               filename="#{downloadBean.fileName}"
>
> contentType="#{downloadBean.contentType}"
>                                        method="#{downloadBean.sayHello}"/>
>            
>
>       
>                                       filename="hello.txt"
>                                contentType="text/plain; charset=utf-8"
>                                method="#{downloadBean.sayHello}"/>
>       
>  
> --
> faces-config contains
> 
>  downloadBean
>        Beans.DownloadBean
>        request
>        
>            text
>            Hi there!
>        
>        
>            contentType
>            text/plain; charset=utf-8
>        
>        
>            fileName
>            hello.txt
>        
>  
> 
> DownloadBean is here:
> package Beans;
>
> import java.io.IOException;
> import java.io.OutputStream;
> import java.io.OutputStreamWriter;
> import javax.faces.context.FacesContext;
>
> public class DownloadBean  implements java.io.Serializable{
>
>  public DownloadBean() {
>  }
>  private String text;
>  public void setText(String text){
>     this.text = text;
>  }
>  public String getText(){
>     return this.text;
>  }
>
>  private String fileName;
>  public void setFileName(String fileName){
>     this.fileName = fileName;
>  }
>  public String getFileName(){
>     return this.fileName;
>  }
>  private String contentType;
>  public void setContentType(String contentType){
>     this.contentType = contentType;
>  }
>  public String getContentType(){
>     return this.contentType;
>  }
> public void sayHello(FacesContext context, OutputStream out) throws
> IOException
>    {
>      System.out.println("sy Hello "+ getFileName()+" "+getContentType());
>      OutputStreamWriter w = new OutputStreamWriter(out, "UTF-8");
>      w.write(getText());
>      // The stream is automatically closed, but since we wrapped it,
>      // we'd better flush our writer
>      w.flush();
>    }
> }
> --
> View this message in context: 
> http://old.nabble.com/What-is-wrong-with-Trinidad%27s-download-example--tp31851629p31851629.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: ViewExpiredException only in some IE8

2011-06-13 Thread Cédric Durmont
Try changing the "compatibility mode" in IE. IE8 "almost always"
switches to IE7-compatible mode with Trinidad.
Also, you may get different result if you access your Trinidad app
with "http://machinename/..."; and "http://localhost/...";. As strange
as it sounds, IE has a different behavior when you use "localhost"
(and this has nothing to do with security parameters... Man I love
this browser !)

Regards,
Cedric

2011/6/10 Walter Mourão :
> Hi Cedric,
> just tried with tr:setActionListener and I've got the same result... this is
> really a strange problem: IE8 (same 'complete' version) accessing the same
> site, same configuration, etc. Works with one and doesn't work with the
> other. Continuing the quest...
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>
>
>
> On Fri, Jun 10, 2011 at 10:02 AM, Cédric Durmont  wrote:
>
>> Hi Walter,
>>
>> The only thing that looks unusual to me in your code is the mix
>> between tr:commandLink and f:setPropertyActionListener. Have you tried
>> tr:setActionListener instead ?
>> (btw I see no reason why this would cause a viewExpiredException on
>> some browsers, but who said computing was an exact science ?)
>>
>> Regards,
>> Cedric
>>
>> 2011/6/10 Walter Mourão :
>> > Hi folks,
>> > I'm using Myfaces 1.2.9, Trinidad 1.2.14.
>> > the following commandLink (and others in the same application) causes
>> > ViewExpiredException in some (!!!) IE8...
>> >
>> >        > > action="#{listarRelatoriosController.visualizandoRelatorioMudarPagina}"
>> >
>> disabled="#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAtual
>> > ge form.paginas}" partialSubmit="false">
>> >            > > shortDesc="#{messages['proxima.pagina']}" inlineStyle="border-style:none"
>> />
>> >            > > value="#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAtual
>> +
>> > 1}"
>> >
>> target="#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAtual}"
>> > />
>> >        
>> >
>> > I'm lost... Hints ?
>> >
>> > Walter Mourão
>> > http://waltermourao.com.br
>> > http://arcadian.com.br
>> > http://oriens.com.br
>> >
>>
>


Re: ViewExpiredException only in some IE8

2011-06-10 Thread Cédric Durmont
Hi Walter,

The only thing that looks unusual to me in your code is the mix
between tr:commandLink and f:setPropertyActionListener. Have you tried
tr:setActionListener instead ?
(btw I see no reason why this would cause a viewExpiredException on
some browsers, but who said computing was an exact science ?)

Regards,
Cedric

2011/6/10 Walter Mourão :
> Hi folks,
> I'm using Myfaces 1.2.9, Trinidad 1.2.14.
> the following commandLink (and others in the same application) causes
> ViewExpiredException in some (!!!) IE8...
>
>         action="#{listarRelatoriosController.visualizandoRelatorioMudarPagina}"
> disabled="#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAtual
> ge form.paginas}" partialSubmit="false">
>             shortDesc="#{messages['proxima.pagina']}" inlineStyle="border-style:none" />
>             value="#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAtual +
> 1}"
> target="#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAtual}"
> />
>        
>
> I'm lost... Hints ?
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>


Re: Tomahawk, Trinidad or Tobago

2011-06-08 Thread Cédric Durmont
Just like Helmut, I had no problem with file upload on 2 projects :
one with Trinidad 1.2+Tomahawk (using Tomahawk upload), the other with
Trinidad 2
Sorry jitechno I had a quick look at your code, but didn't see the
problem (I'm not really familiar with netbeans and ant, though. Just
looked your source)

Regards,
Cedric

2011/6/8 jitechno :
>
> Helmut, problem is very simple: it works, if God willing so..
> I am able upload only small files and still not always.
> But I dont see any advantage in TTT for file uploads. because due to native
> brother's functionality (rather, limitations in a functionality) impossible
> to upload entire dir. Ask user prepare zip before upload?
> Possible, but difficult explain to user, why it is necessary..
> Signed applet does this work in a better way..
> regards
>
>
>
> Helmut Swaczinna-2 wrote:
>>
>> I've used Tobago's file upload (based on Apache's) with no problem.
>>
>> Regards
>> Helmut
>>
>> Am 08.06.2011 14:19, schrieb jitechno:
>>>
>>> Hi,
>>> what kind of project are u starting?
>>> If "file upload" project , read my previous threads, and forget Trinidad.
>>> I have one-time "sex" with this looking fine "girl", it was nightmare...
>>> Tomahawk also was not better. Use simplest Apache Upload, I have selected
>>> all together during one hour..
>>> regards and be lucky
>>>
>>>
>>> Iratxe Lejarreta-2 wrote:

 Hi,



 I have to start a JSF project and I don't know what MyFaces component
 use:
 Tomahawk, Trinidad or Tobago.

 I have experience with Tomahawk and the result was good.

 I think with any of three I could do what I need, but I would like to
 know
 what are the differences with Trinidad and Tobago, and which is the each
 maturity.



 Thanks,



 Iratxe Lejarreta

 www.axios.es









>>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Tomahawk%2C-Trinidad-or-Tobago-tp31790062p31800795.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: Tomahawk, Trinidad or Tobago

2011-06-08 Thread Cédric Durmont
Thanks Helmut, now I know a bit more about Tobago ;o)
Trinidad has some components for layout management (panelFormLayout,
panelGroupLayout, panelPage...), but you can't totally avoid html
layout with these (for instance you can't easily have a 2 column
layout, the first using 25% of available space, the seconf using 75%,
and a fixed size gutter between the 2)

Regards,
Cedric

2011/6/8 Helmut Swaczinna :
> Hi,
>
> I'm using Tobago now for years. (But I havn't used Trinidad.) The main
> advantage of Tobago is (to me) the buildin layout manager (gridlayout). You
> havn't to deal with HTML table layout or something. With Tobago, you don't
> need to use any HTML tag at all. Tobago has a rich skinning support too, so
> you don't need to write any CSS class to get a quite good looking app.
> Buildin ajax support has Tobago also.
>
> Regards,
> Helmut
>
> Am 08.06.2011 10:53, schrieb Cédric Durmont:
>>
>> Hello,
>>
>> Can't tell about Tobago, which I don't use, but (to me) Trinidad has
>> the following advantages over Tomahawk :
>> - ajax support for all components
>> - popup management (passing values to popups and back...)
>> - skinning support
>> I use both Trinidad and Tomahawk in my current project, but Tomahawk
>> is only used for 1/ t:schedule, which  has no equivalent component and
>> 2/  t:inputFileUpload (Trinidad has an upload component too, but I had
>> a hard time mixing Trinidad, Tomahawk and PrettyFaces, and now the
>> uploads are catched by Tomahawk. Better use one more Tomahawk
>> component than struggle with my web.xml again)
>>
>> Regards,
>> Cedric
>>
>>
>> 2011/6/7 Iratxe Lejarreta:
>>>
>>> Hi,
>>>
>>>
>>>
>>> I have to start a JSF project and I don't know what MyFaces component
>>> use:
>>> Tomahawk, Trinidad or Tobago.
>>>
>>> I have experience with Tomahawk and the result was good.
>>>
>>> I think with any of three I could do what I need, but I would like to
>>> know
>>> what are the differences with Trinidad and Tobago, and which is the each
>>> maturity.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Iratxe Lejarreta
>>>
>>> www.axios.es
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>


Re: Tomahawk, Trinidad or Tobago

2011-06-08 Thread Cédric Durmont
Hello,

Can't tell about Tobago, which I don't use, but (to me) Trinidad has
the following advantages over Tomahawk :
- ajax support for all components
- popup management (passing values to popups and back...)
- skinning support
I use both Trinidad and Tomahawk in my current project, but Tomahawk
is only used for 1/ t:schedule, which  has no equivalent component and
2/  t:inputFileUpload (Trinidad has an upload component too, but I had
a hard time mixing Trinidad, Tomahawk and PrettyFaces, and now the
uploads are catched by Tomahawk. Better use one more Tomahawk
component than struggle with my web.xml again)

Regards,
Cedric


2011/6/7 Iratxe Lejarreta :
> Hi,
>
>
>
> I have to start a JSF project and I don't know what MyFaces component use:
> Tomahawk, Trinidad or Tobago.
>
> I have experience with Tomahawk and the result was good.
>
> I think with any of three I could do what I need, but I would like to know
> what are the differences with Trinidad and Tobago, and which is the each
> maturity.
>
>
>
> Thanks,
>
>
>
> Iratxe Lejarreta
>
> www.axios.es
>
>
>
>
>
>
>
>


Question about tr:fileDownloadActionListener

2011-04-20 Thread Cédric Durmont
Hello,

I've been using tr:fileDownloadActionListener for quite some time now,
but I have to rework my code to handle large files (that is,
1000s-page long PDF generated on the fly with jasperreports)
I made jasperreports send the output directly to the outputstream
provided in the listener, but the browser doesn't get the file until
it is completely generated.
When tracing the code I can see that the OutputStream provided is a
BufferedOutputStream, with a 8Kib buffer. The final file I'm
generating right now is 10x larger, so it can't be stuck in the
buffer...

Any idea on what's happening ? Is there something special to do in a
fileDownloadActionListener to have it sending data progressively to
the browser ?

Regards,
Cedric Durmont


Re: [Trinidad] change the text in the tr:selectManyShuttle

2011-04-01 Thread Cédric Durmont
Hello,

You have to write a java class similar to the example below. The
"CONTENTS" list contains a pair of Strings : the first is the key to
the element to rename, the second is the new name.
To enable this class, you have to declare it in your skin definition
(WEB-INF/trinidad-skins.xml ). The relevant part is the 
tag  :
...

myapp.desktop
myapp
org.apache.myfaces.trinidad.desktop
skins/myapp/myapp.css
somepackage.Translation

...

The hardest part IMHO is to find the keys for the labels you want to
change, since it's not documented anywhere (that I know of). Luckily
for you, I also changed the "Move" and "Move All" labels in my app, so
the keys you're looking for are included in the example below !

Regards,
Cedric Durmont

= Translation class =
package somepackage;

import java.util.ListResourceBundle;

public class MyTranslation extends ListResourceBundle
{

@Override
protected Object[][] getContents()
{
// TODO Auto-generated method stub
return _CONTENTS;
}
static private final Object[][] _CONTENTS =
{
  {"af_tableSelectMany.SELECT_COLUMN_HEADER", ""},
  {"af_tableSelectOne.SELECT_COLUMN_HEADER", ""},
  {"af_selectOrderShuttle.MOVE_ALL", ""},
  {"af_selectOrderShuttle.MOVE", ""},
  {"af_selectOrderShuttle.REMOVE", ""},
  {"af_selectOrderShuttle.REMOVE_ALL", ""},
  {"af_selectManyShuttle.MOVE_ALL", ""},
  {"af_selectManyShuttle.MOVE", ""},
  {"af_selectManyShuttle.REMOVE", ""},
  {"af_selectManyShuttle.REMOVE_ALL", ""},

  {"af_selectOrderShuttle.REORDER_UP_ALL", ""},
  {"af_selectOrderShuttle.REORDER_UP", ""},
  {"af_selectOrderShuttle.REORDER_DOWN", ""},
  {"af_selectOrderShuttle.REORDER_DOWN_ALL", ""},

  {"af_panelAccordion.DISCLOSED_TIP", ""},
  {"af_panelAccordion.UNDISCLOSED_TIP", ""},

  {"af_showDetail.DISCLOSED_TIP", "Masquer"}
};
}


2011/3/30 Leandro Andrade :
> Hi,
>
> i want to change the text "Move" and "Move All" to another text.
>
> How can i do this ?
>
> Thanks
> _
> Att,
> Leandro Oliveira de Andrade
>


Re: Possible bug jsf.js (or error on my pat)

2011-03-15 Thread Cédric Durmont
Hi,

Your sample xhtml does not look very "Trinidad-ish". Maybe it was
intended for plain JSF.
a more Trinidad-oriented approach would be :
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"; xml:lang="en" lang="en"
xmlns:tr="http://myfaces.apache.org/trinidad";>

 









...
Should work. For good code organization, I'd rather separate the
action (count++) from the getter. This is a trivial example, but in a
more real-world page, you never really know how ofter (and when) your
getter will be called...


Regards,
Cedric

>
> name="jsf.js" library="javax.faces"
> target="head"
>
>
>
>
>onclick="jsf.ajax.request(this, event,
> {execute: this.id, render: 'out1'}); return false;" />
>
>
>
>onclick="jsf.ajax.request(this, event,
> {execute:'reset', render: 'out1'}); return false;"
>actionListener="#{count.reset}" />
>
>
> 


2011/3/14 Robert Hodges :
> To all,
>
> I'm new to web coding (especially JSF).  I'm looking at Trinidad as my
> component library of choice.  I'm trying out simple samples from the web and
> this sample is not working once I include the Trinidad settings in web.xml
> (it works without Trinidad being defined)
>
> Scenario:               Simple ajax example for a counter.  Count works, but
> reset does not, reset also increments the count
>
> Container:              tomcat 7.x
> JSF Version:    2.0
> Trinidad:               2.0.0 Beta 2
>
>
> = Bean ===
>
> package com.example.;
>
> import java.io.Serializable;
>
> import javax.faces.bean.ManagedBean;
> import javax.faces.bean.SessionScoped;
> import javax.faces.event.ActionEvent;
>
> @ManagedBean(name = "count")
> @SessionScoped
> public class Count implements Serializable {
>        /**
>         *
>         */
>        private static final long serialVersionUID = 1L;
>
>        Integer count = 0;
>
>        public Integer getCount() {
>                System.out.println("Incrementing Count");
>                return count++;
>        }
>
>        public void reset(ActionEvent ae) {
>                System.out.println("Resetting Count");
>                count = 0;
>        }
> }
>
> === web page ===
>
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
> 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"; xml:lang="en" lang="en"
>        xmlns:tr="http://myfaces.apache.org/trinidad";>
>
>        
>                                        content="text/html; charset=iso-8859-1" />
>                JSF Test
>        
>        
>                
>                         name="jsf.js" library="javax.faces"
> target="head"
>                        
>                        
>                        
>                        
>                                                        onclick="jsf.ajax.request(this, event,
> {execute: this.id, render: 'out1'}); return false;" />
>                        
>                        
>                        
>                                                        onclick="jsf.ajax.request(this, event,
> {execute:'reset', render: 'out1'}); return false;"
>                                actionListener="#{count.reset}" />
>                
>        
> 
>
>
> = generate page source ==
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>                
>                JSF Test type="text/javascript">var _AdfWindowOpenError='A popup window blocker has
> been detected in your browser. Popup blockers interfere with the operation
> of this application. Please disable your popup blocker or allow popups from
> this site.'; src="/CounTest/adf/jsLibs/DebugCommon2_0_0_beta_2.js"> id="form1" name="form1" method="POST" onkeypress="return
> _submitOnEnter(event,'form1');" action="/CounTest/index.xhtml"> type="text/javascript"> name="jsf.js" library="javax.faces"
> target="head"
>                        
>                        9
>                         type="submit"
> value="Count" onclick="return _chain('jsf.ajax.request(this, event,
> {execute: this.id, render: \'out1\'}); return
> false;','submitForm(\'form1\',1,{source:\'form1:button1\'});return
> false;',this,event,true)">
>                        
>                     

Re: [TRINIDAD] Placing tr:inputText inside trh:tableLayout sometimes doesn't render the element in the HTML

2011-02-23 Thread Cédric Durmont
you could always add a bogus setter... Not very clean, but you could
use a getter/setter pair in a bean, the setter would do nothing,
whereas the getter would grab the value from your business object "u"

Regards,
Cedric

2011/2/23 A. Nieves :
> I was mistaken. They are displayed as div's because they are read only
> fields. Is there any way to display read only fields inside input elements?
>
> On Tue, Feb 22, 2011 at 9:39 PM, A. Nieves  wrote:
>
>> I have several tr:inputText inside trh:tableLayout and for some values the
>> resulting HTML does not include the input element but only a div. For
>> example, I have:
>>
>> 
>>    
>>        > simple="true"  value="#{u.username}" />
>>        > disabled="true" simple="true"  />
>>     
>> 
>>
>> The code above will always display the following inside the table.
>>
>> ...
>> 
>> 
>>     > class="af_inputText_content" disabled="" name="username" >
>> 
>> 
>>
>> 
>>    
>>        Regular User
>>   
>> 
>> ...
>>
>> The second input always render as a div. It happens for some of the fields
>> but not for all. There doesn't seem to be any common characteristics of the
>> inputs that get displayed as div's.
>>
>> Any hints of what might be the problem and where should I start debugging?
>>
>> I'm using Trinidad 1.2.14 with Facelets.
>>
>> Thanks.
>>
>>
>


Re: [TRINIDAD] ValueChangeListener of tr:selectOneChoice invoked multiple times

2011-02-11 Thread Cédric Durmont
Hello,

I'm sorry but I never ran into that issue...
Two possible reasons come to mind :
- what's the scope of your bean ? I'm not sure what exactly happens if
the bean is request-scoped
- can you post the code of your page ? Maybe it's worth checking if
you don't have duplicate ids or if something could generate multiple
refreshes

Regards,
Cedric Durmont

2011/2/11 Gururaj, Sandeep :
> Hello All,
>
>
>
> I was not sure if I posted my previous mail to the right forum.
>
>
>
> Thanks
>
> ~Sandeep
>
>
>
>
>
> -Original Message-
> From: Gururaj, Sandeep [mailto:sandeep.guru...@in.pega.com]
> Sent: Thursday, February 10, 2011 4:31 PM
> To: users@myfaces.apache.org
> Subject: [TRINIDAD] ValueChangeListener of tr:selectOneChoice invoked
> multiple times
>
>
>
> Hi All,
>
>
>
>
>
> I have recently applied Trinidad 1.2.13 jars in my application.
>
> Previously, I was using Trinidad 1.0.10.
>
>
>
>
>
> While testing my application, I find that the valueChangeListener for
>
> tr:selectOneChoice component is being invoked multiple times. I would
>
> like to know if anybody else has seen the same behavior. If so, do we
>
> have a resolution for this issue?
>
>
>
>
>
> To give you more details, I am launching a pop-up window from the
>
> valueChangeListener method. Since this method is being invoked multiple
>
> times, I see that multiple pop-up windows are being open.
>
>
>
>
>
> Any help in this regard is appreciated.
>
>
>
>
>
> Thanks
>
>
>
> ~Sandeep
>
>
>
>
>
>


Re: [Triniddad] - Problem using tr:table inside a tr:panelPopup

2010-11-19 Thread Cédric Durmont
Hello,

I'm also using a tr:table with pagination inside a tr:panelpopup. So
far I haven't had any problem with that.
Can you give the part of your page with the tr:panelPopup ?
Also, what's the browser you're testing with ?

Regards,
Cedric

2010/11/19 Dreher, Markus :
> Hi all,
>
>
>
> i'm using a tr:table inside a modal tr:panelPopup component.
>
> If the size of the list is greater than the rowsattribute oft he table,
> the table renders a range selector.
>
> If i select a new range, the popup disappears and input is still blocked
> by the popup.
>
>
>
> Is the panelPopup component only intended for use with simple
> components? Or do i miss something?
>
>
>
> It looks like the div fort he popupContainer gets its initial style
> which is visibility: hidden
>
>
>
> I'm using tinidad 1.2.13 and facelets 1.1.15.
>
>
>
> Any suggestions?
>
>
>
> Thanks,
>
>
>
> Markus
>
>
>
>
>
> Abonnieren Sie unseren Infobrief und erfahren Sie regelmäßig die neuesten 
> Nachrichten über unsere Lösungen, aktuellen Projekte und Entwicklungen. 
> Melden sie sich an mit diesem Link http://www.datenzentrale.de/Info-Brief
> ___
>
> Datenzentrale Baden-Württemberg, Anstalt des öffentlichen Rechts
> Krailenshaldenstr. 44, 70469 Stuttgart
> Telefon (0711) 8108-20, Telefax (0711) 8108-21350
> E-Mail i...@dzbw.de, Internet www.datenzentrale.de
> Vorstand: Karl Tramer (Vors.) und Harald Schätzle, Vorsitzender des 
> Verwaltungsrats: Gunter Czisch
> USt-Id-Nr. DE147794223
> ___
>
>
>
>


Re: commandButton actionListener not invoking managed bean method (2nd time)

2010-11-16 Thread Cédric Durmont
Just a guess in the wild, but maybe it's because of a bad use of
auto-completion in Eclipse. There's another ActionEvent class in
package java.awt.something . Make sure you import
javax.faces.event.ActionEvent in your bean, and not the awt thing.

Regards,
Cedric Durmont

2010/11/11  :
> I am new to MyFaces Trinidad component library and I am trying to do some 
> pretty simple stuff.  I am experiencing a problem with getting the 
> tr:commandButton to actually invoke the managed bean's method.  My setup is 
> as follows:
>
> - Ubuntu Linux 64-bit
> - Sun JDK 1.6.0_20
> - Tomcat 6.0.29
> - Apache MyFaces JSF Core 1.2.9
> - Apache MyFaces Trinidad 1.2.13
> - Facelets 1.1.15
> - Development IDE = Eclipse Helios
>
> For testing I have made reduced the eventHandler method called by the Search 
> Button do nothing but System.out.println("..."), to confirm if it is being 
> called.  It is not.  Any ideas on what I am missing (something obvious, I am 
> sure)?
>
> Here is the xhtml file with the unresponsive commandButton:
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml";
>             xmlns:h="http://java.sun.com/jsf/html";
>             xmlns:f="http://java.sun.com/jsf/core";
>             xmlns:ui="http://java.sun.com/jsf/facelets";
>             xmlns:tr="http://myfaces.apache.org/trinidad";
>               xmlns:trh="http://myfaces.apache.org/trinidad/html";>
>
> 
>    
>    
> 
>
>    
>
>        
>             styleClass="subContainer">
>                   inlineStyle="font-weight: bold; margin-bottom: 10px"/>
>                  
>                  
>                                              contentStyle="width: 200px"
>                              maximumLength="20"
>                              value="#{DrawingFetcherBean.searchString}" />
>                                                  id="searchButton"
>                                  partialSubmit="true"
>                                  
> actionListener="#{DrawingFetcherBean.loadDrawingResultsEventHandler}" />
>            
>            
>                 style="margin-right: 10px"/>
>            
>        
>
>        
>
>         partialTriggers="searchButton">
>            
>                        value="#{DrawingFetcherBean.drawingResults}"
>            columns="4" columnBandingInterval="1">
>                
>                    
>                
>                
>                    
>                
>                
>                        
>                
>                
>                        
>                   
>                
>                    
>                
>            
>        
>    
> 
>
> --
>
> Here is the managed bean snippet:
>
> public class DrawingFetcher implements Serializable
> {
>    String searchString;
>    String fileName;
>    ...
>    ...
>    public void loadDrawingResultsEventHandler(ActionEvent event)
>    {
>        System.out.println("Drawing Results loaded!");
>    }
> }
>
>
> Here is the web.xml:
> --
>
> 
> http://www.w3.org/2001/XMLSchema-instance"; 
> xmlns="http://java.sun.com/xml/ns/javaee"; 
> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; 
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID" 
> version="2.5">
>  Test_Trinidad
>  
>    index.html
>  
>  
>    Faces Servlet
>    javax.faces.webapp.FacesServlet
>    1
>  
>  
>    Faces Servlet
>    *.xhtml
>  
>  
>  
>    org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
>    
> org.apache.myfaces.trinidadinternal.facelets.TrinidadFaceletViewHandler
>  
>  
>  
>    javax.faces.DEFAULT_SUFFIX
>    .xhtml
>  
>  
>    javax.servlet.jsp.jstl.fmt.localizationContext
>    resources.application
>  
>  
>    State saving method: 'client' or 'server' (=default). See JSF 
> Specification 2.5.2
>    javax.faces.STATE_SAVING_METHOD
>    client
>  
>  
>    
>    This parameter tells MyFaces if javascript code should be allowed in
>    the rendered HTML output.
>    If javascript is allowed, command_link anchors will have javascript code
>    that submits the corresponding form.
>    If javascript is not allowed, the state saving info and nested parameters
>    will be added as url parameters.
>    Default is 'true'
>    org.apache.myfaces.ALLOW_JAVASCRIPT
>    true
>  
>  
>    
>    If true, rendered HTML code will be formatted, so that it is 
> 'human-readable'
>    i.e. additional line separators and whitespace will be written, that do not
>    influence the HTML code.
>    Default is 'true'
>    org.apache.myfaces.PRETTY_HTML
>    true
>  
>  
>    org.apache.myfaces.DETECT_JAVASCRIPT
>    false
>  
>  
>    
>    

Re: [TRINIDAD] PPR Problem with Trinidad 2.0.0.3-SNAPSHOT / MyFaces 2.0.1

2010-10-12 Thread Cédric Durmont
Hi Roland,

Maybe you have hit the same bug as me : see TRINIDAD-1870 on Jira.
I included a patch on that bug. Can you try your examples with a
patched version of Trinidad 2 ?
Here on my app the patch does solve some problems (e.g. the
panelTabbed problem) on simple pages, but complex (say "real") pages
still have issues.

Regards,
Cedric

2010/10/12 Krebs Roland / BWO Systems AG :
> I have a problem with PPR of the snapshot from today on Firefox 3.6.10
> and  Chrome 6.0.472.63.
>
> There a no errors in the log files nor on the javascript console.
>
>
>
> For example in
>
> -           the next and previous do a refresh of the dropdown
> list ('1-6 of 9' changes to '7-9 of 9') but the table itself is not
> refreshed.
>
> -           nothing happens when clicking
>>Show to display the sub table
>
> -           nothing happens on selection of a tab
>
>
>
> On IE9 and Opera 10.62 everything works fine.
>
> With Trinidad 1.2.13 / MyFaces 1.2.9 everything was fine in all four
> browsers. However I desperately need the bean-scope 'view' and therefore
> MyFaces 2!
>
>
>
> Does anybody know how to solve this?
>
>
>
> Thanks for any help
>
> Roland
>
>
>
>
>
>
>
>
>
>


Re: [Trinidad} Issue with ValueChangeListener

2010-09-28 Thread Cédric Durmont
Hi,

What's the scope of the bean ? If it's a request bean, then this is normal...
Otherwise, the valueChangeListener is not called until the new value
differs from the old one.
Try to put a breakpoint in simpleBackingBean.processValueChange and
compare old and new value as given in the event object.
Maybe the values are "roughly the same" but oldValue.equals(newValue)
returns false for a reason or another. Or, something else changes the
value in between.
Hope this may lead you to your problem...

Regards,
Cedric

2010/9/28 Seema Richard (UST, IND) :
> Hi,
>
>
>
> We are using Trinidad 1.2 with facelets.There are multiple checkboxes in
> our form and we require to call an ActionListener every time a checkbox
> is selected/deselected.
>
>
>
> Below is the code:
>
> 
>
> 
> id="quantity1"
> valueChangeListener="#{simpleBackingBean.processValueChange}"/>
>
> 
> id="quantity2"
> valueChangeListener="#{simpleBackingBean.processValueChange}"/>
>
> 
> id="quantity3"
> valueChangeListener="#{simpleBackingBean.processValueChange}}"/>
>
> 
>
> What happens here is every time the checkbox is selected/deselected the
> listener method is invoked 3 times, one for each component having the
> valuechangeListener attribute. We have tried to remove the autoSubmit
> attribute from the check box components but then nothing happens on
> selection / deselection.
>
>  Is there a way by which we can get just the changed checkbox value when
> it is clicked?
>
> Thanks,
>
> Seema
>
>
>
>
>
>


Re: [Trinidad] Sort Meta Tags

2010-09-23 Thread Cédric Durmont
Try to replace tr:document with :


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";
xmlns:f="http://java.sun.com/jsf/core";
... all used namespaces here...
>


some title
 
 









Regards,
Cedric Durmont

2010/9/22 Ricardo Rog :
> Hello,
>
>
>
> I have an application that has to run in IE7. Now I want to force IE8
> browsers to render the page in IE7 mode. For this reason I added the
> meta-tag to the page which should have this effect but it doesn’t work.
> After some research I found an explanation for this behavior: the meta tag
> has to be the first meta tag in the page or it will not work.
>
>
>
> I added the meta tag like this:
>
>
>
> 
>
>      
>            inlineStyle="margin:0px" mode="strict">
>
>            
>
>                  
>
> 
>
> 
> 
>
> 
>
> 
>
> 
>
>
>
>
> But it gets rendered like this:
>
>
>
> 
>
>        
>
>                 …
>
>                
>
>                href="/dsuche/adf/styles/cache/sp-desktop-wfgiw0-ltr-ie.css;jsessionid=C6FD3
> EA54675A722492C8E6CB59917BF">
>
>                
>
> 
>
>
> Can I in some way reorder the meta tags so the IE meta tag is the first one?
>
>
>
>
>
>
> Thanks for your time
>
>
>
>
>
> Ricardo
>
>
>
>
>
>


Re: double click problem in JSF

2010-08-31 Thread Cédric Durmont
Don't try to catch a double-click event. Instead, try to :
- catch an onclick event
- use it to disable the link
- return true, so that this first click will actually do something.
The following clicks should not happen because you just
disabled/hidden the link

Regards
Cedric

2010/8/31 yogeen honnavar :
> 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  wrote:
>
>> From: Scott O'Bryan 
>> Subject: Re: double click problem in JSF
>> To: "MyFaces Discussion" 
>> 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 
>> 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
>> >
>> >
>>
>
>
>


Re: Simple container tag in Trinidad for PPR (Partial Page Rendering)

2010-08-31 Thread Cédric Durmont
 is often used for this purpose, but it renders
a table, so it's quite verbose...

Regards,
Cedric Durmont

2010/8/31 marioosh.net :
>
> Is there some container tag (generating span or maybe div, something like
> ), which content be updated by using partialTriggers
> attribute ? I can't find that :/
> --
> View this message in context: 
> http://old.nabble.com/Simple-container-tag-in-Trinidad-for-PPR-%28Partial-Page-Rendering%29-tp29579928p29579928.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: page lang\ encoding error after moving to myFaces from mojarra???

2010-08-25 Thread Cédric Durmont
Oh, charset encoding... don't get me started about that ! ;o) I had a
hard time trying to figure out how to configure that beast properly
for my locale (French, and win1252 charset which I had to use for some
obscure database reasons).
Try to add this filter (source below) and set it up properly in your web.xml :

SetCharacterEncoding
filters.SetCharacterEncodingFilter

  encoding
  



SetCharacterEncoding
*.xhtml


It's taken from the examples bundled with Tomcat. I just adapted it a
bit to handle Trinidad partial page rendering properly.

Hope this helps (as I don't know Hebrew at all, I don't understand
what's wrong in the example you give...)
Regards
Cedric Durmont



SetCharacterEncodingFilter.java
=snip=snip=snip
/*
 * $Revision: 1.4 $
 * $Date: 2010/07/05 13:26:29 $
 *
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   "This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/)."
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
 *Foundation" must not be used to endorse or promote products derived
 *from this software without prior written permission. For written
 *permission, please contact apa...@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *nor may "Apache" appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * .
 *
 * [Additional notices, if required by prior licensing conditions]
 *
 */
package filters;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

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


/**
 * Example filter that sets the character encoding to be used in parsing the
 * incoming request, either unconditionally or only if the client did not
 * specify a character encoding.  Configuration of this filter is based on
 * the following initialization parameters:
 * 
 * encoding - The character encoding to be configured
 * for this request, either conditionally or unconditionally based on
 * the ignore initialization parameter.  This parameter
 * is required, so there is no default.
 * ignore - If set to "true", any character encoding
 * specified by the client is ignored, and the value returned by the
 * selectEncoding() method is set.  If set to "false,
 * selectEncoding() is called only if the
 * client has not already specified an encoding.  By default, this
 * parameter is set to "true".
 * 
 *
 * Although this filter can be used unchanged, it is also easy to
 * subclass it and make the selectEncoding() method more
 * intelligent about what encoding to choose, based on characteristics 

Re: [ExtVal] Trouble with ExtValElResolver and a Map

2010-08-20 Thread Cédric Durmont
Works like a charm, thanks !

Regards,
Cedric


Re: [ExtVal] Trouble with ExtValElResolver and a Map

2010-08-17 Thread Cédric Durmont
Thanks Gerhard for your quick response ! I'll try that asap.

Regards,
Cedric

2010/8/17 Gerhard :
> hi cedric,
>
> you can try the current version (see [1]).
>
> regards,
> gerhard
>
> [1] http://issues.apache.org/jira/browse/EXTVAL-113
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2010/8/17 Gerhard 
>
>> hi cedric,
>>
>> you are right - however, we need a property name to identify the target.
>> i'll change that - as soon as there is no property name, we don't continue
>> with the validation process and log a warning.
>>
>> as alternative you could refactor the expression so that the map-trick is
>> not at the >end< of the expression.
>>
>> the issue happens quite early - so everything which is in place for
>> skipping the validation process won't help.
>> (you could also customize extval to change the default behavior)
>>
>> regards,
>> gerhard
>>
>> http://www.irian.at
>>
>> Your JSF powerhouse -
>> JSF Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>> 2010/8/17 Cédric Durmont 
>>
>> Hello,
>>>
>>> I'm new to ExtVal, so it's possible I'm missing something, but I have
>>> troubles with a page containing this :
>>>
>>> [...]
>>> 
>>> [...]
>>>
>>> Where status is declared as a Map (actually what I do here is the
>>> el-map trick to call a method with an argument), and member is a POJO.
>>> Works fine without ExtVal, but when I add ExtVal, I get an exception
>>> when validating the page :
>>>
>>> java.lang.IllegalStateException: error at binding:
>>> #{beanBenef.beneficiaire.famille.statut[membre]} -- an el-resolver
>>> error occurred! maybe you used an invalid binding. otherwise: please
>>> report the issue, deactivate the el-resovler of extval via web.xml
>>> context-param:
>>> org.apache.myfaces.extensions.validator.DEACTIVATE_EL_RESOLVER
>>> and test again.
>>>        at
>>> org.apache.myfaces.extensions.validator.core.el.DefaultELHelper.getPropertyDetailsOfValueBinding(DefaultELHelper.java:182)
>>>        at
>>> org.apache.myfaces.extensions.validator.crossval.recorder.CrossValidationUserInputRecorder.recordUserInput(CrossValidationUserInputRecorder.java:56)
>>>        at
>>> org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor.beforeGetConvertedValue(AbstractValidationInterceptor.java:114)
>>>        at
>>> org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper.getConvertedValue(ExtValRendererWrapper.java:468)
>>>        at
>>> org.apache.myfaces.trinidad.component.UIXEditableValue.getConvertedValue(UIXEditableValue.java:422)
>>> [...]
>>> Caused by: java.lang.ClassCastException:
>>> sap.metier.utilisateur.Beneficiaire cannot be cast to java.lang.String
>>>        at
>>> org.apache.myfaces.extensions.validator.core.el.ExtValELResolver.setValue(ExtValELResolver.java:181)
>>>        at com.sun.el.parser.AstValue.setValue(AstValue.java:167)
>>>        at
>>> com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:269)
>>>        at
>>> com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
>>>        at
>>> org.apache.myfaces.extensions.validator.core.el.DefaultELHelper.getPropertyDetailsOfValueBinding(DefaultELHelper.java:178)
>>>        ... 80 more
>>>
>>> The exception is thrown here (ExtValELResolver.java:181) :
>>>    public void setValue(ELContext elContext, Object o, Object o1, Object
>>> o2)
>>>    {
>>>        expression += "." + o1;
>>>        property = (String)o1;  // <== HERE
>>> [..]
>>> "o" is my Map, o1 is the POJO, which is definitely not castable to a
>>> String !
>>>
>>>
>>> The message says I can disable the resolver, which removes the error.
>>> But then I have other messages from ELHelpher trying to resolve
>>> complex EL such as #{bean.someMap[ value != null ? value :
>>> 'default']}. The message says that :'default' is not a valid EL
>>> operator...
>>>
>>>
>>> Is there a way to circumvent this ? I definitely need a Map with a
>>> non-String Object as key ! Is it possible to prevent ExtVal from
>>> analysing one EL, or one page ?
>>>
>>> Regards,
>>> Cedric Durmont
>>>
>>
>>
>


[ExtVal] Trouble with ExtValElResolver and a Map

2010-08-17 Thread Cédric Durmont
Hello,

I'm new to ExtVal, so it's possible I'm missing something, but I have
troubles with a page containing this :

[...]

[...]

Where status is declared as a Map (actually what I do here is the
el-map trick to call a method with an argument), and member is a POJO.
Works fine without ExtVal, but when I add ExtVal, I get an exception
when validating the page :

java.lang.IllegalStateException: error at binding:
#{beanBenef.beneficiaire.famille.statut[membre]} -- an el-resolver
error occurred! maybe you used an invalid binding. otherwise: please
report the issue, deactivate the el-resovler of extval via web.xml
context-param: org.apache.myfaces.extensions.validator.DEACTIVATE_EL_RESOLVER
and test again.
at 
org.apache.myfaces.extensions.validator.core.el.DefaultELHelper.getPropertyDetailsOfValueBinding(DefaultELHelper.java:182)
at 
org.apache.myfaces.extensions.validator.crossval.recorder.CrossValidationUserInputRecorder.recordUserInput(CrossValidationUserInputRecorder.java:56)
at 
org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor.beforeGetConvertedValue(AbstractValidationInterceptor.java:114)
at 
org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper.getConvertedValue(ExtValRendererWrapper.java:468)
at 
org.apache.myfaces.trinidad.component.UIXEditableValue.getConvertedValue(UIXEditableValue.java:422)
[...]
Caused by: java.lang.ClassCastException:
sap.metier.utilisateur.Beneficiaire cannot be cast to java.lang.String
at 
org.apache.myfaces.extensions.validator.core.el.ExtValELResolver.setValue(ExtValELResolver.java:181)
at com.sun.el.parser.AstValue.setValue(AstValue.java:167)
at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:269)
at 
com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
at 
org.apache.myfaces.extensions.validator.core.el.DefaultELHelper.getPropertyDetailsOfValueBinding(DefaultELHelper.java:178)
... 80 more

The exception is thrown here (ExtValELResolver.java:181) :
public void setValue(ELContext elContext, Object o, Object o1, Object o2)
{
expression += "." + o1;
property = (String)o1;  // <== HERE
[..]
"o" is my Map, o1 is the POJO, which is definitely not castable to a String !


The message says I can disable the resolver, which removes the error.
But then I have other messages from ELHelpher trying to resolve
complex EL such as #{bean.someMap[ value != null ? value :
'default']}. The message says that :'default' is not a valid EL
operator...


Is there a way to circumvent this ? I definitely need a Map with a
non-String Object as key ! Is it possible to prevent ExtVal from
analysing one EL, or one page ?

Regards,
Cedric Durmont


[Trinidad] Trinidad2 : tr:commandLink blocks tr:panelAccordion

2010-07-27 Thread Cédric Durmont
I'm cleaning bugs in my app after my switch to Trinidad2, and I found
2 problems that seems not to be on my side :

1. I'm unable to change of tab in a panelTabbed with a click (works
programmatically using "disclosed" attribute)
2. Consider this sample.xhtml :


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:tr="http://myfaces.apache.org/trinidad";
xmlns:t="http://myfaces.apache.org/tomahawk";
xmlns:trh="http://myfaces.apache.org/trinidad/html";
xmlns:c="http://java.sun.com/jsp/jstl/core";
xmlns:ui="http://java.sun.com/jsf/facelets";>


Some title







foo
bar



 



In this case, the panelAccordion does not work (details are not
disclosed when you click on it). Remove the commandLink, it works
again. Replace the commandLink by a commandButton, it works too.
Setting attributes on the commandLink does not change the situation.

Sall I create JIRA tickets for one of these issues ?

Regards,
Cedric


Re: Migrating app to myfaces2/Trinidad2

2010-07-27 Thread Cédric Durmont
Ahaaa... I was using http://java.sun.com/jstl/core (with jsf
1.2/facelets, it was the "good" namespace to use, isn't it ?).
Now it works like a charm :o)

Many thanks to those who helped me : Bruno, Jakob, Mark & Matthias !
I just have to double check my xhtml pages, as MyFaces2/Trinidad2 seem
to be less lenient than their predecessors

Regards,
Cedric

2010/7/27 Bruno Aranda :
> Hi Cedric,
>
> Double check that the namespace used is:
>
> xmlns:c="http://java.sun.com/jsp/jstl/core";
>
> Cheers,
>
> Bruno
>
> On 27 July 2010 08:03, Cédric Durmont  wrote:
>
>> ok, I found it : it comes from Tomahawk. Jakob, you were right,
>> Tomahawk TagHandlers use com.sun.facelets.*
>> I compiled it from sources and changed the dependency to tomahawk20.
>> Now simple pages work fine !
>>
>> But now it's the jstl tags that stopped working ! If I'm right, jstl
>> tags support was provided by facelets. But is it supported in MyFaces
>> 2 facelets ? Is there something to do to enable it ? If not, is there
>> a replacement, or a workaround ?
>> I mainly use jstl tags for : populating tr:selectOneChoice
>> (c:forEach), declare default values in components ( c:if / c:set ).
>> There are other use cases in my code, but these 2 are the most
>> important.
>>
>> Regards,
>> Cedric
>>
>> 2010/7/26 Mark Struberg :
>> > can you please run a
>> >
>> > $> mvn dependency:tree
>> >
>> > and check if you are picking up some sun JSF impl (maybe through a
>> transitive
>> > dependency)?
>> >
>> > LieGrue,
>> > strub
>> >
>> >
>> >
>> > - Original Message 
>> >> From: Cédric Durmont 
>> >> To: MyFaces Discussion 
>> >> Sent: Mon, July 26, 2010 2:32:22 PM
>> >> Subject: Re: Migrating app to myfaces2/Trinidad2
>> >>
>> >> Here it is :
>> >> (note : ficho.util.SetCharacterEncodingFilter is part of my app.  It
>> >> does what the name implies !)
>> >>
>> >> javax.faces.FacesException:  java.lang.NoClassDefFoundError:
>> >> com/sun/facelets/tag/TagHandler
>> >>      at
>>
>> >>org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
>> >>
>> >>      at
>>
>> >>org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
>> >>
>> >>      at
>>
>> >>org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
>> >>      at
>>
>> >>org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
>> >>      at  javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
>> >>      at
>> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>> >>      at
>>
>> >>org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>> >>
>> >>      at
>>
>> >>org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
>> >>
>> >>      at
>>
>> >>org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
>> >>
>> >>      at
>>
>> >>org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>> >>
>> >>      at
>>
>> >>org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>> >>
>> >>      at
>>
>> >>ficho.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:182)
>> >>
>> >>      at
>>
>> >>org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>> >>
>> >>      at
>> >>org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>> >>      at
>>
>> >>org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>> >>      at
>> >>org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>> >>      at
>> >>org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>> >>      at
>>  org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>> >>      at
>>
>> >>org.mortbay.jetty.handler.ContextHandle

Re: Migrating app to myfaces2/Trinidad2

2010-07-27 Thread Cédric Durmont
ok, I found it : it comes from Tomahawk. Jakob, you were right,
Tomahawk TagHandlers use com.sun.facelets.*
I compiled it from sources and changed the dependency to tomahawk20.
Now simple pages work fine !

But now it's the jstl tags that stopped working ! If I'm right, jstl
tags support was provided by facelets. But is it supported in MyFaces
2 facelets ? Is there something to do to enable it ? If not, is there
a replacement, or a workaround ?
I mainly use jstl tags for : populating tr:selectOneChoice
(c:forEach), declare default values in components ( c:if / c:set ).
There are other use cases in my code, but these 2 are the most
important.

Regards,
Cedric

2010/7/26 Mark Struberg :
> can you please run a
>
> $> mvn dependency:tree
>
> and check if you are picking up some sun JSF impl (maybe through a transitive
> dependency)?
>
> LieGrue,
> strub
>
>
>
> - Original Message 
>> From: Cédric Durmont 
>> To: MyFaces Discussion 
>> Sent: Mon, July 26, 2010 2:32:22 PM
>> Subject: Re: Migrating app to myfaces2/Trinidad2
>>
>> Here it is :
>> (note : ficho.util.SetCharacterEncodingFilter is part of my app.  It
>> does what the name implies !)
>>
>> javax.faces.FacesException:  java.lang.NoClassDefFoundError:
>> com/sun/facelets/tag/TagHandler
>>      at
>>org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
>>
>>      at
>>org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
>>
>>      at
>>org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
>>      at
>>org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
>>      at  javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
>>      at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>      at
>>org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>>
>>      at
>>org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
>>
>>      at
>>org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
>>
>>      at
>>org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>>
>>      at
>>org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>
>>      at
>>ficho.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:182)
>>
>>      at
>>org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>
>>      at
>>org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>>      at
>>org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>      at
>>org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>      at
>>org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>>      at  
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>>      at
>>org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>
>>      at
>>org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>      at
>>org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>      at org.mortbay.jetty.Server.handle(Server.java:324)
>>     at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>      at
>>org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
>>
>>      at  org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>>      at  org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>      at  org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>      at
>>org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>      at
>>org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>> Caused  by: java.lang.NoClassDefFoundError:  com/sun/facelets/tag/TagHandler
>>     at  java.lang.ClassLoader.defineClass1(Native Method)
>>     at  java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>>      at  java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>>     at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>>      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>>      at java.net.URLClassLoader

Re: Migrating app to myfaces2/Trinidad2

2010-07-26 Thread Cédric Durmont
(XMLDocumentFragmentScannerImpl.java:2938)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at 
org.apache.myfaces.view.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:631)
at 
org.apache.myfaces.view.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:662)
at 
org.apache.myfaces.view.facelets.compiler.Compiler.initialize(Compiler.java:93)
at 
org.apache.myfaces.view.facelets.compiler.Compiler.compileViewMetadata(Compiler.java:125)
at 
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory._createViewMetadataFacelet(DefaultFaceletFactory.java:311)
at 
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.getViewMetadataFacelet(DefaultFaceletFactory.java:394)
at 
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.getViewMetadataFacelet(DefaultFaceletFactory.java:376)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage._getViewMetadataFacelet(FaceletViewDeclarationLanguage.java:1898)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.access$000(FaceletViewDeclarationLanguage.java:127)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage$FaceletViewMetadata.createMetadataView(FaceletViewDeclarationLanguage.java:2132)
at 
org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:161)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.sun.facelets.tag.TagHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at 
org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174)
at 
org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67)
at 
org.codehaus.plexus.classworlds.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:39)
at 
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201)
at 
org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:73)
at 
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201)
at 
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
at 
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
... 71 more

2010/7/26 Jakob Korherr :
> Nope, this did not change.
>
> Can you provide the whole stacktrace for the Exception you're getting?
>
> java.lang.NoClassDefFoundError: com/sun/facelets/tag/TagHandler
> Caused by:
> java.lang.ClassNotFoundException - com.sun.facelets.tag.TagHandler
>
> Regards,
> Jakob
>
>
> 2010/7/26 Cédric Durmont 
>
>> Nope, no imports of com.sun.facelets in the code.
>> Does the namespace in *.xhtml files has to change ?
>>
>>
>> Regards,
>> Cedric
>>
>> 2010/7/26 Jakob Korherr :
>> > Hi Cédric,
>> >
>> > Does your app internally use some facelets-1 stuff? These are the classes
>> in
>> > package com.sun.facelets.
>> >
>> > If so, you'll have to change the imports to javax.faces.view.facelets.
>> >
>> > Regards,
>> > Jakob
>> >
>> > 2010/7/26 Cédric Durmont 
>> >
>> >> Hi Jakob,
>> >>
>> >> When I remove facelets from pom.xml and the view handler in web.xml as
>> >> you said, I have this error :
>> >>
>> >> java.lang.NoClassDefFoundError: com/sun/facelets/tag/TagHandler
>> >> Cau

Re: Migrating app to myfaces2/Trinidad2

2010-07-26 Thread Cédric Durmont
Nope, no imports of com.sun.facelets in the code.
Does the namespace in *.xhtml files has to change ?


Regards,
Cedric

2010/7/26 Jakob Korherr :
> Hi Cédric,
>
> Does your app internally use some facelets-1 stuff? These are the classes in
> package com.sun.facelets.
>
> If so, you'll have to change the imports to javax.faces.view.facelets.
>
> Regards,
> Jakob
>
> 2010/7/26 Cédric Durmont 
>
>> Hi Jakob,
>>
>> When I remove facelets from pom.xml and the view handler in web.xml as
>> you said, I have this error :
>>
>> java.lang.NoClassDefFoundError: com/sun/facelets/tag/TagHandler
>> Caused by:
>> java.lang.ClassNotFoundException - com.sun.facelets.tag.TagHandler
>>
>> I have compared my pom.xml to the ones Matthias gave, but found
>> nothing relevant. I disabled Tomahawk 1.1.9 though, as it's not
>> guaranteed to be compatible with MyFaces 2... Still does not work...
>> trinidad-demo does work on my machine, and I tried to get my pom.xml
>> and web.xml as close as possible from the ones found in the component
>> showcase. But trinidad-demo uses jsp, not facelets...
>>
>> Regards,
>> Cedric
>>
>>
>> 2010/7/24 Jakob Korherr :
>> > Hi,
>> >
>> > Actually I don't know what the problem with trinidad is, but from looking
>> at
>> > your pom, you can remove the faceletes-dependency, because facelets are
>> > integrated in MyFaces core 2.0.1.
>> >
>> > So just remove:
>> >
>> > 
>> >       com.sun.facelets
>> >       jsf-facelets
>> >       1.1.15
>> >   
>> >
>> > and also remove the facelets view-handler entry in your faces-config.xml.
>> >
>> > Maybe this will also solve your problem with trinidad.
>> >
>> > Regards,
>> > Jakob
>> >
>> > 2010/7/23 Matthias Wessendorf 
>> >
>> >> do you mind to "compare" yours against our demo's pom ?
>> >>
>> >>
>> >> base file:
>> >>
>> >>
>> https://svn.apache.org/repos/asf/myfaces/trinidad/trunk/trinidad-examples/pom.xml
>> >>
>> >> for the actual problem:
>> >>
>> >>
>> https://svn.apache.org/repos/asf/myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/pom.xml
>> >>
>> >> Thx!
>> >> M
>> >>
>> >> On Fri, Jul 23, 2010 at 4:20 PM, Cédric Durmont 
>> >> wrote:
>> >> > Thanks for looking into it, Matthias !
>> >> > Sadly, it doesn't work with MyFaces 2.0.1.
>> >> > I guess something must be wrong in my pom.xml. Here is its dependency
>> >> > section (I removed non relevant entries) :
>> >> >
>> >> >  
>> >> >  
>> >> >    
>> >> >      org.apache.myfaces.core
>> >> >      myfaces-api
>> >> >      ${myfaces.version}
>> >> >      compile
>> >> >    
>> >> >    
>> >> >      org.apache.myfaces.core
>> >> >      myfaces-impl
>> >> >      ${myfaces.version}
>> >> >      compile
>> >> >    
>> >> >    
>> >> >    
>> >> >      org.apache.myfaces.trinidad
>> >> >      trinidad-api
>> >> >      ${trinidad.version}
>> >> >      compile
>> >> >    
>> >> >    
>> >> >      org.apache.myfaces.trinidad
>> >> >      trinidad-impl
>> >> >      ${trinidad.version}
>> >> >      compile
>> >> >    
>> >> >
>> >> >    
>> >> >        javax.servlet
>> >> >        jstl
>> >> >        1.2
>> >> >        runtime
>> >> >    
>> >> >    
>> >> >        tomcat
>> >> >        servlet-api
>> >> >        5.5.23
>> >> >        provided
>> >> >    
>> >> >    
>> >> >        taglibs
>> >> >        standard
>> >> >        1.1.2
>> >> >    
>> >> >    
>> >> >        org.apache.myfaces.tomahawk
>> >> >        tomahawk
>> >> >        1.1.9
>> >> >    
>> >> >    
>> >> >        com.sun.facelets
>> >> >        jsf-facelets
>> >

Re: Migrating app to myfaces2/Trinidad2

2010-07-26 Thread Cédric Durmont
Hi Jakob,

When I remove facelets from pom.xml and the view handler in web.xml as
you said, I have this error :

java.lang.NoClassDefFoundError: com/sun/facelets/tag/TagHandler
Caused by:
java.lang.ClassNotFoundException - com.sun.facelets.tag.TagHandler

I have compared my pom.xml to the ones Matthias gave, but found
nothing relevant. I disabled Tomahawk 1.1.9 though, as it's not
guaranteed to be compatible with MyFaces 2... Still does not work...
trinidad-demo does work on my machine, and I tried to get my pom.xml
and web.xml as close as possible from the ones found in the component
showcase. But trinidad-demo uses jsp, not facelets...

Regards,
Cedric


2010/7/24 Jakob Korherr :
> Hi,
>
> Actually I don't know what the problem with trinidad is, but from looking at
> your pom, you can remove the faceletes-dependency, because facelets are
> integrated in MyFaces core 2.0.1.
>
> So just remove:
>
> 
>       com.sun.facelets
>       jsf-facelets
>       1.1.15
>   
>
> and also remove the facelets view-handler entry in your faces-config.xml.
>
> Maybe this will also solve your problem with trinidad.
>
> Regards,
> Jakob
>
> 2010/7/23 Matthias Wessendorf 
>
>> do you mind to "compare" yours against our demo's pom ?
>>
>>
>> base file:
>>
>> https://svn.apache.org/repos/asf/myfaces/trinidad/trunk/trinidad-examples/pom.xml
>>
>> for the actual problem:
>>
>> https://svn.apache.org/repos/asf/myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/pom.xml
>>
>> Thx!
>> M
>>
>> On Fri, Jul 23, 2010 at 4:20 PM, Cédric Durmont 
>> wrote:
>> > Thanks for looking into it, Matthias !
>> > Sadly, it doesn't work with MyFaces 2.0.1.
>> > I guess something must be wrong in my pom.xml. Here is its dependency
>> > section (I removed non relevant entries) :
>> >
>> >  
>> >  
>> >    
>> >      org.apache.myfaces.core
>> >      myfaces-api
>> >      ${myfaces.version}
>> >      compile
>> >    
>> >    
>> >      org.apache.myfaces.core
>> >      myfaces-impl
>> >      ${myfaces.version}
>> >      compile
>> >    
>> >    
>> >    
>> >      org.apache.myfaces.trinidad
>> >      trinidad-api
>> >      ${trinidad.version}
>> >      compile
>> >    
>> >    
>> >      org.apache.myfaces.trinidad
>> >      trinidad-impl
>> >      ${trinidad.version}
>> >      compile
>> >    
>> >
>> >    
>> >        javax.servlet
>> >        jstl
>> >        1.2
>> >        runtime
>> >    
>> >    
>> >        tomcat
>> >        servlet-api
>> >        5.5.23
>> >        provided
>> >    
>> >    
>> >        taglibs
>> >        standard
>> >        1.1.2
>> >    
>> >    
>> >        org.apache.myfaces.tomahawk
>> >        tomahawk
>> >        1.1.9
>> >    
>> >    
>> >        com.sun.facelets
>> >        jsf-facelets
>> >        1.1.15
>> >    
>> >    
>> >        com.oracle
>> >        ojdbc12
>> >        9.0
>> >    
>> >    
>> >        rome
>> >        rome
>> >        0.9
>> >    
>> >    
>> >        javax.el
>> >        el-api
>> >        1.0
>> >        provided
>> >    
>> >    
>> >        org.eclipse.persistence
>> >        eclipselink
>> >        2.0.1
>> >        compile
>> >    
>> >    
>> >        org.eclipse.persistence
>> >        javax.persistence
>> >        2.0.0
>> >        compile
>> >    
>> >  
>> >
>> >  
>> >    2.0.0.3-SNAPSHOT
>> >    2.0.1
>> >  
>> >
>> > 2010/7/23 Matthias Wessendorf :
>> >> Hi Cédric,
>> >>
>> >> I just checked and our demo works fine with MyFaces 2.0.1
>> >>
>> >> cd $TINIDAD_HOME/trinidad-examples/trinidad-demo
>> >> mvn clean jetty:run -PjettyConfig
>> >>
>> >> -Matthias
>> >>
>> >> But yeah, a small migration document would be great :)
>> >>
>> >>
>> >>
>> >> On Fri, Jul 23, 2010 at 3:19 PM, Matthias Wessendorf 
>> wrote:
>> >>> Hey Cédric,
>>

Re: Migrating app to myfaces2/Trinidad2

2010-07-23 Thread Cédric Durmont
Thanks for looking into it, Matthias !
Sadly, it doesn't work with MyFaces 2.0.1.
I guess something must be wrong in my pom.xml. Here is its dependency
section (I removed non relevant entries) :

  
  

  org.apache.myfaces.core
  myfaces-api
  ${myfaces.version}
  compile


  org.apache.myfaces.core
  myfaces-impl
  ${myfaces.version}
  compile



  org.apache.myfaces.trinidad
  trinidad-api
  ${trinidad.version}
  compile


  org.apache.myfaces.trinidad
  trinidad-impl
  ${trinidad.version}
  compile



javax.servlet
jstl
1.2
runtime


tomcat
servlet-api
5.5.23
provided


taglibs
standard
1.1.2


org.apache.myfaces.tomahawk
tomahawk
1.1.9


com.sun.facelets
jsf-facelets
1.1.15


com.oracle
ojdbc12
9.0


rome
rome
0.9


javax.el
el-api
1.0
provided


org.eclipse.persistence
eclipselink
2.0.1
compile


org.eclipse.persistence
javax.persistence
2.0.0
compile

  

  
2.0.0.3-SNAPSHOT
2.0.1
  

2010/7/23 Matthias Wessendorf :
> Hi Cédric,
>
> I just checked and our demo works fine with MyFaces 2.0.1
>
> cd $TINIDAD_HOME/trinidad-examples/trinidad-demo
> mvn clean jetty:run -PjettyConfig
>
> -Matthias
>
> But yeah, a small migration document would be great :)
>
>
>
> On Fri, Jul 23, 2010 at 3:19 PM, Matthias Wessendorf  
> wrote:
>> Hey Cédric,
>>
>> thanks for trying Trinidad2 and MyFaces2.
>>
>> Let me double check on my side.
>>
>> BTW. I hope to get to a 2.0.0-beta release, of Trinidad, next week
>>
>> -Matthias
>>
>> On Fri, Jul 23, 2010 at 3:15 PM, Cédric Durmont  wrote:
>>> Hello,
>>>
>>> I'm trying to switch my app from myfaces 1.2.8 / Trinidad 1.2.13 to
>>> myfaces 2.0.0 / Trinidad 2.0.0.3-SNAPSHOT. I was already using
>>> facelets (1.1.15)
>>> I haven't found any relevant documentation on that subject online, so
>>> I basically changed version numbers in my pom.xml
>>>
>>> Switching from myfaces 1.2.8 to myfaces 2.0.0 seems to work well (my
>>> app still runs fine)
>>> But if I try to switch to trinidad 2 (alpha, alpha2 or snapshot), I
>>> have this message for every actionListener in my code :
>>>
>>> javax.el.ELException: /somePage.xhtml: The class 'com.acme.someBean'
>>> does not have the property 'doSomething'
>>>
>>> Of course, the property exists (the application runs fine with
>>> Trinidad 1.2.x). Did I miss something ? Parameters in web.xml /
>>> faces-config.xml ? version of facelets / el-api ?
>>>
>>> Any hint is welcome, I'm stuck !
>>>
>>> Regards,
>>> Cedric Durmont
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>


Migrating app to myfaces2/Trinidad2

2010-07-23 Thread Cédric Durmont
Hello,

I'm trying to switch my app from myfaces 1.2.8 / Trinidad 1.2.13 to
myfaces 2.0.0 / Trinidad 2.0.0.3-SNAPSHOT. I was already using
facelets (1.1.15)
I haven't found any relevant documentation on that subject online, so
I basically changed version numbers in my pom.xml

Switching from myfaces 1.2.8 to myfaces 2.0.0 seems to work well (my
app still runs fine)
But if I try to switch to trinidad 2 (alpha, alpha2 or snapshot), I
have this message for every actionListener in my code :

javax.el.ELException: /somePage.xhtml: The class 'com.acme.someBean'
does not have the property 'doSomething'

Of course, the property exists (the application runs fine with
Trinidad 1.2.x). Did I miss something ? Parameters in web.xml /
faces-config.xml ? version of facelets / el-api ?

Any hint is welcome, I'm stuck !

Regards,
Cedric Durmont


Re: Combining tags with standard HTML elements such as and for example

2010-07-05 Thread Cédric Durmont
Mixing jsf tags and regular html has not always been possible (jsf 1.1
maybe ?). Nowadays you can happily mix jsf and xhtml tags.

Regards,
Cedric Durmont

2010/7/5 Dmitry Barsukov 
>
> Hi All,
>
> Here is the question for Trinidad experts.
> We are extensively using  and  tags in our Trinidad based
> application (*.xhtml pages) combining them with the rest of Trinidad
> features.
> The question I have is... there is a feeling that this is not quite the way
> Trinidad expects to have the content fed into the Trinidad renderer.
>
> My concern is based on the fact that the examples provided with Trinidad do
> not include any standard HTML tags...
>
> It seems that by feeding Trinidad with something it does not expect we are
> sort of a "breaking it".
>
> However JSF spec does not stop developers from using standard HTML tags in
> JSF pages.
>
> So, the feeling is kinda mixed... so far I have not found any single black
> and white "NO, do not use HTML tags".
> At the same time the question "why the use case with standard HTML tags is
> not provided in Trinidad examples" still remains.
>
> Could anyone help me to clarify the picture?
>
> ---
> Sincerely yours
> Dmitry Barsukov


Re: update values on checkbox click

2010-06-29 Thread Cédric Durmont
Hi Martin,

This seems to be the normal JSF behavior. Let me explain :
- first,  your boolean ra.kmt is false, inputText is present and
inputTextArea is not.
- after a click on your checkbox, ra.kmt is changed and becomes true.
So in the component tree, the inputText component is NOT present
(rendered=false). That's why it doesn't get the new value. I think it
might work if the checkbox was after the inputText, but I wouldn't
recommend you to expect this to always work in all cases.

However, the inputText should get a ValueChangeEvent, so if you add a
valueChangeListener, you should get the new value. You may want to
copy it yourself in ra.debitnote.

If it's possible for your project, another solution would be to work
with a jsf library such as Apache Trinidad. In Trinidad you have a
tr:inputText component that does inputText AND inputTextarea,
all-in-one, depending on the number of rows you set. Thus it would be
the very same component whether the checkbox is checked or not.

Your code with Trinidad would look like :




Hope this helps,
Regards,
Cedric Durmont


2010/6/28 Martin Monshausen :
> Hi community,
> would you mind taking a short look to the following problem, please?
>
> Depending on the value of a checkbox I want to show either an 
> inputText-element or an inputTextarea-element - as shown below. The default 
> is, that the checkbox is disabled and therefore the inputText will be shown. 
> If the user enters some text to the textbox, I want to transfer it to the 
> inputTextArea.
> If I trigger some actions located on the page after text was entered and 
> before checkbox is clicked (communication with server took place) everything 
> is working fine.
> If I click the checkbox right after entering the text only the changed value 
> of the checkbox is considered as changed (setter-method for DebitNote will 
> not be called) and nothing is transferred (assuming nothing was enter to the 
> inputText before).
> What's wrong? Did I missed something? Is there any other solution you would 
> suggest?
>
> //checkbox clicking on button in order to transfer state to server
>  onclick="document.getElementById('updateButton').click();" />
>
> //shown on startup; value should be transferred
>  maxlength="50" tabindex="1"  />
>
> //shown if checkbox is checked; value of inputText should be displayed
>  cols="42" tabindex="1" />
>
> //just repaint site (only transfer state to server)
>  id="updateButton" />
>
> Thanks alot,
>
> Martin
>


Re: Trinidad table rows need be displayed in expanded mode by default?

2010-06-03 Thread Cédric Durmont
I have 2 suggestions :
- replace tr:table with tr:treeTable, and use initiallyExpanded="true"
(feasible, but there's work to do to have something that resembles
what you want)
- examine the source code behind the "expand all" button of your
table. Add equivalent javascript code just after the tr:table markup.
Don't use partialTriggers on the table, but instead put the table and
the javascript inside a panel, then use partialTriggers on that panel.

Hope this helps,
Regards,
Cedric Durmont

2010/6/2 boreddy.ravi :
>
> Hi All,
>
>            I have a Trinidad JSF table which will be displayed with some
> rows.I have the following requirement.
>
>
> First time when the jsf page is displayed, all rows should be displayed in
> expanded manner.I have written the following code.
>
>  binding="#{MemberSearchResults.memberSearchResultsTable}"
>
> inlineStyle="background-color:white;" var="results"
> verticalGridVisible="false"
>
> value="#{MemberSearchResults.memberSearchResults}" rows="25"
> horizontalGridVisible="false"
>
> rowBandingInterval="1">
>
> 
>
> something here
>
> 
>
>
> 
>
> something here
>
> 
>
>
>
> 
>
> something here
>
> 
>
>
> 
>
>
> Can you please suggest something here?
>
> --
> View this message in context: 
> http://old.nabble.com/Trinidad-table-rows-need-be-displayed-in-expanded-mode-by-default--tp28755844p28755844.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: Trinidad dialog navigation issue - Help appreciated

2010-05-26 Thread Cédric Durmont
I don't think that dialog: links are supposed to work outside trinidad
tags (tr:commandLink and tr:commandButton)
Use tr: tags every time you open dialogs (at least you want to have
the useWindow attribute, which is trinidad-only)

Regards,
Cedric

2010/5/25 Venkat Ramanan Viswanathan :
> HI All
>
> I did finally manage to checkout the latest code base from trinidad trunk.
> However the dialog framework seems to be broken.  h:link and h:button
> navigations work fine. However any dialog: page does not open the dialogs at
> all . can some one help me out with a solution / work around for this. I
> would really appreciate any help on this.
>
> Thanks
> Venkat
>
>
> -- Forwarded message --
> From: Venkat Ramanan Viswanathan 
> Date: Tue, May 25, 2010 at 8:21 AM
> Subject: Query on latest trinidad code base
> To: MyFaces Discussion 
>
>
> Hi
>
> I am currently using Trinidad 2.0.0 alpha 2. In that the navigation handler
> is broken , as the trinidad navigation handler does not extend the new
> Navigation Handler class which is part of JSF 2.0. As a result h:link and
> h:button are not working.  I want to try by checking out the latest code
> from svn. Also can some one tell me if this issue has been fixed.
>
> Can some one tell me whether i should check out trunk and do a build or
> check out one of the branches for 2.0.0 build ?
>
> can i do  svn co  http://svn.apache.org/viewvc/myfaces/trinidad/trunk/ ?
>
> Thanks for all the  help
> Venkat
>


Re: [Trinidad] Changing content of form

2010-05-12 Thread Cédric Durmont
Maybe it's a bit dirty, and maybe it won't work at all (I'm still
quite new to the jsf/trinidad world), but you can try to remove all
messages in the valuechangelistener.
FacesContext.getCurrentInstance().getMessages() will give you an
iterator on the message queue.

Regards,
Cedric

2010/5/12 Jozef Dropco :
> Thanks Cedric,
> that made the trick but I got some warnings about FacesMessage, so is it
> possible to make it without them?
>
> INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been
> displayed.
> sourceId=j_id29[severity=(ERROR 2), summary=(A value is required.),
> detail=(You must enter a value.)]
> sourceId=j_id30[severity=(ERROR 2), summary=(A value is required.),
> detail=(You must enter a value.)]
>
>
> Jozef
>
> On 12.5.2010 14:03, Cédric Durmont wrote:
>>
>> I won't say it's the ideal way, but my trick is to use a
>> valueChangeListener on the tr:selectBooleanCheckbox, with
>> immediate="true". When the ValueChangeListener is triggered, I update
>> the list used by the tr:selectOneChoice, and the partialTrigger does
>> the rest.
>>
>> Hope this helps.
>> Regards,
>> Cedric Durmont
>>
>> 2010/5/12 Jozef Dropco:
>>
>>>
>>> I have following form, and I need when I toggle checkbox change values of
>>> selectOneChoice. But inputText is first-time blank and selectOneChoice is
>>> first-time null, so when I toggle checkbox javascript validation stops
>>> rerendering, is  it possible to change the value without validation. I
>>> tried
>>> immediate="true" but no success :-(.
>>>
>>> Any ideas?
>>> Thanks Jozef
>>>
>>> 
>>> >> value="#{pensionBean.pension.price.price}">
>>> 
>>> 
>>> 
>>> >> label="#{msg.useSystemCurrencies}"
>>> value="#{pensionBean.pension.price.discriminator}"/>
>>>
>>> >> partialTriggers="pensionCurrencyChanger"
>>> value="#{pensionBean.pension.price.currentCurrency}">
>>> 
>>> 
>>> 
>>>
>>>
>>
>>
>
>


Re: [Trinidad] Changing content of form

2010-05-12 Thread Cédric Durmont
I won't say it's the ideal way, but my trick is to use a
valueChangeListener on the tr:selectBooleanCheckbox, with
immediate="true". When the ValueChangeListener is triggered, I update
the list used by the tr:selectOneChoice, and the partialTrigger does
the rest.

Hope this helps.
Regards,
Cedric Durmont

2010/5/12 Jozef Dropco :
> I have following form, and I need when I toggle checkbox change values of
> selectOneChoice. But inputText is first-time blank and selectOneChoice is
> first-time null, so when I toggle checkbox javascript validation stops
> rerendering, is  it possible to change the value without validation. I tried
> immediate="true" but no success :-(.
>
> Any ideas?
> Thanks Jozef
>
> 
>  value="#{pensionBean.pension.price.price}">
> 
> 
> 
>  label="#{msg.useSystemCurrencies}"
> value="#{pensionBean.pension.price.discriminator}"/>
>
>  partialTriggers="pensionCurrencyChanger"
> value="#{pensionBean.pension.price.currentCurrency}">
> 
> 
> 
>


Re: [Trinidad] PPR issue with Firefox when returning from Dialog

2010-04-19 Thread Cédric Durmont
I have no idea why it worked with Chrome. I think somehow it triggered
a full page reload, but how ?
Anyway, as long as it's working, it's not a big issue, is it ?

Regards,
Cedric

2010/4/19 schneidc :
>
> Hi Cedric,
>
> one of your tips actually helped. The button had no returnListener, but
> after attaching one, now the refresh works. Thanks! (but I'm still wondering
> why it worked in Chrome and not in the Firefox...)
>
> Cheers
> Simon
> --
> View this message in context: 
> http://old.nabble.com/-Trinidad--PPR-issue-with-Firefox-when-returning-from-Dialog-tp28242150p28287646.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: [Trinidad] PPR issue with Firefox when returning from Dialog

2010-04-16 Thread Cédric Durmont
I don't think I have issues with Firefox and dialogs in my apps.
- Do you have an id on the button that starts the dialog, and a
"partialTrigger" attribute on the component you want to refresh ?
- Do that button have a returnListener ? I think the button doesn't
get refreshed on dialog close if no returnListener is set (and so
partialTriggers are not triggered)
- Do you have an error in the console about a partial trigger not found ?
- Do you have "rendered" attributes which should be updated on dialog close ?

Hope this helps.
Regards,
Cedric

2010/4/14 schneidc :
>
> Hi,
>
> what I tried to achieve is, that when when closing a Trinidad dialog certain
> areas of the origin page get refreshed. For testing my pages I use Firefox
> and Chrome and in Chrome the PPR is working, in Firefox it isn't.
> Even when removing the partialSubmit from the button which triggers the
> dialog, so there isn't any more ajax and the page get's a full reload, the
> changes aren't visible and I still have to make a manual reload.
>
> Has anybody else encountered a problem with dialogs in Firefox and a hint on
> how to solve this issue?
>
> Simon
>
> P.S. Tested with Trinidad 1.2.12/13
> --
> View this message in context: 
> http://old.nabble.com/-Trinidad--PPR-issue-with-Firefox-when-returning-from-Dialog-tp28242150p28242150.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: [Trinidad] Ecliipse+maven+trinidad build

2010-02-22 Thread Cédric Durmont
Hi Arnold,

You could start by making a sample Trinidad project (or use trinidad
demo), and add trinidad sources as dependency with m2eclipse. It
should enable Eclipse to trace through Trinidad's code.

Regards,
Cedric Durmont

2010/2/21 apreg :
>
> I found tutorials about, how to build maven projects under Eclipse then debug
> them with jetty or even tomcat. Now I'd like to get some instructions or
> ideas how should I trace the underlaying trinidad components' work.
>
> apreg wrote:
>>
>> Hi,
>>
>> First I'd like to build the trinidad sources within Eclipse (of course
>> with the help of some plugins e.g. m2eclipse), then I'd like to
>> debugging it in a step-by-step mode. Could someone give me a convenient
>> step-by-step guide on how to accomplish this?
>> I use Eclipse 3.5.1, jdk 1.6.0_18 x64 and the latest m2eclipse plugin
>> but if you know a better one let me know.
>>
>> Regards,
>> Arnold Preg
>>
>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/-Trinidad--Ecliipse%2Bmaven%2Btrinidad-build-tp27640956p27676874.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: [Trinidad] forced UTF-8 in PPR responses?

2010-02-12 Thread Cédric Durmont
Thanks for the tip, Rafa, now it works like a charm :o)
Could not find how to get an ExternalContext from inside a filter,
however. So my test is :
if ("true".equals(((HttpServletRequest)(request)).getHeader("Tr-XHR-Message")) )

... because it's basically what isAjaxRequest and ExternalContext actually do.

Thanks everyone for your help :o)
Regards,
Cedric Durmont


2010/2/12 Mike Quentel (4DM) :
> I recommend trying to set the encoding in the web container's configuration 
> (eg: server.xml).
>
>
> Mike Quentel
> Senior Geospatial Software Developer
> 4DM Inc.
> 671 Danforth Avenue Suite 305
> Toronto, Ontario
> M4J 1L3
> Ph/Fax 416 - 410-7569
> www.4dm-inc.com
> Providing solutions through mapping technology
>
> -Original Message-
> From: Cédric Durmont 
> Date: Fri, 12 Feb 2010 12:38:39
> To: MyFaces Discussion
> Subject: Re: [Trinidad] forced UTF-8 in PPR responses?
>
> Thanks for the answer. So Trinidad is fine, which is good news, but I
> have to find another explanation as why it fails on my app. If I'm not
> mistaking, the browser should make the conversion on-the-fly before
> putting the new content into the page. But it does dot, and I have  ©
> characters, meaning that those are utf8 chars interpreted as
> windows-1252.
>
> About the reason that I am using win1252 instead of utf-8 : I'd be
> glad to hear that it's not totally "unavoidable".
> We're developping a new application that will come as a complement of
> our older ones. One prerequisite is to re-use some database tables
> (say, customers, cities/countries, and the likes). The database used
> is... Oracle 10 XE (yeah, I know, don't get me started), which has no
> i18n support, and only knows windows-1252.
>
> I'm not the Master of Charset Encoding, especially when it comes to
> databases, but I was told that in this special case, I cannot instruct
> the Oracle server that I'm a utf8-speaking client, so I have to use
> the default, which is windows-1252.
>
> I'd take ANY solution to this problem, as far as it doesn't break the
> compatibility with the other apps using the same database. If there's
> a way to have xmhHttpRequest responses correctly displayed as
> windows1252, then I'm fine. If I can instead keep utf8 and still use
> the existing databases as-is, it'll make my day :o)
>
> Again, thanks for answering me
> Regards,
> Cedric Durmont
>
> 2010/2/11 Andrew Robinson :
>> According to the W3C specification, XML http responses should always
>> use UTF-8 encoding (requests too actually)
>> http://www.w3.org/TR/XMLHttpRequest/
>>
>> "Authors are strongly encouraged to encode their resources using UTF-8"
>>
>> http://erik.eae.net/archives/2005/05/27/18.55.22/:
>> "UTF-8 is the standard encoding for XML files, so it MSXML probably
>> assumes that all files have that encoding if none is set."
>>
>> http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/
>> "responseText of type DOMString
>> If the readyState attribute has a value other than 3 (Receiving) or 4
>> (Loaded), it must be the empty string. Otherwise, it must be the the
>> body of the data received so far, interpreted using the character
>> encoding specified in the response, or UTF-8 if no character encoding
>> was specified. Invalid bytes must be converted to U+FFFD REPLACEMENT
>> CHARACTER."
>> "If the method is POST or PUT, then the data passed to the send()
>> method must be used for the entity body. If data is a string, the data
>> must be encoded as UTF-8 for transmission. If the data is a Document,
>> then the document must be serialised using the encoding given by
>> data.xmlEncoding, if specified, or UTF-8 otherwise [DOM3]. If data is
>> not a Document or a DOMString the host language must use the
>> stringification mechanisms on the argument that was passed."
>>
>> Basically from what I have seen in the google results, UTF-8 is the
>> XML standard and browsers are expecting AJAX to use UTF-8 for both
>> request and responses. It appears that Trinidad is honoring these
>> guidelines by forcing UTF-8 for XML responses (and other responses,
>> like file-download)
>>
>> My question is why you are using windows-1252 encoding? What is the
>> "unavoidable reason"?
>>
>> -Andrew
>>
>>
>> On Thu, Feb 11, 2010 at 6:07 AM, Cédric Durmont  wrote:
>>> Hi there,
>>>
>>> I was wondering : what's the reason why XmlHttpServletResponse forces
>>> the response to UTF-8, explicitly ignoring the page's 

Re: [Trinidad] forced UTF-8 in PPR responses?

2010-02-12 Thread Cédric Durmont
Thanks for the answer. So Trinidad is fine, which is good news, but I
have to find another explanation as why it fails on my app. If I'm not
mistaking, the browser should make the conversion on-the-fly before
putting the new content into the page. But it does dot, and I have  ©
characters, meaning that those are utf8 chars interpreted as
windows-1252.

About the reason that I am using win1252 instead of utf-8 : I'd be
glad to hear that it's not totally "unavoidable".
We're developping a new application that will come as a complement of
our older ones. One prerequisite is to re-use some database tables
(say, customers, cities/countries, and the likes). The database used
is... Oracle 10 XE (yeah, I know, don't get me started), which has no
i18n support, and only knows windows-1252.

I'm not the Master of Charset Encoding, especially when it comes to
databases, but I was told that in this special case, I cannot instruct
the Oracle server that I'm a utf8-speaking client, so I have to use
the default, which is windows-1252.

I'd take ANY solution to this problem, as far as it doesn't break the
compatibility with the other apps using the same database. If there's
a way to have xmhHttpRequest responses correctly displayed as
windows1252, then I'm fine. If I can instead keep utf8 and still use
the existing databases as-is, it'll make my day :o)

Again, thanks for answering me
Regards,
Cedric Durmont

2010/2/11 Andrew Robinson :
> According to the W3C specification, XML http responses should always
> use UTF-8 encoding (requests too actually)
> http://www.w3.org/TR/XMLHttpRequest/
>
> "Authors are strongly encouraged to encode their resources using UTF-8"
>
> http://erik.eae.net/archives/2005/05/27/18.55.22/:
> "UTF-8 is the standard encoding for XML files, so it MSXML probably
> assumes that all files have that encoding if none is set."
>
> http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/
> "responseText of type DOMString
> If the readyState attribute has a value other than 3 (Receiving) or 4
> (Loaded), it must be the empty string. Otherwise, it must be the the
> body of the data received so far, interpreted using the character
> encoding specified in the response, or UTF-8 if no character encoding
> was specified. Invalid bytes must be converted to U+FFFD REPLACEMENT
> CHARACTER."
> "If the method is POST or PUT, then the data passed to the send()
> method must be used for the entity body. If data is a string, the data
> must be encoded as UTF-8 for transmission. If the data is a Document,
> then the document must be serialised using the encoding given by
> data.xmlEncoding, if specified, or UTF-8 otherwise [DOM3]. If data is
> not a Document or a DOMString the host language must use the
> stringification mechanisms on the argument that was passed."
>
> Basically from what I have seen in the google results, UTF-8 is the
> XML standard and browsers are expecting AJAX to use UTF-8 for both
> request and responses. It appears that Trinidad is honoring these
> guidelines by forcing UTF-8 for XML responses (and other responses,
> like file-download)
>
> My question is why you are using windows-1252 encoding? What is the
> "unavoidable reason"?
>
> -Andrew
>
>
> On Thu, Feb 11, 2010 at 6:07 AM, Cédric Durmont  wrote:
>> Hi there,
>>
>> I was wondering : what's the reason why XmlHttpServletResponse forces
>> the response to UTF-8, explicitly ignoring the page's encoding ?
>> I had a project in utf-8 that ran just fine (even with all accents and
>> fancy stuff we have here in France), but I have to switch it to
>> windows-1252 for some unavoidable reason. Everything has been
>> converted to windows-1252, including the filter I use to force
>> encoding in http requests. The only non-working things are PPR calls.
>>
>> I tracked modifications of http Response objects down to
>> XmlHttpServletResponse :
>>
>> ..
>>   _contentType = "text/xml;charset=utf-8";
>> ..
>>
>> So, did I miss something, or PPR actually only works for iso8859-1 /
>> utf-8 apps ?
>>
>>
>> Regards,
>> Cedric Durmont
>>
>


[Trinidad] forced UTF-8 in PPR responses?

2010-02-11 Thread Cédric Durmont
Hi there,

I was wondering : what's the reason why XmlHttpServletResponse forces
the response to UTF-8, explicitly ignoring the page's encoding ?
I had a project in utf-8 that ran just fine (even with all accents and
fancy stuff we have here in France), but I have to switch it to
windows-1252 for some unavoidable reason. Everything has been
converted to windows-1252, including the filter I use to force
encoding in http requests. The only non-working things are PPR calls.

I tracked modifications of http Response objects down to
XmlHttpServletResponse :

..
   _contentType = "text/xml;charset=utf-8";
..

So, did I miss something, or PPR actually only works for iso8859-1 /
utf-8 apps ?


Regards,
Cedric Durmont


[Trinidad] forced UTF-8 in PPR responses?

2010-02-11 Thread Cédric Durmont
Hi there,

I was wondering : what's the reason why XmlHttpServletResponse forces
the response to UTF-8, explicitly ignoring the page's encoding ?
I had a project in utf-8 that ran just fine (even with all accents and
fancy stuff we have here in France), but I have to switch it to
windows-1252 for some unavoidable reason. Everything has been
converted to windows-1252, including the filter I use to force
encoding in http requests. The only non-working things are PPR calls.

I tracked modifications of http Response objects down to
XmlHttpServletResponse :

...
_contentType = "text/xml;charset=utf-8";
...

So, did I miss something, or PPR actually only works for iso8859-1 /
utf-8 apps ?


Regards,
Cedric Durmont


Re: [TRINIDAD] Javascript sendPartialFormPost - how to read param in bean

2009-10-07 Thread Cédric Durmont
I don't know the answer either (and I'd be glad to know it, btw), but
what I do is that my javascript code updates form fields (hidden if
necessary) with values I want to send back :

in jspx :
...
function myfunc()
{
  document.getElementById("param1").value=someValue;
  TrPage.getInstance().sendPartialFormPost(myForm,
 {source: "myButton"},
 {});
}

...



in bean :
public String doSomething()
{
  String s=getParam1();
  ...
}

Note that :
-you can hide the button as well (with inlineStyle)
-everything will work as is you clicked the button. So you can use
partialTriggers, partialSubmit, etc. referencing the button, je
javascript code will do the same.
-I think the Trinidad documentation should have a similar example. I
spent hours figuring out that "source" thing !

Regards,
Cedric


2009/10/7 Elmar Kretzer :
> Hi everyone,
>
> when i am triggering a partial submit via javascript and add e.g. param1 to
> the call,
>
> how can i read the value of the param in the bean from the FacesContext ?
>
> Javascript Code:
>
> TrPage.getInstance().sendPartialFormPost(
>  theForm,
>  {param1: "value1", param2: "value2"});
>
> any clues?
>
> Thanks in advance
>
> Elmar


Re: Customize rendered code of (Trinidad) JSF components

2009-10-05 Thread Cédric Durmont
Hi Thomas,

inputText has an optional attribute to remove these :



It should be enough for what you need.

Regards,
Cedric

2009/10/5 Thomas Hamacher :
> Hi @all,
>
> I´m pretty new to JSF and like to ask a question concerning customizing
> the Trinidad components.
> The Trinidad input-components have some functionalities, that I need,
> because they are not available in the core JSF-libraries.
> But I´m not totally pleased with what Trinidad renders as html source
> code. For example, when I define a tr:inputText, a complete table is built
> around the input box, instead of using the - combination.
> Furthermore the * appears, whenever the field is required, which does not
> fit in my layout. So what I would like to do now is to redefine the html
> source code that will be rendered by those components. Is there a way to do
> this? I would I approach this issue? Or do I have to completely built my
> own components?
>
> So mabye some more experience JSF-developers have some advice here.
>
> Thanks for help
>
> Thomas
>