Re: JSF 1.2 support/plans

2006-01-13 Thread Craig McClanahan
On 1/13/06, Simon Kitching <[EMAIL PROTECTED]> wrote:
On Fri, 2006-01-13 at 14:01 -0500, Balunas, Jay wrote:> Hello all,>> I have been lurking for some time, and have been investigating JSF for a new project at my company.  Please forgive me is this has come up already - I did search through several pages of archives and could not find a reference to 
1.2 support roadmaps>> Because this will be a new project starting in about a month, and first release around end of summer (August -September) I have been investigating both the current 1.1.1 version of myFaces, and looking into what 
1.2 JSF provides.  We are planning on using Ajax and from what research I have done JSF 1.2 has some hooks for making Ajax requests less of a hack into the life cycle.>> We are also investigating Suns implementation, but I would prefer to stick with myFaces as the support and community seems stronger.
Note that all the following is not "official"; I'm a myfaces committer,but not part of the project management committee. This info is just myview from what I observe happening...Firstly, the JSF 
1.2 spec is not yet released; it's at "proposed finaldraft", and has been for many months.Indeed, no one can actually "release" a "General Availability" implementation of a JCP spec that is not final yet.  But that doesn't stop you from working on such an implementation, on the assumption that it will eventually go final (since JSF 
1.2 is part of JavaEE 5, I think that's a pretty good bet :-).I doubt very much if MyFaces will manage to release a 
1.2-compatibleversion in the next six months. Sun have made JSF 1.2 dependent on a newversion of the EL "_expression_ language" library, and on a new version ofJSP. Until those exist MyFaces can't even begin to implement much of JSF
1.2.And I'm not aware of any progress on implementing the next JSP versionby Apache Tomcat or other such projects. As far as I am aware, Sun isthe only one with an implementation of this near completion. That would,
in fact, prevent the official release of the spec for manyorganisations; it's common to require at least 2 successfulimplementations of a spec before it is considered ready for release. I'mnot sure that Sun works by those rules though.
MyFaces is intending to add some JSF1.2 type features into the current1.1-compatible release. Encrypted client-side sessions are already donefor example.In addition, there is still a lot of work to be done to stabilise the
current 1.1-compatible release. I personally would like to see effortput into this before moving on to the next spec version.One option for the MyFaces community to consider, with regards to JSF 
1.2, is to utilize some portions of the JSF 1.2 reference implementation, which (unlike the JSF 1.1 RI) is under the CDDL license.  The implementation of the new EL APIs seems like an obvious candidate for this.  In turn, though, this would require pushing on Apache to accept dependencies on CDDL-licensed code -- from my conversation with insiders, there seems to be no conceptual problem with CDDL's terms; it's caught up in a larger strategic initiative on dealing with non-Apache-licensed software.  If the MyFaces community wants to, this would be an obvious case where it would benefit the world.  I'd happily go advocate that scenario, if the MyFaces community felt that this was the right direction to go.
It isn't by any means required that such a dependency last forever -- if it makes sense to create your own implementation, that's perfectly fine.  Consider using the RI code a short term strategy to get a release out the door more quickly than would otherwise be possible.  If the code works, and does everything you need, then no harm in relying on it.  If it doesn't, replace it -- that's what open source is about.
But I need to reiterate a comment above, because it is not obvious to me that the MyFaces development community has figured out all the implications yet:* JSF 1.2 will be (when it is released -- trust me, that is not a long time away :-) a *required*
  API to be supported by any Java EE 5 server.* That means, any app server vendor who is planning on implementing Java EE 5 is going  to need to make a JSF technology choice sooner, rather than later.
* At the moment, there is only one viable JSF 1.2 implementation that I am aware of.  In the absence of any other choice, this will become the default selection.* Specific use cases -- if/when Geronimo and JBoss decide to implement Java EE 5,
  they are going to require a JSF 1.2 implementation.* Is the MyFaces community interested in being an option for app server vendors?  If so,  it's time to move quickly.  Once a particular app server chooses a particular implementation
  of a particular dependency, it's generally pretty difficult to affect that choice later.* If MyFaces is satisfied being a JSF 1.1 implementation, for non-JavaEE5 environments,  then none of the above matters.  ((In my personal opinion, that would be a poor choice,
  but it is not my choi

RE: JSF Flaw: Comopnent not preserving it state

2006-01-13 Thread Yee CN
Rich,

Actually my proposal is specifically to prevent the issues you described.
Please refer to the thread "An optimised pattern for using t:dataTable -
please verify". This is where the current thread originates from.

Regards,
Yee

-Original Message-
From: Richard Wallace [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 14 January 2006 3:04 PM
To: MyFaces Discussion
Subject: Re: JSF Flaw: Comopnent not preserving it state

The biggest problem I can see with making the default value for this 
true for the dataTable component is that the DataModel could very well 
be backed by data loaded from an ORM tool such as Hibernate.  In this 
case, it would be very easy to run into LazyInitializationExceptions or 
equivalent.  Also, as pointed out, if the data is loaded from the 
database, other users interacting with the system could cause a user to 
see stale data.  A refresh button for the table is a poor solution to 
this, because in my experience when a user sees a new page load they 
expect the data to be the latest.  Making them have to hit an additional 
refresh button would just confuse them.

On a bit of a different note, something I've run into with DataTables 
that bugs me is the way JSF handles the Master-Detail pattern.  Using 
the traditional way of finding the object the user selected with the 
DataModel.getRowData() method is error-prone if another user adds an 
object that would appear in the table before the one the user is trying 
to drill-down on.  The user could wind up with an off-by-one error, 
getting the object above the one they selected.  I don't know what the 
best solution to this is.  In the past I've tried to use the 
t:updateActionListener to set an id parameter in the backing bean and 
load just the object I'm interested in for the details as an alternative 
to using the DataModel.getRowData() method.  But I'm not sure that's any 
better for consistency because I'm not sure when the parameter for the 
updateActionListener is actually set.  If it's when the master page is 
loaded, then it will work fine.  But if it's when the view is being 
restored when the link to go to the detail page is clicked, then this is 
still error-prone.  Of course, it also doesn't solve the problem of 
having to do the select for all the things that would show up in the 
master list when all you're interested in is the single object you want 
to get details on.

Just my 2c worth.

Rich

Yee CN wrote:
> I definitely consider this a flaw. There is no reason why a dataTable
should
> behave differently from an inputText. preserveDataModel should be enforced
> in all components and enabled by default. It should only be disabled with
> explicit settings.
>
> This has been a major stumbling block for me to get a clear understanding
of
> the JSF technology. Judging from the discussions in this news group - I
> think I am not the only one.
>
> What is the possibility of rectifying this in JSF spec?
>
> Regards,
> Yee
>
> -Original Message-
> From: Simon Kitching [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, 14 January 2006 12:15 PM
> To: MyFaces Discussion
> Subject: Re: AW: An optimised pattern for using t:dataTable - please
verify.
>
> On Fri, 2006-01-13 at 15:27 +0100, Matthias Kahlau wrote:
>   
>> Hi Simon!
>>
>> You wrote:
>>
>> 
>>> NB: The default behaviour (no preserveDataModel) is flawed because it
>>> doesn't get (2) right for datasets that may be changed by something
>>> other than the viewing user.
>>>   
>> Isn't this only a problem if the dataModel is directly backed by the
>> database, so that the database is accessed on each call of
getDataModel()?
>> 
>
> Well, it's flawed for any "dataset that may be changed by something
> other than the viewing user". But yes the most common situation that
> occurs in is when an app is retrieving data from a shared database.
>
> When all the data is held in memory and does not change (ie is static
> "reference" data) then of course the default behaviour is fine. However
> that isn't often the case.
>
> Regards,
>
> Simon
>
>   



Re: JSF Flaw: Comopnent not preserving it state

2006-01-13 Thread Richard Wallace
The biggest problem I can see with making the default value for this 
true for the dataTable component is that the DataModel could very well 
be backed by data loaded from an ORM tool such as Hibernate.  In this 
case, it would be very easy to run into LazyInitializationExceptions or 
equivalent.  Also, as pointed out, if the data is loaded from the 
database, other users interacting with the system could cause a user to 
see stale data.  A refresh button for the table is a poor solution to 
this, because in my experience when a user sees a new page load they 
expect the data to be the latest.  Making them have to hit an additional 
refresh button would just confuse them.


On a bit of a different note, something I've run into with DataTables 
that bugs me is the way JSF handles the Master-Detail pattern.  Using 
the traditional way of finding the object the user selected with the 
DataModel.getRowData() method is error-prone if another user adds an 
object that would appear in the table before the one the user is trying 
to drill-down on.  The user could wind up with an off-by-one error, 
getting the object above the one they selected.  I don't know what the 
best solution to this is.  In the past I've tried to use the 
t:updateActionListener to set an id parameter in the backing bean and 
load just the object I'm interested in for the details as an alternative 
to using the DataModel.getRowData() method.  But I'm not sure that's any 
better for consistency because I'm not sure when the parameter for the 
updateActionListener is actually set.  If it's when the master page is 
loaded, then it will work fine.  But if it's when the view is being 
restored when the link to go to the detail page is clicked, then this is 
still error-prone.  Of course, it also doesn't solve the problem of 
having to do the select for all the things that would show up in the 
master list when all you're interested in is the single object you want 
to get details on.


Just my 2c worth.

Rich

Yee CN wrote:

I definitely consider this a flaw. There is no reason why a dataTable should
behave differently from an inputText. preserveDataModel should be enforced
in all components and enabled by default. It should only be disabled with
explicit settings.

This has been a major stumbling block for me to get a clear understanding of
the JSF technology. Judging from the discussions in this news group - I
think I am not the only one.

What is the possibility of rectifying this in JSF spec?

Regards,
Yee

-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 14 January 2006 12:15 PM

To: MyFaces Discussion
Subject: Re: AW: An optimised pattern for using t:dataTable - please verify.

On Fri, 2006-01-13 at 15:27 +0100, Matthias Kahlau wrote:
  

Hi Simon!

You wrote:



NB: The default behaviour (no preserveDataModel) is flawed because it
doesn't get (2) right for datasets that may be changed by something
other than the viewing user.
  

Isn't this only a problem if the dataModel is directly backed by the
database, so that the database is accessed on each call of getDataModel()?



Well, it's flawed for any "dataset that may be changed by something
other than the viewing user". But yes the most common situation that
occurs in is when an app is retrieving data from a shared database.

When all the data is held in memory and does not change (ie is static
"reference" data) then of course the default behaviour is fine. However
that isn't often the case.

Regards,

Simon

  




JSF Flaw: Comopnent not preserving it state

2006-01-13 Thread Yee CN
I definitely consider this a flaw. There is no reason why a dataTable should
behave differently from an inputText. preserveDataModel should be enforced
in all components and enabled by default. It should only be disabled with
explicit settings.

This has been a major stumbling block for me to get a clear understanding of
the JSF technology. Judging from the discussions in this news group - I
think I am not the only one.

What is the possibility of rectifying this in JSF spec?

Regards,
Yee

-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 14 January 2006 12:15 PM
To: MyFaces Discussion
Subject: Re: AW: An optimised pattern for using t:dataTable - please verify.

On Fri, 2006-01-13 at 15:27 +0100, Matthias Kahlau wrote:
> Hi Simon!
> 
> You wrote:
> 
> > NB: The default behaviour (no preserveDataModel) is flawed because it
> > doesn't get (2) right for datasets that may be changed by something
> > other than the viewing user.
> 
> Isn't this only a problem if the dataModel is directly backed by the
> database, so that the database is accessed on each call of getDataModel()?

Well, it's flawed for any "dataset that may be changed by something
other than the viewing user". But yes the most common situation that
occurs in is when an app is retrieving data from a shared database.

When all the data is held in memory and does not change (ie is static
"reference" data) then of course the default behaviour is fine. However
that isn't often the case.

Regards,

Simon



Re: JSF 1.2 support/plans

2006-01-13 Thread Simon Kitching
On Fri, 2006-01-13 at 14:01 -0500, Balunas, Jay wrote:
> Hello all,
> 
> I have been lurking for some time, and have been investigating JSF for a new 
> project at my company.  Please forgive me is this has come up already - I did 
> search through several pages of archives and could not find a reference to 
> 1.2 support roadmaps
> 
> Because this will be a new project starting in about a month, and first 
> release around end of summer (August -September) I have been investigating 
> both the current 1.1.1 version of myFaces, and looking into what 1.2 JSF 
> provides.  We are planning on using Ajax and from what research I have done 
> JSF 1.2 has some hooks for making Ajax requests less of a hack into the life 
> cycle.
> 
> We are also investigating Suns implementation, but I would prefer to stick 
> with myFaces as the support and community seems stronger.

Note that all the following is not "official"; I'm a myfaces committer,
but not part of the project management committee. This info is just my
view from what I observe happening...

Firstly, the JSF 1.2 spec is not yet released; it's at "proposed final
draft", and has been for many months.

I doubt very much if MyFaces will manage to release a 1.2-compatible
version in the next six months. Sun have made JSF 1.2 dependent on a new
version of the EL "expression language" library, and on a new version of
JSP. Until those exist MyFaces can't even begin to implement much of JSF
1.2.

And I'm not aware of any progress on implementing the next JSP version
by Apache Tomcat or other such projects. As far as I am aware, Sun is
the only one with an implementation of this near completion. That would,
in fact, prevent the official release of the spec for many
organisations; it's common to require at least 2 successful
implementations of a spec before it is considered ready for release. I'm
not sure that Sun works by those rules though.

MyFaces is intending to add some JSF1.2 type features into the current
1.1-compatible release. Encrypted client-side sessions are already done
for example.

In addition, there is still a lot of work to be done to stabilise the
current 1.1-compatible release. I personally would like to see effort
put into this before moving on to the next spec version.

Regards,

Simon



Re: AW: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Simon Kitching
On Fri, 2006-01-13 at 15:27 +0100, Matthias Kahlau wrote:
> Hi Simon!
> 
> You wrote:
> 
> > NB: The default behaviour (no preserveDataModel) is flawed because it
> > doesn't get (2) right for datasets that may be changed by something
> > other than the viewing user.
> 
> Isn't this only a problem if the dataModel is directly backed by the
> database, so that the database is accessed on each call of getDataModel()?

Well, it's flawed for any "dataset that may be changed by something
other than the viewing user". But yes the most common situation that
occurs in is when an app is retrieving data from a shared database.

When all the data is held in memory and does not change (ie is static
"reference" data) then of course the default behaviour is fine. However
that isn't often the case.

Regards,

Simon



Re: Why is AddResource not usable outside myFaces?

2006-01-13 Thread Simon Kitching
On Fri, 2006-01-13 at 15:51 +0100, Juergen Melzer wrote:
> Hi,
> 
> I want to use the mechanism like myFaces to load javascript resources.
> I use the class org.apache.myfaces.component.html.util.AddResource.
> But when I want to use it I found in 1.1.1:
> "For security reasons, only components member of the 
> org.apache.myfaces.custom are allowed to add ressources"
> In 1.1.x:
> "expected a myfaces custom component class in package 
> org.apache.myfaces.custom"
> 
> Is there is a reason to do this?

The SVN current version of AddResource allows non-faces classes to serve
resources from jars. However this functionality is NOT available in the
1.1.1 release.

There are some steps needed to enable non-faces code to use AddResource;
I haven't done this myself so I'm not entirely sure but I think it
involves writing your own (trivial) ResourceHandler class.

Regards,

Simon



Re: link inside extendedDataTable

2006-01-13 Thread Simon Kitching
On Fri, 2006-01-13 at 17:22 -0500, Ryan Wynn wrote:
> Can anyone explain to me how a link inside extendedDataTable whose
> action is bound to a rowVar bean method gets executed?  I have a case
> where I invoke a method binding on the rowVar bean in the table.  When
> I click on the link the method is executed but not on the correct
> row/bean in the table.  My problem began where I started sorting the
> list return to data in the getData method.  I guess my sorting of the
> list is not being propogated to the list data model.  The rows appear
> in the order that is expected.  It is just invoking the link on the
> correct bean in the unwind process that is not working.  I am using
> myfaces 1.1.1.  Other things to note, the link isImmediate is true (I
> also tried false) and FacesContext.renderResponse is called first in
> the invoked method.  The invoked method also returns null because I
> want to stay on the same view.

There is a hidden field in each form that is used to store the id of the
command component that caused the form to be submitted.

Each command component (commandLink, commandButton, etc) has javascript
attached to it which sets this hidden field to the command component's
id before performing the submit.

In the case of a commandLink in a table, the javascript rendered for
each row will set this hidden field to a slightly different value (ie
indicating the row).

After a submit occurs, the table does:
for each row: 
  set row index
  call decode for each child component

Therefore on each row the commandLink component looks for its id in the
hidden field - but this is only found when table rowIndex matches the
one that the user clicked on. When this occurs, the commandLink
component queues an event for later processing; this is intercepted by
the UIData component which wraps it in a custom event class that knows
about the current row.

When the event is executed, the custom event class ensures the UIData's
rowIndex is set to the appropriate row for the event before the
ActionListeners attached to the commandLink component are run. Result:
the code run by the ActionListeners can look at the parent table, and
see its rowIndex and rowData objects are set to the appropriate values
for the row containing the link that was clicked on.

All this *does work*; I use it - and with sorting enabled too.

Perhaps you're correctly sorting at the render phase, but are returning
the data in a different order during the "decode" phase?

Regards,

Simon



Re: NPE with custom.scope.ScopeUtils

2006-01-13 Thread Dennis Byrne
Thanks.  I only asked because it had been like that since the initial commit 
and I am not very familiar with this component.

Dennis Byrne

>-Original Message-
>From: Bruno Aranda [mailto:[EMAIL PROTECTED]
>Sent: Friday, January 13, 2006 07:44 PM
>To: 'MyFaces Discussion'
>Subject: Re: NPE with custom.scope.ScopeUtils
>
>I guess you are true. I think that the ScopeUtils.isEl should be
>
>beanName.startsWith(EL_BEGIN) && beanName.endsWith(EL_END);
>
>(note the removal of quotes from EL_BEGIN and the removal of the '!'
>before beanName.endsWith)
>
>I've changed that in the SVN, hoping to be enough awake to commit
>things. Thanks Dennis,
>
>Bruno
>
>2006/1/13, Dennis Byrne <[EMAIL PROTECTED]>:
>> I am getting a NPE in ScopeUtils.getManagedBean when making a non-faces 
>> request -> faces response .   The problem goes away if I place the following 
>> at the top of getManagedBean ...
>>
>> if(FacesContext.getCurrentInstance() == null)
>>return null;
>>
>> Also, in ScopeUtils.isEl, should it be
>>beanName.startsWith("EL_BEGIN")
>> or
>>beanName.startsWith(EL_BEGIN)  ?
>>
>>
>>
>




[ot] why you didn't tell me?

2006-01-13 Thread Bruno Aranda
I did not know it before, but the funniest part of being a commiter is
the second definition:

>From The Collaborative International Dictionary of English v.0.48 [gcide]:

 Committer \Com*mit"ter\, n.
1. One who commits; one who does or perpetrates. --South.
   [1913 Webster]

2. A fornicator. [Obs.] --T. Decker.
   [1913 Webster]

I was going to put that "I am a committer" in a resumé, but a friend
of me from the States is still laughing... ;-)

Bruno


Re: NPE with custom.scope.ScopeUtils

2006-01-13 Thread Bruno Aranda
I guess you are true. I think that the ScopeUtils.isEl should be

beanName.startsWith(EL_BEGIN) && beanName.endsWith(EL_END);

(note the removal of quotes from EL_BEGIN and the removal of the '!'
before beanName.endsWith)

I've changed that in the SVN, hoping to be enough awake to commit
things. Thanks Dennis,

Bruno

2006/1/13, Dennis Byrne <[EMAIL PROTECTED]>:
> I am getting a NPE in ScopeUtils.getManagedBean when making a non-faces 
> request -> faces response .   The problem goes away if I place the following 
> at the top of getManagedBean ...
>
> if(FacesContext.getCurrentInstance() == null)
>return null;
>
> Also, in ScopeUtils.isEl, should it be
>beanName.startsWith("EL_BEGIN")
> or
>beanName.startsWith(EL_BEGIN)  ?
>
>
>


link inside extendedDataTable

2006-01-13 Thread Ryan Wynn
Can anyone explain to me how a link inside extendedDataTable whose
action is bound to a rowVar bean method gets executed?  I have a case
where I invoke a method binding on the rowVar bean in the table.  When
I click on the link the method is executed but not on the correct
row/bean in the table.  My problem began where I started sorting the
list return to data in the getData method.  I guess my sorting of the
list is not being propogated to the list data model.  The rows appear
in the order that is expected.  It is just invoking the link on the
correct bean in the unwind process that is not working.  I am using
myfaces 1.1.1.  Other things to note, the link isImmediate is true (I
also tried false) and FacesContext.renderResponse is called first in
the invoked method.  The invoked method also returns null because I
want to stay on the same view.

Thanks,
Ryan


How i can open a link in a browser window using a button ?

2006-01-13 Thread Legolas Woodland


Hi
Thank you for reading my post.
how i can open a pop-up browser ?
I want to open a pop-up browser with a dynamic link which i make by 
using my

parameters.

is it possible to put a button on page and make some code to open a 
pop-up browser ?


Can some one help me to do this ?

I should tell that i can not use Myfaces component and i need a plain 
jsf solution.


Re: mvn artifacts ending up in build?

2006-01-13 Thread Dennis Byrne
OK.  So this is a feature.  

Dennis Byrne

>-Original Message-
>From: Darren Hartford [mailto:[EMAIL PROTECTED]
>Sent: Friday, January 13, 2006 03:46 PM
>To: 'MyFaces Discussion'
>Subject: RE: mvn artifacts ending up in build?
>
>From my experience, most of the new packaged artifacts coming out of
>Maven builds include the pom.xml file.  This is good for people that
>want to take advantage of maven-style repositories (and, for non-Maven
>users, a quick look into pom.xml can show you which dependency library
>and library-version was used when that package was built ;-).
>
>-D 
>
>> -Original Message-
>> From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
>> Sent: Friday, January 13, 2006 3:11 PM
>> To: users@myfaces.apache.org
>> Subject: mvn artifacts ending up in build?
>> 
>> I noticed the following in tamahawk-1.1.2-SNAPSHOT.jar
>> 
>> META-INF.maven.org.apache.myfaces.tomahawk.pom.xml
>> 
>> I am completely new maven, but shouldn't this be kept out of 
>> the binary?
>> 
>> Dennis Byrne
>> 
>> 
>> 
>




RE: mvn artifacts ending up in build?

2006-01-13 Thread Darren Hartford
>From my experience, most of the new packaged artifacts coming out of
Maven builds include the pom.xml file.  This is good for people that
want to take advantage of maven-style repositories (and, for non-Maven
users, a quick look into pom.xml can show you which dependency library
and library-version was used when that package was built ;-).

-D 

> -Original Message-
> From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
> Sent: Friday, January 13, 2006 3:11 PM
> To: users@myfaces.apache.org
> Subject: mvn artifacts ending up in build?
> 
> I noticed the following in tamahawk-1.1.2-SNAPSHOT.jar
> 
> META-INF.maven.org.apache.myfaces.tomahawk.pom.xml
> 
> I am completely new maven, but shouldn't this be kept out of 
> the binary?
> 
> Dennis Byrne
> 
> 
> 


mvn artifacts ending up in build?

2006-01-13 Thread Dennis Byrne
I noticed the following in tamahawk-1.1.2-SNAPSHOT.jar

META-INF.maven.org.apache.myfaces.tomahawk.pom.xml

I am completely new maven, but shouldn't this be kept out of the binary?

Dennis Byrne




Re: JavaScript cannot pick up the selection changes for component?

2006-01-13 Thread Emily Gu
Nevermind. I found a way to do it.
 
Thanks!! 
On 1/13/06, Emily Gu <[EMAIL PROTECTED]> wrote:

Hi,
 
  When I used the _javascript_ to get the value of selected  component, it only got the first value no mattter how I change the selection.
Any examples?
 
Thanks,
Emily


NPE with custom.scope.ScopeUtils

2006-01-13 Thread Dennis Byrne
I am getting a NPE in ScopeUtils.getManagedBean when making a non-faces request 
-> faces response .   The problem goes away if I place the following at the top 
of getManagedBean ...

if(FacesContext.getCurrentInstance() == null)
   return null;

Also, in ScopeUtils.isEl, should it be 
   beanName.startsWith("EL_BEGIN") 
or
   beanName.startsWith(EL_BEGIN)  ?




Re: JSF 1.2 support/plans

2006-01-13 Thread Gary VanMatre

>From: "Balunas, Jay" <[EMAIL PROTECTED]> >> Hello all, > > I have been lurking for some time, and have been investigating JSF for a new > project at my company. Please forgive me is this has come up already - I did > search through several pages of archives and could not find a reference to 1.2 > support roadmaps > > Because this will be a new project starting in about a month, and first release > around end of summer (August -September) I have been investigating both the > current 1.1.1 version of myFaces, and looking into what 1.2 JSF provides. We > are planning on using Ajax and from what research I have done JSF 1.2 has some > hooks for making Ajax requests less of a hack into the life cycle. > > We are also investigating Suns implementation, but I would prefer to stick with > myFaces as the support and community seems stronger. >
 
You might consider Struts Shale's remoting support for myfaces (http://struts.apache.org/struts-shale/shale-remoting/apidocs/index.html).  It allows an AJAX call into the JSF life cycle invoking an action bound method on a managed bean.  It assumes a URL convention where the managed bean name and method are specified as folders within the URL.
 
Consider the following example where “remoting$business”is the managed bean name and “cityAndStateForZip” is the method.: 
sendRequest("http://localhost:8080/struts-shale-usecases/" +    "dynamic/remoting$business/cityAndStateForZip.faces" +    ?zip=" + escape(zip),     processZipCodeSelection);
 
 > Thanks in advance, > Jay > 
Gary
 
> 


Re: quick question: JSCookMenu support now? Thanks.

2006-01-13 Thread Dudu

no..
but The nightly build support actionListeners, is valid to some  
problems but the nightly build still do not works fine...
I'm waiting for a release, if the release will not already pretty son I  
will buy the www.otrix.com webmenu components

:[
http://www.otrix.com/livedemos/webgrid/automaticPaging/index.faces?com.otrix.faces.CLIENT_SIDE_EVENT=_id0%3Aleft%3A_id6%3A_id25%3A_id26%3A%3A%3A%3A

On Fri, 13 Jan 2006 16:36:27 -0200, Dave <[EMAIL PROTECTED]> wrote:





-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events,  
holidays, whatever.




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/





___ 
Yahoo! doce lar. Faça do Yahoo! sua homepage. 
http://br.yahoo.com/homepageset.html 



JavaScript cannot pick up the selection changes for component?

2006-01-13 Thread Emily Gu
Hi,
 
  When I used the _javascript_ to get the value of selected  component, it only got the first value no mattter how I change the selection.
Any examples?
 
Thanks,
Emily


JSF 1.2 support/plans

2006-01-13 Thread Balunas, Jay
Hello all,

I have been lurking for some time, and have been investigating JSF for a new 
project at my company.  Please forgive me is this has come up already - I did 
search through several pages of archives and could not find a reference to 1.2 
support roadmaps

Because this will be a new project starting in about a month, and first release 
around end of summer (August -September) I have been investigating both the 
current 1.1.1 version of myFaces, and looking into what 1.2 JSF provides.  We 
are planning on using Ajax and from what research I have done JSF 1.2 has some 
hooks for making Ajax requests less of a hack into the life cycle.

We are also investigating Suns implementation, but I would prefer to stick with 
myFaces as the support and community seems stronger.

Thanks in advance,
Jay




quick question: JSCookMenu support now? Thanks.

2006-01-13 Thread Dave

		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.

Re: Bug in InputHtml in IE

2006-01-13 Thread Dave
Hi  There are two bugs on this already filed in JIRA. Please vote for them. Hope someone who are familar with the code can fix it. :)[EMAIL PROTECTED] wrote:  Hi all!   I just realized, that the HTMLEDITOR t:inputHtml doesn't work correct in IE. When I load some text into the editor and when I just move the mouse on the editor text field, all my text disapperas... I display the htmleditor in a jeniapopup. Could this be a problem.  Here is my code:    Here are two screenshot to show what i
 mean.   When the page is loaded it looks like this:When I move the mouse into the textfield, it looks like this: My Text as well as the properties are gone.In Firefox everything is normal...   Any ideas what this could be   
		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.

Re: MyFaces + Shale + Facelets

2006-01-13 Thread Mike Kienenberger
On 1/13/06, Werner Punz <[EMAIL PROTECTED]> wrote:
> Have in mind that jsf-spring works quite well in many situations, but
> some situations still are problematic with that lib, I recently (in fact
> last night) ran into the situation of not being able to deploy an app on
> websphere due to the fact that jsf-spring interfered with the WAS6 class
> loader.

Werner, are you sure it was an issue with jsf-spring and not with spring?
Remember when we talked about the jenia4faces/jsf-spring/jetty issue
with resolving references?  It turned out to an error in Spring, not
jsf-spring.

There's not a lot going on in the jsf-spring code.


Re: How to make Client Side JS validation working on form submission?

2006-01-13 Thread Emily Gu
Thanks, This does the trick. It is unconventional...
 
Thanks a lot for the help!
Emily 
On 1/13/06, Enrique Medina <[EMAIL PROTECTED]> wrote:
Take a look at:
http://wiki.apache.org/myfaces/_javascript_WithJavaServceFaces
2006/1/13, Emily Gu < [EMAIL PROTECTED]>: 


Hi,
 
  None of my client side form validation is working. I have a page with form and CommandLink as the button. I have tried to do 
 
   .
 
  or
   
 >
 value="Create" />
 
   None of JS got invoked. How to make such JS client side validation working?
 
Thanks for your help!!
Emily


Re: abt how to locate jsp file and the syntax of myfaces-config.xml

2006-01-13 Thread Mike Kienenberger
It's my understanding that the inaccessiblity of files placed in
WEB-INF is part of the servlet specification.

Thus, this is true if you're using Spring, JSF, Struts, WebWorks,
Click, WebObjects, or anything else.

What it does is makes it illegal to directly request any resource with
a URL that contains /WEB-INF/ in the path.

So, if you want to use

http://localhost/mywebapp/index.jsp
http://localhost/mywebapp/xxx.jsp

then your default *.jsp-processing servlet needs to either have a
method in the code to fetch the hidden page, or you need to move your
jsp files out of WEB-INF.

Note that I'm no expert in this area, so some of this information is
possibly incorrect.

On 1/13/06, wch zll <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In Spring it says put jsp files in WEB-INF can protect
> your files from direct access, but Spring has its own
> lib, so in spring.xml file has
>  id="viewResolver"class="org.springframework.web.servlet.view.InternalResourceViewResolver
> ">
> 
> org.springframework.web.servlet.view.JstlView
> 
>  name="prefix">/WEB-INF/jsp/
>  name="suffix">.jsp
> 
>
> So here it has "prefix" and "suffix", so the yyy.jsp
> inside WEB-INF/jsp/ can still be access while
> http://localhost/mywebapp/yyy.jsp
>
> So i am just wondering in myFaces, is there any
> configuration also this kind of functionality.
>
>
>
> Thanks!
>
>
>
> --- Jeffrey Porter
> <[EMAIL PROTECTED]> wrote:
>
> >
> > In you're first email you said want to access..
> > > http://localhost/mywebapp/yyy.jsp,
> >
> > In your second message, you said you want it to be
> > protected.
> >
> > So if you want yyy.jsp to be protected, then why are
> > you trying to get
> > direct access to it?
> >
> > I presume was you would want to use yyy.jsp as an
> > include later on,
> > rather than direct access to it. For example...
> >
> > <%@ include file="/WEB-INF/jsp/include.jsp" %>
> >
> >
> > I could be completely wrong about this. I've not
> > used the spring frame
> > work.
> >
> > JP
> >
> >
> >
> > -Original Message-
> > From: wch zll [mailto:[EMAIL PROTECTED]
> > Sent: 13 January 2006 13:03
> > To: MyFaces Discussion
> > Subject: RE: abt how to locate jsp file and the
> > syntax of
> > myfaces-config.xml
> >
> > Hi,
> > To have yyy.jsp inside WEB-INF/jsp so that people
> > won't get direct access via
> > http://localhost/mywebapp/WEB-INF/jsp/yyy.jsp. It's
> > something called proteced that was recommonded by
> > SpringFramework. Their samples are all in this kind
> > of
> > folder structure. But Spring has its syntax as
> >  >
> class="org.springframework.web.servlet.view.InternalResourceViewResolver
> > ">
> > 
> >
> >
> org.springframework.web.servlet.view.JstlView
> > 
> >  >
> name="prefix">/WEB-INF/jsp/
> >  > name="suffix">.jsp
> > 
> > to resovle this. But i can't find any statement abt
> > how resovle this using myFaces.
> >
> >
> >
> > Best Regards!
> >
> >
> >
> >
> > --- Jeffrey Porter
> > <[EMAIL PROTECTED]> wrote:
> >
> > > Why do you have the yyy.jsp under WEB-INF ?
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: wch zll [mailto:[EMAIL PROTECTED]
> > > Sent: 13 January 2006 12:50
> > > To: myfaces
> > > Subject: abt how to locate jsp file and the syntax
> > > of myfaces-config.xml
> > >
> > > Hi,
> > >
> > > I have a standard web application, it's arranged
> > in
> > > very normal way. The structure of folders like:
> > >
> > > mywebapp
> > > index.jsp
> > > xxx.jsp
> > > --css
> > >   --some css files
> > > --jscript
> > >   --some js files
> > > --images
> > >   --some images
> > > --WEB-INF
> > >   --web.xml
> > >   --myfaces-config.xml
> > >   --classes
> > > --com
> > >   --work
> > > --ecs
> > >   --some java files
> > >   --jsp
> > > --yyy.jsp
> > >
> > > the problem now is how I can launch the page by
> > > http://localhost/mywebapp/index.jsp
> > > http://localhost/mywebapp/xxx.jsp
> > >
> > > but i can't launch
> > > http://localhost/mywebapp/yyy.jsp,
> > > error is page not found. I know this error would
> > > occur
> > > since yyy.jsp is in WEB-INF/jsp/,
> > > but if I want launch this yyy.jsp, then how should
> > I
> > > configure web.xml or myfaces-config.xml? So can
> > set
> > > the path.
> > >
> > >
> > > Best Regards!
> > >
> > > chaohe
> > >
> > >
> > >
> > >
> > > __
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > http://mail.yahoo.com
> > >
> >
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


Re: How to make Client Side JS validation working on form submission?

2006-01-13 Thread Enrique Medina
Take a look at:http://wiki.apache.org/myfaces/_javascript_WithJavaServceFaces2006/1/13, Emily Gu <
[EMAIL PROTECTED]>:Hi,
 
  None of my client side form validation is working. I have a page with form and CommandLink as the button. I have tried to do 
 
   .
 
  or
   
 >
 value="Create" />
 
   None of JS got invoked. How to make such JS client side validation working?
 
Thanks for your help!!
Emily




RE: How to make Client Side JS validation working on form submission?

2006-01-13 Thread Jeffrey Porter








To start with look at…

 

http://www.exadel.com/tutorial/jsf/jsftags-guide.html

 

& the section…

 

Enter address:

 

 

required="true" will make sure the person enters some data in
to that field.

Also add in the line…

 

 id="messageList" styleClass="error" summaryFormat="{0} in {1}" />

 

That will print out the error messages.

 

Hope that gets you started.

 

Jeff

 

 

 

-Original Message-
From: Emily Gu
[mailto:[EMAIL PROTECTED] 
Sent: 13 January 2006 17:12
To: MyFaces Discussion
Subject: Re: How to make Client
Side JS validation working on form submission?

 



I want to do very simple
validation. Such as,





 





Whether a
 is empty. Or when the radio selection changes, some text
input field becomes required. I don't think it is  a good idea to go back
to Server Side each time for such simple validation. Can you explain more on
what MyFaces great validation framework? 





 





Thanks for your help!





Emily

 





On 1/13/06, Jeffrey Porter <[EMAIL PROTECTED]>
wrote: 



What is the validation
you want to do in your _javascript_?

 

MyFaces provides a very
good automatic validation of forms framework.

 

Jeff



 

-Original Message-
From: Emily Gu [mailto: [EMAIL PROTECTED]] 
Sent: 13 January 2006 16:52
To: users@myfaces.apache.org
Subject: How to make Client Side
JS validation working on form submission?

 



Hi,





 





  None of my client side form
validation is working. I have a page with form and CommandLink as the
button. I have tried to do 





 





  
. 





 





  or





   






action="" 






styleClass="formButtonLink"






>






>






value="Create" />





 





   None of JS got invoked.
How to make such JS client side validation working?





 





Thanks for your help!!





Emily











 








Re: How to make Client Side JS validation working on form submission?

2006-01-13 Thread Emily Gu
I want to do very simple validation. Such as,
 
Whether a  is empty. Or when the radio selection changes, some text input field becomes required. I don't think it is  a good idea to go back to Server Side each time for such simple validation. Can you explain more on what MyFaces great validation framework?

 
Thanks for your help!
Emily 
On 1/13/06, Jeffrey Porter <[EMAIL PROTECTED]> wrote:


What is the validation you want to do in your _javascript_?
 
MyFaces provides a very good automatic validation of forms framework.
 
Jeff

 
-Original Message-From: Emily Gu [mailto:
[EMAIL PROTECTED]] Sent: 13 January 2006 16:52To: 
users@myfaces.apache.orgSubject: How to make Client Side JS validation working on form submission?
 

Hi,

 

  None of my client side form validation is working. I have a page with form and CommandLink as the button. I have tried to do 


 

   .


 

  or

   

 action="" 

 styleClass="formButtonLink"

 >

 >

 value="Create" />

 

   None of JS got invoked. How to make such JS client side validation working?


 

Thanks for your help!!

Emily


RE: How to make Client Side JS validation working on form submission?

2006-01-13 Thread Jeffrey Porter








What is the validation you want to do in
your _javascript_?

 

MyFaces provides a very good automatic validation
of forms framework.

 

Jeff

 

-Original Message-
From: Emily Gu
[mailto:[EMAIL PROTECTED] 
Sent: 13 January 2006 16:52
To: users@myfaces.apache.org
Subject: How to make Client Side
JS validation working on form submission?

 



Hi,





 





  None
of my client side form validation is working. I have a page with form
and CommandLink as the button. I have tried to do 





 





  
.





 





  or





   






action="" 






styleClass="formButtonLink"






>






>






value="Create" />





 





   None
of JS got invoked. How to make such JS client side validation working?





 





Thanks for your help!!





Emily










How to make Client Side JS validation working on form submission?

2006-01-13 Thread Emily Gu
Hi,
 
  None of my client side form validation is working. I have a page with form and CommandLink as the button. I have tried to do 
 
   .
 
  or
   
 >
 value="Create" />
 
   None of JS got invoked. How to make such JS client side validation working?
 
Thanks for your help!!
Emily


RE: abt how to locate jsp file and the syntax of myfaces-config.xml

2006-01-13 Thread wch zll
Hi,

In Spring it says put jsp files in WEB-INF can protect
your files from direct access, but Spring has its own
lib, so in spring.xml file has

 
org.springframework.web.servlet.view.JstlView

/WEB-INF/jsp/
.jsp


So here it has "prefix" and "suffix", so the yyy.jsp
inside WEB-INF/jsp/ can still be access while
http://localhost/mywebapp/yyy.jsp

So i am just wondering in myFaces, is there any
configuration also this kind of functionality.



Thanks!



--- Jeffrey Porter
<[EMAIL PROTECTED]> wrote:

> 
> In you're first email you said want to access..
> > http://localhost/mywebapp/yyy.jsp,
> 
> In your second message, you said you want it to be
> protected.
> 
> So if you want yyy.jsp to be protected, then why are
> you trying to get
> direct access to it?
> 
> I presume was you would want to use yyy.jsp as an
> include later on,
> rather than direct access to it. For example...
> 
> <%@ include file="/WEB-INF/jsp/include.jsp" %>
> 
> 
> I could be completely wrong about this. I've not
> used the spring frame
> work.
> 
> JP
> 
> 
> 
> -Original Message-
> From: wch zll [mailto:[EMAIL PROTECTED] 
> Sent: 13 January 2006 13:03
> To: MyFaces Discussion
> Subject: RE: abt how to locate jsp file and the
> syntax of
> myfaces-config.xml
> 
> Hi,
> To have yyy.jsp inside WEB-INF/jsp so that people
> won't get direct access via
> http://localhost/mywebapp/WEB-INF/jsp/yyy.jsp. It's
> something called proteced that was recommonded by
> SpringFramework. Their samples are all in this kind
> of
> folder structure. But Spring has its syntax as
> 
class="org.springframework.web.servlet.view.InternalResourceViewResolver
> ">
> 
>   
>
org.springframework.web.servlet.view.JstlView
> 
> 
name="prefix">/WEB-INF/jsp/
>  name="suffix">.jsp
>
> to resovle this. But i can't find any statement abt
> how resovle this using myFaces.
> 
> 
> 
> Best Regards!
> 
> 
>  
> 
> --- Jeffrey Porter
> <[EMAIL PROTECTED]> wrote:
> 
> > Why do you have the yyy.jsp under WEB-INF ?
> > 
> > 
> > 
> > 
> > -Original Message-
> > From: wch zll [mailto:[EMAIL PROTECTED] 
> > Sent: 13 January 2006 12:50
> > To: myfaces
> > Subject: abt how to locate jsp file and the syntax
> > of myfaces-config.xml
> > 
> > Hi,
> > 
> > I have a standard web application, it's arranged
> in
> > very normal way. The structure of folders like:
> > 
> > mywebapp
> > index.jsp
> > xxx.jsp
> > --css
> >   --some css files
> > --jscript
> >   --some js files
> > --images
> >   --some images
> > --WEB-INF
> >   --web.xml
> >   --myfaces-config.xml
> >   --classes
> > --com
> >   --work
> > --ecs
> >   --some java files
> >   --jsp
> > --yyy.jsp
> > 
> > the problem now is how I can launch the page by
> > http://localhost/mywebapp/index.jsp
> > http://localhost/mywebapp/xxx.jsp
> > 
> > but i can't launch
> > http://localhost/mywebapp/yyy.jsp,
> > error is page not found. I know this error would
> > occur
> > since yyy.jsp is in WEB-INF/jsp/,
> > but if I want launch this yyy.jsp, then how should
> I
> > configure web.xml or myfaces-config.xml? So can
> set
> > the path.
> > 
> > 
> > Best Regards!
> > 
> > chaohe
> > 
> > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://mail.yahoo.com 
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


RE: abt how to locate jsp file and the syntax of myfaces-config.xml

2006-01-13 Thread wch zll
Hi,

In Spring it says put jsp files in WEB-INF can protect
your files from direct access, but Spring has its own
lib, so in spring.xml file has

 
org.springframework.web.servlet.view.JstlView

/WEB-INF/jsp/
.jsp


So here it has "prefix" and "suffix", so the yyy.jsp
inside WEB-INF/jsp/ can still be access while
http://localhost/mywebapp/yyy.jsp

So i am just wondering in myFaces, is there any
configuration also this kind of functionality.



Thanks!








--- Jeffrey Porter
<[EMAIL PROTECTED]> wrote:

> 
> In you're first email you said want to access..
> > http://localhost/mywebapp/yyy.jsp,
> 
> In your second message, you said you want it to be
> protected.
> 
> So if you want yyy.jsp to be protected, then why are
> you trying to get
> direct access to it?
> 
> I presume was you would want to use yyy.jsp as an
> include later on,
> rather than direct access to it. For example...
> 
> <%@ include file="/WEB-INF/jsp/include.jsp" %>
> 
> 
> I could be completely wrong about this. I've not
> used the spring frame
> work.
> 
> JP
> 
> 
> 
> -Original Message-
> From: wch zll [mailto:[EMAIL PROTECTED] 
> Sent: 13 January 2006 13:03
> To: MyFaces Discussion
> Subject: RE: abt how to locate jsp file and the
> syntax of
> myfaces-config.xml
> 
> Hi,
> To have yyy.jsp inside WEB-INF/jsp so that people
> won't get direct access via
> http://localhost/mywebapp/WEB-INF/jsp/yyy.jsp. It's
> something called proteced that was recommonded by
> SpringFramework. Their samples are all in this kind
> of
> folder structure. But Spring has its syntax as
> 
class="org.springframework.web.servlet.view.InternalResourceViewResolver
> ">
> 
>   
>
org.springframework.web.servlet.view.JstlView
> 
> 
name="prefix">/WEB-INF/jsp/
>  name="suffix">.jsp
>
> to resovle this. But i can't find any statement abt
> how resovle this using myFaces.
> 
> 
> 
> Best Regards!
> 
> 
>  
> 
> --- Jeffrey Porter
> <[EMAIL PROTECTED]> wrote:
> 
> > Why do you have the yyy.jsp under WEB-INF ?
> > 
> > 
> > 
> > 
> > -Original Message-
> > From: wch zll [mailto:[EMAIL PROTECTED] 
> > Sent: 13 January 2006 12:50
> > To: myfaces
> > Subject: abt how to locate jsp file and the syntax
> > of myfaces-config.xml
> > 
> > Hi,
> > 
> > I have a standard web application, it's arranged
> in
> > very normal way. The structure of folders like:
> > 
> > mywebapp
> > index.jsp
> > xxx.jsp
> > --css
> >   --some css files
> > --jscript
> >   --some js files
> > --images
> >   --some images
> > --WEB-INF
> >   --web.xml
> >   --myfaces-config.xml
> >   --classes
> > --com
> >   --work
> > --ecs
> >   --some java files
> >   --jsp
> > --yyy.jsp
> > 
> > the problem now is how I can launch the page by
> > http://localhost/mywebapp/index.jsp
> > http://localhost/mywebapp/xxx.jsp
> > 
> > but i can't launch
> > http://localhost/mywebapp/yyy.jsp,
> > error is page not found. I know this error would
> > occur
> > since yyy.jsp is in WEB-INF/jsp/,
> > but if I want launch this yyy.jsp, then how should
> I
> > configure web.xml or myfaces-config.xml? So can
> set
> > the path.
> > 
> > 
> > Best Regards!
> > 
> > chaohe
> > 
> > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://mail.yahoo.com 
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Why is AddResource not usable outside myFaces?

2006-01-13 Thread Pierpaolo Follia
I'd like to know it too. I have had to duplicate that class to use the 
same feature for my components...


Bye

Juergen Melzer wrote:

Hi,

I want to use the mechanism like myFaces to load javascript resources.
I use the class org.apache.myfaces.component.html.util.AddResource.
But when I want to use it I found in 1.1.1:
"For security reasons, only components member of the 
org.apache.myfaces.custom are allowed to add ressources"

In 1.1.x:
"expected a myfaces custom component class in package 
org.apache.myfaces.custom"


Is there is a reason to do this?

Regards,
Juergen

_
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar 
mit Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt 
neu! http://desktop.msn.de/ Jetzt gratis downloaden!




--
Pierpaolo Follia
Wave S.r.l. - Vai Benaco 24/B, Bedizzole (BS)
Telefono: +39 030 687561
Fax: +39 030 6875690



RE: Urgent: Collapsible Panel with data table not workingIllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-13 Thread Saurabh Rasinghaney
Hi Simon,

Our requirement is not flexible enough to change the interface - though
I can use a different component but the functionality should be same.

Can I add other components such as Input and check box etc, to a tree
table component? Or can you suggest any component which can provide
single level drill down with component addition at parent and child
levels.

Also, can I use Oracle ADF with Apache MyFaces? I wanted to understand
if it will be feasible and wise to do that. I was looking at it and
thought we might need to do two different Faces Servlet configurations
and configure extns such that ".jsf" for Apache Myfaces and ".faces" for
Oracle ADF.

Thanks a lot for your help.

Best Regards,


Saurabh Raisinghaney 


-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 12:05 AM
To: MyFaces Discussion
Subject: RE: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed

Hi Saurabh,

You can use subversion to look at the history of the CollapsiblePanel
component/tag/renderer classes and see what patches have been applied
since the last release. You'll need to figure out which bits are
suitable for applying to the 1.1.1 release and which are not.

I expect the irian site is running a nightly build, not an official
release.

Using c:foreach around JSF components is definitely not supported; it's
not at all surprising that problems have occurred.

However if I were you, I'd redesign the interface to avoid collapsible
panels entirely. It's the simplest solution!

Cheers,

Simon

On Thu, 2006-01-12 at 16:02 -0600, Saurabh Rasinghaney wrote:
> Also if you go to this URL
> http://www.irian.at/myfaces/collapsiblePanel.jsf 
> Looking at the example given here.it looks like it worksand
> there is some way to make it work
> 
> 
> Best Regards,
> 
> 
> Saurabh Raisinghaney 
> 
> 
> -Original Message-
> From: Saurabh Rasinghaney 
> Sent: Thursday, January 12, 2006 3:47 PM
> To: MyFaces Discussion
> Subject: RE: Urgent: Collapsible Panel with data table not working
> IllegalStateException: Client-id : _id3ToggleCollapsed
> Importance: High
> 
> Hi Simon & Martin,
> 
> I tried using a foreach loop and Collapsible Panel...but now I am
facing
> problem with that too inside foreach loop h:input tags dosen't work -
> data is not getting populated in input tags - so now I m stuck again,
> please tell me the patch which I can apply to make collapsible panel
> work with data table.
> 
> 
> Thanks & Best Regards,
> 
> 
> 
> Saurabh Raisinghaney 
> 
> 
> 
> -Original Message-
> From: Simon Kitching [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 11, 2006 6:06 PM
> To: MyFaces Discussion
> Subject: Re: Urgent: Collapsible Panel with data table not working
> IllegalStateException: Client-id : _id3ToggleCollapsed
> 
> Saurabh Rasinghaney wrote:
> > Thanks for your replies Simon and Martin,
> > 
> > For me everything works fine - all other input components - in data
> > table except Collapsible Panel and I am using MyFaces 1.1.1, not the
> Sun
> > Ref Impl.
> > 
> > As you said there is a bug in using Collapsible Panel within
> Datatable,
> > fixed but not available as of now. Could you tell me when the patch
> for
> > this bug would be available?
> 
> So far, MyFaces hasn't released any "bugfix" releases, and I don't 
> expect to see one this cycle either; it just releases the next major 
> release and expects people to upgrade.
> 
> Hopefully bugfix releases will become part of MyFaces procedures in
the 
> future.
> 
> The next major release is probably a couple of months away.
> 
> Regards,
> 
> Simon
> 
> 




RE: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Yee CN

>Oh - and also that the user will never see any changes to the database
>made concurrently by other users. That may be desirable, or maybe not.
>Of course if it is desirable, then a read before each render has to be
>done. 

>Cheers,

>Simon

I forgot about that! In that case a simpler pattern would work nicely:

preserveDataModel="true" always,

and

public DataModel getDataModel() {
return new LocalDataModel(.);
}

This will still cut out the database access during the Restore-View phase,
and would be sufficient for almost all cases.

For those who are really efficient conscious - my original pattern can still
be used (maybe with 'refresh' button for user to refresh the data). I don't
think there will be any significant differences between these two patterns
in real cases.

I think components that do not save its state are 'wrong'. JSF handles this
by calling the backing bean, while ASP.NET simply left them blank - but both
are wrong in their own way. 

In ASP.NET once a component is specified to participate in viewState then it
behaves like my first pattern. But there is no equivalent to the second
pattern. In ASP.NET you simply have to do refresh a dataTable manually.

I am really happy to find a frame of comparison between these two
frameworks. JSF does has its advantages - but it has been hard work trying
to figure out how to use it properly though.

Regards,
Yee





Why is AddResource not usable outside myFaces?

2006-01-13 Thread Juergen Melzer

Hi,

I want to use the mechanism like myFaces to load javascript resources.
I use the class org.apache.myfaces.component.html.util.AddResource.
But when I want to use it I found in 1.1.1:
"For security reasons, only components member of the 
org.apache.myfaces.custom are allowed to add ressources"

In 1.1.x:
"expected a myfaces custom component class in package 
org.apache.myfaces.custom"


Is there is a reason to do this?

Regards,
Juergen

_
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit 
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu! 
http://desktop.msn.de/ Jetzt gratis downloaden!




RE: dataScroller

2006-01-13 Thread Miller, John








Not that I am aware of, however it would
be a simple change to add, I would recommend asking the dev community to add
this functionality. As a workaround you could add multiple scroller components
and only render the one you want passed on your page, this is sloppy but would
work: for example (sorry about the incomplete code I am at work and don’t
have time to give you actual working examples)

 



    

    

    



 



    

    

    

    



 



    

    

    



 

 









From: Tom Butler
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006
9:33 PM
To: 'MyFaces Discussion'
Subject: RE: dataScroller



 

Is there an easy way to further control
the datascroller functionality – specifically, not display the
‘previous’ or ‘first’ control if on the first page of
data (and also not display the ‘next’ or ‘last’ control
if on the last page of data)?

 









From: Miller, John
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006
8:55 AM
To: MyFaces
 Discussion
Subject: RE: dataScroller



 



DataScroller by default will not render if
there is only one page of data, however the facets will, you can turn this off
by simply adding the following attribute to your datascroller

 

renderFacetsIfSinglePage="false"



 

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006
7:15 AM
To: users@myfaces.apache.org
Subject: AW: dataScroller



 



Another possible is that you set the
rendered attribute of the datascroller  to false or true at the point
where you get your list for the datatable in the backing bean.





e.g something like that in your backing
bean:





 





rowList is the result you will display on
the datatable. In my example a datascroller will only be displayed if the list
contains more than 5 items.





 





 if (rowList.size() > 5) {
dbAdminDto.setShowDatascroller(true);
   }
   else {
dbAdminDto.setShowDatascroller(false);
   }





 





 





in the JSP:











    rendered="#{dbAdminDto.showDatascroller}"





...





/>





 





I hope it's clear, what I mean...





 





Regards





Andy





 





-Ursprüngliche Nachricht-
Von: Vladimir Coutinho
[mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 12. Januar
2006 13:08
An: myfaces user list
Betreff: dataScroller

I'm trying to render a dataScroller only when the number of rows of the
table are greater than rows exibited on a page.
I tried this :  rendered="#{((rowsCount>displayedRowsCountVar) ?
true : false)}" , but the dataScroller is not displayed, despite the
number of rows.
...
<%@ taglib uri="http://myfaces.apache.org/tomahawk"
prefix="t"%>
...
 
   
for="">
   
fastStep="3"
   
pageCountVar="pageCount"
   
pageIndexVar="pageIndex"
   
rowsCountVar="rowsCount"
   
styleClass="scroller"
   
displayedRowsCountVar="displayedRowsCountVar"
   
firstRowIndexVar="firstRowIndex"
   
lastRowIndexVar="lastRowIndex"
   
pageCountVar="pageCount"
   
paginator="true"
   
paginatorMaxPages="6"
   
paginatorTableClass="paginator"
   
rendered="#{((rowsCount>displayedRowsCountVar) ? true :
false)}"  
 
   
paginatorActiveColumnStyle="font-weight:bold;">
.




__ This
email and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. If you have
received this email in error please notify your system manager. This footnote
also confirms that this email message has been swept for the presence of
computer viruses.
__ 





 






NOTICE: This message, including all attachments transmitted with it, is for the
use of the addressee only. It may contain proprietary, confidential and/or
legally privileged information belonging to Litle & Co. No confidentiality
or privilege is waived or lost by any mistransmission. If you are not the intended
recipient, you must not, directly or indirectly, use, disclose, distribute,
print or copy any part of this message. If you believe you have received this
message in error, please delete it and all copies of it from your system and
notify the sender immediately by reply e-mail. Thank you.










AW: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Matthias Kahlau
Hi Simon!

You wrote:

> NB: The default behaviour (no preserveDataModel) is flawed because it
> doesn't get (2) right for datasets that may be changed by something
> other than the viewing user.

Isn't this only a problem if the dataModel is directly backed by the
database, so that the database is accessed on each call of getDataModel()?


Regards,

Matthias


> -Ursprungliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von Simon Kitching
> Gesendet: Freitag, 13. Januar 2006 12:58
> An: 'MyFaces Discussion'
> Betreff: Re: An optimised pattern for using t:dataTable - please verify.
>
>
> Hi Yee,
>
> Yes, I agree with this. I think you've put it all very nicely.
>
> The only concern is that point (6) can be hard to get right.
>
> NB: The default behaviour (no preserveDataModel) is flawed because it
> doesn't get (2) right for datasets that may be changed by something
> other than the viewing user.
>
> Cheers,
>
> Simon
>
> On Fri, 2006-01-13 at 19:19 +0800, Yee CN wrote:
> > Hi,
> >
> > Below are some thoughts that came to me after months of trying
> to understand the dataTable. Please verify that it is accurate
> enough for Wiki.
> >
> > 1)By definition the Restore-View phase should restores
> whatever that was being rendered in the Render-Response phase of
> the last request.
> > 2)A t:dataTable that does not persists its data in
> viewState would have to call the backing bean to obtain the table
> data again during the Restore-View phase. If the data obtained is
> different from what was being rendered previously, it could lead
> to inconsistencies.
> > 3)That explains tomahawk preserveDataModel="true" extension
> to dataTable component – to make ensure that (1) is upheld.
> > 4)Given the above understanding, consider the code scriplets below.
> > 5)preserveDataModel should be set to true base on the
> reasons given above. It will restores the backing bean dataModel
> using the setter method (*1), during the Restore-View phase.
> > 6)If the backing bean action changes the database, then the
> dataModel should be invalidated (*2) so that it will be
> regenerated with the updated data.
> > 7)However if the bean action is known to not doing any
> update to the database, the dataModel should be left alone.
> > 8)This pattern will avoid the most hated and hotly
> discussed problems of JSF hitting the database twice on every
> request. This pattern is actually highly optimal – in that it
> will only hit the database again when you explicitly invalidate
> the dataModel. The price to pay is relatively small – which is
> saving the page of data in the viewState.
> >
> > --- The JSF --
> >
> >>
> > …
> >
> > value="#{myBean.dataModel}"
> >
> > preserveDataModel="true">
> >
> >
> > --- The Backing Bean --
> >
> > public class myBean extends serializable {
> >
> > (*2) public String changeDbAction() {
> > // an action that changes the database. Invalidate the
> dataModel here
> > // so that the it will be regenerated during the
> Render-Response phase
> > this.dataModel = null;
> > …
> > return SOME_NAVIGATION_RESULT;
> > }
> >
> > (*3) public String doesNotChangeDbAction() {
> > // action that does not change the database. So leaves the
> dataModel alone
> > // and the Render-Response phase will not result in hitting
> the database.
> > …
> > Return SOME_NAVIGATION_RESULT;
> > }
> >
> >
> >
> > (*1) public setDataModel(DataModel d) {
> > // t:dataTable will call this method to restore the table data
> > this.dataModel = d;
> > }
> >
> > public DataModel getDataModel() {
> > // if the dataModel is being invalidated then
> regenerates it again
> > if (dataModel == null) {
> > dataModel = new LocalDataModel(…);
> > }
> > return dataModel;
> > }
> >
> >
> >
> > }
> >
> >
> >
> >
> >
> > Best regards,
> >
> > Yee
> >
> >
>



Bad config web.xml > no getscrolling() function in html page

2006-01-13 Thread Adrien FOURES

Hello

I have try to pass to myFaces 1.0.8 to 1.1.1 and with ADF faces ea19, 
component works but i have got a problem.
In final html page in navigator i have javascript error, because render 
component call javascript function, that is no insert in page, like 
getscrolling().


I build my configuration with your web site help and with simple 
application, but i don't see where i have wrong, some boby can tell me 
what is it wrong with my config , is it the listener in tld that is no 
call ??



thanks,

Adrien


RE: How can I redirect from a servlet to a JSF page (that is backed by a bean)?

2006-01-13 Thread Jeffrey Porter


Hello all again.

I've messed around with the Tobago code for 5 hours now and have
achieved 1/2 what I want.

I can redirect to a JSF page & populate the backing bean, but...

I now have this problem with the redirect code...

The problem I have is when a commandButton on the JSF page is clicked it
makes another call to NonFacesRequestServlet servlet, rather than making
a call back into the servlet from MyFaces.

I'm sure this problem is to do with what I should be returning in the

  String getFromViewId() method. 

And what I should have in my  section of
faces-config.xml.


Does anyone have any ideas?

Thank you!
Jeff.





-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: 11 January 2006 18:50
To: MyFaces Discussion
Subject: Re: How can I redirect from a servlet to a JSF page (that is
backed by a bean)?

If nothing else, this question has been asked enough times that
someone who's using it or has ideas how to solve it should write up a
wiki page on the topic :)

On 1/11/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> Hi Jeffrey,
>
> you are in the situation to serve a Non-Faces Request to a Faces
> Response as described in the jsf 1.1 spec in section 2.1.1.
>
> Take a look at tobagos NonFacesRequestServlet [1] how this situation
> could handled.
>
> I don't know if there is somthing like this in tomahawk, could be a
> candidate for commons.jar.
>
> Regards,
>   Volker
>
> [1]:
>
http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-core/src
/main/java/org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java
?view=markup
>
> Jeffrey Porter wrote:
> >
> >
> > Hello all.
> >
> >
> >
> > I have the situation where I want to send a URL out in an email for
a
> > person to click on, so that they can then see a page in my system.
> >
> >
> >
> > Normally I'd have a backing servlet that takes the parameters in and
> > redirects to the page I want the user to view.
> >
> > But since I'm using myfaces, I don't know how to redirect to a JSF
page.
> >
> >
> >
> > In this case I'm at a complete loss to where I should start.
> >
> >
> >
> > Can some one please prod me in the correct direction.
> >
> >
> >
> > Thanks
> >
> > Jeff
> >
> >
> >
>
> --
> Don't answer to From: address!
> Mail to this account are droped if not recieved via mailinglist.
> To contact me direct create the mail address by
> concatenating my forename to my senders domain.
>


RE: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Jesse Alexander \(KBSA 21\)
in this direction. thanks for the hint.

Then come the other requirements as well:
- ability to render one record on more than one row
- dynamic col-spans according to different data-objects
- automatic datascroller
- sort and filter headers (multiple sort criterias)

Our users (read the developers here) are VERY creative...

But I still hope we find the cash to finance our inhous
infrastructure project... to make such components ;-)

regards
Alexander

-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 2:11 PM
To: MyFaces Discussion
Subject: RE: An optimised pattern for using t:dataTable - please verify.

On Fri, 2006-01-13 at 13:34 +0100, Jesse Alexander (KBSA 21) wrote:
> I am milling around since quite some time on the subject of 
> datatables.
> 
> In our app we have the case that hibernates fetches a few megabytes of
> data, which will then be saved in the state and the hibernate-objects 
> remain referenced -> no gc...
> 
> My current thoughts are about a datamodel that does not keep all data
> but just a part of the data active and requests the missing data when
> paging is requested...
> 
> But I still have the unfinished business of the optional validation
for 
> JSF 1.1 (without facelets)
> 
> if we find some developers that want to start on such a better table-
> component... (without committer-rights) we can share the code on a
> temporary base on the js-comp.sf.net project

Have you read this? I'm using this with success, as are others:
  http://wiki.apache.org/myfaces/WorkingWithLargeTables

Regards,

Simon



Re: MyFaces + Shale + Facelets

2006-01-13 Thread Alexandre Poitras
Yes I agree with you but it would be great to be able to use the clean
EL syntax of JSF managed beans in the xml files. To refer aother bean
property in spring, you need to declare it using a special bean wich
is very verbose.

The mixing approach you talking about is because we confuse two
concepts here. Declarative programming and configuration. For
instance, declaring a bean stateful has nothing to do with the
configuration because if you change it to stateless your code need
some changes. A datasource url is a configuration and need to be put
in a centralized configuration. This changes has no impact on your
code. I think the confusion comes from the fact that a configuration
is declarative by nature.

On 1/13/06, Werner Punz <[EMAIL PROTECTED]> wrote:
> Alexandre Poitras schrieb:
> > The thing I like about JSF managed beans is the clean EL syntax
> > instead of the very verbose xml language (I have nothing against xml
> > files but I do think we abuse its usage). I hope Spring IoC container
> > adopt it one day if it is possible. But using annotations is going to
> > be even better :) Can't wait!
> >
>
> I personally love the EJB3 @Bean @inject @outject paradigm
> very clean and tight.
>
> I think things like bean definitions at least should have the optional
> option of annotations, I do not thing blocking the xml way is good at
> all, in many situations you need a centralized configuration of things.
> But in many you do not need it, a mixed approach in this area might be
> the best way to go.
>
>


--
Alexandre Poitras
Québec, Canada


RE: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Simon Kitching
On Fri, 2006-01-13 at 13:34 +0100, Jesse Alexander (KBSA 21) wrote:
> I am milling around since quite some time on the subject of 
> datatables.
> 
> In our app we have the case that hibernates fetches a few megabytes of
> data, which will then be saved in the state and the hibernate-objects 
> remain referenced -> no gc...
> 
> My current thoughts are about a datamodel that does not keep all data
> but just a part of the data active and requests the missing data when
> paging is requested...
> 
> But I still have the unfinished business of the optional validation for 
> JSF 1.1 (without facelets)
> 
> if we find some developers that want to start on such a better table-
> component... (without committer-rights) we can share the code on a
> temporary base on the js-comp.sf.net project

Have you read this? I'm using this with success, as are others:
  http://wiki.apache.org/myfaces/WorkingWithLargeTables

Regards,

Simon



RE: abt how to locate jsp file and the syntax of myfaces-config.xml

2006-01-13 Thread Jeffrey Porter

In you're first email you said want to access..
> http://localhost/mywebapp/yyy.jsp,

In your second message, you said you want it to be protected.

So if you want yyy.jsp to be protected, then why are you trying to get
direct access to it?

I presume was you would want to use yyy.jsp as an include later on,
rather than direct access to it. For example...

<%@ include file="/WEB-INF/jsp/include.jsp" %>


I could be completely wrong about this. I've not used the spring frame
work.

JP



-Original Message-
From: wch zll [mailto:[EMAIL PROTECTED] 
Sent: 13 January 2006 13:03
To: MyFaces Discussion
Subject: RE: abt how to locate jsp file and the syntax of
myfaces-config.xml

Hi,
To have yyy.jsp inside WEB-INF/jsp so that people
won't get direct access via
http://localhost/mywebapp/WEB-INF/jsp/yyy.jsp. It's
something called proteced that was recommonded by
SpringFramework. Their samples are all in this kind of
folder structure. But Spring has its syntax as


  
org.springframework.web.servlet.view.JstlView

/WEB-INF/jsp/
.jsp
 
to resovle this. But i can't find any statement abt
how resovle this using myFaces.



Best Regards!


 

--- Jeffrey Porter
<[EMAIL PROTECTED]> wrote:

> Why do you have the yyy.jsp under WEB-INF ?
> 
> 
> 
> 
> -Original Message-
> From: wch zll [mailto:[EMAIL PROTECTED] 
> Sent: 13 January 2006 12:50
> To: myfaces
> Subject: abt how to locate jsp file and the syntax
> of myfaces-config.xml
> 
> Hi,
> 
> I have a standard web application, it's arranged in
> very normal way. The structure of folders like:
> 
> mywebapp
> index.jsp
> xxx.jsp
> --css
>   --some css files
> --jscript
>   --some js files
> --images
>   --some images
> --WEB-INF
>   --web.xml
>   --myfaces-config.xml
>   --classes
> --com
>   --work
> --ecs
>   --some java files
>   --jsp
> --yyy.jsp
> 
> the problem now is how I can launch the page by
> http://localhost/mywebapp/index.jsp
> http://localhost/mywebapp/xxx.jsp
> 
> but i can't launch
> http://localhost/mywebapp/yyy.jsp,
> error is page not found. I know this error would
> occur
> since yyy.jsp is in WEB-INF/jsp/,
> but if I want launch this yyy.jsp, then how should I
> configure web.xml or myfaces-config.xml? So can set
> the path.
> 
> 
> Best Regards!
> 
> chaohe
> 
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


RE: abt how to locate jsp file and the syntax of myfaces-config.xml

2006-01-13 Thread wch zll
Hi,
To have yyy.jsp inside WEB-INF/jsp so that people
won't get direct access via
http://localhost/mywebapp/WEB-INF/jsp/yyy.jsp. It's
something called proteced that was recommonded by
SpringFramework. Their samples are all in this kind of
folder structure. But Spring has its syntax as


  
org.springframework.web.servlet.view.JstlView

/WEB-INF/jsp/
.jsp
 
to resovle this. But i can't find any statement abt
how resovle this using myFaces.



Best Regards!


 

--- Jeffrey Porter
<[EMAIL PROTECTED]> wrote:

> Why do you have the yyy.jsp under WEB-INF ?
> 
> 
> 
> 
> -Original Message-
> From: wch zll [mailto:[EMAIL PROTECTED] 
> Sent: 13 January 2006 12:50
> To: myfaces
> Subject: abt how to locate jsp file and the syntax
> of myfaces-config.xml
> 
> Hi,
> 
> I have a standard web application, it's arranged in
> very normal way. The structure of folders like:
> 
> mywebapp
> index.jsp
> xxx.jsp
> --css
>   --some css files
> --jscript
>   --some js files
> --images
>   --some images
> --WEB-INF
>   --web.xml
>   --myfaces-config.xml
>   --classes
> --com
>   --work
> --ecs
>   --some java files
>   --jsp
> --yyy.jsp
> 
> the problem now is how I can launch the page by
> http://localhost/mywebapp/index.jsp
> http://localhost/mywebapp/xxx.jsp
> 
> but i can't launch
> http://localhost/mywebapp/yyy.jsp,
> error is page not found. I know this error would
> occur
> since yyy.jsp is in WEB-INF/jsp/,
> but if I want launch this yyy.jsp, then how should I
> configure web.xml or myfaces-config.xml? So can set
> the path.
> 
> 
> Best Regards!
> 
> chaohe
> 
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


RE: abt how to locate jsp file and the syntax of myfaces-config.xml

2006-01-13 Thread Jeffrey Porter
Why do you have the yyy.jsp under WEB-INF ?




-Original Message-
From: wch zll [mailto:[EMAIL PROTECTED] 
Sent: 13 January 2006 12:50
To: myfaces
Subject: abt how to locate jsp file and the syntax of myfaces-config.xml

Hi,

I have a standard web application, it's arranged in
very normal way. The structure of folders like:

mywebapp
index.jsp
xxx.jsp
--css
  --some css files
--jscript
  --some js files
--images
  --some images
--WEB-INF
  --web.xml
  --myfaces-config.xml
  --classes
--com
  --work
--ecs
  --some java files
  --jsp
--yyy.jsp

the problem now is how I can launch the page by
http://localhost/mywebapp/index.jsp
http://localhost/mywebapp/xxx.jsp

but i can't launch http://localhost/mywebapp/yyy.jsp,
error is page not found. I know this error would occur
since yyy.jsp is in WEB-INF/jsp/,
but if I want launch this yyy.jsp, then how should I
configure web.xml or myfaces-config.xml? So can set
the path.


Best Regards!

chaohe




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


abt how to locate jsp file and the syntax of myfaces-config.xml

2006-01-13 Thread wch zll
Hi,

I have a standard web application, it's arranged in
very normal way. The structure of folders like:

mywebapp
index.jsp
xxx.jsp
--css
  --some css files
--jscript
  --some js files
--images
  --some images
--WEB-INF
  --web.xml
  --myfaces-config.xml
  --classes
--com
  --work
--ecs
  --some java files
  --jsp
--yyy.jsp

the problem now is how I can launch the page by
http://localhost/mywebapp/index.jsp
http://localhost/mywebapp/xxx.jsp

but i can't launch http://localhost/mywebapp/yyy.jsp,
error is page not found. I know this error would occur
since yyy.jsp is in WEB-INF/jsp/,
but if I want launch this yyy.jsp, then how should I
configure web.xml or myfaces-config.xml? So can set
the path.


Best Regards!

chaohe




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


RE: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Jesse Alexander \(KBSA 21\)
I am milling around since quite some time on the subject of 
datatables.

In our app we have the case that hibernates fetches a few megabytes of
data, which will then be saved in the state and the hibernate-objects 
remain referenced -> no gc...

My current thoughts are about a datamodel that does not keep all data
but just a part of the data active and requests the missing data when
paging is requested...

But I still have the unfinished business of the optional validation for 
JSF 1.1 (without facelets)

if we find some developers that want to start on such a better table-
component... (without committer-rights) we can share the code on a
temporary base on the js-comp.sf.net project

regards
Alexander

-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 1:11 PM
To: 'MyFaces Discussion'
Subject: Re: An optimised pattern for using t:dataTable - please verify.

On Sat, 2006-01-14 at 00:58 +1300, Simon Kitching wrote:
> Hi Yee,
> 
> Yes, I agree with this. I think you've put it all very nicely.
> 
> The only concern is that point (6) can be hard to get right.

Oh - and also that the user will never see any changes to the database
made concurrently by other users. That may be desirable, or maybe not.
Of course if it is desirable, then a read before each render has to be
done. 

However as you point out in (2), the model used for rendering really
does need to be preserved until the start of the next render phase for
consistency - and that saves one database read too.

I would love to see t:dataTable (and maybe h:dataTable) avoid fetching
the datamodel during validation when there are no input components in
the table; that would make a nice project for someone wanting to get
involved in MyFaces coding!

Cheers,

Simon




Re: MYFACES-27 JSCOOKMENU

2006-01-13 Thread Bruno Aranda
I've reopened the issue and fixed this in the SVN. Now, there is a new
attribute immediate for the jsCookMenu (note that defaults to false to
be consistent with UICommand, maybe some users may have to put
immediate="true" in their menus). I haven't tested this because there
is some problem now with the generation of the examples due to the
maven reorg, but will do as soon as I can. Thanks Igor,

Bruno

2006/1/13, Igor Marakov <[EMAIL PROTECTED]>:
>
>
>
>
> In the last build that I have ( 12/12 ) JSCookmenu fix to allow component to
> work within form and submit forms is incomplete.
>
> There are still two issues in the code preventing it from operating
> properly. Below is a description and temporary fixes.
>
>
>
> Even though code to find enclosing form is in place and does work,
> Javascript component
> org.apache.myfaces.custom.navmenu.jscookmenu.resources.MyFacesHack.js
> still refers to and submits dummy form. I guess it was forgotten about…
>
> Code can be fixed by changing the following line in cmItemMouseUp function
>
> var dummyForm = document.forms['linkDummyForm']; with var dummyForm =
> document.forms[target];
>
>
>
> There is still hardwired 'immediate' attribute in the
> org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookMenu.java
> class. Although reasoning for this is still not known ( see myfaces-27
> discussion ) I would guess it is a intention of the original design of the
> component to be pure navigational solution therefore short-circuiting
> processing cycle. Even though I would favor solution to make 'immediate'
> attribute configurable, for the time being for those who need working
> component right now ( like me :(  )  the temporary solution is to patch the
> class overriding isImmediate() and setImmediate() methods as follows:
>
>
>
> public void setImmediate(boolean flag) { super.setImmediate(false); }
>
> public boolean isImmediate() { return false; }
>
>
>
> Although I this is not a proper solution these two patches produce
> jscookmenu component that pretends :) to be working.
>
>
>
> Maybe issue 27 needs to be reopened to get this fixed for good?
>
>
>
> Thanks,
>
> Igor


Tobago Sheet pagingLength==1 bug

2006-01-13 Thread Olexandr Zakordonskyy
Hi guys,

When I setting pagingLength to 1 pager works abnormal. 
I see |<< Page 3 of 6 >>| and link to previous is disabled.
When I set length > 1 all works fine.

Olexandr.



Re: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Simon Kitching
On Sat, 2006-01-14 at 00:58 +1300, Simon Kitching wrote:
> Hi Yee,
> 
> Yes, I agree with this. I think you've put it all very nicely.
> 
> The only concern is that point (6) can be hard to get right.

Oh - and also that the user will never see any changes to the database
made concurrently by other users. That may be desirable, or maybe not.
Of course if it is desirable, then a read before each render has to be
done. 

However as you point out in (2), the model used for rendering really
does need to be preserved until the start of the next render phase for
consistency - and that saves one database read too.

I would love to see t:dataTable (and maybe h:dataTable) avoid fetching
the datamodel during validation when there are no input components in
the table; that would make a nice project for someone wanting to get
involved in MyFaces coding!

Cheers,

Simon




Re: An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Simon Kitching
Hi Yee,

Yes, I agree with this. I think you've put it all very nicely.

The only concern is that point (6) can be hard to get right.

NB: The default behaviour (no preserveDataModel) is flawed because it
doesn't get (2) right for datasets that may be changed by something
other than the viewing user.

Cheers,

Simon

On Fri, 2006-01-13 at 19:19 +0800, Yee CN wrote:
> Hi,
>  
> Below are some thoughts that came to me after months of trying to understand 
> the dataTable. Please verify that it is accurate enough for Wiki. 
>  
> 1)By definition the Restore-View phase should restores whatever that was 
> being rendered in the Render-Response phase of the last request.
> 2)A t:dataTable that does not persists its data in viewState would have 
> to call the backing bean to obtain the table data again during the 
> Restore-View phase. If the data obtained is different from what was being 
> rendered previously, it could lead to inconsistencies.
> 3)That explains tomahawk preserveDataModel="true" extension to dataTable 
> component – to make ensure that (1) is upheld.
> 4)Given the above understanding, consider the code scriplets below.
> 5)preserveDataModel should be set to true base on the reasons given 
> above. It will restores the backing bean dataModel using the setter method 
> (*1), during the Restore-View phase.
> 6)If the backing bean action changes the database, then the dataModel 
> should be invalidated (*2) so that it will be regenerated with the updated 
> data.
> 7)However if the bean action is known to not doing any update to the 
> database, the dataModel should be left alone.
> 8)This pattern will avoid the most hated and hotly discussed problems of 
> JSF hitting the database twice on every request. This pattern is actually 
> highly optimal – in that it will only hit the database again when you 
> explicitly invalidate the dataModel. The price to pay is relatively small – 
> which is saving the page of data in the viewState.
>  
> --- The JSF --
> 
>
> …
> 
> value="#{myBean.dataModel}"
> 
> preserveDataModel="true">
> 
>  
> --- The Backing Bean --
>  
> public class myBean extends serializable {
>  
> (*2) public String changeDbAction() {
> // an action that changes the database. Invalidate the dataModel here
> // so that the it will be regenerated during the Render-Response phase
> this.dataModel = null; 
> …
> return SOME_NAVIGATION_RESULT;
> }
>  
> (*3) public String doesNotChangeDbAction() {
> // action that does not change the database. So leaves the dataModel 
> alone  
> // and the Render-Response phase will not result in hitting the database.
> …
> Return SOME_NAVIGATION_RESULT;
> }
> 
>  
> 
> (*1) public setDataModel(DataModel d) {
> // t:dataTable will call this method to restore the table data
> this.dataModel = d;
> }
>  
> public DataModel getDataModel() {
> // if the dataModel is being invalidated then regenerates it again
> if (dataModel == null) {
> dataModel = new LocalDataModel(…);
> }
> return dataModel;
> }
> 
>  
> 
> }
> 
> 
> 
>  
> 
> Best regards,
> 
> Yee
> 
> 



An optimised pattern for using t:dataTable - please verify.

2006-01-13 Thread Yee CN






Hi, Below are some thoughts that came to me after months of trying to understand the dataTable. Please verify that it is accurate enough for Wiki.  1)    By definition the Restore-View phase should restores whatever that was being rendered in the Render-Response phase of the last request.2)    A t:dataTable that does not persists its data in viewState would have to call the backing bean to obtain the table data again during the Restore-View phase. If the data obtained is different from what was being rendered previously, it could lead to inconsistencies.3)    That explains tomahawk preserveDataModel="true" extension to dataTable component – to make ensure that (1) is upheld.4)    Given the above understanding, consider the code scriplets below.5)    preserveDataModel should be set to true base on the reasons given above. It will restores the backing bean dataModel using the setter method (*1), during the Restore-View phase.6)    If the backing bean action changes the database, then the dataModel should be invalidated (*2) so that it will be regenerated with the updated data.7)    However if the bean action is known to not doing any update to the database, the dataModel should be left alone.8)    This pattern will avoid the most hated and hotly discussed problems of JSF hitting the database twice on every request. This pattern is actually highly optimal – in that it will only hit the database again when you explicitly invalidate the dataModel. The price to pay is relatively small – which is saving the page of data in the viewState. --- The JSF --

  

 --- The Backing Bean -- public class myBean extends serializable { (*2) public String changeDbAction() {    // an action that changes the database. Invalidate the dataModel here    // so that the it will be regenerated during the Render-Response phase    this.dataModel = null;     …    return SOME_NAVIGATION_RESULT;} (*3) public String doesNotChangeDbAction() {    // action that does not change the database. So leaves the dataModel alone      // and the Render-Response phase will not result in hitting the database.    …    Return SOME_NAVIGATION_RESULT;}

 

(*1) public setDataModel(DataModel d) {    // t:dataTable will call this method to restore the table data    this.dataModel = d;} public DataModel getDataModel() {    // if the dataModel is being invalidated then regenerates it again    if (dataModel == null) {        dataModel = new LocalDataModel(…);    }    return dataModel;}

 

}

    

 

Best regards,

Yee








Re: H:selectOneMenu question

2006-01-13 Thread Mikael Andersson
Hi,
you could use the style attribute.
style="width:150px;"

MickeOn 12/01/06, Yixing Ma <[EMAIL PROTECTED]> wrote:













Quick question,

 

 

How to change the width of a drop down list ?

 

H:selectOneMenu

 

 

I want to set
a fixed width to the drop down list. It trims off the empty spaces
automatically.

 

Thanks










RE: How can I redirect from a servlet to a JSF page (that isbacked by a bean)?

2006-01-13 Thread Jeffrey Porter


Great page Mike! It was very useful.

I have another question leading on from it though.

I now have the servlet redirecting to the page I want, it populates the
bean on for the page. BUT (there's always a but)...

The commandButton's on the page now call in to servlet, instead of
calling the action that I'd expect.


Example of commandButton 



Does anyone have any ideas?
(I'll add notes on this to the wiki when I find the reason/solution)

Thanks
Jeff.




-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: 13 January 2006 06:01
To: MyFaces Discussion
Subject: Re: How can I redirect from a servlet to a JSF page (that
isbacked by a bean)?

Hi Mike,

I've gathered the info posted so far and created this page:
  http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls

Anyone who actually gets this working, please review the wiki page and
make any necessary corrections/enhancements!

Cheers,

Simon

Corrections or enhancements
On Wed, 2006-01-11 at 13:50 -0500, Mike Kienenberger wrote:
> If nothing else, this question has been asked enough times that
> someone who's using it or has ideas how to solve it should write up a
> wiki page on the topic :)
> 
> On 1/11/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> > Hi Jeffrey,
> >
> > you are in the situation to serve a Non-Faces Request to a Faces
> > Response as described in the jsf 1.1 spec in section 2.1.1.
> >
> > Take a look at tobagos NonFacesRequestServlet [1] how this situation
> > could handled.
> >
> > I don't know if there is somthing like this in tomahawk, could be a
> > candidate for commons.jar.
> >
> > Regards,
> >   Volker
> >
> > [1]:
> >
http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-core/src
/main/java/org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java
?view=markup
> >
> > Jeffrey Porter wrote:
> > >
> > >
> > > Hello all.
> > >
> > >
> > >
> > > I have the situation where I want to send a URL out in an email
for a
> > > person to click on, so that they can then see a page in my system.
> > >
> > >
> > >
> > > Normally I'd have a backing servlet that takes the parameters in
and
> > > redirects to the page I want the user to view.
> > >
> > > But since I'm using myfaces, I don't know how to redirect to a JSF
page.
> > >
> > >
> > >
> > > In this case I'm at a complete loss to where I should start.
> > >
> > >
> > >
> > > Can some one please prod me in the correct direction.
> > >
> > >
> > >
> > > Thanks
> > >
> > > Jeff
> > >
> > >
> > >
> >
> > --
> > Don't answer to From: address!
> > Mail to this account are droped if not recieved via mailinglist.
> > To contact me direct create the mail address by
> > concatenating my forename to my senders domain.
> >



Re: MyFaces + Shale + Facelets

2006-01-13 Thread Werner Punz
Alexandre Poitras schrieb:
> The thing I like about JSF managed beans is the clean EL syntax
> instead of the very verbose xml language (I have nothing against xml
> files but I do think we abuse its usage). I hope Spring IoC container
> adopt it one day if it is possible. But using annotations is going to
> be even better :) Can't wait!
> 

I personally love the EJB3 @Bean @inject @outject paradigm
very clean and tight.

I think things like bean definitions at least should have the optional
option of annotations, I do not thing blocking the xml way is good at
all, in many situations you need a centralized configuration of things.
But in many you do not need it, a mixed approach in this area might be
the best way to go.



Re: MyFaces + Shale + Facelets

2006-01-13 Thread Werner Punz
Marco Mistroni schrieb:
> Hello all,
>   it seems to me that the Spring-JSF project allows you to scope
> beans... isn't that so?
> pls correct me if i m wrong./...
>  
> regards
>  marco

It should, yes to my knowledge jsf-spring (although it did not work for
me in my last project) should allow the calling from jsf beans within
spring and vice versa thus you can scope beans over jsf.

Things will become easier however with spring 2.0 then you simply define
all beans in spring and have faces-config doing the rest.

(the xml syntax according to the spring devs, also will be cleaned up
and tighter, I have not looked into it yet though)


Have in mind that jsf-spring works quite well in many situations, but
some situations still are problematic with that lib, I recently (in fact
last night) ran into the situation of not being able to deploy an app on
websphere due to the fact that jsf-spring interfered with the WAS6 class
loader.
But at least if you go the one way route there are other fallback
options. So choose your binding technology with care upfront and do some
minimal testing.