f:verbatim and myfaces 1.2.0

2007-07-20 Thread Safurudin Mahic

I'm currently trying out myfaces 1.2.0.
I noticed a small change in behaviour for the f:verbatim tag.

Before (with myfaces 1.1.6) I was able to do the following: (note I'm 
using facelets)


f:verbatim
   #{facesContext.externalContext.requestContextPath}
/f:verbatim

It would nicely output the contextpath.
However, If I try to do the same with 1.2.0 it doesn't output anything.

Is there a spec change for jsf 1.2 saying el expressions are not allowed 
within f:verbatim?




regards,
Safurudin Mahic


Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Werner Punz

Ok I talked with Matthias regarding all ths
first of all there seems to be an issue with tomcat 6 regarding
JSTL compatibility Tomahawk seems to have hooks into it.

Matthias told me that Jetty works, Tomcat doesnt (seems to be Tomcats 
fault or jaspers in Tomcat 6.0.13)


The problem goes away as soon as you use facelets, since facelets does 
not require JSP. (Hence my application works)


With Facelets also the usage of Tomcat 6 is possible.



Werner







Werner Punz schrieb:

Ok sorry for this, as it seems
there is an issue in the examples
with Tomcat 6 and the jstl needed by the
sandbox examples, my app was not affected
since it does not use the jstl (and facelets work fine)
can anyone confirm this, not sure why the jstl is in the tomahawk
examples at all.

If anyone of the myfaces 1.2 authors could jump in here I would be 
grateful ;-)


The funny thing is in my facelets/spring configuration I am not affected
not sure where the problem is, but it must be a mixture of jstl 
dependencies which and tomcat 6 :-)



Werner Punz schrieb:

Wolf Benz schrieb:

Hi List

It's very cool MyFaces 1.2 finally got out of the door but...

It's again a true pain setting MyFaces up correctly before it 
works... (more than it should).
I remember it took me an entire week before I had MyFaces 1.x 
configured correctly with the Extension Filter etc. What a waste of 
time :-(
In the mean time, other sites have helped out and put a proper 
Tutorial or a complete blank app online but this major new release 
demands renewed examples and ... is a chance for e renewed approach.


Yet, with MyFaces 1.2.0 out, I see the old the same mistakes are made 
again:


- no examples
- no info on the web.xml (like: should it specify servlet container v 
2.5 now?)
- no info on the faces-config.xml (like: should it specify 
http://java.sun.com/dtd/web-facesconfig_1_1.dtd or v.1.2?)

- no info on what jars are exactly required
- no compatibility matrix (like: works with Tomcat6? Can you use 
Tomahawk (e.g. of version 1.6) together with MyFaces1.2?

...



Hi Wolf, first of all sorry for the lack of examples and documentation 
for now anyway.


I just moved a project testwise up to the current myfaces and sort of 
was pleasantly surprised how good it went, so some help here from my 
side:


First of all MyFaces 1.2 needs the latest JEE5 implementations of the 
servlet jsp/servlet api and at least java 5 (sorry but that is a 
limitation introduced by JSF 1.2 itself)


So what you have to do, the configuration basically stayed the same 
from what I could tell, I didnt have to alter my old web.xml


You just have to make sure you run on a container which provides the 
latest standard (it was tomcat 6 in my case)


then I removed all jars wich referenced jsp apis, el apis and jasper, 
or serlvet apis, I moved the myfaces libs up to the latest versions as 
well as their dependencies (which come in in the pack)


the last problem and this is a bug in Tomahawk, which I am filing at 
the moment, is a dependency into commons-el, you have to readd the jar 
if you use the sandbox and tomahawk unfortunately, I dont know if this 
can cause sideffects, but so far I couldnt notice one (but I am on 
facelets anyway)


Once this is done it should run.


I get the impression the jars are just dumped online and the makers 
have a great time looking at how users have a terrible time figuring 
it all out themselves...




Actually no it definitely is not like that, we are no sadists, it is 
more along the lines, that the implementation is way overdue timewise 
and it had to get out asap, so that the server programmers can start 
using it. Expect the situation to improve soon.

(Btw. thanks to all the guys who finally got the release out)

As I cannot image no one on this list has such example, could someone 
take the effort of posting the jar online to help all the rest of us 
out?
My setup is: Tomcat6, MyFaces 1.2, Tomahawk(if possible in 
combination with MF1.2.0 - also this info is not online)

I guess this setup would currently the most common one.
I spent the last 2 days (starting from my old MF 1.1.5/Toma1.1.5 app 
on Tomcat 5) trying to migrate it to that setup but to no avail.



Actually if you want contact me either via mail, or via
google talk (same address as posted here) or  via icq 46949386 I am 
yet a mere user of MyFaces 1.2 myself but I might be able to help you 
out to get it running.


Cheers

Werner









Re: f:verbatim and myfaces 1.2.0

2007-07-20 Thread Matthias Wessendorf

f:verbatim


f:verbatim ?


#{facesContext.externalContext.requestContextPath}
/f:verbatim

It would nicely output the contextpath.
However, If I try to do the same with 1.2.0 it doesn't output anything.

Is there a spec change for jsf 1.2 saying el expressions are not allowed
within f:verbatim?


do you see stack trace ?
or some log info?





regards,
Safurudin Mahic




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


[Trinidad] Can the chart generated svg be converted to images?

2007-07-20 Thread Wesley Hales

Curious if anyone has tried or knows of a way to convert the charts that are
generated to images?


Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Werner Punz
Werner Punz schrieb:
 Ok I talked with Matthias regarding all ths
 first of all there seems to be an issue with tomcat 6 regarding
 JSTL compatibility Tomahawk seems to have hooks into it.
 
 Matthias told me that Jetty works, Tomcat doesnt (seems to be Tomcats
 fault or jaspers in Tomcat 6.0.13)
 
 The problem goes away as soon as you use facelets, since facelets does
 not require JSP. (Hence my application works)
 
 With Facelets also the usage of Tomcat 6 is possible.
 
 
 
 Werner
 

Ok I just got in a correction of Matthias, as it seems I cannot confirm
jetty yet.
Anyway, I will do furhter testing this afternoon to circle the entire
thing in a little bit (also I will try jetty personally)

All I personally can say for now, is that I can confirm that the combination
of Tomcat 6 MyFaces 1.2 and Facelets work as they should.

please watch https://issues.apache.org/jira/browse/MYFACES-1682
for further comments on this.



Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Matthias Wessendorf

Ok I just got in a correction of Matthias, as it seems I cannot confirm
jetty yet.
Anyway, I will do furhter testing this afternoon to circle the entire
thing in a little bit (also I will try jetty personally)

All I personally can say for now, is that I can confirm that the combination
of Tomcat 6 MyFaces 1.2 and Facelets work as they should.

please watch https://issues.apache.org/jira/browse/MYFACES-1682
for further comments on this.


so, I noticed the TLD thing on ([1]) in tomcat 6.0.13 with and without tomahawk.
Not in Jetty 6.1.2rc0 .

-Matthias

[1] https://issues.apache.org/jira/browse/MYFACES-1682


--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: f:verbatim and myfaces 1.2.0

2007-07-20 Thread Safurudin Mahic

Matthias Wessendorf skrev:

f:verbatim


f:verbatim ?


yeah, typo in the mail, my bad

this is the page verbatim.xhtml:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;


f:view xmlns:f=http://java.sun.com/jsf/core;
xmlns:h=http://java.sun.com/jsf/html; 
   #{facesContext.externalContext.requestContextPath}
 
   
f:verbatim#{facesContext.externalContext.requestContextPath}/f:verbatim

/f:view

In MyFaces 1.1.6 this outputs the context path twice, in 1.2.0 only once.


#{facesContext.externalContext.requestContextPath}
/f:verbatim

It would nicely output the contextpath.
However, If I try to do the same with 1.2.0 it doesn't output anything.

Is there a spec change for jsf 1.2 saying el expressions are not allowed
within f:verbatim?


do you see stack trace ?
or some log info?

there is no errors outputted when loading the page,
here is the entire log trace outputted by 1.2.0 for the verbatim.xhtml:

10:22:36,983 DEBUG org.acegisecurity.util.FilterChainProxy - 
/sandbox/verbatim.html has no matching filters
10:22:36,983 DEBUG org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter - 
Filter start request processing at 20.07.07 10:22  for uri: 
/iTeam/sandbox/verbatim.html
10:22:36,983 DEBUG org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter - 
Filter request output to XML
10:22:36,983 DEBUG org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter - 
XML filter service start processing request

10:22:36,999 TRACE javax.faces.webapp.FacesServlet - service begin
10:22:37,014 TRACE org.apache.myfaces.lifecycle.LifecycleImpl - entering 
RESTORE_VIEW(1) in org.apache.myfaces.lifecycle.LifecycleImpl
10:22:37,014 DEBUG org.ajax4jsf.framework.renderer.AjaxPhaseListener - 
Process before phase RESTORE_VIEW(1)
10:22:37,014 DEBUG org.ajax4jsf.framework.ajax.InitPhaseListener - 
Perform additional framework initialization on first request
10:22:37,124 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'traceData' in via original VariableResolver
10:22:37,202 INFO  
org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory - 
Using LifecycleProvider 
org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
10:22:37,202 INFO  
org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider - 
Creating instance of net.sf.facestrace.TraceData
10:22:37,218 TRACE 
org.apache.myfaces.lifecycle.DefaultRestoreViewSupport - Calculated 
viewId '/sandbox/verbatim.html' from request servlet path
10:22:37,218 DEBUG org.ajax4jsf.framework.ViewHandlerWrapper - Create 
new instance of alternate handler class com.sun.facelets.FaceletViewHandler
10:22:37,249 TRACE org.apache.myfaces.lifecycle.LifecycleImpl - Request 
is not a postback. New UIViewRoot will be created
10:22:37,249 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'ajaxContext' in via original VariableResolver
10:22:37,249 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'ajaxContext' in root WebApplicationContext
10:22:37,249 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Could not 
resolve variable 'ajaxContext'
10:22:37,264 TRACE 
org.apache.myfaces.application.DefaultViewHandlerSupport - view id after 
applying the context suffix: /sandbox/verbatim.xhtml
10:22:37,280 TRACE org.apache.myfaces.application.jsp.JspViewHandlerImpl 
- Created view /sandbox/verbatim.html
10:22:37,280 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'ajaxContext' in via original VariableResolver
10:22:37,280 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'ajaxContext' in via original VariableResolver
10:22:37,280 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'ajaxContext' in via original VariableResolver
10:22:37,280 DEBUG 
net.sf.facestrace.phase.listener.TraceResourcePhaseListener - View Root 
:/sandbox/verbatim.xhtml
10:22:37,280 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'traceData' in via original VariableResolver
10:22:37,280 DEBUG org.ajax4jsf.framework.ajax.InitPhaseListener - 
Remove init phase listener from factories
10:22:37,280 DEBUG org.ajax4jsf.framework.renderer.AjaxPhaseListener - 
Process after phase RESTORE_VIEW(1)
10:22:37,280 DEBUG 
org.springframework.web.jsf.DelegatingVariableResolver - Attempting to 
resolve variable 'ajaxContext' in via original VariableResolver
10:22:37,280 DEBUG org.apache.myfaces.lifecycle.LifecycleImpl - exiting 
from lifecycle.execute in RESTORE_VIEW(1) because getRenderResponse is 
true from one of the after listeners
10:22:37,280 TRACE org.apache.myfaces.lifecycle.LifecycleImpl - entering 
RENDER_RESPONSE(6) in org.apache.myfaces.lifecycle.LifecycleImpl
10:22:37,280 DEBUG 

how to avoid server hit on click of a commandLink

2007-07-20 Thread Arvind Pandey

Hi All
   I want avoid server hit on click of a commandLink.
For that i have written a javascript which returns false on click of that
link.
But again it is hitting the server..

Any idea?
regards
Arvind


Disclaimer: The information contained in this e-mail and attachments if any are 
privileged and confidential and are intended for the individual(s) or 
entity(ies) named in this e-mail. If the reader or recipient is not the 
intended recipient, or employee or agent responsible for delivering to the 
intended recipient, you are hereby notified that dissemination, distribution or 
copying of this communication or attachments thereof is strictly prohibited. IF 
YOU RECEIVE this communication in error, please immediately notify the sender 
and return the original message.


Re: how to avoid server hit on click of a commandLink

2007-07-20 Thread David Delbecq
h:commandLink onclick=return false;
En l'instant précis du 20/07/07 11:22, Arvind Pandey s'exprimait en ces
termes:
 Hi All
I want avoid server hit on click of a commandLink.
 For that i have written a javascript which returns false on click of that
 link.
 But again it is hitting the server..

 Any idea?
 regards
 Arvind


 Disclaimer: The information contained in this e-mail and attachments if any 
 are privileged and confidential and are intended for the individual(s) or 
 entity(ies) named in this e-mail. If the reader or recipient is not the 
 intended recipient, or employee or agent responsible for delivering to the 
 intended recipient, you are hereby notified that dissemination, distribution 
 or copying of this communication or attachments thereof is strictly 
 prohibited. IF YOU RECEIVE this communication in error, please immediately 
 notify the sender and return the original message.
   


-- 
http://www.noooxml.org/



Re: Problem updating details in Tomahawk detailStamp dataTable

2007-07-20 Thread Alf



vlad10 wrote:
 
 I'm encountering a strange behavior, when trying to update detail records
 in tomahawk detailStamp dataTable. 
 The bean method attached to the valueChangeListener gets called even so,
 there is no one detail value is changed. When I display
 event.getOldvalue()/.getNewValue(), it shows the new value correctly, but
 the oldValue is somehow grabbed from another detail.
 
 I appreciate your input.
 thanks
 vlad
 

Hi Vlad,
I encountered the same problem using Tomahawk detailStamp inside a
datatable, in
my code each table row has an inputTextArea component that I show and hide
using
detailStamp facet.
When I submit the page ALL row-objects will be update (calling the proper
setter
method) with the value stored in the currently visible textarea.

I can't find any solution about this issue so I would like to know if you
solved
this problem or if you can suggest me some input.

Thanks 
Alf



-- 
View this message in context: 
http://www.nabble.com/Problem-updating-details-in-Tomahawk-detailStamp-dataTable-tf4005743.html#a11705241
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Trinidad Chart ppr

2007-07-20 Thread sgthawk

Hello,

I use the trinidad chart wit  tr:poll in order to update the chart
periodically(every 5 sec). it works really good but something is annoying
and i dont konw if it solvable. The whole chart is alwalys updated but i
like to see is, that ONLY the bar values onl updated because they are only
the values which are changing.

 
-- 
View this message in context: 
http://www.nabble.com/Trinidad-Chart-ppr-tf4116170.html#a11705431
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Tobago] when tc:in has no value user should be altered, When pressed enter form should be submitted.

2007-07-20 Thread Zied Hamdi

Hi Ramarao,

I suggest you to return null in search.searchItems() if the input is empty
(and use ajax to refresh only the component search, elsewhere give an
outcome that redirects to the page of results.

for the ajax use

tc:link ...

tc:attribute name=renderedPartially value=search /

/tc:link
I didn't try it yet but it should work ifaoif your outcome is null. Take a
look at the demo app for examples.


p.s: maybe there's a better solution, I'm a beginner in tobago too.

Regards,
Zied

2007/7/20, Ramarao Venkata [EMAIL PROTECTED]:


Hi,

I has a tc:in and a tc:link.  when we click on the link the form is
submited even though no value value in tc:in.
When there is no value in tc:in and pressed on tc:link i should not
submit instead i should display an alert message.

With in tc:in when i press enter i need to invoke the action specified in
tc:link. do i need register for any key listener

My code is written as below

tc:cell
tc:in id=search width=130px
value=#{search.searchText}
suggestMethod = #{search.suggestSearch} /
tc:link image=img/search.gif
 action=#{search.searchItems} /
/tc:cell


kindly suggest a solution.

regards
Ramarao














--
Zied Hamdi
zatreex.sourceforge.net


Validating Multiple Components in DataTable

2007-07-20 Thread Graeme Steyn
Hi,
 
I have a tr:table component that is displaying rows from an ArrayLIst
containing instances of class X.  I would like to introduce a validator
that checks that if information is entered for any property, then all
properties must be populated for that row.  ANy rows that have no data
entered or all data entered are thus valid. At present I have the
arrangement provided below, but I appear to be getting the instances of
X from the original collection, rather than the table components local
values.  Thus when the view is first displayed, I can enter data in row
1 cell 1 and press next to invoke a POST back and the validation.  Using
the debugger, I find that the first iteration through the loop returns
an instance of X, but without the posted back data (everything is null).
I do not appear to be getting at the local converted value.
 
Any help would be greatly appreciated.
 
Thank you,
 
Regards,
 
Graeme.
 
PS. 
I came across a related query located at
http://mail-archives.apache.org/mod_mbox/myfaces-users/200608.mbox/%3c55
[EMAIL PROTECTED]  I am trying to avoid binding as the user
will be able to add and delete rows within my datatable, so I was hoping
to keep things flexible.
 
public class X {
 
private String prop1;
private String prop2;
private String prop3;
 
getters/setters...etc
}
 

 
class BackingBean {
 
Collection X collection = new ArrayList X ();
 
etc
}
 

 
tr:message for=validateRows /
 
tr:table
id=tblx
value=#{bean.collection}
binding=#{bean.coreTable}
var=entry 
 
tr:column
tr:inputText value=#{entry.prop1} /
/tr:column
 
tr:column
tr:inputText value=#{entry.prop2} /
/tr:column
:
:
etc
/tr:table
 
tr:inputHidden id=validateRows value=dummy
validator=#{bean.validateRows} /

=
 
Will only catch the first invlaid instance in the table - the validation
message appears at the table level rather than per row.
 
public void validateEntriesComplete(FacesContext facesContext,
UIComponent uIComponent,
Object object) throws ValidatorException {

UIXCollection uixCollection = (UIXCollection) coreTable;
int oldRowIndex = uixCollection.getRowIndex();
for (int rowNum = 0, numRows = uixCollection.getRowCount();
rowNum  numRows; rowNum++) {
uixCollection.setRowIndex(rowNum);
X instancex = (X) uixCollection.getRowData();

if (!instancex.isAllPropertiesSet()
 instancex.isAnyPropertySet()) {

FacesMessage message = Messages.getMessage(
Constants.LOCALIZATION_RESOURCE,
IncompleteRecord, null);
message.setSeverity(FacesMessage.SEVERITY_ERROR);
throw new ValidatorException(message);

}
}
uixCollection.setRowIndex(oldRowIndex);

}



Override default HtmlTreeRenderer?

2007-07-20 Thread Tomzi

Is there a way to override the default HtmlTreeRenderer of the tree2
component, in order to add some features?
-- 
View this message in context: 
http://www.nabble.com/Override-default-HtmlTreeRenderer--tf4116448.html#a11706288
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: [Addendum]: Myfaces 1.2 upgrading

2007-07-20 Thread Cormier, Matthieu
Hello Matthias,

We are using facelets instead of jsp, and the following xhtml file does
reproduce it for me:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:ui=http://java.sun.com/jsf/facelets;
xmlns:f=http://java.sun.com/jsf/core;
xmlns:h=http://java.sun.com/jsf/html;
xml:lang=#{view.locale.language} lang=#{view.locale.language} 
f:view
h:form
h:outputText value=#{beany.date}
f:convertDateTime type=both
dateStyle=#{beany.style}/
/h:outputText
/h:form
/f:view
/html

Matthieu 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Matthias Wessendorf
Sent: Thursday, July 19, 2007 3:48 PM
To: MyFaces Discussion
Subject: Re: [Addendum]: Myfaces 1.2 upgrading

Hi Matthieu,

regarding #2.
I can't reproduce it.

faces-config:
managed-bean
managed-bean-namebeany/managed-bean-name

managed-bean-classorg.apache.myfaces.blank.SessionBean/managed-bean-c
lass
managed-bean-scopesession/managed-bean-scope
managed-property
property-namestyle/property-name
valueshort/value
/managed-property 
/managed-bean

JSP-file:
%@ taglib uri=http://java.sun.com/jsf/html; prefix=h %
%@ taglib uri=http://java.sun.com/jsf/core; prefix=f%
f:view
h:form

h:outputText value=#{beany.date}
 f:convertDateTime   type=both dateStyle=#{beany.style} /
/h:outputText
/h:form
/f:view

Bean
package org.apache.myfaces.blank;

import java.util.Date;

public class SessionBean {

  private Date date = new Date();
  private String style;
  public Date getDate() {
return date;
  }
  public void setDate(Date date) {
this.date = date;
  }
  public String getStyle() {
System.out.println(getStyle called);
return style;
  }
  public void setStyle(String style) {
this.style = style;
  }

}

and the system.out is called, when I access the webpage

-Matthias
On 7/19/07, Cormier, Matthieu [EMAIL PROTECTED] wrote:




 Hello all,



 My original hypothesis for issue 2 was incorrect.  The issue is
actually
 caused from the tag

 f:convertDateTime  which we have embedded in an h:outputText.  We
use a
 bean to contain the configuration items for data display.  The invalid
style
 message is coming from this:



  f:convertDateTime type=both

 dateStyle=#{LocaleBean.dateStyle}

 ...



 The bean is of type session and I have verfified that the proper value
is
 set in the bean.

 ...

 managed-property

 property-namedateStyle/property-name

 valueshort/value

 /managed-property



 However the get method for the property is never called and the
exception
 stack trace below occurs.



 This code worked fine in 1.1 but no longer works in 1.2.



 Matthieu





 From: Cormier, Matthieu [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 19, 2007 9:55 AM
  To: MyFaces Discussion
  Subject: Myfaces 1.2 upgrading



 Hello all,



 I am attempting to upgrade our application to Myfaces 1.2 and have
come
 across 2 interesting issues.  Bot have workarounds but I was wondering
if
 they are bugs or not.



 1.  The names of facets for tomahawk tree2 must be hardcoded and
cannot come
 from a bean.



 So facet name=#{someBean.rootNodeType} will not work but

 facet name=root will.



 2.  Definition of a StyleClass can fail with the following exception:

 javax.faces.convert.ConverterException: invalid style ''

 at

javax.faces.convert.DateTimeConverter.calcStyle(DateTimeConverter.java:2
03)

 at

javax.faces.convert.DateTimeConverter.getDateFormat(DateTimeConverter.ja
va:166)

 at

javax.faces.convert.DateTimeConverter.getAsString(DateTimeConverter.java
:125)



 This was discovered because we use a conditional in our tree to define
 styles dependant on the selected node.

 styleClass=#{t.nodeSelected || node.container eq selectedContainer ?
 'selectedContainer' : '' }

 The workaround is to define the empty style to a style that is not
defined.

 styleClass=#{t.nodeSelected || node.container eq selectedContainer ?
 'selectedContainer' : 'nullStyle'}

 Are these bugs or spec changes from 1.1 to 1.2?

 --

 Matthieu Cormier

 Abridean Inc.

 T: 902-442-5122 x 5145

 F: 902-442-5101

 www.abridean.com

 This e-mail is intended solely for the person or entity to which it is
 addressed and may contain confidential and/or privileged information.
Any
 review, dissemination, copying, printing or other use of this e-mail
by
 persons or entities other than the addressee is prohibited. If you
have
 received this e-mail in error, please contact the sender immediately
and
 delete the material from any computer


-- 
Matthias Wessendorf

further stuff:
blog: 

Re: Validating Multiple Components in DataTable

2007-07-20 Thread David Delbecq
Quick suggestion:
tr:table
id=tblx
value=#{bean.collection}
binding=#{bean.coreTable}
var=entry 
 
tr:column
tr:inputText value=#{entry.prop1}  id=prop1
my:NotNullIfOtherNotNull others=prop2,prop3,prop4/
/tr:inputText
/tr:column
 
tr:column
tr:inputText value=#{entry.prop2} id=prop2 


as for the content of the cutsom my:NotNullIfOtherNotNull, i suggest you
look at code of validateEqual in tomahawk, that check 2 component
value are same. You can do similar thing with null.
That way, non need to limit your check to the use of a UIData.


En l'instant précis du 20/07/07 12:56, Graeme Steyn s'exprimait en ces
termes:
 Hi,
  
 I have a tr:table component that is displaying rows from an
 ArrayLIst containing instances of class X.  I would like to introduce
 a validator that checks that if information is entered for any
 property, then all properties must be populated for that row.  ANy
 rows that have no data entered or all data entered are thus valid. At
 present I have the arrangement provided below, but I appear to be
 getting the instances of X from the original collection, rather than
 the table components local values.  Thus when the view is first
 displayed, I can enter data in row 1 cell 1 and press next to invoke a
 POST back and the validation.  Using the debugger, I find that the
 first iteration through the loop returns an instance of X, but without
 the posted back data (everything is null).  I do not appear to be
 getting at the local converted value.
  
 Any help would be greatly appreciated.
  
 Thank you,
  
 Regards,
  
 Graeme.
  
 PS.
 I came across a related query located at
 http://mail-archives.apache.org/mod_mbox/myfaces-users/200608.mbox/[EMAIL 
 PROTECTED] 
 I am trying to avoid binding as the user will be able to add and
 delete rows within my datatable, so I was hoping to keep things flexible.
  
 public class X {
  
 private String prop1;
 private String prop2;
 private String prop3;
  
 getters/setters...etc
 }
  
 
  
 class BackingBean {
  
 Collection X collection = new ArrayList X ();
  
 etc
 }
  
 
  
 tr:message for=validateRows /
  
 tr:table
 id=tblx
 value=#{bean.collection}
 binding=#{bean.coreTable}
 var=entry 
  
 tr:column
 tr:inputText value=#{entry.prop1} /
 /tr:column
  
 tr:column
 tr:inputText value=#{entry.prop2} /
 /tr:column
 :
 :
 etc
 /tr:table
  
 tr:inputHidden id=validateRows value=dummy
 validator=#{bean.validateRows} /

 =
  
 Will only catch the first invlaid instance in the table - the
 validation message appears at the table level rather than per row.
  
 public void validateEntriesComplete(FacesContext facesContext,
 UIComponent uIComponent,
 Object object) throws ValidatorException {
 
 UIXCollection uixCollection = (UIXCollection) coreTable;
 int oldRowIndex = uixCollection.getRowIndex();
 for (int rowNum = 0, numRows = uixCollection.getRowCount();
 rowNum  numRows; rowNum++) {   
 uixCollection.setRowIndex(rowNum);
 X instancex = (X) uixCollection.getRowData();

 if (!instancex.isAllPropertiesSet()
  instancex.isAnyPropertySet()) {

 FacesMessage message = Messages.getMessage(
 Constants.LOCALIZATION_RESOURCE,
 IncompleteRecord, null);
 message.setSeverity(FacesMessage.SEVERITY_ERROR);
 throw new ValidatorException(message);

 }
 }
 uixCollection.setRowIndex(oldRowIndex);

 }


-- 
http://www.noooxml.org/



jsf-1.2 RI - myfaces 1.2: Newbie seeking for help

2007-07-20 Thread RobertBln

Hi,

I'm new to JSF and have managed it to get a very simple Application running
with jsf-1.2 ri on Tomcat 6.0.13.

When I try to replace jsf ri with myfaces 1.2, the Result is a

exception

javax.servlet.ServletException: Unable to convert string OK to class
javax.el.ValueExpression for attribute value: Property Editor not
registered with the PropertyEditorManager
javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)

root cause

javax.faces.FacesException: Unable to convert string OK to class
javax.el.ValueExpression for attribute value: Property Editor not
registered with the PropertyEditorManager

org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:340)

org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)

org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)

org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

root cause

org.apache.jasper.JasperException: Unable to convert string OK to class
javax.el.ValueExpression for attribute value: Property Editor not
registered with the PropertyEditorManager

org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:887)

org.apache.jsp.index2_jsp._jspx_meth_h_005fcommandButton_005f0(index2_jsp.java:175)

org.apache.jsp.index2_jsp._jspx_meth_h_005fform_005f0(index2_jsp.java:145)

org.apache.jsp.index2_jsp._jspx_meth_f_005fview_005f0(index2_jsp.java:105)
org.apache.jsp.index2_jsp._jspService(index2_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:334)

org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)

org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)

org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

=
Error Log:
org.apache.jasper.JasperException: Unable to convert string OK to class
javax.el.ValueExpression for attribute value: Property Editor not
registered with the PropertyEditorManager
at
org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:887)
at
org.apache.jsp.index2_jsp._jspx_meth_h_005fcommandButton_005f0(index2_jsp.java:175)
at
org.apache.jsp.index2_jsp._jspx_meth_h_005fform_005f0(index2_jsp.java:145)
at
org.apache.jsp.index2_jsp._jspx_meth_f_005fview_005f0(index2_jsp.java:105)
at org.apache.jsp.index2_jsp._jspService(index2_jsp.java:71)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:334)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)
at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at

Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Wolf Benz

Hi allThanks for the help so far guys.
After yesterday's struggling,  I wasn't really in the mood today to pick it
up again so quickly. Will try again this WE.

Short question aside:
I've got nothing against facelets (quite the contrary), but I understand
from previous postings the combo Tomcat6 - MF120 - Tomahawk - JSP is a dead
end.
I think this is a problem as I guess most users will use this combo.
Tomcat6 is kinda a standard and if you don't need Tomahawk, why not just use
the RI... (MF could learn smth from their easy setup -- I think there's
great value in defaulting much more so that the web.xml can remain much
easier than MF makes it now)
Facelets is better than JSP yet most users still use JSP...
Certainly as I guess what most users will forst attempt(like myself) is
migrate old apps to the new MF std.
Or does JSP work if you just don't use JSTL?

How good are your contacts with the Apache Tomcat team to perhaps address
this issue in an incremental Tomcat release? (should this be the best way to
solve this decoupling)

Wolf


On 7/20/07, Matthias Wessendorf [EMAIL PROTECTED] wrote:


 Ok I just got in a correction of Matthias, as it seems I cannot confirm
 jetty yet.
 Anyway, I will do furhter testing this afternoon to circle the entire
 thing in a little bit (also I will try jetty personally)

 All I personally can say for now, is that I can confirm that the
combination
 of Tomcat 6 MyFaces 1.2 and Facelets work as they should.

 please watch https://issues.apache.org/jira/browse/MYFACES-1682
 for further comments on this.

so, I noticed the TLD thing on ([1]) in tomcat 6.0.13 with and without
tomahawk.
Not in Jetty 6.1.2rc0 .

-Matthias

[1] https://issues.apache.org/jira/browse/MYFACES-1682



--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org



4 second page response time

2007-07-20 Thread Martin Denham

I have had a performance issue with both the JSF applications I have
written.

On my windows xp development pc responses are instant.  However when
deployed to a Sun Ultra 80 Solaris machine every page takes 4 seconds and if
I add a redirect the response time increases to 7 seconds.  Another
application on the same Solaris machine, but written using Struts has
instant page response times.

Is a simple page response time of 4 seconds expected when using JSF?  I have
tried all sorts of tweaks during the past year but the response time is
unaffected.

I am using Myfaces  tomahawk 1.1.5,  Weblogic 8.1sp4, Facelets 1.1.12.  One
application uses Oracle ADF and the other Ajax4Jsf/Richfaces.

Thanks in advance for any pointers.

Martin


Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Werner Punz

Hi Wolf
I am currently trying to nail down the bugs
I am still not sure about everything,
but as it seems there is lots of weird stuff going on
in the various app servers (most of them unified el related so far...
jetty choked on me currently by tring to push a simple example)

All I can say is dont spend too much time yet to get this release 
running better wait for a 2.0.1 release if things do not work out quickly.


Werner



Wolf Benz schrieb:

Hi all
Thanks for the help so far guys.
After yesterday's struggling,  I wasn't really in the mood today to pick 
it up again so quickly. Will try again this WE.


Short question aside: 
I've got nothing against facelets (quite the contrary), but I understand 
from previous postings the combo Tomcat6 - MF120 - Tomahawk - JSP is a 
dead end. 
I think this is a problem as I guess most users will use this combo. 
Tomcat6 is kinda a standard and if you don't need Tomahawk, why not just 
use the RI... (MF could learn smth from their easy setup -- I think 
there's great value in defaulting much more so that the web.xml can 
remain much easier than MF makes it now)
Facelets is better than JSP yet most users still use JSP... 
Certainly as I guess what most users will forst attempt(like myself) is 
migrate old apps to the new MF std. 
Or does JSP work if you just don't use JSTL?


How good are your contacts with the Apache Tomcat team to perhaps 
address this issue in an incremental Tomcat release? (should this be the 
best way to solve this decoupling)


Wolf


On 7/20/07, *Matthias Wessendorf* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


  Ok I just got in a correction of Matthias, as it seems I cannot
confirm
  jetty yet.
  Anyway, I will do furhter testing this afternoon to circle the entire
  thing in a little bit (also I will try jetty personally)
 
  All I personally can say for now, is that I can confirm that the
combination
  of Tomcat 6 MyFaces 1.2 and Facelets work as they should.
 
  please watch https://issues.apache.org/jira/browse/MYFACES-1682
  for further comments on this.

so, I noticed the TLD thing on ([1]) in tomcat 6.0.13 with and
without tomahawk.
Not in Jetty 6.1.2rc0 .

-Matthias

[1] https://issues.apache.org/jira/browse/MYFACES-1682



--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org






Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Matthias Wessendorf

running better wait for a 2.0.1 release if things do not work out quickly.


1.2.1 ;)


Werner



Wolf Benz schrieb:
 Hi all
 Thanks for the help so far guys.
 After yesterday's struggling,  I wasn't really in the mood today to pick
 it up again so quickly. Will try again this WE.

 Short question aside:
 I've got nothing against facelets (quite the contrary), but I understand
 from previous postings the combo Tomcat6 - MF120 - Tomahawk - JSP is a
 dead end.
 I think this is a problem as I guess most users will use this combo.
 Tomcat6 is kinda a standard and if you don't need Tomahawk, why not just
 use the RI... (MF could learn smth from their easy setup -- I think
 there's great value in defaulting much more so that the web.xml can
 remain much easier than MF makes it now)
 Facelets is better than JSP yet most users still use JSP...
 Certainly as I guess what most users will forst attempt(like myself) is
 migrate old apps to the new MF std.
 Or does JSP work if you just don't use JSTL?

 How good are your contacts with the Apache Tomcat team to perhaps
 address this issue in an incremental Tomcat release? (should this be the
 best way to solve this decoupling)

 Wolf


 On 7/20/07, *Matthias Wessendorf* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

   Ok I just got in a correction of Matthias, as it seems I cannot
 confirm
   jetty yet.
   Anyway, I will do furhter testing this afternoon to circle the entire
   thing in a little bit (also I will try jetty personally)
  
   All I personally can say for now, is that I can confirm that the
 combination
   of Tomcat 6 MyFaces 1.2 and Facelets work as they should.
  
   please watch https://issues.apache.org/jira/browse/MYFACES-1682
   for further comments on this.

 so, I noticed the TLD thing on ([1]) in tomcat 6.0.13 with and
 without tomahawk.
 Not in Jetty 6.1.2rc0 .

 -Matthias

 [1] https://issues.apache.org/jira/browse/MYFACES-1682



 --
 Matthias Wessendorf

 further stuff:
 blog: http://matthiaswessendorf.wordpress.com/
 mail: matzew-at-apache-dot-org







--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: [tobago] an unexpected block is executed with RI 1.2 (in JBoss 4.2.1 GA) // TODO: remove this if block if prooven this never happens anymore

2007-07-20 Thread Bernd Bohmann

Hello Zied,

can you send the jsf pages, please.

Regards

Bernd

Zied Hamdi wrote:

Hi again,

I'm sorry for announcing these problems, it's not a pleasure at all, I will
help as I can to resolve them.

I have some other side effects on using sun RI (bundled with JBoss 
4.2.1.GA),

I don't know if it's a consequense of the exception described in the first
mail, there are both visual and programmatic bugs:

1. visually (see picture):
 .It seems there's a first iteration on sheets with no arguments: before
some sheets header we see a complete line with no values in

2 programmatically I have this exception : If you want me to activate the
Trace mode on Phasis or component tree just let me know


14:44:18,011 INFO  [STDOUT] 2007-07-20 14:44:18,011 [http-127.0.0.1-8080-1]
INFO  org.apache.myfaces.tobago.util.DebugPhaseListener.afterPhase(65) -
Total response time : 5875 milliseconds

14:44:18,136 INFO  [STDOUT] 2007-07-20 14:44:18,120 [http-127.0.0.1-8080-2]
WARN
org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader.getLastModified(81) 


- Unparsable lastModified : @lastModified@

14:44:18,136 INFO  [STDOUT] 2007-07-20 14:44:18,120 [http-127.0.0.1-8080-1]
WARN
org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader.getLastModified(81) 


- Unparsable lastModified : @lastModified@

14:46:00,931 INFO  [STDOUT] 2007-07-20 14:46:00,931 [http-127.0.0.1-8080-1]
ERROR 
org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/IntoServicesTobagoWeb].[FacesServlet].invoke(278) 


- Servlet.service() pour la servlet FacesServlet a généré une exception

*java.lang.IllegalStateException*:
org.apache.myfaces.custom.schedule.UISchedule$ScheduleActionListener

at javax.faces.component.StateHolderSaver.restore(*
StateHolderSaver.java:98*)

at javax.faces.component.UIComponentBase.restoreAttachedState(*
UIComponentBase.java:1406*)

at javax.faces.component.UIComponentBase.restoreState(*
UIComponentBase.java:1272*)

at org.apache.myfaces.custom.schedule.UISchedule.restoreState(*
UISchedule.java:378*)

at org.apache.myfaces.custom.schedule.HtmlSchedule.restoreState(*
HtmlSchedule.java:189*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1141*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at javax.faces.component.UIComponentBase.processRestoreState(*
UIComponentBase.java:1157*)

at com.sun.faces.application.StateManagerImpl.restoreView(*
StateManagerImpl.java:171*)

at com.sun.faces.application.ViewHandlerImpl.restoreView(*
ViewHandlerImpl.java:290*)

at
org.apache.myfaces.tobago.application.ViewHandlerImpl.restoreView(*
ViewHandlerImpl.java:113*)

at org.apache.myfaces.tobago.lifecycle.RestoreViewExecutor.execute(
*RestoreViewExecutor.java:108*)

at org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.executePhase
(*TobagoLifecycle.java:102*)

at org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.execute(*
TobagoLifecycle.java:72*)

at javax.faces.webapp.FacesServlet.service(*FacesServlet.java:244*)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(*ApplicationFilterChain.java:290*)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
ExtensionsFilter.java:147*)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(*ApplicationFilterChain.java:235*)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(*
ReplyHeaderFilter.java:96*)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(*ApplicationFilterChain.java:235*)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

at org.apache.catalina.core.StandardWrapperValve.invoke(*
StandardWrapperValve.java:230*)

at org.apache.catalina.core.StandardContextValve.invoke(*
StandardContextValve.java:175*)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(*

[Trinidad] sorting table, table range navigation...

2007-07-20 Thread Burghard Britzke

I am new to trinidad and tried to play a little bit with the tr:table.
I enabled table paging with the attribut rows=15 for the tr:table
I enabled table sorting with the sortProperty=name sortable=true  
for the tr:column


the controls are shown as expected. but do nothing on click.

I read the FAQ at http://wiki.apache.org/myfaces/FAQ . But yes I  
defined the ResourceServlet for the ADF resource mapping in web.xml.
I read the documentation at http://myfaces.apache.org/trinidad/ 
devguide/table.html . But it is not clear to me if I have to code an  
own underlying table model which supports sorting. And (if I have  
to) how to underly it.


has anybody done it?

Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Wolf Benz


I am currently trying to nail down the bugs
I am still not sure about everything,
but as it seems there is lots of weird stuff going on



-- I'm glad you've found that out as well. Quite frustrating if you get the
impression stuff only jamms on your PC.


in the various app servers (most of them unified el related so far...

jetty choked on me currently by tring to push a simple example)


All I can say is dont spend too much time yet to get this release

running better wait for a 2.0.1 release if things do not work out quickly.



-- Too bad. If simple apps don't work perhaps the release should have better
been postponed a little, as releases cannot be pulled back. Does anyone has
an informed idea on when this release would see the (public)light?


Wolf


Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Zied Hamdi

Hi fashion creators ;-),

I'm really happy for this last event, even if I'm a little late (notice it
has its advanteges to be late too ;-).

Wolf:

Tomcat6 is kinda a standard and if you don't need Tomahawk, why not just

use the RI

I'd say you're a little direct with the MyFaces team, comparing the RI and
MyFaces with all its subprojects is a little unfair comparaison seen that
the RI doesn't have to handle nor ajax features nor css beside the fact that
it's definitely less rich in its components, in addition to the fact that
MyFaces is not just Tomahawk, and that the RI is only a sort of testing
labs with no performance objectives.

On the other side, I agree with you in the fact that integrating MyFaces is
not made very easy. For me, exception messages of MyFaces are not verbose
enough to give you an orientation on what's exactly going wrong. I think
some work of catching and rethrowing more explicit and verbose exceptions
could help in all developement and integration phasis.

Just for an example on the well known exception: Base is null

It costed me nothing to add this code snippet in ValueBindingImpl:
line 461

   *if* (base == *null*)

   {

   *throw* *new* PropertyNotFoundException(Base is null: 

   + complexValue.getPrefix().*getExpressionString*() + in
expression: + complexValue.getExpressionString() );

   }

line 475

   *if* (base == *null*)

   {

   *throw* *new* PropertyNotFoundException(Base is null: 

   + suffix.*getExpressionString*() + in expression: +
suffixes + for object: + complexValue.getPrefix()

   .*evaluate*(variableResolver, *s_functionMapper*,

   ELParserHelper.*LOGGER*) );

   }


So I spend less time in searching in which page the problem is. A even
better handling would be to say in which page and which line the problem
occured (by catching this exception in a wider context). The same can be
done for testing if MyFaces is loaded correctly (a sort of self checking
utility).

Regards,
Zied


2007/7/20, Matthias Wessendorf [EMAIL PROTECTED]:


 running better wait for a 2.0.1 release if things do not work out
quickly.

1.2.1 ;)

 Werner



 Wolf Benz schrieb:
  Hi all
  Thanks for the help so far guys.
  After yesterday's struggling,  I wasn't really in the mood today to
pick
  it up again so quickly. Will try again this WE.
 
  Short question aside:
  I've got nothing against facelets (quite the contrary), but I
understand
  from previous postings the combo Tomcat6 - MF120 - Tomahawk - JSP is a
  dead end.
  I think this is a problem as I guess most users will use this combo.
  Tomcat6 is kinda a standard and if you don't need Tomahawk, why not
just
  use the RI... (MF could learn smth from their easy setup -- I think
  there's great value in defaulting much more so that the web.xml can
  remain much easier than MF makes it now)
  Facelets is better than JSP yet most users still use JSP...
  Certainly as I guess what most users will forst attempt(like myself)
is
  migrate old apps to the new MF std.
  Or does JSP work if you just don't use JSTL?
 
  How good are your contacts with the Apache Tomcat team to perhaps
  address this issue in an incremental Tomcat release? (should this be
the
  best way to solve this decoupling)
 
  Wolf
 
 
  On 7/20/07, *Matthias Wessendorf* [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
Ok I just got in a correction of Matthias, as it seems I cannot
  confirm
jetty yet.
Anyway, I will do furhter testing this afternoon to circle the
entire
thing in a little bit (also I will try jetty personally)
   
All I personally can say for now, is that I can confirm that
the
  combination
of Tomcat 6 MyFaces 1.2 and Facelets work as they should.
   
please watch https://issues.apache.org/jira/browse/MYFACES-1682
for further comments on this.
 
  so, I noticed the TLD thing on ([1]) in tomcat 6.0.13 with and
  without tomahawk.
  Not in Jetty 6.1.2rc0 .
 
  -Matthias
 
  [1] https://issues.apache.org/jira/browse/MYFACES-1682
 
 
 
  --
  Matthias Wessendorf
 
  further stuff:
  blog: http://matthiaswessendorf.wordpress.com/
  mail: matzew-at-apache-dot-org
 
 




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org





--
Zied Hamdi
zatreex.sourceforge.net


Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Werner Punz

Wolf Benz schrieb:

I am currently trying to nail down the bugs
I am still not sure about everything,
but as it seems there is lots of weird stuff going on 



-- I'm glad you've found that out as well. Quite frustrating if you get 
the impression stuff only jamms on your PC. 
 


in the various app servers (most of them unified el related so far...
jetty choked on me currently by tring to push a simple example)

All I can say is dont spend too much time yet to get this release
running better wait for a 2.0.1 release if things do not work out
quickly.


-- Too bad. If simple apps don't work perhaps the release should have 
better been postponed a little, as releases cannot be pulled back. Does 
anyone has an informed idea on when this release would see the 
(public)light? 

Wolf I cannot give dates since I am not an implementor, but some bugs I 
found so far were not myfaces related, one being a not fully implemented 
servlet spec in jetty.


The plan however to my knowledge is that a 1.2.01 (sorry for the version 
mixup) is pushed out rather sooner than later.


The funny thing is, that I have a rather complicated implementation 
which I was able to upgrade in no time, but that one was relying on 
facelets, which seems to bypass a lot of the JEE stuff (el, jsp etc...)


It is more the simple jsp stuff which seems to cause problems ;-)



Re: Myfaces 1.2.0 setup issues (again)

2007-07-20 Thread Wolf Benz


Attaching some more infos, like stack trace or debug infos, would
speed up things!



-- I planned to make some time for that this WE. (I didn't forget your
previous post!)




I'll try to look at some of your issues over the weekend.




-- Cool. And that's smth that can be said of this project: the user list is
VERY responsive and to the point. If it weren't for that, I think I might
have switched in the past already... (time, time)

-Wolf


RE: [Trinidad] panelTabbed - validation of unvisited tabs

2007-07-20 Thread Peter Rawlins

On 7/19/07, Adam Winer wrote:

 There's two questions here:
 (1) Is there a way to validate tabs that have been disclosed,
   but aren't disclosed right now?
 (2) Is there a way to validate tabs that have never been disclosed.

 For 1, the answer is yes:  call processValidators() and
 processUpdateModel() on the children of the showDetailItem.

 For 2, the answer is no, you can't.  And you can't set the submitted value to 
 , because  that'll blow up for many renderers.

 What you need here is bean-level validation, not component-level validation.
 Alternatively, you might disable the button until all tabs have been visited.


Adam,  thanks for the quick reply.

I've got quite a lot of similar pages to create using tabbedPanels, so I'd like 
to make the most of the automatic validation based on the declarative page 
definition.

After careful consideration, I've decided to go with your very last suggestion 
- with a slight tweak :-)

I plan to track which tabs have been visited, but leave the button always 
enabled.
When the button is pushed, the action will first perform a check that all 
necessary tabs have been visited, and if not, disclose the next required tab as 
appropriate.  If the check passes, then the normal button action will be 
performed.  I'll be relying on the standard behaviour of not letting the user 
get out of the current tab unless it's valid - so I need to ensure that no 
immediate actions switch away from the current tab.

Additionally, I expect to use bean-level validation for cross-field validation 
where the fields are on different tabs.

Many thanks for your help.

Regards,
Peter.




RE: PPR - Update an inputText dont work

2007-07-20 Thread David Brunette
 

 Just to close out this discussion (in case anybody else is listening to 
the thread)... I've come across a way to reset the values of inputText 
components that are in a table.  Turns out that it's actually pretty simple... 
very similar to some things discussed below.  It's just a matter of looping 
through each row of the table and using the myTable.findComponent( 
inputTextId ) to get the components in the table.  Once you've got the 
component, you can simply reset the values for that inputText the way it is 
described below.

 

 



UIXCollection collection = getMyTable();

int size = collection.getRowCount();

for( int index = 0 ; index  size ; index++ ) {

collection.setRowKey( Integer.valueOf( index ) );

_resetEditableValues( collection.findComponent( inputTextId ) );

}

 



From: David Brunette [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 16, 2007 6:14 PM
To: MyFaces Discussion
Subject: RE: PPR - Update an inputText dont work

 

 

 Thanks for the suggestion.  But unfortunately it still did not work for 
me.  For an inputText on its own, it worked fine, but the values in my table 
still did not reset.

 

 While trying a bunch of things, I noticed that this is only happening if 
immediate=true is set on the commandButton.  That seems like an odd thing to 
me.  Can somebody explain why this is only happening if immediate=true??  
Maybe if I understood that bit a little more, I could come up with a way to 
work with this.

 

Dave

 



From: Michał 'Gandalf' Stawicki [mailto:[EMAIL PROTECTED]
Sent: Mon 7/16/2007 12:57 PM
To: MyFaces Discussion
Subject: Re: PPR - Update an inputText dont work

In my case, I just put fields in form named objectDetForm and when I
need to reset them:

private void resetFields()
{
UIComponent c =
FacesContext.getCurrentInstance().getViewRoot().findComponent(objectDetForm);
if(c != null  c.getParent() != null)
c.getParent().getChildren().remove(c);
   
}

It's dirty, but for me it works

On 16/07/07, David Brunette [EMAIL PROTECTED] wrote:






  Hello.



  I am having trouble with this as well.  But, the difference in my
 situation is that the inputText components that I am trying to reset are in
 a table.  I'm having trouble getting a hold of those components in the table
 so I can reset the values.  I've tried a couple things, such as binding the
 table to my bean and then trying to loop through all of its children
 (recursively) to find the inputTexts... but that didn't solve the issue for
 me.



  Any idea on what I can do with the inputText components in the table??
 Thanks...



 Dave



  


 From: Martin Marinschek [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 12, 2007 12:20 PM
  To: MyFaces Discussion
  Subject: Re: PPR - Update an inputText dont work




 Hi Ariel,

  you'll have to clean out the value of the input-text - the problem that you
 are seeing is that JSF takes the current value in the inputText component,
 and sees this as more important than the backing bean value.

  so you'll have to bind your inputText to your backing bean (using
 binding=#{myBean.myInputText}, and a getter/setter pair getMyInputText /
 setMyInputText in your backing bean) and then call:

  myInputText.setSubmittedValue(null);
  myInputText.setValue(null);
  myInputText.setLocalValueSet(false);

  with this, your inputText will reread the value from the backing bean!

  regards,

  Martin


 On 7/12/07, Ariel Di Mattia [EMAIL PROTECTED] wrote:

 Hi all,

  I am having some problems with PPR.  When I try to update an inputText,
 it's
  simply do nothing (no errors or warnings).  But, if I put the same
  partialTriggers in other component (i.e. outputFormatted) with same backing
  bean, all works fine.

  Here is my code:

  f:view
  tr:document title=#{title.applicationName}
  t:div styleClass=mainPanel
  tr:form id=form
  tr:commandButton id=pSub_button
  immediate=true
  partialSubmit=true
  text=Update

 actionListener=#{newAgent.editContact}
  /tr:commandButton
  tr:panelLabelAndMessage label=OUTPUT
 FORMATTED: 
  tr:outputFormatted
 id=cmdTarget1

 partialTriggers=pSub_button

 styleUsage=instruction

 value=#{newAgent.nombreContacto }
 /tr:outputFormatted
/tr:panelLabelAndMessage
tr:panelLabelAndMessage label=INPUT TEXT: 
tr:inputText id=cmdTarget3

 partialTriggers=pSub_button

 value=#{newAgent.nombreContacto}
/tr:inputText
/tr:panelLabelAndMessage
  /tr:form
  /t:div
  /tr:document
  /f:view


  And backing bean 

[Trinidad] Validating Multiple Components in DataTable

2007-07-20 Thread Graeme Steyn
Sorry, forgot to include Trinidad in the subject.



From: Graeme Steyn
Sent: Fri 20/07/2007 8:56 PM
To: 'MyFaces Discussion'
Subject: Validating Multiple Components in DataTable


Hi,
 
I have a tr:table component that is displaying rows from an ArrayLIst 
containing instances of class X.  I would like to introduce a validator that 
checks that if information is entered for any property, then all properties 
must be populated for that row.  ANy rows that have no data entered or all data 
entered are thus valid. At present I have the arrangement provided below, but I 
appear to be getting the instances of X from the original collection, rather 
than the table components local values.  Thus when the view is first displayed, 
I can enter data in row 1 cell 1 and press next to invoke a POST back and the 
validation.  Using the debugger, I find that the first iteration through the 
loop returns an instance of X, but without the posted back data (everything is 
null).  I do not appear to be getting at the local converted value.
 
Any help would be greatly appreciated.
 
Thank you,
 
Regards,
 
Graeme.
 
PS. 
I came across a related query located at 
http://mail-archives.apache.org/mod_mbox/myfaces-users/200608.mbox/[EMAIL 
PROTECTED]  I am trying to avoid binding as the user will be able to add and 
delete rows within my datatable, so I was hoping to keep things flexible.
 
public class X {
 
private String prop1;
private String prop2;
private String prop3;
 
getters/setters...etc
}
 

 
class BackingBean {
 
Collection X collection = new ArrayList X ();
 
etc
}
 

 
tr:message for=validateRows /
 
tr:table
id=tblx
value=#{bean.collection}
binding=#{bean.coreTable}
var=entry 
 
tr:column
tr:inputText value=#{entry.prop1} /
/tr:column
 
tr:column
tr:inputText value=#{entry.prop2} /
/tr:column
:
:
etc
/tr:table
 
tr:inputHidden id=validateRows value=dummy 
validator=#{bean.validateRows} /

=
 
Will only catch the first invlaid instance in the table - the validation 
message appears at the table level rather than per row.
 
public void validateEntriesComplete(FacesContext facesContext,
UIComponent uIComponent,
Object object) throws ValidatorException {

UIXCollection uixCollection = (UIXCollection) coreTable;
int oldRowIndex = uixCollection.getRowIndex();
for (int rowNum = 0, numRows = uixCollection.getRowCount(); rowNum  
numRows; rowNum++) {
uixCollection.setRowIndex(rowNum);
X instancex = (X) uixCollection.getRowData();

if (!instancex.isAllPropertiesSet()
 instancex.isAnyPropertySet()) {

FacesMessage message = Messages.getMessage(
Constants.LOCALIZATION_RESOURCE,
IncompleteRecord, null);
message.setSeverity(FacesMessage.SEVERITY_ERROR);
throw new ValidatorException(message);

}
}
uixCollection.setRowIndex(oldRowIndex);

}



Re: Trinidad Chart ppr

2007-07-20 Thread venkata guddanti

Unfortunately when the chart is being PPR the entire chart is being PPRed.
One thing you may want to do is to turn off animation(animationDuration=0)
since it is annoying when the chart is being refreshed using af:poll. This
make it look like only the chart bars are refreshing.

Venkata

On 7/20/07, sgthawk [EMAIL PROTECTED] wrote:



Hello,

I use the trinidad chart wit  tr:poll in order to update the chart
periodically(every 5 sec). it works really good but something is annoying
and i dont konw if it solvable. The whole chart is alwalys updated but i
like to see is, that ONLY the bar values onl updated because they are only
the values which are changing.


--
View this message in context:
http://www.nabble.com/Trinidad-Chart-ppr-tf4116170.html#a11705431
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: [Trinidad] Can the chart generated svg be converted to images?

2007-07-20 Thread venkata guddanti

Currently I believe the IE Adobe SVG viewer plugin has an option to save the
generated SVG content. You can then take the SVG output to any of the SVG
authoring tool and convert it into images.

Also Emia Renesis SVG player in IE has an option to save the generated SVG
content as an image. But unfortunately the player does not work with the
chart control. I have not found the time to make the chart component
compatible with it. Moreover the Renesis player is in beta (.7 version). I
was hoping to wait for the final release.

On 7/19/07, Wesley Hales [EMAIL PROTECTED] wrote:


Curious if anyone has tried or knows of a way to convert the charts that
are generated to images?



Re: [Trinidad] sorting table, table range navigation...

2007-07-20 Thread Adam Winer

Do you have a trh:body or tr:document on the page?
These are (at least for 1.0.1) required for PPR to function.

-- Adam


On 7/20/07, Burghard Britzke [EMAIL PROTECTED] wrote:


I am new to trinidad and tried to play a little bit with the tr:table.I
enabled table paging with the attribut rows=15 for the tr:table
I enabled table sorting with the sortProperty=name sortable=true for the
tr:column

the controls are shown as expected. but do nothing on click.

I read the FAQ at http://wiki.apache.org/myfaces/FAQ . But
yes I defined the ResourceServlet for the ADF resource mapping in web.xml.
I read the documentation
at http://myfaces.apache.org/trinidad/devguide/table.html .
But it is not clear to me if I have to code an own underlying table model
which supports sorting. And (if I have to) how to underly it.

has anybody done it?