RE: Custom Converter exception during processing of faces-config.xml

2006-12-15 Thread Julian Ray
Did you add it to the faces config file?

  _  

From: Jon Steelman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 6:10 PM
To: users@myfaces.apache.org
Subject: Custom Converter exception during processing of faces-config.xml


Hi - When I try to use a custom Converter, I get a strange Exception during
processing of the faces-config.xml file. Any hints why when the
MyCustomConverter that implements Converter is clearly in my project?
Thanks,
Jon

18:07:33,318 ERROR [org.apache.myfaces.shared_impl.util.ClassUtils] () Class
com.autotrader.dc.util.MyCustomConverter not found
java.lang.ClassNotFoundException: No ClassLoaders found for:
com.autotrader.dc.util.MyCustomConverter 
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoad
er.java:511)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass
(RepositoryClassLoader.java:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)



RE: datatable headerClass

2006-12-14 Thread Julian Ray
Excellent. Thank you for the quick response. 

-Original Message-
From: Andrew Robinson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 11:36 AM
To: MyFaces Discussion
Subject: Re: datatable headerClass

http://myfaces.apache.org/tomahawk/tagreference.html#column

On 12/14/06, Julian Ray <[EMAIL PROTECTED]> wrote:
>
>
> Ok, so its time I addressed this issue:
>
> datatable provides a single headerClass attribute which is applied to 
> all  elements of the table. Using text-align CSS attributes within 
> a CSS class allows the table header to align all  the same way.
>
> So, how to align individual table header elements left, center, or right?
> Using style or styleClass on the outputText in the header facet 
> renders a  within the  which is ignored and the  CSS 
> styling overrides the  stylying. Unless I'm missing something, 
> it seems that all table headers in JSF must align the same way wihtin a
table.
>
> Julian



datatable headerClass

2006-12-14 Thread Julian Ray
Ok, so its time I addressed this issue:
 
datatable provides a single headerClass attribute which is applied to all
 elements of the table. Using text-align CSS attributes within a CSS
class allows the table header to align all  the same way.
 
So, how to align individual table header elements left, center, or right?
Using style or styleClass on the outputText in the header facet renders a
 within the  which is ignored and the  CSS styling overrides
the  stylying. Unless I'm missing something, it seems that all table
headers in JSF must align the same way wihtin a table.
 
Julian


RE: singleton validators and converters

2006-12-08 Thread Julian Ray
Wouldn't singletons need to be multi-threaded otherwise you will get probems
with concurrency. Would a pooled resource pattern make more sense if you
validators/converters are costly to create?
 

  _  

From: Iordanov, Borislav (GIC) [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 08, 2006 12:48 PM
To: MyFaces Discussion
Subject: singleton validators and converters



Hi,

 

Is there a standard way/practice to have singleton validators and
converters? Those are mostly stateless and in a large application with
aggressive input validation, it would make sense to avoid creating them on
the fly each time and for each user.

 

Thanks,

Bolerio



RE: Newbie: OutOfMemoryError: PermGen space Question

2006-11-27 Thread Julian Ray
Hmmm, run into this one before. Best idea is to change to JRockit and this
problem never happens again :) Next best is to change the permgen space
using -XX:MaxPermSize=256m
 
 

  _  

From: kindsol [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 27, 2006 1:07 PM
To: users@myfaces.apache.org
Subject: Newbie: OutOfMemoryError: PermGen space Question


Hey now,


I just upgraded my JSF release to MyFaces w/ facelets over the weekend. My
web app has been working for about a year without fail in a production
environment. 


Things are converting over fairly nicely, but after my web application runs
for a while (main page refreshes every minute) I get the following
exception: 


09:53:47,564 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces
Servlet threw exception java.lang.OutOfMemoryError: PermGen space




Are there any known issues like this? Has anyone experienced this problem
when they switched over?? I could not find anything in the mail list
archive.


Any help would be greatly appreciated!


-KindSol






RE: navigation pages history...

2006-11-26 Thread Julian Ray
Be wary of using  as the t:saveState tag stops working. 

-Original Message-
From: Jorge Vásquez [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 26, 2006 2:44 PM
To: 'MyFaces Discussion'
Subject: RE: navigation pages history...

Gerald, can you be a little more detailed in this explanation please?
I'll begin a scenario to help clear out things.  I have the following rule
in faces_config.xml:



infoSpaceTool

/pages/tools/infospace/mainInfoSpace.xhtml




I have an action method that currently returns "infoSpaceTool" as String and
this causes JSF to load page: /pages/tools/infospace/mainInfoSpace.xhtml.
Now, what would happen when the navigation-case has a redirect element?

Thanks,
JV



-Mensaje original-
De: Gerald Müllan [mailto:[EMAIL PROTECTED] Enviado el: domingo, 26 de
noviembre de 2006 14:26
Para: MyFaces Discussion
Asunto: Re: navigation pages history...

Hi,

there is the -element in faces-config in order to do such a
forward. You can put it to any navigation rule. Should help in this case.

cheers,

Gerald

On 11/26/06, Jorge Vásquez <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Thanks Julian.
>
> I've Still got one more question:
>
> I am using facelets and in facelets that method returns the name of 
> the page, which seems interesting, I need to somehow force a redirect 
> to the page returned and stored previously.  How can I force a 
> redirect to a specific page without using the traditional steps of 
> returning an action String and according to that action String and to 
> the rules defined in faces_config.xml let the faces Servlet do the 
> forward.  Again, I want to
do
> an explicit forward from an action method to a specific page, how can 
> I accomplish this?
>
>
>
> Regards,
>
> JV
>
>
>
>  
>
>
> De: Julian Ray [mailto:[EMAIL PROTECTED]  Enviado el: sábado, 25 
> de noviembre de 2006 5:18
>  Para: 'MyFaces Discussion'
>  Asunto: RE: navigation pages history...
>
>
>
>
> Its easy to create one. Just use a session scoped bean and add a stack 
> to it. You can get the last view rendered using the following
>
>
>
> return FacesContext.getCurrentInstance().getViewRoot().getViewId();
>
>
>
>
>
>
>  
>
>
> From: Jorge Vásquez [mailto:[EMAIL PROTECTED]
>  Sent: Friday, November 24, 2006 9:09 PM
>  To: 'MyFaces Discussion'
>  Subject: navigation pages history...
>
> Regards,
>
> Is there a way to see the las accessed page that the user was at.
Moreover,
> is there some sort of stack that keeps track of the last accessed 
> pages by
a
> specific user inside a JSF application?
>
> Thanks,
>
> JV
>
>


--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



RE: navigation pages history...

2006-11-26 Thread Julian Ray
JV,
 
Our app keeps a stack of views. The get the previous view pop the stack and
and push the current view on to it before you return,  We also have
standardized our navigation mechanism so that each action returns the name
of the view to navigate to next and our navigation.xml file maps full view
names returned from getViewId() to JSPs. If we have x JSPs there are x
 entities. So for us, returning the view from the top of
the stack will force the navigation handler to navigate to that view. Very
simple and easy to manage. 

  _  

From: Jorge Vásquez [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 26, 2006 1:44 PM
To: 'MyFaces Discussion'
Subject: RE: navigation pages history...



Thanks Julian.

I’ve Still got one more question:

1.  I am using facelets and in facelets that method returns the name of
the page, which seems interesting, I need to somehow force a redirect to the
page returned and stored previously.  How can I force a redirect to a
specific page without using the traditional steps of returning an action
String and according to that action String and to the rules defined in
faces_config.xml let the faces Servlet do the forward.  Again, I want to do
an explicit forward from an action method to a specific page, how can I
accomplish this? 

 

Regards,

JV 

 

  _____  

De: Julian Ray [mailto:[EMAIL PROTECTED] 
Enviado el: sábado, 25 de noviembre de 2006 5:18
Para: 'MyFaces Discussion'
Asunto: RE: navigation pages history...

 

Its easy to create one. Just use a session scoped bean and add a stack to
it. You can get the last view rendered using the following

 

return FacesContext.getCurrentInstance().getViewRoot().getViewId();

 

 

 

  _  

From: Jorge Vásquez [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 24, 2006 9:09 PM
To: 'MyFaces Discussion'
Subject: navigation pages history...

Regards,

Is there a way to see the las accessed page that the user was at.  Moreover,
is there some sort of stack that keeps track of the last accessed pages by a
specific user inside a JSF application?

Thanks,

JV

 



RE: navigation pages history...

2006-11-25 Thread Julian Ray
Its easy to create one. Just use a session scoped bean and add a stack to
it. You can get the last view rendered using the following
 
return FacesContext.getCurrentInstance().getViewRoot().getViewId();

 

 


  _  

From: Jorge Vásquez [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 24, 2006 9:09 PM
To: 'MyFaces Discussion'
Subject: navigation pages history...



Regards,

Is there a way to see the las accessed page that the user was at.  Moreover,
is there some sort of stack that keeps track of the last accessed pages by a
specific user inside a JSF application?

Thanks,

JV

 



RE: Pdf and tabbed pane

2006-11-22 Thread Julian Ray
Hi Simeon,
 
I had added a piece about this to the wiki. See
 
http://wiki.apache.org/myfaces/AccessFacesContextFromServlet
 
Julian

  _  

From: Leyzerzon, Simeon [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 22, 2006 11:30 AM
To: 'MyFaces Discussion'
Subject: RE: Pdf and tabbed pane


Ray,
Thanks for the response, I understand the iframe part, could you please
elaborate on the JSF session-aware servlet/phaseListener?
Thanks,
Simeon

  _  

From: Julian Ray [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 22, 2006 10:13 AM
To: 'MyFaces Discussion'
Subject: RE: Pdf and tabbed pane


You could use a iFrame on each tabbed pane and load the PDF and XLS data
into iFrame using a JSF session-aware servlet or phaseListener.

  _  

From: Leyzerzon, Simeon [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 22, 2006 9:19 AM
To: 'users@myfaces.apache.org'
Subject: Pdf and tabbed pane



Hi, 

We have a requirements to display reports (in either pdf or xls formats)
inside tabbed pane set.  I'm wondering if this is possible and if yes would
someone direct me to a sample of how to do this.  Maybe there's another
container JSF component of which I'm unaware to hold non-html pages.  My
trouble is how to combine the html and non-html response in the single view.


Thank you in advance. 
Simeon 



==

Please access the attached hyperlink for an important electronic
communications disclaimer: 



http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html


==



==

Please access the attached hyperlink for an important electronic
communications disclaimer: 



http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html


==



RE: Pdf and tabbed pane

2006-11-22 Thread Julian Ray
You could use a iFrame on each tabbed pane and load the PDF and XLS data
into iFrame using a JSF session-aware servlet or phaseListener.

  _  

From: Leyzerzon, Simeon [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 22, 2006 9:19 AM
To: 'users@myfaces.apache.org'
Subject: Pdf and tabbed pane



Hi, 

We have a requirements to display reports (in either pdf or xls formats)
inside tabbed pane set.  I'm wondering if this is possible and if yes would
someone direct me to a sample of how to do this.  Maybe there's another
container JSF component of which I'm unaware to hold non-html pages.  My
trouble is how to combine the html and non-html response in the single view.


Thank you in advance. 
Simeon 



==

Please access the attached hyperlink for an important electronic
communications disclaimer: 



http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html


==



[OFFTOPIC] MyFaces Help Wanted

2006-11-19 Thread Julian Ray
C2Glogistics is looking for one or more experienced JSF/MyFaces developers
to help us continue to develop and maintain our flagship JSF application.
Our app has been in production for almost 1 year (current version is 1.2)
and we have several large world-reknowned customers using the system. 
 
We anticipate approx 10-20 hours of work per week per developer for approx 6
months. Location is not an issue as long as efficient lines of communication
can be maintained (email, IM etc.) and sufficient overlap of the work day
for synchronous communication can be achieved (we are located in a suburb of
Boston, USA). Work will consist of enhancing our existing app through
reorganizing and enhancing existing modules, adding new modules and fixing
outstanding issues tracked through our TRAC SCM. Developers must be able to
work independently, have great communication ability, have good system
design and problem solving skills and have previously developed with the
following technologies:

*   MyFaces/Tomahawk 1.1.5
*   Hibernate 3
*   Ajax4JSF
*   Eclipse
*   Subversion/Subclicpse
*   Java Mail
*   Tomcat 5.5
*   Experience with JFreeCharts and JasperReports are a big plus.

 
We maintain database compatibility with MySQL 5 and Sql Server 2005 through
Hibernate dialects and host on RHEL4 and Windows Server 2003.
 
We will require a NDA to be signed before we provide access to any source
code repos or engineering documentation. If you are interested, or know
anyone who might be interested in this work, please send a resume, hourly
rates and other pertinent information to me directly (not the list!). 
 
Julian Ray
 

Julian J Ray, Ph.D.

C2G Logistics Inc.


Chief Technical Officer

 

Suite 316 

One Apple Hill

Natick MA 01760


email: [EMAIL PROTECTED]

web:   http://www.c2glogistics.com

Tel: (781) 259-8115

Fax: (508) 652-8075

 


OT - Looking for help

2006-11-19 Thread Julian Ray
Is there a good place to post help-wanted ads for the MyFaces community?
 
 
 


RE: Using myfaces for a wizard type application

2006-11-17 Thread Julian Ray
One way is to use the tomahawk saveState control. Use a single request level
bean to collect your form data. Save the bean use saveState in each page of
the wizard. If the user wants to cancel use an action which either navigates
to a page where there is not saveState (the wizard backing bean is removed)
or re-initialize the backing bean. 

-Original Message-
From: ying lcs [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 17, 2006 7:15 PM
To: MyFaces Discussion
Subject: Using myfaces for a wizard type application

Hi,

Can you please tell me how can I use myfaces to implement a wizard type
application?

1. User go to a page, fill in a form. pass to second page 2. the second page
is built based on information from page #1 3. user fill in second pages, go
to third page.

When user clicks 'cancel' or finish the wizard all the user filled data is
gone.

Any pointer/example is appreciated.



RE: Get browsers resolution

2006-11-17 Thread Julian Ray
Why not create a simple control which adds the hidden field and JS and drop
it into each form. For the first form you can drop the control into the
logon page or use a redirect.

  _  

From: Adrian Mitev [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 17, 2006 4:18 PM
To: MyFaces Discussion
Subject: Re: Get browsers resolution


So i need to to recursively to find all forms and add them hidden field and
javascript? And how i get this info when the user session is created so the
first opened page could be rendered according to this info? 


2006/11/17, Julian Ray <[EMAIL PROTECTED]>: 

We use a filter which examines the request and creates a bean detailing the
client's capabilities and other info which is then pushed into the session.
Hidden JS-driven form fields in the form capture any aspect we wish to track
while the rest of the info comes from the headers. Our backing beans are all
"capability-aware" as their base class gets the capability bean from the
session using the FacesContext.

  _  

From: Adrian Mitev [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 17, 2006 5:46 AM
To: MyFaces Discussion
Subject: Re: Get browsers resolution



My question is not how to get it via java script. My questions it how to
send it to the server - add hidden component on each form or something like
that...
 

2006/11/16, Andrew Robinson < [EMAIL PROTECTED]>: 

Are you looking for the viewable space inside the browser (the pixel 
dimensions of the actual page) or are you looking for the outer width
of the window, or the user's screen resolution?

On 11/16/06, Adrian Mitev <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:
> Hi all! I need to get browser's width and heigth and by this size i'll
> include different stylesheets. Any suggestions how to do it?
>






RE: Get browsers resolution

2006-11-17 Thread Julian Ray
We use a filter which examines the request and creates a bean detailing the
client's capabilities and other info which is then pushed into the session.
Hidden JS-driven form fields in the form capture any aspect we wish to track
while the rest of the info comes from the headers. Our backing beans are all
"capability-aware" as their base class gets the capability bean from the
session using the FacesContext.

  _  

From: Adrian Mitev [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 17, 2006 5:46 AM
To: MyFaces Discussion
Subject: Re: Get browsers resolution


My question is not how to get it via java script. My questions it how to
send it to the server - add hidden component on each form or something like
that...
 

2006/11/16, Andrew Robinson < [EMAIL PROTECTED]>: 

Are you looking for the viewable space inside the browser (the pixel 
dimensions of the actual page) or are you looking for the outer width
of the window, or the user's screen resolution?

On 11/16/06, Adrian Mitev <[EMAIL PROTECTED]
 > wrote:
> Hi all! I need to get browser's width and heigth and by this size i'll
> include different stylesheets. Any suggestions how to do it?
>





RE: rowClasses is cool, but how to handle javascript events?

2006-11-01 Thread Julian Ray
Why not simply store the current background color in the onmouseover event
and replace it in the onmouseout event?
 

-Original Message-
From: Nebinger, David [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 01, 2006 10:36 AM
To: MyFaces Discussion
Subject: rowClasses is cool, but how to handle javascript events?

Okay, I'm using rowClasses with two different styles for the rows.  However,
I'd like to implement a highlighting scheme based upon onmouseover and
onmouseout.

onmouseover is easy enough, simple javascript to set the class to the class
that handles the highlight.

The onmouseout is the tough one though.  Ideally it should be as simple as
using javascript to set the class to the appropriate row class.  If I were
generating the HTML directly I could easily determine which row I'm on and
use the appropriate class for the row.

Anyone have some suggestions as to how I would do that in JSF?

Thanks!



RE: Strange problem with myfaces components on a PDA

2006-10-17 Thread Julian Ray
What browser are you using on the PDA? IE does not support JavaScript on the
the PDAs so many of the Tomahawk actions fail. You could try Mozilla's new
browser minimo or Opera for mobile. Does anyone know of any other browsers
which work?

-Original Message-
From: Stan81 [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 17, 2006 10:38 AM
To: users@myfaces.apache.org
Subject: Strange problem with myfaces components on a PDA


Hello,

I have a very strange problem. I have developed a site which works just fine
with IE on my desktop computer, but is not functioning properly with IE on a
Pocket PC. The most bizzare thing is that a page with a similar content and
behavior is working even on the PDA, but the other page is not. Here is it's
content :  



 
 
 <%%>
 
 

 
 
 
 <%%>
 
   
 

 
 
 


 
   
Date
   
 
 
  
 

 
 

  Number
  
 
 
 
 

  
<%--
--%>   


  <%%>
 
 
  



The page works with the commented tags. The problems come when I uncomment
them. This leads to the page stopping to be responsive, no actions of the
buttons and links are executed. How can these simple outputText tags cause
such a problem. I'm out of ideas already. Please help ! Thanks
 
--
View this message in context:
http://www.nabble.com/Strange-problem-with-myfaces-components-on-a-PDA-tf245
9995.html#a6856616
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: Combine Hibernate and JSF, but how?

2006-10-12 Thread Julian Ray



Hi 
Matthias
 
Here is what our class heirarchy 
looks like. I'm still in the process of documenting and refactoring it but you 
should be able to get the general idea. We use the threadlocal pattern for 
managing Hibernate sessions and transactions. All this detail is provided in the 
AbstractUIBean which provides all services for managing page state, 
materializing Hibernate objects and managing transactions, getting session beans 
etc. The Page and Table abstract classes provide utility methods for manaign 
individual instances or lists of Hibernate objects.  We also have a class 
of hibernate-aware converters which know how to convert primary and 
foreign -key values of objects into correct domain values for the 
view. 
 
Hibernate itself is initialized via 
a filter and preloads as many objects into the second level cache as is useful 
on app start.
 

 
An implementation with 
respect to a single class of business objects looks like this. Each interface 
(Deletable, Searchable etc.) uses a JSF fragment which is included into the JSF 
page. Our JSF pages are heaviy templated with lots of includes for all common 
groups of attributes of our business objects.
 
 

 
 


From: Mosimann Matthias 
[mailto:[EMAIL PROTECTED] Sent: Thursday, October 12, 2006 
8:30 AMTo: MyFaces DiscussionSubject: AW: Combine 
Hibernate and JSF, but how?

Hi Julian
 
 
Well in the presentation layer you have the jsp's and the 
backing beans. In the domain layer you have hibernate resp. the persitence 
classes. And between them you have this shale-like framework. Do I understand 
that right?
 
regards
Matthias


Von: Julian Ray [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 12. Oktober 2006 14:24An: 'MyFaces 
Discussion'Betreff: RE: Combine Hibernate and JSF, but 
how?

We use Hibernate and JSF but don't use Spring. We use a 
Shale-like framework where each JSF view has a single backing bean which is 
Hibernate-session-aware.  Works great.


From: Mosimann Matthias 
[mailto:[EMAIL PROTECTED] Sent: Thursday, October 12, 2006 
8:14 AMTo: MyFaces DiscussionSubject: Combine Hibernate 
and JSF, but how?

Hi 
everyone
 
 
I'm wonder if it is 
neccesary to use Spring Framework to combine Hibernate and JSF. What is you 
experience in that topic? I can imagine that many people use Hibernate 
as o/r mapper. Where can I finde some resources (articles or books) for a 
strategy or overview howto combine plain Hibernate with plain JSF for a three 
layer architecture. I know theoretically it is possibly to write some business 
logic in den managed beans from JSF. This is the form centric approach Kito Mann 
discripes in his book JSF in Action. But that isn't what I want. I'm a beginner 
in both topics (hibernate and jsf) and for me it's no clear how this fit 
together. Is it recommended to use Spring to stick this two worlds togehter? Is 
that a good way to use Spring?
 
Many thanks, I'm a 
little bit confused.
 
regards
Matthias


RE: Combine Hibernate and JSF, but how?

2006-10-12 Thread Julian Ray



We use Hibernate and JSF but don't use Spring. We use a 
Shale-like framework where each JSF view has a single backing bean which is 
Hibernate-session-aware.  Works great.


From: Mosimann Matthias 
[mailto:[EMAIL PROTECTED] Sent: Thursday, October 12, 2006 
8:14 AMTo: MyFaces DiscussionSubject: Combine Hibernate 
and JSF, but how?

Hi 
everyone
 
 
I'm wonder if it is 
neccesary to use Spring Framework to combine Hibernate and JSF. What is you 
experience in that topic? I can imagine that many people use Hibernate 
as o/r mapper. Where can I finde some resources (articles or books) for a 
strategy or overview howto combine plain Hibernate with plain JSF for a three 
layer architecture. I know theoretically it is possibly to write some business 
logic in den managed beans from JSF. This is the form centric approach Kito Mann 
discripes in his book JSF in Action. But that isn't what I want. I'm a beginner 
in both topics (hibernate and jsf) and for me it's no clear how this fit 
together. Is it recommended to use Spring to stick this two worlds togehter? Is 
that a good way to use Spring?
 
Many thanks, I'm a 
little bit confused.
 
regards
Matthias


RE: Issue in Tabbed window

2006-10-06 Thread Julian Ray



See http://wiki.apache.org/myfaces/SettingTabClasses
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 06, 2006 5:17 AMTo: 
users@myfaces.apache.orgSubject: Issue in Tabbed 
window
Hi, I am having a problem of changing the background color 
of a tab in panelTabbedPane tag. I want to change the color of selected tab to blue while current window 
color remain the white backgound. whenever I change the property of backgound color through 
activeTabStyleClass property of panelTabbedPane tag its changes the color 
of whole tab window. I just want to set 
the color of the selected tab. Monika MalikTata Consultancy Services LimitedMailto: 
[EMAIL PROTECTED]Website: http://www.tcs.com=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you





Re: Scheduler: Getting Clicked Entry

2006-09-20 Thread Julian Ray

Ok, so I resolved this issue.

When clicking on a schedule item the scheduler saves the selected state
(i.e. which schedule entry was clicked) into the schedule model then submits
the form. My problem was the model was in request scope and the state is
lost between requests so when the form is posted and the backing bean
re-generated the model was getting re-generated and, therefore, loosing the
state. The resolution: keep the model in request scope but save state across
views using t:saveState.

I purposfully did not want to do this as the model represent highly dynamic
data and I wanted it refreshed on each re-post. A better design (for my
purposes) would be to extend the scheduler to allow it to get/set the
selected item id (which could be preserved in view state) while the model
itself dynamic.

Julian




Jurgen Lust-2 wrote:
> 
> Well, I checked by simply adding some debugging to the action method:
> Just calling log.info("Selected Entry: " +
> getModel().getSelectedEntry()) in the action method printed the correct
> entry...
> 
> I committed the changes, please check out the latest sources and take a
> look at the log file...
> 
> Jurgen
> 
> Op wo, 20-09-2006 te 05:18 -0700, schreef Julian Ray:
>> Hi Jurgen,
>> 
>> I'm back on this and still have not found a resolution.
>> 
>> Looking at the code, example 5 does not return the selected entry but
>> simply
>> identifies that an entry was clicked in the mouse listener and the action
>> method simply returns "success".  Am I missing something here?
>> 
>> Has anybody else got this working and if so, have any code they can
>> share.
>> 
>> 
>> BTW, I am not using facelets.
>> 
>> Thanks
>> Julian
>> 
>> 
>> Jurgen Lust-2 wrote:
>> > 
>> > Have you checked schedule example 5? In that example, the
>> > getModel().getSelectedEntry() returns the correct entry when called
>> from
>> > the action method.
>> > 
>> > Are you using Facelets?
>> > 
>> > Jurgen
>> > 
>> > Op ma, 11-09-2006 te 09:15 -0700, schreef Julian Ray:
>> >> Does anyone have any ideas on this? I've been pulling my hair out over
>> it
>> >> for
>> >> two days now :)
>> >> 
>> >> Thanks
>> >> Julian
>> >> 
>> >> 
>> >> Julian Ray wrote:
>> >> > 
>> >> > I'm having problems getting the clicked entry from the scheduler.
>> The
>> >> > ScheduleMouseEvent is set to SCHEDULE_ENTRY_CLICKED but in the mouse
>> >> > listener event and the action event the
>> getModel().getSelectedEntry()
>> >> is
>> >> > always null and  isEntrySelected() always returns false.
>> >> > 
>> >> > Have I missed something? Do I ahve to select the entry somehow?
>> >> > 
>> >> > Thanks
>> >> > Julian
>> >> > 
>> >> 
>> > 
>> > 
>> > 
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Scheduler%3A-Getting-Clicked-Entry-tf2247939.html#a6411997
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Scheduler: Getting Clicked Entry

2006-09-20 Thread Julian Ray

Hi Jurgen,

I'm back on this and still have not found a resolution.

Looking at the code, example 5 does not return the selected entry but simply
identifies that an entry was clicked in the mouse listener and the action
method simply returns "success".  Am I missing something here?

Has anybody else got this working and if so, have any code they can share.


BTW, I am not using facelets.

Thanks
Julian


Jurgen Lust-2 wrote:
> 
> Have you checked schedule example 5? In that example, the
> getModel().getSelectedEntry() returns the correct entry when called from
> the action method.
> 
> Are you using Facelets?
> 
> Jurgen
> 
> Op ma, 11-09-2006 te 09:15 -0700, schreef Julian Ray:
>> Does anyone have any ideas on this? I've been pulling my hair out over it
>> for
>> two days now :)
>> 
>> Thanks
>> Julian
>> 
>> 
>> Julian Ray wrote:
>> > 
>> > I'm having problems getting the clicked entry from the scheduler. The
>> > ScheduleMouseEvent is set to SCHEDULE_ENTRY_CLICKED but in the mouse
>> > listener event and the action event the getModel().getSelectedEntry()
>> is
>> > always null and  isEntrySelected() always returns false.
>> > 
>> > Have I missed something? Do I ahve to select the entry somehow?
>> > 
>> > Thanks
>> > Julian
>> > 
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Scheduler%3A-Getting-Clicked-Entry-tf2247939.html#a6406694
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: Question About saveState

2006-09-18 Thread Julian Ray
You are probably better managing the backing bean in the session in that
case. 

-Original Message-
From: mjovanov [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 5:27 PM
To: users@myfaces.apache.org
Subject: Question About saveState


Hi everyone,

On page X I have a saveState tag to preserve the state of a backing bean
between requests.  There is also a link on the side navigation bar that is
used to navigate to page X.  Whenever a user clicks this link, I do not want
to de-serialize the backing bean but rather I want a new instance of the
backing bean to be created (just like it is the case on the original load)
Is there any way to do this (for example to somehow overrides the behavior
of the saveState tag in such  case).  Perhaps someone can explain the
internals of the saveState implementation; that would be really helpful. 
Thanks in advance.

--
View this message in context:
http://www.nabble.com/Question-About-saveState-tf2294657.html#a6374835
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: wizard-style JSF application: looking for words of wisdom

2006-09-16 Thread Julian Ray
We have several of these in our app and have a consistent approach using
just Tomahawk. Each page of the wizard has a different backing bean (request
scope) which inherits from a wizard class which manages forward/backward
navigation etc. and access to a wizard-specific bean to store state. The
state bean is managed using Tomahawk's saveState tag.

The model works well and is very efficient. We use it for creating new
objects as well as editing existing object -- you just have to be careful
about how to initialize the state bean on the first page and managing page
access such that the user could not type a URL to page n unless page n-1 has
been completed.

-Original Message-
From: Gerald Müllan [mailto:[EMAIL PROTECTED] 
Sent: Saturday, September 16, 2006 8:16 AM
To: MyFaces Discussion
Subject: Re: wizard-style JSF application: looking for words of wisdom

Yes, you can also use sandbox` conversation component to achieve a wizard.

In the current application i am developing on, we use t:savestate in order
to get a page-wide scope for our beans. The beans are special page-wizard
beans which get a base wizard functionality from a wizard base class.

The typical back-forward-end functionality works very well with this
solution.

cheers,

Gerald

On 9/15/06, William Huang <[EMAIL PROTECTED]> wrote:
> then I think a nice solution is Andrew Robinson's method (JBoss Seam & 
> Facelets),  but instead of JBoss Seam, use tomahawk savestate.  I 
> think there is also a conversation jsf tag/component from tomahawk as
well.
>
> William Huang
> Product Development Team
>
>  "Henrik Bentel"
>  <[EMAIL PROTECTED]
>  .com>  To
>"MyFaces Discussion"
>  09/15/2006 12:08  
>  PM cc
>
>Subject
>  Please respond to Re: wizard-style JSF application:
>  "MyFaces  looking for words of wisdom
> Discussion"
>  <[EMAIL PROTECTED]
>  ache.org>
>
>
>
>
>
>
>
> They both look like good alternatives except I'm stuck on java 1.4.2 
> and EE 1.3 (weblogic 8.1).
> It seems they both require higher JDK/EE versions.
>
> -Henrik
>
>
> On 9/15/06, Adam Brod <[EMAIL PROTECTED]> wrote:
> >
> > Check out JBoss Seam or the Apache Shale project.  They are both JSF 
> > frameworks with support for widard-like flows.
> >
> >  Adam Brod
> >  Product Development Team
> >
> >
> > "Henrik Bentel" <[EMAIL PROTECTED]> wrote on 09/15/2006 11:22:56 AM:
> >
> >
> >  > Hi
> >  >
> >  > I'm developing a JSF webapp which works like a 'wizard' where the 
> > user  > steps though  > several pages(or steps). The main navigation 
> > control are links like  > 'next', 'previous', and 'cancel'.  I've 
> > done a couple of these  > 'wizard'-style apps, each very different 
> > in structure.
> >  >
> >  > I'm looking for suggestions for what you've found to work well in 
> > this  > type of application.
> >  >
> >  >
> >  > My previous 2 weak attempts of a wizard-style app is as follows.
> >  > My first app has one managed bean for the entire wizard with all  
> > > validation and wizard logic in that one bean(and supporting POJOs).
> >  > Using one backing bean made it easier for reuse of page layout 
> > and  > navigation controls, and made it easy to skip steps 
> > dynamically at  > runtime. But it grew very large and not very pretty.
> >  >
> >  > My second app has one backing bean per 'step'. But I couldn't 
> > find an  > obvious way of reuse page layout and navigation controls 
> > across all  > the managed beans. So each page is bound to its own 
> > backing bean with  > 'next', 'previous' and 'cancel' action methods. 
> > And sometimes a  > backing bean had to know which page was the 
> > previous and the next  > step.
> >  >
> >  > Hope someone can help
> >  >
> >  > regards,
> >  > Henrik
> >
> >  Disclaimer: This electronic mail and any attachments are 
> > confidential
> and
> > may be privileged. If you are not the intended recipient, please 
> > notify
> the
> > sender immediately by replying to this email, and destroy all copies 
> > of
> this
> > email and any attachments. Thank you.
> >
> >
> >
>
> Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the
sender immediately by replying to this email, and destroy all copies of this
email and any attachments. Thank you.
>
>


--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



Re: Scheduler: Getting Clicked Entry

2006-09-11 Thread Julian Ray

Does anyone have any ideas on this? I've been pulling my hair out over it for
two days now :)

Thanks
Julian


Julian Ray wrote:
> 
> I'm having problems getting the clicked entry from the scheduler. The
> ScheduleMouseEvent is set to SCHEDULE_ENTRY_CLICKED but in the mouse
> listener event and the action event the getModel().getSelectedEntry() is
> always null and  isEntrySelected() always returns false.
> 
> Have I missed something? Do I ahve to select the entry somehow?
> 
> Thanks
> Julian
> 

-- 
View this message in context: 
http://www.nabble.com/Scheduler%3A-Getting-Clicked-Entry-tf2247939.html#a6249916
Sent from the MyFaces - Users forum at Nabble.com.



RE: Schedule Tomahawk Component

2006-09-10 Thread Julian Ray



Its in the Tomahawk jar.


From: Stephen Osella 
[mailto:[EMAIL PROTECTED] Sent: Sunday, September 10, 2006 12:19 
PMTo: users@myfaces.apache.orgSubject: Schedule Tomahawk 
Component

I can't find the custom Schedule component (that is 
advertised in "http://myfaces.apache.org/tomahawk/schedule.html") in either the 
tomahawk-1.1.3.jar nor in the tomahawk-sandbox-1.1.5 SNAPSHOT.
 
Could someone tell me in which JAR this component 
resides?
 
Thanks!


RE: Schedule Tomahawk Component

2006-09-10 Thread Julian Ray



It was moved from Sandbox to Tomahawk a few months ago so 
I'm guessing that it moved in the 1.1.4 version. I use 1.1.5 from a nightly 
build. If you have 1.1.3 it should be in the sandbox jar.
 Julian


From: Stephen Osella 
[mailto:[EMAIL PROTECTED] Sent: Sunday, September 10, 2006 12:28 
PMTo: MyFaces DiscussionSubject: Re: Schedule Tomahawk 
Component

Julian,
 
Thanks for responding.  Sorry to be so obtuse, 
but I have tomahawk-1.1.3.jar and I dont see it.  What is the 
package?  Which tomahawk.jar do you have?  And where can i get 
it?
 
Thanks a bunch!
 
Steve

  - Original Message - 
  From: 
  Julian 
  Ray 
  To: 'MyFaces Discussion' 
  Sent: Sunday, September 10, 2006 11:21 
  AM
  Subject: RE: Schedule Tomahawk 
  Component
  
  Its in the Tomahawk jar.
  
  
  From: Stephen Osella 
  [mailto:[EMAIL PROTECTED] Sent: Sunday, September 10, 2006 
  12:19 PMTo: users@myfaces.apache.orgSubject: 
  Schedule Tomahawk Component
  
  I can't find the custom Schedule component (that 
  is advertised in "http://myfaces.apache.org/tomahawk/schedule.html") 
  in either the tomahawk-1.1.3.jar nor in the tomahawk-sandbox-1.1.5 
  SNAPSHOT.
   
  Could someone tell me in which JAR this component 
  resides?
   
  Thanks!


Scheduler: Getting Clicked Entry

2006-09-10 Thread Julian Ray

I'm having problems getting the clicked entry from the scheduler. The
ScheduleMouseEvent is set to SCHEDULE_ENTRY_CLICKED but in the mouse
listener event and the action event the getModel().getSelectedEntry() is
always null and  isEntrySelected() always returns false.

Have I missed something? Do I ahve to select the entry somehow?

Thanks
Julian
-- 
View this message in context: 
http://www.nabble.com/Scheduler%3A-Getting-Clicked-Entry-tf2247939.html#a6234409
Sent from the MyFaces - Users forum at Nabble.com.



RE: the biggest myfaces webapp

2006-08-20 Thread Julian Ray



Hi Guys,
 
I'm in the process of tuning our MyFaces app and have been 
focusing on the Hibernate cache so far. This discussion thread is interesting as 
I have now moved into the JSF pages to look for bottlenecks etc now thw database 
tier has been optimized. I'm using OpenSymphony's clicksteam to map user 
requests and behaviours and page timings.
 
My question is this. Are there any pluggable components 
(listeners/filters etc.) that I can use to detemine average server load in 
requests per min/sec etc. as Rogerio describes in his app before I go and write 
these myself?
 
Thanks
Julian


From: Rogerio Pereira 
[mailto:[EMAIL PROTECTED] Sent: Sunday, August 20, 2006 10:11 
AMTo: MyFaces DiscussionSubject: Re: the biggest myfaces 
webapp
Maybe client state saving with JBossSerialization can increase the 
performance.
2006/8/20, Rogerio Pereira <[EMAIL PROTECTED]>: 

  Have u done tests with client side state saving using 
compression?
  2006/8/20, Frederic Auge <[EMAIL PROTECTED]>:
  
  Hi 
guys,We had big performance problems with client state 
saving.Changing to server helped a lot ! x4-5 improvement for serving 
pages !We don't have any problems anymore. Our average load is 
30requests/min 24/24 7/7 And we could take a lot more 
(hopefully)We use a profiler when we have a specific performance 
problem(understand a page that is slow). It's more likely to be in 
thebusiness tier than the web tier.Regards,FredOn 
8/20/06, Yee CN <[EMAIL PROTECTED]> 
wrote:> I am in the same boat – a 
distributed application that I was building has to > be converted to 
become centralized, so the number of users suddenly becomes> at least 
an order of magnitude larger. I am thinking 
memory might not be such a big issue as a multi-CPU Intel > boxes 
with 8GB of memory is getting rather common place nowadays. But I am 
a> bit concerned about view rendering time. A while back somebody 
posted a> benchmark which I recalled was showing that JSF pages took 
about 4 times > longer to render, and there were some non-linear 
issues as well. In> principle faster CPU plus cheaper boxes for 
clustering should handle the> problem, but I am dying for someone to 
share his/her experience on large > scale deployment of 
JSF. I have no regret so far – after the 
initial learning curve the faster> development/prototype time has 
been a great advantage to our team. 
Regards>> 
Yee>>  >>> 
From: Rogerio Pereira [mailto: 
[EMAIL PROTECTED] ]>  Sent: Sunday, August 20, 
2006 7:31 AM>  To: MyFaces 
Discussion>  Subject: Re: the biggest myfaces 
webapp> Thanks guys, this kind of 
discussion is very useful. >>> 2006/8/19, Kevin 
Galligan <[EMAIL PROTECTED]>:>> > 
If memory is the major concern, I think the real unknown is the view state 
> storage.  To be honest, this is an unknown for me 
also.  Currently I'm> keeping that stuff on the 
client.  If the page download size isn't too big,> I think 
this is the direction I'd stick with even in production, as I don't > 
have to worry about old views getting dumped from the session in case 
the> user really digs the back 
button.>>  But, in general, I'm not sure what the 
memory issue would be beyond the> view storage.  I'm 
anti-session for most things anyway, besides carrying > around some 
standard user info.  I'm planning to rely on smart coding,> 
tuning hibernate settings (which, obvisouly, requires the use of 
hibernate)> and, possibly, turning on the hibernate cache for certain 
parts of the data. >>  However, I do understand your 
concern.  I'm sort of in the same boat.  I'm> 
implementing an app and I'm not sure how many people will be logging 
into> it.  I don't know what the performance will really be 
like.  I still think > there is some technical 
understanding of the JSF view that I've ignored> until now that would 
probably help.  If anybody happens to have a good page> to 
point to that discusses the view, please forward that along. 
>>  What kind of box will this be running 
on?  I assume if this is a production> app that you might 
have a few hundred megs of memory available for the> application to 
play in?  Making that assumption, you've got about a meg per 
> user.  Right?  While compared to some other 
technologies, a meg per user is> a lot, but at the same time, 
hardware is cheap compared to developer time.> Again, the big 
question mark in my mind is the view storage.  If it were > 
stored on the client, in theory you wouldn't need much session space 
besides> authentication, if 
any.  Right?>> On 
8/19/06, Eurig Jones < [EMAIL PROTECTED]> wrote:>> As far 
as I'm aware after the research I've done I haven't seen 
any>  large websites done in 
JSF.>> 

RE: LayoutManager

2006-08-19 Thread Julian Ray
You might want to look at Sun's Creator and components as it has a grid and
a flow layout manager although the positions are rendered with CSS -- you
just don't have to worry about it though!


-Original Message-
From: Remo Liechti [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 19, 2006 12:32 PM
To: users@myfaces.apache.org
Subject: LayoutManager

Hi all
I use JSF some months now. But what I really miss is a nice LayoutManager
like BoarderLayout or GridBagLayout in Java. Is there any way to do simple
JSF using LayoutManagers?

It would be so great if one could use JSF like this:

  
  
  
  


Same for Border:

  
  
  
  


Or the like. You know what I'm talking about. Is there any easy way to do
this? I don't think it would be nice to use 's with CSS...
If so, great. If not, I'm really thinking about to create a custom component
that can render all other JSF elements, but which is able to handle some
basic layoutmanagers.

Summary:
Flowlayout: would be very easy to do
NullLayout could be done using html tables and some wierd hights and widths
BorderLayout: could be done using html tables and col/rowspan
GridBagLayout: could be done using html tables and col/rowspan
GidLayout: just a simple html table

Any feedback?

Thanks,
Remo


This message may contain legally privileged or confidential information and
is therefore addressed to the named persons only. The recipient should
inform the sender and delete this message, if he/she is not named as
addressee.
The sender disclaims any and all liability for the integrity and punctuality
of this message. The sender has activated an automatic virus scanning, but
does not guarantee the virus free transmission of this message.



RE: is there a way to pull a session scope variable directly into a jsf tag?

2006-07-27 Thread Julian Ray
We put all our session scoped variables into a managed bean which has
session scope. It then becomes easy

#{SessionBean.foo.bar}


-Original Message-
From: James Reynolds [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 27, 2006 2:41 PM
To: MyFaces Discussion
Subject: RE: is there a way to pull a session scope variable directly into a
jsf tag?

There are some implicit variables to simplify accessesing objects in session
or application scope...

#{sessionScope.foo.bar}

Or

#{applicationScope.foo.bar}

I haven't tried this for navigation as you've described, but it works great
for tying object properties to controls.

JR

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 11:33 AM
To: MyFaces Discussion
Subject: is there a way to pull a session scope variable directly into a jsf
tag?






let's say I have a session scoped attribute (not a component) named foo,
with a value of "bar"

I wanted to create a command button like 

Automatic Page Refresh

2006-07-26 Thread Julian Ray



Has anyone managed 
to get a JSF page to automatically refresh. Using meta tags is out because the 
URL lags behind the actual view in the browser so it refreshes the previous 
view.
 
I would think that 
you could add a timer and refresh current view using _javascript_ and a 
hidden submit button attached to a backing bean action but before I start to do 
this I wanted to check to see if anyone has already done it (perhaps more 
elegantly) and could share code. It would actually make a cool Tomahawk 
component if it could be encapsulated in a custom tag.
 
Julian


RE: Custom Validation Problem

2006-07-26 Thread Julian Ray
Did you register the validator in the faces-xml file? 

-Original Message-
From: Ali Abdel-Aziz Ali [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 26, 2006 6:52 AM
To: MyFaces Discussion
Subject: Custom Validation Problem

Hi All,
I have problem in building Custom Validation.
I want build custom validator that accept name property for the other
component that it will make the validation with it.
I need to build validator similar to the t:validateEqual 

here are what I did:-
copy and past the EqualValidator, and EqualValidatorTag and make code
changes to do what I want
  changed the VALIDATOR_ID from  "org.apache.myfaces.validator.Equal"
  to " com.oc.validators.MyValidator";

and created tld

  validateFromThrue
 
com.oc.itworx.HR.validators.FromThrueValidatorTag 
  JSP
  
A custom validator for validations against foreign component
values.

Unless otherwise specified, all attributes accept static values or
EL expressions. 

  
  
 message 
 false
 false
 
alternate validation error message format string
 
  
  
 for
 true
 false
  
the id of the foreign component, which is needed for the
validation

  
   

but I got the following exception
javax.faces.FacesException : Unknown validator id
'com.oc.validators.MyValidator'

--
Ali Abdel-Aziz
http://www.aliabdelaziz.com
http://aabdelaziz.blogspot.com 



RE: partial validation of value

2006-07-26 Thread Julian Ray
Perhaps a good strategy would be to add bindings to all the form elements
you need to validate and a hidden form element at the bottom of the page and
perform a backing-bean validation on this hidden element. You can validate
all the values in the bound form elements at one time and as complicated
business logic as you need.

-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 26, 2006 6:20 AM
To: MyFaces Discussion
Subject: partial validation of value

Hello,

is it possible to handle partial validation of form content? I need 1 or
several items in a forms to be valid at a specific submit, but as it is only
a request for partial change in the form, it is most probable the rest is
not valid / finished. However, i need to keep information in rest of form
even if it's not valid.

Here is how my form must look like:


data1 [.]
data2 [.]
data3 [.]
  subdata1 (read-only)
  subdata2 (read-only)
  subdata3 (read-only)
  subdata4 [..]  [add-subdata-button]
data4 [.]
data5 [.]
[submit]

when i click add-subdata-button, i need subdata4 to be validate, but textual
content of data 1 -> 5  must be kept without any validation attempt.
when i click submit, data 1->5 must be validated, but content of
subdata4 ignored.

I suppose the JSF framework has something for this, but am not sure what.



RE: [Fwd: RE: 'dynamic' breadcrumb navigation --> possible?]

2006-07-25 Thread Julian Ray
 Please keep this on the list for everybody to read.

-Original Message-
From: Kuni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 25, 2006 4:38 PM
To: Julian Ray
Subject: Re: [Fwd: RE: 'dynamic' breadcrumb navigation --> possible?]

that is exactly that what i mean!
i hope there is enough interesst by the myfaces communitiy.. :/

Julian Ray schrieb:
> If you go to our web site (www.c2glogistics.com/cms_iwc.php) you can 
> see a few screenshots which show the Nav History in action.
>
> -Original Message-
> From: Kuni [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 25, 2006 4:14 PM
> To: [EMAIL PROTECTED]
> Subject: [Fwd: RE: 'dynamic' breadcrumb navigation --> possible?]
>
> Hello Julian,
>
> thanks for your reply! that seems to be exactly that what i want :) is 
> it possible to see a working example or something more?
>
> some of my first ideas get in touch with your description :)
>
> regards,
> kuni
>
> 
>
> Hi Kuni,
>
> We have a solution which does exactly what you want. However, it 
> requires a bit or organization of your JSF files. In particular:
>
> A session-scoped stack to store previous views A view-specific 
> mechanism to push each new view to the stack A standardized means to 
> associate a view name with jsf page A component to dynamically render 
> the breadcrumb trail and A backing bean to manage breadcrumb actions.
>
> We have not yet had time to create a JSF component to encapsulate all 
> this coding but, if there is enough interest from the MyFaces 
> community at large I will try to put our methodology on the WIKI for you
and others.
>
>
> Julian
>
> -Original Message-
> From: Kuni [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 25, 2006 3:46 PM
> To: adffaces-user@incubator.apache.org; MyFaces Discussion
> Subject: 'dynamic' breadcrumb navigation --> possible?
>
> Hello,
>
> i'm looking for a breadcrumb component.. i found the navigationPath 
> component provided by trinidad.. that's really nice but that's not 
> what i'm looking for! i imagine something like these:
>
> 
> which will render:   index >> page1 >> page2 >> page3
>
> the component 'knows' your navigation history based on the navigation
rules.
> in the simpliest way you only should define an entry point. the 
> component observes your behavior to create a path like shown above. no 
> path definition is needed..
>
> a well known strategy to create such path is to organize your sources 
> in structured directories and parsing the directory tree.. but that 
> makes no sense cause your source-tree depends on the navigation-path 
> terrible ;)
>
> anybody has a working example or knows hot to realize it? ..
>
> regards,
> Kuni
>
>
>
>
>
>
>
>
>
>   



RE: 'dynamic' breadcrumb navigation --> possible?

2006-07-25 Thread Julian Ray
Hi Kuni,

We have a solution which does exactly what you want. However, it requires a
bit or organization of your JSF files. In particular:

A session-scoped stack to store previous views 
A view-specific mechanism to push each new view to the stack
A standardized means to associate a view name with jsf page
A component to dynamically render the breadcrumb trail and
A backing bean to manage breadcrumb actions.

We have not yet had time to create a JSF component to encapsulate all this
coding but, if there is enough interest from the MyFaces community at large
I will try to put our methodology on the WIKI for you and others.


Julian

-Original Message-
From: Kuni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 25, 2006 3:46 PM
To: adffaces-user@incubator.apache.org; MyFaces Discussion
Subject: 'dynamic' breadcrumb navigation --> possible?

Hello,

i'm looking for a breadcrumb component.. i found the navigationPath
component provided by trinidad.. that's really nice but that's not what i'm
looking for! i imagine something like these:


which will render:   index >> page1 >> page2 >> page3

the component 'knows' your navigation history based on the navigation rules.
in the simpliest way you only should define an entry point. the component
observes your behavior to create a path like shown above. no path definition
is needed..

a well known strategy to create such path is to organize your sources in
structured directories and parsing the directory tree.. but that makes no
sense cause your source-tree depends on the navigation-path terrible ;)

anybody has a working example or knows hot to realize it? ..

regards,
Kuni








RE: Help in table conversion from HTML to JSF...

2006-07-25 Thread Julian Ray



Here are some solutions
 
[1] Use the rowClasses to set a CSS style with the 
background image set.
 
[2] use a   and styles again!
 
[3] item1, item 2, item 
3...,item,n
 
 


From: Jorge Vásquez [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 25, 2006 12:41 PMTo: 'MyFaces 
Discussion'Subject: Help in table conversion from HTML to 
JSF...


Greetings,
 
I am having tons of problems 
migrating a pure html table to JSF, I don´t know if I am still not used to think 
in JSF terms but I kind of get the impression that table components in JSF miss 
lots of features that were present in html.
I enumerate 
some:
 
1.  How is it possible to 
associate an image to a td as background in JSF:
Example in html:  
 
2.  How is it possible to 
define an empty td with certain width:  
Example in html:  
 
3.  How is it possible to 
specify to a panelGrid container that a bunch of elements must go under a 
td?
 
Does anyone knows of a table 
component in JSF that is more closely related to the html 
table?
 
Thanks a 
lot,
JV
 


RE: how do you folks handle a "Cancel" button?

2006-07-24 Thread Julian Ray
Add immediate="true" to the command button. This will by pass any updates.
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 4:37 PM
To: MyFaces Discussion
Subject: how do you folks handle a "Cancel" button?






hello to everyone,

I have a form that displays detail data from a backing bean.

The same bean supplies properties for an update page.

The update page has a Cancel button and when selected should return the user
to the detail page with no changes saved.

Simple enough use, but when the Cancel button is selected, the backing bean
is updated and the detail page shows modified data.

How do you folks handle similar situations?

Thanks in advance for your help.
Tom



 
This message is intended for the recipient only and is not meant to be
forwarded or distributed in any other format. This communication is for
informational purposes only.  It is not intended as an offer or solicitation
for the purchase or sale of any financial instrument, or security, or as an
official confirmation of any transaction.  Putnam does not accept purchase
or redemptions of securities, instructions, or authorizations that are sent
via e-mail.   All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not necessarily reflect
those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and
affiliates.  If you are not the intended recipient of this e-mail, please
delete the e-mail.



RE: breadcrumb navigation

2006-07-22 Thread Julian Ray
This would be a good topic for the wiki. 

-Original Message-
From: Kuni [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 22, 2006 7:03 AM
To: MyFaces Discussion
Subject: breadcrumb navigation

Hello,

i need a breadcrumb-navigation for my actual project. i have no ideas how to
realize this and i don't can find such components in the net.

any ideas?


thanks,
kuni




RE: need javascript syntax to loop through checkbox list from dataTable

2006-07-21 Thread Julian Ray
Sure. Good suggestion. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Matthias Wessendorf
Sent: Friday, July 21, 2006 12:28 AM
To: MyFaces Discussion
Subject: Re: need javascript syntax to loop through checkbox list from
dataTable

Hi Julian,

I think this is useful for others too.
can you (again) put it to our wiki ?

Thank you!

On 7/18/06, Julian Ray <[EMAIL PROTECTED]> wrote:
> We do exactly the same thing. Here is my JS.
>
> Note how the checkboxes are named. We have one funcrtion which toggles 
> checks on and off and another which checks for one or more checked.
>
>
>
> /*
>  * Browser-safe get object. Tries all three approaches to get an 
> object
>  * by its element Id.
>  *
>  * Param:   objId - String - id of element to retrieve.
>  * Param:   formId - String - id of form (optional).
>  * Returns: element or null if not found.
>  */
> function getObj(objId, formId) {
> var fullId = objId;
> if (formId != null && formId.length > 0) {
> fullId = formId + ':' + objId;
> }
> //alert('getting object: ' + fullId);
> var elem = null;
> if (document.getElementById) {
> elem = document.getElementById(fullId);
> } else if (document.all) {
> elem = document.all[fullId];
> } else if (document.layers) {
> elem = document.layers[fullId];
> }
> return elem;
> }
> /*
>  * Browser-safe. Check or uncheck an array of checkboxes. Boxes have 
> ids
>  * like check[0], check[1], ... , check[n] where 'check' is the base 
> Id that
>  * has been assigned to the group.
>  *
>  * Param:   arrayId - String - id of element group to change
>  * Param:   state - boolean - true (check all elements) false
> (uncheck all elements)
>  * Returns: nothing
>  */
> function checkBoxArraySet(arrayId, state) {
> for (i = 0; ; i++) {
> id = arrayId + '[' + i + ']';
> elem = getObj(id);
> if (elem == null) {
> break;
> } else {
> elem.checked = state;
> }
> }
> }
> /*
>  * Browser-safe. Checks to see if an array of check boxes has any 
> which are
>  * checked. Boxes have ids like check[0], check[1], ... , check[n] 
> where 'check'
>  * is the base Id that has been assigned to the group.
>  *
>  * Param:   arrayId - String - id of element group to change
>  * Returns: boolean (true one or more checked) false (else)
>  */
> function checkBoxArrayHasChecked(arrayId) {
> for (i = 0; ; i++) {
> id = arrayId + '[' + i + ']';
> elem = getObj(id);
> if (elem == null) {
> break;
> } else if (elem.checked) {
> return true;
> }
> }
> return false;
> }
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 18, 2006 2:41 PM
> To: MyFaces Discussion
> Subject: need javascript syntax to loop through checkbox list from 
> dataTable
>
>
>
>
>
>
> hello to everyone
>
> I'm using a tomahawk dataTable where one of the t:columns contains a 
> t:selectBooleanCheckbox
>
> The tag has id and a forceId="true" attributes.
>
> In the rendered html, the id of the checkbox is foo[0], foo[1] etc
>
> I need to be able to loop through this list and look for a .checked 
> property.
>
> I've tried all the loop mechanisms usually described for checkboxes 
> but can't hit on the proper javascript syntax.  googled till my eyes 
> glazed over.
>
> can someone provide an example or a good reference to resolve this?
>
> Thanks in advance for your time and help.
> Tom
>
>
>
>
> This message is intended for the recipient only and is not meant to be 
> forwarded or distributed in any other format. This communication is 
> for informational purposes only.  It is not intended as an offer or 
> solicitation for the purchase or sale of any financial instrument, or 
> security, or as an official confirmation of any transaction.  Putnam 
> does not accept purchase or redemptions of securities, instructions, or
authorizations that are sent
> via e-mail.   All market prices, data and other information are not
> warranted as to completeness or accuracy and are subject to change 
> without notice.  Any comments or statements made herein do not 
> necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and 
> its subsidiaries and affiliates.  If you are not the intended 
> recipient of this e-mail, please delete the e-mail.
>
>


--
Matthias Wessendorf

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com



RE: Component tag with variable componenttype, howto?

2006-07-20 Thread Julian Ray
Is is a container such as a gridPanel that you need? If so, you could
probably subclass the gridpanel and use a backing bean to add other
components on demand. We do this for our tab menus.
 

-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 20, 2006 6:07 AM
To: MyFaces Discussion
Subject: Component tag with variable componenttype, howto?

Hello,

I am in a situation where i need to write such a tab:



The jsf component is to be created using parameterBean.createComponent
().

My first thought was to create an empty Component whose sole role was to ass
the result of parameterBean.createComponent() as it's only child. 
However, i begin to think it might be better of the tag itself would call
createComponent() on my bean, this would prevent creation of useless
intermediate Components. But i am not sure how to do this, according to my
knowledged, i need to extend UIComponentTag and this requires to return a
componentType, which in my case is a non sense as the component is to be
generated by createComponent() How can i do this. Am i forced to create
a custom component that would only serve as an container to another
correctly fitted component?

I hope i was clear in my request :)

Thanks for consideration,
David Delbecq



RE: add resource woes (list is growing)

2006-07-19 Thread Julian Ray

An update on this. After doing a comparison of changes between the dev with
the just-compiled myfaces 1.1.5 and my last working version (8 days ago) I
found that I have somehow missed copying the new build for myfaces.impl
snapshot.

When I copied the impl everything started to work fine.
-- 
View this message in context: 
http://www.nabble.com/add-resource-woes-%28list-is-growing%29-tf1962327.html#a5398794
Sent from the MyFaces - Users forum at Nabble.com.



RE: [OT] Mailing list Support in other languages, was "Re: question"

2006-07-19 Thread Julian Ray
Would that be English-English, US English or Bush-English? 

-Original Message-
From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 6:48 AM
To: MyFaces Discussion
Subject: Re: [OT] Mailing list Support in other languages, was "Re:
question"


> 
>   Ask George W.
> 
>   

But then you should add "english" to the list too 


Ciao,
Mr. Anonymous



RE: JSF-RI, ADF, MyFaces, Facelets. I'm lost.

2006-07-19 Thread Julian Ray
Our project started off using Suns Creator which is JSF-RI + a few
additional components. We quickly found 
the MyFaces + Tomahawk provides a much better option and moved our entire
project suite (6 apps) over to it. I purposfully stayed away from ADF when
making a choice as it still belonged to Oracle and after spending 4 years
banging against stupid Oracle bugs in my previous company, I just didn't
trust their quality control (I'm glad to see its now open source). We did
look at Tobago but didn't want to replace the view controller and it seemed
to have a small developer group.

Here are a couple of key points to consider when making a selection: 

[1] the learning curve is pretty steep in all JSF implementations and, in
some cases, the richer the component choice, the more learning needs to be
done and the less documentation is generally available. 

[2] user-group support is *very* important. Both MyFaces and Sun have large
user bases and active user lists but perhaps its worth while spending a few
minutes browsing through the forums to get a feel for (a) the type of
problems user experience, (b) how helpful (and fast) is the user community
in reponding to questions, and (c) how reactive is the development team to
addressing Azissues?

My money is firmly on MyFaces -- great support, great components and a great
product.


-Original Message-
From: Cosma Colanicchia [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 6:15 AM
To: MyFaces Discussion
Subject: Re: JSF-RI, ADF, MyFaces, Facelets. I'm lost.

They are not concurrents. MyFaces provides a JSF implementation (as the Sun
RI does), while ADF Faces/Trinidad is a library of components with some
added services. If you are talking about "MyFaces Tomahawk"
, then yes, there is some overlap with Trinidad, but they are probably going
to be merged in future.

Right now, you will have some troubles only using both Tomahawk and
Trinidad. For example Tomahawk components will not be aware of Trinidad
skinning system and of its client validation framework. I think that it is
better to choose one of the two until they'll be merged or refactored to
work well togheter.

Regards
Cosma


2006/7/19, Cyrille37 <[EMAIL PROTECTED]>:
> ::SammyRulez:: a écrit :
> > my choices
> >
> > myfaces + tomahawk component: all the gui you need
> > facelets: decouple design and component
> > ajaxanywhere: add some exotic behaviour non breaking jsf cycle
> Thank you very much for your comment.
>
> What about MyFaces and ADF ? They seem concurents, isn't it ? Why we 
> should one or other ?
>
> cyrille.
>
> > Application Framework... I really don't need them.. I sense that 
> > good design ad c couple of utility classes ca do anything you 
> > need... IMHO
> >
> > 2006/7/19, Cyrille37 <[EMAIL PROTECTED]>:
> >> Hello,
> >>
> >> There are few projects around JSF that make me lost. I've to make a 
> >> choice to start the study of a future project, it's time for me to 
> >> select technologies.
> >>
> >> At first, I've to choice a Application Framework. Choices are 
> >> Spring, Tapestry.
> >> Then a GUI Framework. Here is my problem, JSF is in spotlight so 
> >> looks to be a good choice, but there are several projects and I 
> >> could not make my choice.
> >>
> >> Have you got an opinion which could light me ??
> >> Thanks you very much.
> >> cyrille.
> >>
> >
> >
>
>
>



RE: need javascript syntax to loop through checkbox list from dataTable

2006-07-18 Thread Julian Ray
We do exactly the same thing. Here is my JS. 

Note how the checkboxes are named. We have one funcrtion which toggles
checks on and off and another which checks for one or more checked.



/*
 * Browser-safe get object. Tries all three approaches to get an object
 * by its element Id.
 *
 * Param:   objId - String - id of element to retrieve.
 * Param:   formId - String - id of form (optional).
 * Returns: element or null if not found.
 */
function getObj(objId, formId) {
var fullId = objId;
if (formId != null && formId.length > 0) {
fullId = formId + ':' + objId;
}
//alert('getting object: ' + fullId);
var elem = null;
if (document.getElementById) {
elem = document.getElementById(fullId);
} else if (document.all) {
elem = document.all[fullId];
} else if (document.layers) {
elem = document.layers[fullId];
}
return elem;
}   
/*
 * Browser-safe. Check or uncheck an array of checkboxes. Boxes have ids
 * like check[0], check[1], ... , check[n] where 'check' is the base Id that
 * has been assigned to the group.
 *
 * Param:   arrayId - String - id of element group to change
 * Param:   state - boolean - true (check all elements) false
(uncheck all elements)
 * Returns: nothing
 */
function checkBoxArraySet(arrayId, state) {
for (i = 0; ; i++) {
id = arrayId + '[' + i + ']';
elem = getObj(id);
if (elem == null) {
break;
} else {
elem.checked = state;
}
}   
}
/* 
 * Browser-safe. Checks to see if an array of check boxes has any which are 
 * checked. Boxes have ids like check[0], check[1], ... , check[n] where
'check' 
 * is the base Id that has been assigned to the group.
 *
 * Param:   arrayId - String - id of element group to change
 * Returns: boolean (true one or more checked) false (else)
 */
function checkBoxArrayHasChecked(arrayId) {
for (i = 0; ; i++) {
id = arrayId + '[' + i + ']';
elem = getObj(id);
if (elem == null) {
break;
} else if (elem.checked) {
return true;
}
}
return false;
} 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 2:41 PM
To: MyFaces Discussion
Subject: need javascript syntax to loop through checkbox list from dataTable






hello to everyone

I'm using a tomahawk dataTable where one of the t:columns contains a
t:selectBooleanCheckbox

The tag has id and a forceId="true" attributes.

In the rendered html, the id of the checkbox is foo[0], foo[1] etc

I need to be able to loop through this list and look for a .checked
property.

I've tried all the loop mechanisms usually described for checkboxes but
can't hit on the proper javascript syntax.  googled till my eyes glazed
over.

can someone provide an example or a good reference to resolve this?

Thanks in advance for your time and help.
Tom



 
This message is intended for the recipient only and is not meant to be
forwarded or distributed in any other format. This communication is for
informational purposes only.  It is not intended as an offer or solicitation
for the purchase or sale of any financial instrument, or security, or as an
official confirmation of any transaction.  Putnam does not accept purchase
or redemptions of securities, instructions, or authorizations that are sent
via e-mail.   All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not necessarily reflect
those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and
affiliates.  If you are not the intended recipient of this e-mail, please
delete the e-mail.



RE: Custom Validator problem.

2006-07-18 Thread Julian Ray
To do this you will need to use bindings into the backing bean which does
the validation. You might also want to take a look at the validateCompareTo
validator and see if this does what you need. 

-Original Message-
From: Ali Abdel-Aziz Ali [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 9:10 AM
To: MyFaces Discussion
Subject: Custom Validator problem.

Hello All,

I have Custom Validator problem.
I have two input calenders and I want to make some validation on their
values any validation.

so this the UI code:

 




 

and this is the validator code:

public void validate(FacesContext facesContext,UIComponent uiComponent,
Object value)throws ValidatorException 
{
if (facesContext == null) throw new
NullPointerException("facesContext"); 
if (uiComponent == null) throw new
NullPointerException("uiComponent");
if (value == null)
{
return;
} 

UIComponent foreignComp =
uiComponent.getParent().findComponent(_for);// _for =  "ThruDate" //
equall to the second inputCalender ID
if(foreignComp==null)
throw new FacesException("Unable to find component '" + _for
+ "' (calling findComponent on component '" + uiComponent.getId() + "')");
if(false == foreignComp instanceof EditableValueHolder)
throw new FacesException("Component '" + foreignComp.getId()
+ "' does not implement EditableValueHolder"); 
EditableValueHolder foreignEditableValueHolder =
(EditableValueHolder) foreignComp;

if (foreignEditableValueHolder.isRequired() &&
foreignEditableValueHolder.getValue()== null ) 
{
return;
}

Object[] args =
{value.toString(),(foreignEditableValueHolder.getValue()==null) ?
foreignComp.getId():foreignEditableValueHolder.getValue().toString()}; 

_logger.info(" From Date =  "+ args[0].toString() +" Thrue Date
= "+foreignEditableValueHolder.getValue());


boolean overlap = this.overlap ( new Range(new Date(1), new
Date(2)), new Range(new Date(1), new Date(2)));
if(!overlap)
{ 
//if(foreignEditableValueHolder.getValue()==null ||
!foreignEditableValueHolder.getValue().toString().equals( value.toString())
)

   FacesMessage message = new FacesMessage();
 
message.setDetail(Messages.getMessageString("RangeOverlapValidator")+" "+
args[0].toString() +" "+args[1].toString() + "."); 
 
message.setSummary(Messages.getMessageString("RangeOverlapValidator")+" "+
args[0].toString() +" "+args[1].toString() + ".");
   message.setSeverity (FacesMessage.SEVERITY_ERROR);
   throw new ValidatorException(message);
}
}

but it always return the ThruDate = null however it can feel with it's
properties like isRequired or not. 

Can Any buddy help?
--
Ali Abdel-Aziz
http://www.aliabdelaziz.com
http://aabdelaziz.blogspot.com 



RE: jdk 1.5

2006-07-17 Thread Julian Ray



We download the exe from Suns web site then change the 
default install location to c:\jsk1.5 and don't install the optional JRE. Works 
like a charm.


From: Bret Kumler 
[mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 6:43 
PMTo: MyFaces DiscussionSubject: OT: jdk 
1.5


Anyone know where I can 
get a self extracting jdk 5 zip file?
 
I do not want to 
install/run the exe from sun’s web page, it’ll overwrite my existing 
environment.
 
ThanksThis 
e-mail message and any attachments may contain private, confidential, 
proprietary or privileged material of GoldenGate Software, Inc. that is for the 
sole use of the intended recipient(s) of this e-mail message. Any review, 
copying or distribution or other use of this e-mail message or any attachments 
hereto by anyone other than the intended recipient(s) is strictly prohibited. If 
you are not the intended recipient(s) of this e-mail message, please contact 
GoldenGate Software, Inc. (415-777-0200) immediately and permanently delete the 
original e-mail message and any copies of this e-mail message and all 
attachments, if any. 


RE: "Process" scope

2006-07-17 Thread Julian Ray
Take a look at the saveState tag. It might do what you need. 

-Original Message-
From: Aleksei Valikov [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 11:51 AM
To: MyFaces Discussion
Subject: "Process" scope

Hi.

In web applications, it is often desirable to have a "process" scope of
beans. 
Process-scoped beans are retained between sessions, but in contradiction to
session scope there can be many of them per session. An example of process
scope scenarion is a document deletion:

select document -> display backup options page -> display deletion
confirmation page -> congratulate that the document is deleted

During the deletion process you somehow need to keep track of the document
that is being deleted.
You can't model that with a request-scope bean since this will be lost in a
multiple-step process.
You also can't model this with session-scope bean since if the user tries to
delete several documents concurrently, you'll get into trouble.
Therefore you need a "process"-scoped bean. There'll be one instance per
initiated process, but these instances will not be lost across requests.

Are there any existing approaches to process-scoping that could be used with
MyFaces?

My idea was tracking processes with an URL parameters and use a custom
variable resolver (+ Spring maybe) to instantiate beans on a per-process
basis.

Bye.
/lexi



RE: selectonemenuitem problems Value is not a valid option

2006-07-10 Thread Julian Ray
Have you tried the selectManyPicklist from the sandbox? Works like a charm!
 

-Original Message-
From: sarma [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 10, 2006 7:16 AM
To: users@myfaces.apache.org
Subject: selectonemenuitem problems Value is not a valid option


Hi,
   I am working with two selectOneListBox  in jsf
   If I selected one item in first list box the corresponding values(from
the database (setting that values to preparedstatement))
must displayed in second list box  
   For that I used value change listener .  
   When I am submitting this form   I  am getting an error 

 cpuids": Value is not a valid option.
  
   This is my code.
This is jsp code.

 
   
 
 
  
   
  
  
 
 
   
  
   
   



// this is backing bean code 

Corresponding java code
// this is for value change listener
   
public void hostSelection(ValueChangeEvent e) { 
  FacesContext context = FacesContext.getCurrentInstance(); 
  hostid=(String) e.getNewValue();
  getCpuids(); 
  context.renderResponse();
 }
//this is for  host select 

public Map getHosts(){
try{
  openConnection();
  selhostnames=new HashMap(); 
  String str="select distinct hostid from  system_cpu"; 
  st=con.createStatement(); 
  rs=st.executeQuery(str);  
  
  while(rs.next()){
hostname=rs.getString("hostid");
System.out.println(hostname);
selhostnames.put(hostname,hostname);
  }
  return selhostnames;
}

public String getHost(){ 
return hostselected;
  }
  public void setHost(String hostselected){ 
this.hostselected = hostselected; 
  }

//this is for  cpu  selection
public Map getCpuids(){
   try{
 
 if(hostid==null){
 System.out.println("if it is null");  // imp  note
 return selcpunames;
 }
  openConnection();
  String str="select distinct cpuid from system_cpu where hostid=?";
  System.out.println("setting cpuids from host");
  ps=con.prepareStatement(str); 
  ps.setString(1,hostid);
  ps.execute();
  rs=ps.getResultSet(); 
  while(rs.next()){
cpuname=rs.getString("cpuid");
System.out.println(cpuname);
selcpunames.put(cpuname,cpuname);
  }
  return selcpunames;
   }   


public void setCpuid(String cpuid){
  this.cpuid=cpuid;
}
public String getCpuid(){
  
  return cpuid;
}



When I am running 
If its  null//in tomcat

And  

cpuids": Value is not a valid option.

What is the problem with my code please tell  and  what to change  

With regards
Shannu sarma
--
View this message in context:
http://www.nabble.com/selectonemenuitem-problems--Value-is-not-a-valid-optio
n-tf1917733.html#a5249864
Sent from the MyFaces - Users forum at Nabble.com.



RE: Dynamically adding row in datatable.

2006-07-10 Thread Julian Ray
Why not create a list in your backing bean to store the rows. Add the
backing bean to session scope or (a better approach) use the t:saveState tag
to store the list in the request. 

-Original Message-
From: Purvesh [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 10, 2006 6:27 AM
To: users@myfaces.apache.org
Subject: Dynamically adding row in datatable.


Hi,

   I am having a datatable with no of rows. For every row i have a button
and username, password, etc fields. Now when i click on the button of any
row. one blank row should be added next to that that row.

Here, conditions can be he can click on more then one button without adding
data.
Data can be save only when he clicks on the save button given at the bottom
of page.

How can i achieve this.

-Purvesh
--
View this message in context:
http://www.nabble.com/Dynamically-adding-row-in-datatable.-tf1917476.html#a5
249261
Sent from the MyFaces - Users forum at Nabble.com.



RE: AbstractUIBean class - where to find?

2006-07-06 Thread Julian Ray
Actually, the AbstractUIBean is a base class which is not part of the
JSF/MyFaces/Tomahawk framwework but is part of our own implementation and
provides basic functions (such as session participation, messages etc.)
which all our managed beans use.

-Original Message-
From: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 06, 2006 11:57 AM
To: users@myfaces.apache.org
Subject: AbstractUIBean class - where to find?

Reading:

http://wiki.apache.org/myfaces/Handling_Server_Errors

where to find those AbstractUIBean class, ExecptionUtil is in tomahawk -
where's the other one?

kind regards



RE: Dynamically adding tabs to t:panelTabbedPane

2006-07-05 Thread Julian Ray
A simple way would be to create a container such as a h:groupPanel for each
tabbed pane in the JSP and use a binding to it in a backing bean, then add
to the panel from the backing bean.

-Original Message-
From: janw [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 05, 2006 10:33 AM
To: users@myfaces.apache.org
Subject: RE: Dynamically adding tabs to t:panelTabbedPane


Hello,

one question in this context:
How do you add content to the tabs? Programmatically, or do you refer in the
JSP page (in case JSP is used) to the created tabs?

Best regards
Jan
--
View this message in context:
http://www.nabble.com/Dynamically-adding-tabs-to-t%3ApanelTabbedPane-tf17855
35.html#a5182767
Sent from the MyFaces - Users forum at Nabble.com.



RE: How to displayi an images generated by a managed bean?

2006-06-29 Thread Julian Ray
Hmmm, let see...
as many of our charts require different params, as well as some core params
to be sent, we naturally end up duplicating a lot of code in the backing
beans. Even refactoring this code into base classes did little to help. This
duplicated code has as couple of negatives: [1] its duplicated, therefore,
inefficient for many reasons, maintenance not the least among them, [2] the
URLs and servlets we create need to be on the same lifecycle which is not
necessarily the same as the JSF pages and backing beans -- we reuse the
servlet across several JSF services, and [3] as we extend the charting
functionality there is a lot of unnecessary testing and code changes which
is minimized if the backing beans work against the custom component api.

Lastly, its cleaner and much more JSF-ish :) 



Typically, as in most designs, if your problem is not too complex, a simple
solution will work fine (eg servlet and URL). As the problem complexity
increases, however, more elegant solutions are necessary hence the custom
component. Indeed we started with backing bean URLs then migrated to a
custom component during the course of several code refactoring phases - a
pattern we repeated for JasperReports and other functionality as well.

To address Cagatay's comments: 

[1] A phase listener would probably be preferable to a servlet and I intend
to migrate (or at least benchmark) a phase listener to replace our servlet.
However, often when beginning with a new technology staying within the
bounds of our experience at, least initially, can be beneficial, especially
when using an agile approach to development where speed of development and
delivered functionality are driving forces. Basically, if you know how to
code servlets and are comfortable coding servlets, use a servlet and when it
all works migrate to something better but get it to work first. 

[2] I have not yet tried the JSF-Chart Creator in JSF-COMP although I have
heard good things about it and fully intend to take a look. However, this
goes back to my initial rant and if JSF-COMP does everything you need (at
least for now) why not use it -- it was not available when we started our
current build cycle :). 



-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 9:51 AM
To: MyFaces Discussion
Subject: Re: How to displayi an images generated by a managed bean?

Julian,
Can you expand on this?

> One more note, While this approach works well found that it is more 
> convienient to create a custom component to provide the JSF interface 
> as we use charts on a large number of our pages and it fits the MVC 
> model better to let the JSF fuly control the format and display of the
greaphic.
> 


Your responses have been very helpful.

Paul Spencer



RE: How to displayi an images generated by a managed bean?

2006-06-29 Thread Julian Ray
a custom component to provide the JSF interface as we
use charts on a large number of our pages and it fits the MVC model better
to let the JSF fuly control the format and display of the greaphic.

I hope this helps.



Example

-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 7:55 AM
To: MyFaces Discussion
Subject: Re: How to displayi an images generated by a managed bean?

Julian,
Can you explain the code and configuration behind #{myBackingBean.chartURL}
and the servlet you have created?

I need to understand where the graphic is created, i.e. in the managed bean
or servlet, how the servlet gets what is needs, and any housekeeping that is
performed.


Paul Spencer

Julian Ray wrote:
> Hi Paul,
> 
> We use JFreeCharts by creating a servlet which serves up the charts 
> and then creating a URL in the backingbean which is set as the value 
> for the graphicImage
> 
> Eg  />
> 
> -Original Message-
> From: Paul Spencer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 28, 2006 11:14 PM
> To: MyFaces Discussion
> Subject: How to displayi an images generated by a managed bean?
> 
> I need to include a graphic image generated by JFreeCharts.  Currently 
> the generation of the image is in an action of a managed bean and is 
> displayed in a separate windows via .  How should I 
> convert this to a  so it can be displayed in an existing
page?
> 
> Paul Spencer
> 
> 




RE: html text TabbedPane?

2006-06-29 Thread Julian Ray
Use  or  or 

-Original Message-
From: ldr [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 5:29 AM
To: users@myfaces.apache.org
Subject: html text TabbedPane?


Is it possible to have plain html text in a panelTab -> like this:











Synkronisering af Sony Ericsson
K700i


...




thx in advance, ldr_
--
View this message in context:
http://www.nabble.com/html-text-TabbedPane--tf1866451.html#a5099629
Sent from the MyFaces - Users forum at Nabble.com.



RE: How to displayi an images generated by a managed bean?

2006-06-29 Thread Julian Ray
Hi Paul,

We use JFreeCharts by creating a servlet which serves up the charts and then
creating a URL in the backingbean which is set as the value for the
graphicImage

Eg  

-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 11:14 PM
To: MyFaces Discussion
Subject: How to displayi an images generated by a managed bean?

I need to include a graphic image generated by JFreeCharts.  Currently the
generation of the image is in an action of a managed bean and is displayed
in a separate windows via .  How should I convert this to a
 so it can be displayed in an existing page?

Paul Spencer



RE: Design Type Question

2006-06-28 Thread Julian Ray



Great. How about adding how you did it to the wiki and pass 
on your know-how as I'm sure others will be facing the same problem 
:)


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 
3:33 PMTo: MyFaces DiscussionSubject: Re: Design Type 
Question
New info.  If I place all this code in a function and call that 
function on document load, it works fine.  So I guess I'll just go that 
route.
On 6/28/06, Gregg 
Bolinger <[EMAIL PROTECTED]> 
wrote:

  Alright.  Thanks for the info.  Getting closer.  I have 
  the following being spit out on my page after rendered.var 
  options = document.getElementById('catSelect').options;
  var option = new Option('4', 'Active');
  options[options.length] = option; 
  var option = new Option('69', 'Appreciate');
  options[ options.length] = option;
  var option = new Option('3', 'Explore');
  options[options.length] = option;
  var option = new Option('71', 'Habitat');
  options[options.length] = option;
  var option = new Option('70', 'Indulge');
  options[options.length] = option;
  var option = new Option('1', 'Locate'); 
  options[options.length] = option;
  var option = new Option('2', 'People'); 
  options[options.length] = option;And I am getting 
  document.getElementById("catSelect") has no properties error.  I 
  also see this on the rendered HTML:  ALLWhich is accurate as to: 
   
   Anything jump 
  out?            
          
  
  On 6/28/06, Julian 
  Ray < [EMAIL PROTECTED] 
  > wrote:
  


No if 
you use selectOne components which update the backingbean. Your JS should 
reference the selectOne components via ids - you might have to pass dummy 
select items but these will get removed then replaced by the JS as it loads. 
Remember that the page is rendered before its loaded by the browser so the 
JS will execute after the rendering has been 
performed.



From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 28, 2006 3:05 
PM
To: MyFaces 
DiscussionSubject: Re: Design Type 
Question


Ok, got it working now. One final question.  If I do this 
with _javascript_, I am going to have to do all the work of updating the model 
with the new values since it's client side, correct?  Maybe 
this should be my first custom component. Eh? lol. Thanks for the 
help.Gregg
On 6/28/06, Gregg 
Bolinger <[EMAIL PROTECTED]> wrote: 

  Scratch that.  I am getting the value. But all the code is 
  escaped. >, < etc.  So it doesn't register 
  correclty.  Trying something else 
  
  On 6/28/06, Gregg 
  Bolinger <[EMAIL PROTECTED]> wrote: 
  
Alright, maybe a stupid question...For testing I have a 
property in my backing bean called _javascript_ with getters and 
setters.  I have initialized _javascript_ with the 
following:private String _javascript_ = "function testFunction(){ alert('this is a 
test'); }"; And then did:t:outputText 
value="#{ArticleListBean._javascript_}"/>But it's not spitting 
out the code.  Am I doing this wrong?
Thanks.
On 6/28/06, Julian Ray <[EMAIL PROTECTED]> wrote: 

  
  
  Make sure to use forceId on the select items so the JS can find 
  them otherwise you will have to prefix the component ids with 
  "formname:" 
   
  
  
  
  From: Gregg Bolinger 
  [mailto:[EMAIL PROTECTED] ] 

      Sent: Wednesday, June 28, 2006 
  2:31 PM
  To: MyFaces 
  DiscussionSubject: Re: Design Type 
  Question
  
  
  Doh!  Didn't even think about that.  
  Thanks.
  On 6/28/06, Julian Ray <[EMAIL PROTECTED]> wrote: 
  


Couldn't you use a [EMAIL PROTECTED]] 

Sent: Wednesday, June 28, 2006 
1:38 PM
To: MyFaces 
DiscussionSubject: Re: Design Type 
Question


Thanks Julian.  *Unfortunately* I'm well adapt at 
    _javascript_ so I already know how to do that.  What I don't know 
is how to populate _javascript_ arrays with data from my backing 
bean.Aside from a custom component, I'd assume I need to do 
something like that. Thanks.
On 6/28/06, Julian Ray <[EMAIL PROTECTED] > wrote: 

  
  
  Here is an example, I have not tested it but have used 
  similar approaches

RE: Design Type Question

2006-06-28 Thread Julian Ray



How are you loading the JS and performing the 
initialization? onload event or appending to the 
window.onload?


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 
3:26 PMTo: MyFaces DiscussionSubject: Re: Design Type 
Question
Alright.  Thanks for the info.  Getting closer.  I 
have the following being spit out on my page after rendered.var options = 
document.getElementById('catSelect').options;
var 
option = new Option('4', 'Active');
options[options.length] = option; 
var 
option = new Option('69', 'Appreciate');
options[ 
options.length] = option;
var 
option = new Option('3', 'Explore');
options[options.length] = option;
var 
option = new Option('71', 'Habitat');
options[options.length] = option;
var 
option = new Option('70', 'Indulge');
options[options.length] = option;
var 
option = new Option('1', 'Locate'); 
options[options.length] = option;
var 
option = new Option('2', 'People'); 
options[options.length] = option;And I am getting 
document.getElementById("catSelect") has no properties error.  I 
also see this on the rendered HTML:  ALLWhich is accurate as to: 
 
 
Anything jump out?        
            

On 6/28/06, Julian 
Ray <[EMAIL PROTECTED] > 
wrote:

  
  
  No if you 
  use selectOne components which update the backingbean. Your JS should 
  reference the selectOne components via ids - you might have to pass dummy 
  select items but these will get removed then replaced by the JS as it loads. 
  Remember that the page is rendered before its loaded by the browser so the JS 
  will execute after the rendering has been performed.
  
  
  
  From: Gregg Bolinger 
  [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, June 28, 2006 3:05 
  PM
  To: MyFaces DiscussionSubject: Re: Design Type 
  Question
  
  
  Ok, got it working now. One final question.  If I do this with 
  _javascript_, I am going to have to do all the work of updating the model with 
  the new values since it's client side, correct?  Maybe this 
  should be my first custom component. Eh? lol. Thanks for the 
  help.Gregg
  On 6/28/06, Gregg 
  Bolinger <[EMAIL PROTECTED]> wrote: 
  
Scratch that.  I am getting the value. But all the code is 
escaped. >, < etc.  So it doesn't register 
correclty.  Trying something else 

On 6/28/06, Gregg 
Bolinger <[EMAIL PROTECTED]> wrote: 

  Alright, maybe a stupid question...For testing I have a 
  property in my backing bean called _javascript_ with getters and 
  setters.  I have initialized _javascript_ with the 
  following:private String _javascript_ = "function testFunction(){ alert('this is a 
      test'); }"; And then did:t:outputText 
  value="#{ArticleListBean._javascript_}"/>But it's not spitting 
  out the code.  Am I doing this wrong?
  Thanks.
  On 6/28/06, Julian 
  Ray <[EMAIL PROTECTED]> wrote: 
  


Make 
sure to use forceId on the select items so the JS can find them 
otherwise you will have to prefix the component ids with "formname:" 

 



From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] ] 
Sent: Wednesday, June 28, 2006 2:31 
PM
To: MyFaces 
DiscussionSubject: Re: Design Type 
Question


Doh!  Didn't even think about that.  
Thanks.
On 6/28/06, Julian Ray <[EMAIL PROTECTED]> wrote: 

  
  
  Couldn't you use a [EMAIL PROTECTED]] 
  Sent: Wednesday, June 28, 2006 
  1:38 PM
  To: MyFaces 
  DiscussionSubject: Re: Design Type 
  Question
  
  
  Thanks Julian.  *Unfortunately* I'm well adapt at 
  _javascript_ so I already know how to do that.  What I don't know 
  is how to populate _javascript_ arrays with data from my backing 
  bean.Aside from a custom component, I'd assume I need to do 
  something like that. Thanks.
  On 6/28/06, Julian Ray <[EMAIL PROTECTED] 
  > wrote: 
  


Here is an example, I have not tested it but have used 
similar approaches
 
http://www._javascript_kit.com/script/script2/multiplecombo.shtml
 
 



From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] ] 

Sent: Wednesday, June 28, 2006 
11:45 AMTo: MyFaces DiscussionSubject: Re: 
Design Type Question

Julian,Thanks for the suggestions.  How 
would 

RE: Design Type Question

2006-06-28 Thread Julian Ray



No if you use selectOne components which update the 
backingbean. Your JS should reference the selectOne components via ids - you 
might have to pass dummy select items but these will get removed then replaced 
by the JS as it loads. Remember that the page is rendered before its loaded by 
the browser so the JS will execute after the rendering has been 
performed.


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 
3:05 PMTo: MyFaces DiscussionSubject: Re: Design Type 
Question
Ok, got it working now. One final question.  If I do this with 
_javascript_, I am going to have to do all the work of updating the model with the 
new values since it's client side, correct?  Maybe this should be 
my first custom component. Eh? lol. Thanks for the 
help.Gregg
On 6/28/06, Gregg 
Bolinger <[EMAIL PROTECTED]> 
wrote: 

  Scratch that.  I am getting the value. But all the code is escaped. 
  >, < etc.  So it doesn't register correclty.  Trying 
  something else 
  
  On 6/28/06, Gregg 
  Bolinger <[EMAIL PROTECTED]> wrote:
  
Alright, maybe a stupid question...For testing I have a 
property in my backing bean called _javascript_ with getters and 
setters.  I have initialized _javascript_ with the 
following:private String _javascript_ = "function testFunction(){ alert('this is a 
test'); }"; And then did:t:outputText 
value="#{ArticleListBean._javascript_}"/>But it's not spitting out 
the code.  Am I doing this wrong?
Thanks.
On 6/28/06, Julian 
Ray <[EMAIL PROTECTED]> wrote:

  
  
  Make 
  sure to use forceId on the select items so the JS can find them otherwise 
  you will have to prefix the component ids with "formname:" 
  
   
  
  
  
  From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, June 28, 2006 2:31 
  PM
  To: MyFaces 
  DiscussionSubject: Re: Design Type 
  Question
  
  
      Doh!  Didn't even think about that.  Thanks.
  On 6/28/06, Julian 
  Ray <[EMAIL PROTECTED]> wrote: 
  


Couldn't you use a [EMAIL PROTECTED]] 
Sent: Wednesday, June 28, 2006 1:38 
PM
To: MyFaces 
DiscussionSubject: Re: Design Type 
Question


Thanks Julian.  *Unfortunately* I'm well adapt at 
_javascript_ so I already know how to do that.  What I don't know is 
how to populate _javascript_ arrays with data from my backing 
bean.Aside from a custom component, I'd assume I need to do 
something like that. Thanks.
On 6/28/06, Julian Ray <[EMAIL PROTECTED]> wrote: 

  
  
  Here is an example, I have not tested it but have used similar 
  approaches
   
  http://www._javascript_kit.com/script/script2/multiplecombo.shtml
   
   
  
  
  
  From: Gregg Bolinger 
  [mailto:[EMAIL PROTECTED] ] 

  Sent: Wednesday, June 28, 2006 
  11:45 AMTo: MyFaces DiscussionSubject: Re: 
  Design Type Question
  
  Julian,Thanks for the suggestions.  How would 
  I go about populating _javascript_ values with data from the backing 
  bean if I were to go with [1]?  Any links with this 
  info?Thanks.
  On 6/28/06, Julian Ray <[EMAIL PROTECTED]> wrote: 
  


Some suggestions
 
[1] Use client-side population of teh drop 
downs
[2] Use 2 backing beans, 1 for the drop down and 1 for the 
articles. Lazily load all getters. Use t:saveState to store the 
filter bean.
[3] Use Ajax


From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] Sent: 
Wednesday, June 28, 2006 10:20 AMTo: MyFaces 
DiscussionSubject: Design Type 
Question

This isn't about MyFaces specifically so I apologize but 
this list is the best JSF resource I know of. ;)I have a 
page that contains a list of Articles.  There are also filter 
criteria to filter the list of Articles.  The article list is a 
dataTable who's value is a method in the backing bean that returns a 
list of articles.  Simple enough.  So when the page first 
loads, I get all the articles. The problem I am facing is 
part of the filter is 3 levels of categories.  Category, Sub 
Category, and a Sub Sub Category.  Each of these is a 
selectOneMenu and the child catagories depends on the parent 
category.  So I have valueChangeListeners registered so that 

RE: Design Type Question

2006-06-28 Thread Julian Ray



You need to set escape="false" on the outputText so the 
text does not get escaped.


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 
2:58 PMTo: MyFaces DiscussionSubject: Re: Design Type 
Question
Scratch that.  I am getting the value. But all the code is 
escaped. >, < etc.  So it doesn't register correclty.  
Trying something else
On 6/28/06, Gregg 
Bolinger <[EMAIL PROTECTED]> 
wrote:

  Alright, maybe a stupid question...For testing I have a property 
  in my backing bean called _javascript_ with getters and setters.  I have 
  initialized _javascript_ with the following:private String _javascript_ = 
  "function testFunction(){ alert('this 
  is a test'); }"; And then did:t:outputText 
  value="#{ArticleListBean._javascript_}"/>But it's not spitting out 
  the code.  Am I doing this wrong?
  Thanks.
  On 6/28/06, Julian 
  Ray <[EMAIL PROTECTED]> 
  wrote:
  


Make 
sure to use forceId on the select items so the JS can find them otherwise 
you will have to prefix the component ids with "formname:" 

 



From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 28, 2006 2:31 
PM
To: MyFaces 
DiscussionSubject: Re: Design Type 
Question

    
Doh!  Didn't even think about that.  Thanks.
On 6/28/06, Julian 
Ray <[EMAIL PROTECTED]> wrote: 

  
  
  Couldn't you use a [EMAIL PROTECTED]] 
  Sent: Wednesday, June 28, 2006 1:38 
  PM
  To: MyFaces 
  DiscussionSubject: Re: Design Type 
  Question
  
  
  Thanks Julian.  *Unfortunately* I'm well adapt at 
  _javascript_ so I already know how to do that.  What I don't know is 
  how to populate _javascript_ arrays with data from my backing 
  bean.Aside from a custom component, I'd assume I need to do 
  something like that. Thanks.
  On 6/28/06, Julian 
  Ray <[EMAIL PROTECTED]> wrote: 
  


Here 
is an example, I have not tested it but have used similar 
approaches
 
http://www._javascript_kit.com/script/script2/multiplecombo.shtml
 
 



From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] ] 
Sent: Wednesday, June 28, 2006 
11:45 AMTo: MyFaces DiscussionSubject: Re: Design 
Type Question

Julian,Thanks for the suggestions.  How would I 
go about populating _javascript_ values with data from the backing bean if 
I were to go with [1]?  Any links with this 
info?Thanks.
On 6/28/06, Julian Ray <[EMAIL PROTECTED]> wrote: 

  
  
  Some suggestions
   
  [1] Use client-side population of teh drop 
  downs
  [2] Use 2 backing beans, 1 for the drop down and 1 for the 
  articles. Lazily load all getters. Use t:saveState to store the filter 
  bean.
  [3] Use Ajax
  
  
  From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] Sent: 
  Wednesday, June 28, 2006 10:20 AMTo: MyFaces 
  DiscussionSubject: Design Type 
  Question
  
  This isn't about MyFaces specifically so I apologize but 
  this list is the best JSF resource I know of. ;)I have a page 
  that contains a list of Articles.  There are also filter criteria 
  to filter the list of Articles.  The article list is a dataTable 
  who's value is a method in the backing bean that returns a list of 
  articles.  Simple enough.  So when the page first loads, I 
  get all the articles. The problem I am facing is part of the 
  filter is 3 levels of categories.  Category, Sub Category, and a 
  Sub Sub Category.  Each of these is a selectOneMenu and the child 
  catagories depends on the parent category.  So I have 
  valueChangeListeners registered so that when one drop down changes, 
  the child dropdown gets new values. The problem with this is 
  that when this happens, my method to get the list of articles is 
  called.  But I don't want this to happen until I click the Search 
  button.  So I am just looking for solutions to solve this. 
  Thanks.
  

  



RE: Design Type Question

2006-06-28 Thread Julian Ray



Make sure to use forceId on the select items so the JS can 
find them otherwise you will have to prefix the component ids with "formname:" 

 


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 
2:31 PMTo: MyFaces DiscussionSubject: Re: Design Type 
Question
Doh!  Didn't even think about that.  Thanks.
On 6/28/06, Julian 
Ray <[EMAIL PROTECTED]> 
wrote: 

  
  
  Couldn't 
  you use a [EMAIL PROTECTED]] 
  Sent: Wednesday, June 28, 2006 1:38 
  PM
  To: MyFaces DiscussionSubject: Re: Design Type 
  Question
  
  
  Thanks Julian.  *Unfortunately* I'm well adapt at _javascript_ 
  so I already know how to do that.  What I don't know is how to populate 
  _javascript_ arrays with data from my backing bean.Aside from a custom 
  component, I'd assume I need to do something like that. 
Thanks.
  On 6/28/06, Julian 
  Ray <[EMAIL PROTECTED]> 
  wrote: 
  


Here is 
an example, I have not tested it but have used similar 
approaches
 
http://www._javascript_kit.com/script/script2/multiplecombo.shtml
 
 



From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 28, 2006 11:45 
AMTo: MyFaces DiscussionSubject: Re: Design Type 
Question

Julian,Thanks for the suggestions.  How would I go 
about populating _javascript_ values with data from the backing bean if I were 
to go with [1]?  Any links with this info?Thanks.
On 6/28/06, Julian 
Ray <[EMAIL PROTECTED]> wrote: 

  
  
  Some 
  suggestions
   
  [1] 
  Use client-side population of teh drop downs
  [2] 
  Use 2 backing beans, 1 for the drop down and 1 for the articles. Lazily 
  load all getters. Use t:saveState to store the filter 
  bean.
  [3] 
  Use Ajax
  
  
  From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 
  June 28, 2006 10:20 AMTo: MyFaces DiscussionSubject: 
  Design Type Question
  
  This isn't about MyFaces specifically so I apologize but this 
  list is the best JSF resource I know of. ;)I have a page that 
  contains a list of Articles.  There are also filter criteria to 
  filter the list of Articles.  The article list is a dataTable who's 
  value is a method in the backing bean that returns a list of 
  articles.  Simple enough.  So when the page first loads, I get 
  all the articles. The problem I am facing is part of the filter is 
  3 levels of categories.  Category, Sub Category, and a Sub Sub 
  Category.  Each of these is a selectOneMenu and the child catagories 
  depends on the parent category.  So I have valueChangeListeners 
  registered so that when one drop down changes, the child dropdown gets new 
  values. The problem with this is that when this happens, my method 
  to get the list of articles is called.  But I don't want this to 
  happen until I click the Search button.  So I am just looking for 
  solutions to solve this. Thanks.
  

  


RE: Design Type Question

2006-06-28 Thread Julian Ray



Couldn't you use a [EMAIL PROTECTED]> 
wrote:

  
  
  Here is an 
  example, I have not tested it but have used similar 
  approaches
   
  http://www._javascript_kit.com/script/script2/multiplecombo.shtml
   
   
  
  
  
  From: Gregg Bolinger 
  [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, June 28, 2006 11:45 
  AMTo: MyFaces DiscussionSubject: Re: Design Type 
  Question
  
  Julian,Thanks for the suggestions.  How would I go 
  about populating _javascript_ values with data from the backing bean if I were 
  to go with [1]?  Any links with this info?Thanks.
  On 6/28/06, Julian 
  Ray <[EMAIL PROTECTED]> 
  wrote: 
  


Some 
suggestions
 
[1] Use 
client-side population of teh drop downs
[2] Use 
2 backing beans, 1 for the drop down and 1 for the articles. Lazily load all 
getters. Use t:saveState to store the filter bean.
[3] Use 
Ajax


From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 
June 28, 2006 10:20 AMTo: MyFaces DiscussionSubject: 
Design Type Question

This isn't about MyFaces specifically so I apologize but this 
list is the best JSF resource I know of. ;)I have a page that 
contains a list of Articles.  There are also filter criteria to filter 
the list of Articles.  The article list is a dataTable who's value is a 
method in the backing bean that returns a list of articles.  Simple 
enough.  So when the page first loads, I get all the articles. 
The problem I am facing is part of the filter is 3 levels of 
categories.  Category, Sub Category, and a Sub Sub Category.  Each 
of these is a selectOneMenu and the child catagories depends on the parent 
category.  So I have valueChangeListeners registered so that when one 
drop down changes, the child dropdown gets new values. The problem 
with this is that when this happens, my method to get the list of articles 
is called.  But I don't want this to happen until I click the Search 
button.  So I am just looking for solutions to solve this. 
Thanks.

  


RE: Design Type Question

2006-06-28 Thread Julian Ray



Here is an example, I have not tested it but have used 
similar approaches
 
http://www._javascript_kit.com/script/script2/multiplecombo.shtml
 
 


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 
11:45 AMTo: MyFaces DiscussionSubject: Re: Design Type 
Question
Julian,Thanks for the suggestions.  How would I go about 
populating _javascript_ values with data from the backing bean if I were to go 
with [1]?  Any links with this info?Thanks.
On 6/28/06, Julian 
Ray <[EMAIL PROTECTED]> 
wrote:

  
  
  Some 
  suggestions
   
  [1] Use 
  client-side population of teh drop downs
  [2] Use 2 
  backing beans, 1 for the drop down and 1 for the articles. Lazily load all 
  getters. Use t:saveState to store the filter bean.
  [3] Use 
  Ajax
  
  
  From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 
  28, 2006 10:20 AMTo: MyFaces DiscussionSubject: Design 
  Type Question
  
  This isn't about MyFaces specifically so I apologize but this list 
  is the best JSF resource I know of. ;)I have a page that contains a 
  list of Articles.  There are also filter criteria to filter the list of 
  Articles.  The article list is a dataTable who's value is a method in the 
  backing bean that returns a list of articles.  Simple enough.  So 
  when the page first loads, I get all the articles. The problem I am 
  facing is part of the filter is 3 levels of categories.  Category, Sub 
  Category, and a Sub Sub Category.  Each of these is a selectOneMenu and 
  the child catagories depends on the parent category.  So I have 
  valueChangeListeners registered so that when one drop down changes, the child 
  dropdown gets new values. The problem with this is that when this 
  happens, my method to get the list of articles is called.  But I don't 
  want this to happen until I click the Search button.  So I am just 
  looking for solutions to solve this. Thanks.
  


RE: Design Type Question

2006-06-28 Thread Julian Ray



Some suggestions
 
[1] Use client-side population of teh drop 
downs
[2] Use 2 backing beans, 1 for the drop down and 1 for the 
articles. Lazily load all getters. Use t:saveState to store the filter 
bean.
[3] Use Ajax


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 
10:20 AMTo: MyFaces DiscussionSubject: Design Type 
Question
This isn't about MyFaces specifically so I apologize but this list is 
the best JSF resource I know of. ;)I have a page that contains a list of 
Articles.  There are also filter criteria to filter the list of 
Articles.  The article list is a dataTable who's value is a method in the 
backing bean that returns a list of articles.  Simple enough.  So when 
the page first loads, I get all the articles. The problem I am facing is 
part of the filter is 3 levels of categories.  Category, Sub Category, and 
a Sub Sub Category.  Each of these is a selectOneMenu and the child 
catagories depends on the parent category.  So I have valueChangeListeners 
registered so that when one drop down changes, the child dropdown gets new 
values. The problem with this is that when this happens, my method to 
get the list of articles is called.  But I don't want this to happen until 
I click the Search button.  So I am just looking for solutions to solve 
this. Thanks.


RE: dataTable get datas from multiple table

2006-06-28 Thread Julian Ray
A couple of thoughts

[1] Use a join to get a composite row back from the database which contains
the complete set of data you need
[2] In your backing bean create a set of methods to get the required column
data from whichever table it exists in This can be done as follows


 


And in your backing bean create a method like

Public String getRefLanguage() {
String Name = getValue("#{rowRecord.name}");
// Lookup in the database for this users language
//
String lang = .
return lang;
}


-Original Message-
From: Alexandre Jaquet [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 7:52 AM
To: MyFaces Discussion
Subject: dataTable get datas from multiple table

Hi again,

I didn't find the way to put in a data table datas who cam from multiple
database table.

For example I have a field  ref_mother_tongue (int) who is a foreign key in
a table person and I want to display the field language.value from the
language table to get the following result :

First name - Name - Mother tongue
--
Alexandre   Jaquetfrench
PaulToto  english

we already have tryied :




and :



   
 

but it's doesn't work

thx for your advice

Alexandre Jaquet



RE: myfaces tomahawk components

2006-06-28 Thread Julian Ray
Moved to Tomahawk in the latest builds. 

-Original Message-
From: ::SammyRulez:: [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 5:04 AM
To: MyFaces Discussion
Subject: Re: myfaces tomahawk components

schedule component is not in 1.1.3 neither :-(

2006/6/21, Julian Ray <[EMAIL PROTECTED]>:
> Hi Chris,
>
> [1] In 1.1.1 the schedule component in in the sandbox jar.
> [2] There is a discussion on decorating the tabbed pane on the wiki. 
> See http://wiki.apache.org/myfaces/SettingTabClasses
>
> -Original Message-
> From: ldr [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 21, 2006 6:10 AM
> To: users@myfaces.apache.org
> Subject: myfaces tomahawk components
>
>
> Im trying to use some of the tomahawk components to be exact
>
> - TabbedPane
> - Schedule
>
> I've got the TabbedPane working, but it doesn't look very nice and I 
> would like to ask if any have a "simple version" with stylesheets. 
> Moreover Im not sure if I have the latest version - Im using 
> myfaces-all (i think 1.1.1 ) which also concerns my problem with 
> Schedule wich I can't find in myfaces-all-1.1.1.jar. Which package should
I use?
>
> thanks in advance
>
> Chris
>
> _
> Setup:
> Eclipse Version: 3.1.2
> MyEclipse Version: 4.1.1
> JBoss Application Server 4.0.4
> Windows XP
>
> --
> View this message in context:
> http://www.nabble.com/myfaces-tomahawk-components-t1822969.html#a49714
> 32 Sent from the MyFaces - Users forum at Nabble.com.
>
>


--
::SammyRulez::
http://www.kyub.com/blojsom/blog/sam/



RE: LoginAction not executed after server restart

2006-06-28 Thread Julian Ray



Hi Michael,
 
You might want to check to see if your login page is 
entering into a session. When the server restarts and the same page has not been 
refreshed in the browser it might be associated with a stale session. When the 
browser refreshs a new (and valid) session will be created. Two ways to get 
around it (a) allow Tomcat to save sessions between restarts and  (b) don;t 
let your login page start a session.
 


From: Michael Heinen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 4:53 AMTo: MyFaces 
DiscussionSubject: LoginAction not executed after server 
restart


I have a standard login page with 
two input fields.
The corresponding BackingBean has 
Request scope and a login-Action.
 
Now I'm facing a (for me) strange 
behaviour:
The login page is displayed without 
any values.
Now I restart Tomcat (happens often 
during development).
When I enter values and execute the 
login action then the login page is displayed again without any 
values.
The loginAction was not 
executed!
So I have to enter my values again 
and login again and then the login action is 
called.
This occurs only if Tomcat has been 
restarted.
 
Why is the login action not called 
after the first submit?
The backingBean has request scope, 
as I mentioned before.
 
I use server side state 
saving.
 
Thanks for any 
help
Michael


RE: Adding star while rendering all required InputText

2006-06-27 Thread Julian Ray
You can add a properties file which overrides the default messages. Here are
some that we have used in the past

javax.faces.component.UIInput.REQUIRED=* value required.
javax.faces.component.UIInput.CONVERSION=* invalid.
javax.faces.validator.NOT_IN_RANGE=* value must be between {0} and {1}.
javax.faces.validator.LongRangeValidator.TYPE=* must be a number.
javax.faces.convert.IntegerConverter.CONVERSION=* must be a valid number.
javax.faces.convert.DoubleConverter.CONVERSION=* must be a valid number. 

-Original Message-
From: Michael Ageeb [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 5:50 AM
To: MyFaces Discussion
Subject: Adding star while rendering all required InputText

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,
   Is there a way to render a red star concatenated to any InputText with
the required attribute set to true?

I've an application with a lot of those InputText with their required set to
true and I don't want to change the code for each manually .
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEoP9bs6YiuH6FszARAotVAJ4jC7LKvwHQlYUHF8IPk6R+66xlngCeJFKI
yY2O3GnNfdnwus48RUfcTss=
=d+8u
-END PGP SIGNATURE-



RE: creating datatable at runtime

2006-06-26 Thread Julian Ray
Hi Maria,

The book "Core JavaServer Faces" has a whole chapter on using datatables
with lots of examples which you might want to take a look at.

-Original Message-
From: Maria G [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 26, 2006 10:37 AM
To: users@myfaces.apache.org
Subject: creating datatable at runtime


Hi All,
 
I have a requirement to create datatables at runtime. I will get the number
of table to be created at runtime and I have to create the table with the
columns that are fixed. 
 
Can anyone please tell me, how to do this? How to create a table at rum
time? It will more helpful, If I can find any example. 

Thank you.
 
Maria
--
View this message in context:
http://www.nabble.com/creating-datatable-at-runtime-t1849326.html#a5048137
Sent from the MyFaces - Users forum at Nabble.com.



RE: Protecting pages from expired sessions

2006-06-25 Thread Julian Ray



It should protect against any server-sode processing but 
not against client-side actions such as _javascript_ etc.


From: John [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 25, 2006 8:42 PMTo: MyFaces 
DiscussionSubject: RE: Protecting pages from expired 
sessions

Thanks Julian,
 
Will this approach protect from a user clicking on an 
action within an orphaned page where the session has expired, or will 
it only function if the user does a refresh (reloading the 
page)?
 
John
 


From: Julian Ray [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 25, 2006 2:00 PMTo: 'MyFaces 
Discussion'Subject: RE: Protecting pages from expired 
sessions

Hi John,
 
How about creating a filter which performs a redirect to a 
logon page if the session has expired.
 
Here is some code 
which outlines the basic idea. You need to deal with pages such as logon and 
password retrieval pages (isAllowedPage() performs this function and figure out 
the best way to test if your session is 
expired.
 

/** Creates a new instance of 
SecurityCheckFilter */
public void doFilter(ServletRequest 
request, ServletResponse response, FilterChain chain) throws IOException, ServletException 
{
HttpServletRequest hreq = 
(HttpServletRequest) request;HttpServletResponse hres = (HttpServletResponse) response;
String url = 
"">boolean 
isJsp = url.endsWith(".jsf");
/*** Dont filter login.jsp because otherwise an endless loop. 
& only* filter .jsp 
otherwise it will filter all images etc as well.**/
if (! isAllowedPage(url) && 
isJsp) {
/* Perform session tests here*/
hres.sendRedirect(getNextPage());return;
}
/* deliver request to next filter 
*/
chain.doFilter(request, 
response);
}


From: John [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 25, 2006 4:16 PMTo: MyFaces 
DiscussionSubject: Protecting pages from expired 
sessions

How does one prevent 
all the (method/variable not found) errors generated to STDERR, when a user 
leaves a page open (the session expires), and then the user comes back and trys 
to refresh the page or click on some action?
 
John


RE: Protecting pages from expired sessions

2006-06-25 Thread Julian Ray



Hi John,
 
How about creating a filter which performs a redirect to a 
logon page if the session has expired.
 
Here is some code 
which outlines the basic idea. You need to deal with pages such as logon and 
password retrieval pages (isAllowedPage() performs this function and figure out 
the best way to test if your session is 
expired.
 

/** Creates a new instance of 
SecurityCheckFilter */
public void doFilter(ServletRequest 
request, ServletResponse response, FilterChain chain) throws IOException, ServletException 
{
HttpServletRequest hreq = 
(HttpServletRequest) request;HttpServletResponse hres = (HttpServletResponse) response;
String url = 
"">boolean 
isJsp = url.endsWith(".jsf");
/*** Dont filter login.jsp because otherwise an endless loop. 
& only* filter .jsp 
otherwise it will filter all images etc as well.**/
if (! isAllowedPage(url) && 
isJsp) {
/* Perform session tests here*/
hres.sendRedirect(getNextPage());return;
}
/* deliver request to next filter 
*/
chain.doFilter(request, 
response);
}


From: John [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 25, 2006 4:16 PMTo: MyFaces 
DiscussionSubject: Protecting pages from expired 
sessions

How does one prevent 
all the (method/variable not found) errors generated to STDERR, when a user 
leaves a page open (the session expires), and then the user comes back and trys 
to refresh the page or click on some action?
 
John


RE: datatable, different cell attribures?

2006-06-25 Thread Julian Ray
I don't think that there is any direct way you can change the column class
for an individual cell without writing your own renderer. You can always
have  elements in the cells which you can use either EL or a
backing bean to set the styleClass. For example using EL





-Original Message-
From: Frank Langelage [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 25, 2006 11:18 AM
To: MyFaces Discussion
Subject: datatable, different cell attribures?

To build a table with a variable number of rows and cols I used a
t:datatable with a t:columns child.
This works pretty good.
Is there a way to use different css-classes or attributes for an individual
cell?
If the value displayed in the cell exceeds a certain value I want to
highlight this cell by using a red background or something like that.



RE: how can i remove message from faces context

2006-06-23 Thread Julian Ray
Try this

protected void clearMessages() {

Iterator iter = getFacesContext().getMessages();
while (iter.hasNext()) {
iter.remove();
}
}

 

-Original Message-
From: sarma [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 23, 2006 5:56 AM
To: users@myfaces.apache.org
Subject: how can i remove message from faces context


Hi ,
how can i remove messages from faces context or any alernative for removing
the messages

i am adding my message like this
FacesContext context = FacesContext.getCurrentInstance(); 
 context.addMessage(null,new
FacesMessage(FacesMessage.SEVERITY_WARN,"Invalid Username or Password",""));


how can i remove that message
--
View this message in context:
http://www.nabble.com/how-can-i-remove-message-from-faces-context-t1835398.h
tml#a5009115
Sent from the MyFaces - Users forum at Nabble.com.



RE: Something Simple

2006-06-21 Thread Julian Ray
If you are using tomahawx then  will work. Otherwise
use  

-Original Message-
From: Troy Bull [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 4:33 PM
To: MyFaces Discussion
Subject: Re: Something Simple

Ok, in the vein of avoiding HTML all together how do i do a  without
html?

Thanks
troy

CD said the following on 6/21/2006 2:17 PM:
> I also would recommend the stylesheet approach rather than the h2.  In 
> fact, avoiding HTML tags altogether would be in your best interest.
> 
>  
> 
> 
> 
>  
> 
> On 6/21/06, *Clement, James* <[EMAIL PROTECTED] 
> > wrote:
> 
>  value="Welcome #{authedUser.firstName}"/>
> 
>  
>

> *From:* CD [mailto:[EMAIL PROTECTED] ]
> *Sent:* Wednesday, June 21, 2006 3:10 PM
> *To:* MyFaces Discussion
> *Subject:* Re: Something Simple
> 
> 
>   
> 
> 
> 
>   
> 
> 
>  
> On 6/21/06, *Troy Bull* <[EMAIL PROTECTED]
> > wrote:
> 
> Greetings:
> 
> I have an attribute in a backing bean and I want to display it
> in a jsp
> "inline".  I tried to use OutputText and it doesn't seem to work
> correctly.
> 
> Here is what I want to do:
> 
> 
> Welcome #{authedUser.firstName}
> 
> 
> This doesn't work.  So I tried
> 
> 
> Welcome  value="#{authedUser.firstName}"
>
binding="#{backing_mainMenu.outputText1}"
>id="outputText1"/>
> 
> 
> This doesnt work either.  The first one prints out the
> #{authedUs...,
> the second one prints out the firstName but "outside" the h2 tag.
> 
> Thanks
> troy
> 
> 
> 



IRC Channel #myfaces

2006-06-21 Thread Julian Ray



Does anybody use 
this channel? whenever I check it seems somewhat under-represented 
:)
 


RE: Something Simple

2006-06-21 Thread Julian Ray



Of course its always best to 
use CSS  so
 
 

 
 


From: CD [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 3:10 PMTo: MyFaces 
DiscussionSubject: Re: Something Simple


  



  
 
On 6/21/06, Troy Bull 
<[EMAIL PROTECTED] 
> wrote: 
Greetings:I 
  have an attribute in a backing bean and I want to display it in a 
  jsp"inline".  I tried to use OutputText and it doesn't seem to 
  work correctly.Here is what I want to 
  do:Welcome 
  #{authedUser.firstName}This doesn't 
  work.  So I 
  triedWelcome 
     
  binding="#{backing_mainMenu.outputText1}"   
  id="outputText1"/> This doesnt 
  work either.  The first one prints out the #{authedUs...,the 
  second one prints out the firstName but "outside" the h2 
  tag.Thankstroy


RE: Something Simple

2006-06-21 Thread Julian Ray
Try



 

-Original Message-
From: Troy Bull [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 3:07 PM
To: users@myfaces.apache.org
Subject: Something Simple

Greetings:

I have an attribute in a backing bean and I want to display it in a jsp
"inline".  I tried to use OutputText and it doesn't seem to work correctly.

Here is what I want to do:


Welcome #{authedUser.firstName} 

This doesn't work.  So I tried


Welcome  

This doesnt work either.  The first one prints out the #{authedUs..., the
second one prints out the firstName but "outside" the h2 tag.

Thanks
troy



RE: Is there already a way to restrict users selecting the date prior to today in ?

2006-06-21 Thread Julian Ray



The sandbox jar should be available in the repository. If 
you scan this forum you should find a link to it.


From: Emily Gu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 2:06 PMTo: MyFaces 
DiscussionSubject: Re: Is there already a way to restrict users 
selecting the date prior to today in 
?

Thanks Julian for your quick reply and suggestion. 
 
It looks very good for my needs. I haven't used the sandbox. Do I need any 
additional jars?
 
Thanks,
Emily 
On 6/21/06, Julian 
Ray <[EMAIL PROTECTED]> 
wrote: 

  
  
  Rather 
  than writing your own, check out the validateCompareTo validator in the 
  sandbox.
  
  
  From: Emily Gu [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, June 21, 2006 12:59 PM To: users@myfaces.apache.orgSubject: Is there already 
  a way to restrict users selecting the date prior to today in 
  ?  
  
  
  Hi,
   
  I am wonder whether there is already a way to not let users selectig date 
  earlier than today in <t:inputCalendar>? Or I will 
  have to do my own validation?
   
  Thanks for your help in advance,
  Emily
   
  


RE: Is there already a way to restrict users selecting the date prior to today in ?

2006-06-21 Thread Julian Ray



Rather than writing your own, check out the 
validateCompareTo validator in the sandbox.


From: Emily Gu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 12:59 PMTo: 
users@myfaces.apache.orgSubject: Is there already a way to restrict 
users selecting the date prior to today in 
?

Hi,
 
I am wonder whether there is already a way to not let users selectig date 
earlier than today in ? Or I will 
have to do my own validation?
 
Thanks for your help in advance,
Emily
 


RE: Looping in JSF?

2006-06-21 Thread Julian Ray
I'm no expert on EL but what you are describing sounds like a good candidate
for a custom component.

-Original Message-
From: Anders W. Tell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 11:05 AM
To: MyFaces Discussion
Subject: Looping in JSF?

Hi,

I want to create list of commandButtons based on a collection of
ActionObjects. so I want to loop over my collection of this.
But I cant seem to find looping constructs in JSF except from the DataTable.

Does  work or how do I mix it with Java constructs in a JSP file

thanks for any hints
/anders




RE: Typical Validation Issues

2006-06-21 Thread Julian Ray



You can always create a hidden input element at the bottom 
of the form which has required="true" and perform form-scoped validation using 
the backing bean. 
 
The spec says that form elements are processed in the order 
they are on the page so putting the hidden element last means that it will be 
validated after any other validations you specify. Note that if you need to use 
tag-level messages you will need to invalidate each component by getting it from 
tree or by using a binding.


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 
11:04 AMTo: MyFaces DiscussionSubject: Re: Typical 
Validation Issues
Thanks for the code.  The problem though is if I leave the 
required="true" attribute on the input field, even with the custom validation, 
the commandLinks still trigger the validation.  If I remove 
required="true" from the input field, and I try and add a category without 
typing in a category name, no validation occurs. And I've 
simplified the validation for testing purposes. public void 
validateCategoryName(FacesContext fc, UIComponent uic, Object 
o)    {    if 
(currentCategory.getCategoryId() == 
null)    
{    
((UIInput)uic).setValid(false);    
FacesMessage facesMessage = new FacesMessage( FacesMessage.SEVERITY_WARN, 
"Category Name Required", 
null);    
throw new 
ValidatorException(facesMessage);    
}    }
On 6/21/06, Julian 
Ray <[EMAIL PROTECTED]> 
wrote:

  
  
  Hi 
  Gregg,
   
  here is 
  some code for [3]
   
  [1] 
  example bean-based validation. Here is a function we use to validate 
  a new user name for a customer account. As some of these methods are 
  re-used we actually place the code in a validation class.
   
   
      // Check to see if the user name is unique for 
  this customer. The user is not allowed    // to change the 
  username this function is only called when a new user is 
  created,    public static void validateUserName(Integer 
  customerId, UIComponent uic, String entry, String fieldName) 
  {    if (! validateLength(uic, 
  entry, fieldName, 6, 10)) 
  {    
  return;    }
   
      if (entry.indexOf(' ') 
  != -1) {    
  String message = fieldName + " cannot contain 
  spaces.";    
  invalidateInput((UIInput) uic, 
  message);    
  return;    
  }    if (! 
  UserDao.isUserNameUnique(customerId, entry)) 
  {    String 
  message = fieldName + " must be unique for this 
  customer.";    
  invalidateInput((UIInput) uic, 
  message);    
  return;    }    
  }
   
      public 
  static void invalidateInput(UIComponent uic, String message) 
  {    invalidateInput((UIInput) uic, 
  message);    }
   
      private static void invalidateInput(UIInput uii, 
  String message) {    
  uii.setValid(false);    
  //FacesContext fc = 
  javax.faces.context.FacesContext.getCurrentInstance();    
  FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_WARN, 
  message, null);    throw new 
  ValidatorException(facesMessage);    
  }
  [2] In the backing bean use something like the following. The 
  ValidationUtils are defined in [1] above.
   
  
  public void 
  validateUserName(FacesContext fc, UIComponent uic, 
  Object o) {
  ValidationUtils.validateUserName(getSessionBean().getCustomerId(), uic, 
  o.toString(), "*");
  }
  [3] In your JSP use the 
  validation="" attribute with a method binding to the method defined in [2]. 
  For example
  
  
   
  
   
   
   
   
   
  
   
  
  
  
  From: Gregg Bolinger 
  [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, June 21, 2006 10:04 
  AMTo: MyFaces DiscussionSubject: Re: Typical Validation 
  Issues
  
  [1] Not really.  The user needs the Category Name field along 
  with it's Add button to be able to add a Category.[2] I could probably do 
  that (worst case)[3] This sounds feasable.  Could you provide a bit 
  more info on this solution? Thanks.Gregg
  On 6/21/06, Julian 
  Ray <[EMAIL PROTECTED]> 
  wrote: 
  


Some 
more suggestions
 
[1] Is 
it possible to not render the form until a command link is clicked or 
renderer a place-holder instead? 
[2] Can 
you put dummy data in the form?
[3] can 
use use a validation method in your backing bean which only tests if a 
category has been loaded (my preference).


From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 
June 21, 2006 9:49 AMTo: MyFaces DiscussionSubject: 
Typical Validation Issues

I am facing a pretty typical JSF validation issue.  I have a 
list of commandLinks which are Categories.  On the right side of the 
page I have a form with details about the category.  You can also use 
this form to add or update a category. Obviously, the category name 

RE: myfaces tomahawk components

2006-06-21 Thread Julian Ray
Hi Chris,

[1] In 1.1.1 the schedule component in in the sandbox jar. 
[2] There is a discussion on decorating the tabbed pane on the wiki. See
http://wiki.apache.org/myfaces/SettingTabClasses

-Original Message-
From: ldr [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 6:10 AM
To: users@myfaces.apache.org
Subject: myfaces tomahawk components


Im trying to use some of the tomahawk components to be exact 

- TabbedPane
- Schedule 

I've got the TabbedPane working, but it doesn't look very nice and I would
like to ask if any have a "simple version" with stylesheets. Moreover Im not
sure if I have the latest version - Im using myfaces-all (i think 1.1.1 )
which also concerns my problem with Schedule wich I can't find in
myfaces-all-1.1.1.jar. Which package should I use? 

thanks in advance 

Chris 

_
Setup: 
Eclipse Version: 3.1.2
MyEclipse Version: 4.1.1
JBoss Application Server 4.0.4
Windows XP 

--
View this message in context:
http://www.nabble.com/myfaces-tomahawk-components-t1822969.html#a4971432
Sent from the MyFaces - Users forum at Nabble.com.



RE: Typical Validation Issues

2006-06-21 Thread Julian Ray



Hi Gregg,
 
here is some code for [3]
 
[1] example bean-based validation. Here is a function 
we use to validate a new user name for a customer account. As some of these 
methods are re-used we actually place the code in a validation 
class.
 
 
    // Check to see if the user name is 
unique for this customer. The user is not allowed    // to 
change the username this function is only called when a new user is 
created,    public static void validateUserName(Integer 
customerId, UIComponent uic, String entry, String fieldName) 
{    if (! validateLength(uic, entry, 
fieldName, 6, 10)) 
{    
return;    }
 
    if 
(entry.indexOf(' ') != -1) 
{    String 
message = fieldName + " cannot contain 
spaces.";    
invalidateInput((UIInput) uic, 
message);    
return;    
}    if (! 
UserDao.isUserNameUnique(customerId, entry)) 
{    String 
message = fieldName + " must be unique for this 
customer.";    
invalidateInput((UIInput) uic, 
message);    
return;    }    
}
 
    public static void 
invalidateInput(UIComponent uic, String message) 
{    invalidateInput((UIInput) uic, 
message);    }
 
    private static void invalidateInput(UIInput uii, 
String message) {    
uii.setValid(false);    
//FacesContext fc = 
javax.faces.context.FacesContext.getCurrentInstance();    
FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_WARN, 
message, null);    throw new 
ValidatorException(facesMessage);    }
[2] In the backing bean use 
something like the following. The ValidationUtils are defined in [1] 
above.
 

public void validateUserName(FacesContext fc, UIComponent uic, Object o) 
{
ValidationUtils.validateUserName(getSessionBean().getCustomerId(), uic, 
o.toString(), "*");
}
[3] In 
your JSP use the validation="" attribute with a method binding to the method 
defined in [2]. For example


 

 
 
 
 
 

 


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 
10:04 AMTo: MyFaces DiscussionSubject: Re: Typical 
Validation Issues
[1] Not really.  The user needs the Category Name field along 
with it's Add button to be able to add a Category.[2] I could probably do 
that (worst case)[3] This sounds feasable.  Could you provide a bit 
more info on this solution? Thanks.Gregg
On 6/21/06, Julian 
Ray <[EMAIL PROTECTED]> 
wrote:

  
  
  Some more 
  suggestions
   
  [1] Is it 
  possible to not render the form until a command link is clicked or renderer a 
  place-holder instead? 
  [2] Can 
  you put dummy data in the form?
  [3] can 
  use use a validation method in your backing bean which only tests if a 
  category has been loaded (my preference).
  
  
  From: Gregg Bolinger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 
  21, 2006 9:49 AMTo: MyFaces DiscussionSubject: Typical 
  Validation Issues
  
  I am facing a pretty typical JSF validation issue.  I have a 
  list of commandLinks which are Categories.  On the right side of the page 
  I have a form with details about the category.  You can also use this 
  form to add or update a category. Obviously, the category name is 
  required.  But since it is blank when the page loads, and if I click on a 
  category link to view the details, I get a validation error.  No 
  surprise.  So I change the commandLink immediate="true" and, you guessed 
  it, my model isn't updated so most of the details don't get populated in the 
  form.  My commandLink code on my JSP looks like: 
   
           
            
                  
      property="#{ CategoryAdminBean.currentCategory}"  
                  
      value="#{category}" 
  />I've tried many different suggestions 
  that I found on various different sites including this mailing list.  I 
  am not interested in adding yet another dependency to this project as in a 3rd 
  party validation library or the adf:subForm (from what I can tell, this 
  doesn't solve the problem either).  But I would like to know what other 
  people did to solve this similar issue, if they solved it. 
  Thanks.Gregg
  


RE: Typical Validation Issues

2006-06-21 Thread Julian Ray



Some more suggestions
 
[1] Is it possible to not render the form until a command 
link is clicked or renderer a place-holder instead? 
[2] Can you put dummy data in the form?
[3] can use use a validation method in your backing bean 
which only tests if a category has been loaded (my 
preference).


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 
9:49 AMTo: MyFaces DiscussionSubject: Typical Validation 
Issues
I am facing a pretty typical JSF validation issue.  I have a 
list of commandLinks which are Categories.  On the right side of the page I 
have a form with details about the category.  You can also use this form to 
add or update a category. Obviously, the category name is 
required.  But since it is blank when the page loads, and if I click on a 
category link to view the details, I get a validation error.  No 
surprise.  So I change the commandLink immediate="true" and, you guessed 
it, my model isn't updated so most of the details don't get populated in the 
form.  My commandLink code on my JSP looks like:  
         
          
                
    property="#{ CategoryAdminBean.currentCategory}"  
                
    value="#{category}" 
/>I've tried many different suggestions 
that I found on various different sites including this mailing list.  I am 
not interested in adding yet another dependency to this project as in a 3rd 
party validation library or the adf:subForm (from what I can tell, this doesn't 
solve the problem either).  But I would like to know what other people did 
to solve this similar issue, if they solved it. 
Thanks.Gregg


RE: exceptions

2006-06-20 Thread Julian Ray
There is some discussion on this topic in the WIKI that you might want to
look at. 

-Original Message-
From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 20, 2006 1:47 AM
To: MyFaces Discussion
Subject: Re: exceptions

Hi!
> I am having the same old issue with exception handling that has been 
> raised in every JSF forum since the beginning of time (!)
First, to get rid of the "blank page" problem it should be possible to use a
servlet filter which buffers the whole response (also ignores any flush).
This might slightly increase the latency, but if you use e.g.
the ExtensionsFilter this buffering already takes place.
You do not have to do any further processing of the response, so the
response time at all shouldn't increase that way.
Again, if you use the ExtensionsFilter and NOT the StreamingAddResource this
buffering already takes place, so there should be no need for this filter,
except you have huge parts of jsp/html outside your f:view component.

Second, I use the web.xml strategy too. So adding

500
/error.jsp

do the "friendly error page" trick.

At last you might get a copy of error.jsp from tomahawks "simple"
example (tomahawk/examples/simple/src/main/webapp/error.jsp) there you will
find the code required to get the real exception (which is not that easy as
it might sound - well, ok, if you know the trick its easy again
;-) )

RIP ugly exception page.

Ciao,
Mario



RE: Navigation problem with Java Script

2006-06-19 Thread Julian Ray



This link might help
 
http://wiki.apache.org/myfaces/_javascript_WithJavaServerFaces
 
 


From: Meghana [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 19, 2006 3:59 PMTo: 
users@myfaces.apache.orgSubject: Navigation problem with _javascript_
Hi,  I am using a _javascript_ function to check a required 
field and to check if the user has entered whitespace to bypass 
validation.Here is the code:           
 action="" 
/>function 
validate(form){            
    var requestor = 
form["HWRForm:requestedby"].value;        
        var error;    
            if(requestor && 
requestor.match(/^\w+$/)){        
              
form.submit();            
    } else{        
          
alert('Please enter the Requestors Name');    
            }}When the 
user doesn't enter any thing for the field 'requestedby', the alert is shown and 
the control stays in the same page. But when the user enters a whitespace for 
the aforementioned field and clicks on the button the alert is shown and is 
taken to another the page as if it were a success. Can anyone please help me 
out?Thanks a lot,-M


Yahoo! Sports Fantasy Football ’06 - Go with the leader. Start 
your league today! 


RE: Handling and displaying action errors

2006-06-19 Thread Julian Ray
No problem. Feel free to enhance, fix any errors/inconsistencies etc.
 

-Original Message-
From: Jeff Bischoff [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 19, 2006 11:59 AM
To: MyFaces Discussion
Subject: Re: Handling and displaying action errors

Looks like you've added both. Thanks a bunch Julian!

Julian Ray wrote:
> I have started this section, please contribute where you can -- if you 
> look on the WIKI I added a new section on handling messages/errors.
> 
> There was also some earlier discussion about handling server 500 
> errors which should be added as well. If I can dig it out of the posts I
will add.
> --
> View this message in context: 
> http://www.nabble.com/Handling-and-displaying-action-errors-t1685789.h
> tml#a4926630 Sent from the MyFaces - Users forum at Nabble.com.
> 
> 
> 
> 




RE: dataList displaying horizontal

2006-06-19 Thread Julian Ray



try adding  
around the commandLink tag.


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 10:42 
AMTo: MyFaces DiscussionSubject: dataList displaying 
horizontal
I created a dataList   
  
   
I thought the "simple" 
layout was supposed to beCat1Cat2Cat3...But it is 
appearing as:Cat1 Cat2 Cat3Should this be 
happening?Thanks.


Re: Handling and displaying action errors

2006-06-18 Thread Julian Ray

I have started this section, please contribute where you can -- if you look
on the WIKI I added a new section on handling messages/errors. 

There was also some earlier discussion about handling server 500 errors
which should be added as well. If I can dig it out of the posts I will add.
--
View this message in context: 
http://www.nabble.com/Handling-and-displaying-action-errors-t1685789.html#a4926630
Sent from the MyFaces - Users forum at Nabble.com.



RE: Force creation of managed bean

2006-06-15 Thread Julian Ray



Gregg,
 
thats a good idea. I will have a shot at a wiki 
post.


From: Gregg Bolinger 
[mailto:[EMAIL PROTECTED] Sent: Thursday, June 15, 2006 
2:33 PMTo: MyFaces Discussion; Julian RaySubject: Re: 
Force creation of managed bean
Julian, thanks a bunch for the code.  Worked like a champ.  
This should be on the wiki.  There is a jsffaq link in the conversation but 
it doesn't appear to work.Gregg
On 6/15/06, Gregg 
Bolinger <[EMAIL PROTECTED]> 
wrote:

  I found the info.  Thanks.  Trying it out.
  
  On 6/15/06, Gregg 
  Bolinger < 
  [EMAIL PROTECTED]> wrote: 
  
This list or a forum?

On 6/15/06, Julian 
Ray <[EMAIL PROTECTED] 
> wrote:

  
  
  
  I 
  posted some code oin the forum which shows how to get the faces context 
  from within a servlet. You might want to do a search and get take a look. 
  
  
  - 
  Original Message From: Gregg Bolinger < 
  [EMAIL PROTECTED]>To: MyFaces Discussion <users@myfaces.apache.org>Sent: Thursday, June 15, 
  2006 1:42:28 PM Subject: Re: Force creation of managed beanOk, 
  the problem with all this is that it's being done from within JSF driven 
  code.  I need to be able to do this from a plain jane servlet that 
  just happens to exist along side all the JSF stuff, if possible.  
  Either method listed thus far returns a null faces context from within the 
  servlet. Thanks.
  On 6/15/06, octoberdan <[EMAIL PROTECTED] > wrote: 
  I 
beleive... I may be wrong.--View this message in context: http://www.nabble.com/Force-creation-of-managed-bean-t1792885.html#a4886098 
Sent from the MyFaces - Users forum at Nabble.com.
  


Re: Creating a custom Component for a whole page that renders any other component

2006-06-15 Thread Julian Ray
You can always use an included JSP and use tomahawk's aliasBean. Not as good long-term solution as facelets but is less invasive on an existing code base.
- Original Message From: Andrew Robinson <[EMAIL PROTECTED]>To: MyFaces Discussion Sent: Thursday, June 15, 2006 12:59:42 PMSubject: Re: Creating a custom Component for a whole page that renders any other component
Use facelets : it is made for these things.Look into facelet user tags (source tags).I just published a blog article on this and the ability to passmethods to composite controls:http://andrewfacelets.blogspot.com/-AndrewOn 6/15/06, Remo Liechti <[EMAIL PROTECTED]> wrote:> Hi all> I have to create a custom component. But I don't have any idea how to do> this, can anybody help me out?>> The problem is we have to set some stuff on every JSF page, like header> etc.> Now I'd like to create component like this:>>> >> <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>> <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>> <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>> <%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>> <%@ taglib uri="component.tags" prefix="custom"%>>> >> >> It should be able to render all other jsf components in it:> > >
 > > > > > >  The custom page component should render this like things:>
 > > > > > href="" rel="stylesheet"> type="text/css">>
 >> > > > >
 > > name="_flowExecutionKey" value="${flowExecutionKey}" />> > >> > > > Does anybody know how to do this?>> Thanks a lot for your help!>> Regards,> Remo>

Re: Force creation of managed bean

2006-06-15 Thread Julian Ray
I posted some code oin the forum which shows how to get the faces context from within a servlet. You might want to do a search and get take a look.
- Original Message From: Gregg Bolinger <[EMAIL PROTECTED]>To: MyFaces Discussion Sent: Thursday, June 15, 2006 1:42:28 PMSubject: Re: Force creation of managed beanOk, the problem with all this is that it's being done from within JSF driven code.  I need to be able to do this from a plain jane servlet that just happens to exist along side all the JSF stuff, if possible.  Either method listed thus far returns a null faces context from within the servlet. Thanks.
On 6/15/06, octoberdan <[EMAIL PROTECTED]> wrote:
I beleive... I may be wrong.--View this message in context: http://www.nabble.com/Force-creation-of-managed-bean-t1792885.html#a4886098 Sent from the MyFaces - Users forum at Nabble.com.

RE: Any problems using external JDK1.5 based libraries?

2006-06-14 Thread Julian Ray
Hi John,
 
We use JDK 1.5_06 for all our builds and it works fine. As the libs are
compiled with 1.4 there are a few warnings generated against collections
coming from the libs but that is the only issue.

  _  

From: John Mani [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 2:30 PM
To: MyFaces Discussion
Subject: Any problems using external JDK1.5 based libraries?


Hi
 
Are there any issues with using or referencing libraries that use JDK1.5
features (like generics, enums), from within
a backing bean ? Or even can I have a Backing bean that uses JDK1.5
features?
 
In particular, I have the following cases:
 1) My backing bean needs to use a library that returns 'typed' arrays
(using generics) and enums. My
build environment is based on JDK1.5, so I'm assuming this is not a problem.
Right?
2) Can a ListDataModel take a 'typed' ArrayList as argument?
 
I had bad experiences with Sun Creator not supporting JDK1.5 external
libraries, hence my questions now!
 
thanx
-john
<>

RE: Setting styleClass on the text in the tab, active or inactive, of the Tabbed Pane .

2006-06-14 Thread Julian Ray
We override the following styles to remove all default formatting

table.tabbedPane
td.activeTab
td.activeTab input
td.inactiveTab
td.inactiveTab input
td.activeSub
td.inactiveSub
td.tabContent
td.myFaces_panelTabbedPane_emptyHeaderCell
.myFaces_panelTabbedPane_activeHeaderCell input:hover
.myFaces_panelTabbedPane_inactiveHeaderCell input:hover

 

-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 8:44 AM
To: MyFaces Discussion
Subject: Re: Setting styleClass on the text in the tab, active or inactive,
of the Tabbed Pane .

Julian,
This does not work for the font-weight attribute.  "! important" is not need
for background-color.  I am not sure about other attributes.

Paul Spencer

Julian Ray wrote:
> You need to override the default stylesheet settings using !important. 
> For
> example:
> 
> td.activeTab {
>  background-color: #FEFEFE ! important;
>  border-top: 1px solid #91A0CA ! important; }
> 
> 
> -Original Message-
> From: Paul Spencer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 14, 2006 6:19 AM
> To: MyFaces Discussion
> Subject: Setting styleClass on the text in the tab, active or 
> inactive, of the Tabbed Pane .
> 
> I would like to bold the text in the tab of the active pane.  Setting 
> the attribute activeTabStyleClass="activeTabHeader" does have some 
> affect, mainly properties used by .  What appears to be missing is 
> the class attribute on the generated  tag that contains the
displayed text.
> 
> Paul Spencer
> 
> 



RE: Setting styleClass on the text in the tab, active or inactive, of the Tabbed Pane .

2006-06-14 Thread Julian Ray
You need to override the default stylesheet settings using !important. For
example:

td.activeTab {
 background-color: #FEFEFE ! important;
 border-top: 1px solid #91A0CA ! important;
}


-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 6:19 AM
To: MyFaces Discussion
Subject: Setting styleClass on the text in the tab, active or inactive, of
the Tabbed Pane .

I would like to bold the text in the tab of the active pane.  Setting the
attribute activeTabStyleClass="activeTabHeader" does have some affect,
mainly properties used by .  What appears to be missing is the class
attribute on the generated  tag that contains the displayed text.

Paul Spencer



RE: Conditionally rendered fields not retaing values

2006-06-13 Thread Julian Ray
I faced a similar problem when using conditionally rendered panes. The best
solution I found was to render them all with JSP but use javascript to hide
the unused panes. Works like a charm and is actually better as I can switch
the rendered pane without requiring a round-trip to the server.

-Original Message-
From: Bruno Aranda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 5:52 PM
To: MyFaces Discussion
Subject: Re: Conditionally rendered fields not retaing values

I have two choices in my mind now. One is more elegant than the other, which
is a hack actually. The more elegant is to use the sandbox s:subForm
component [1]. I haven't used it myself so I cannot be or more help. The
hack is to click with javascript an invisible button with the immediate that
sends the form, something like this:


...




Note that both the selectOne and the button are immediate="true". It is an
ugly hack, so the subform option is a better approach...

Bruno

[1] http://myfaces.apache.org/sandbox/subForm.html

On 6/13/06, Meghana <[EMAIL PROTECTED]> wrote:
> Bruno,
>  Thanks a lot! That was it. One side effect though. It seems to 
> validate and show the error messages for the required fields and 
> others. Any idea how to circumvent that?
> -M
>
>
>
> Bruno Aranda <[EMAIL PROTECTED]> wrote:
>
>  Does it work if you remove the immediate="true" attribute from the 
> selectOneRadio (see this docs to see if you really need it [1]), and 
> remove the facesContext.renderResponse() line (not needed).
>
> Let's see!
>
> Bruno
>
> [1]
> http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works
>
> On 6/13/06, Meghana wrote:
> > I am sorry I should have included my code snippet before itself.
> > Here we go!
> >
> >
> >
> > onclick="submit()" immediate="true"
> > valueChangeListener="#{ServiceBean.hardwareTypeChanged}">
> >
> >
> >
> > public void hardwareTypeChanged(ValueChangeEvent event) throws 
> > SQLException, Exception{ FacesContext context = 
> > FacesContext.getCurrentInstance();
> > String prevCategorySelected = (String)event.getOldValue(); String 
> > newCategorySelected = (String)event.getNewValue();
> >
> >
> if(!newCategorySelected.equalsIgnoreCase(prevCategorySelected)){
> > // Value changed. Change the drop down values.
> > if(newCategorySelected.equals("Desktop")){
> > desktopSelected = true;
> > debug("Setting desktopSelected field to:
> > "+isDesktopSelected());
> > }
> > else if(newCategorySelected.equals("Laptop")){
> > laptopSelected = true;
> > debug("Setting laptopSelected field to:
> > "+isLaptopSelected()+" Laptop Type: "+laptopType); } 
> > context.renderResponse(); } } }
> >
> > Based on what hardware type is selected Desktop items/laptop items 
> > are displayed.
> > The code for that is
> >
> > rendered="#{ServiceBean.desktopSelected}"/>
> >
> >
> > id="desktop_type">
> >
> > itemLabel="Standard User Desktop" />
> >
> > itemLabel="Non User Desktop" />
> >
> >
> >
> >
> > rendered="#{ServiceBean.laptopSelected}"/>
> >
> >
> > id="laptop_type">
> >
> > itemLabel="Standard User Laptop" />
> >
> > itemLabel="Power User Laptop" />
> >
> >
> >
> >
> > rendered="#{ServiceBean.laptopSelected}"/>
> >
> >
> > id="docking_station">
> >
> >
> >
> >
> >
> >
> > rendered="#{ServiceBean.laptopSelected}"/>
> >
> >
> > id="wireless_access">
>
> >
> >
> >
> >
> >
> >
> >
> >
> > Bruno Aranda wrote:
> >
> > And what about the "immediate" attributes? Are you using them? Can 
> > you show an snippet of your code?
> >
> > Bruno
> >
> > On 6/13/06, Meghana wrote:
> > > Its already in session scope :-(
> > >
> > >
> > > Bruno Aranda wrote:
> > >
> > > Could you try if that works if your bean is in session scope?
> > >
> > > Bruno
> > >
> > > On 6/13/06, Meghana wrote:
> > > > Hi,
> > > > I have a form in which the displayed input fields change based 
> > > > on a
> > radio
> > > > button field. When ever the field value is changed a 
> > > > corresponding valuechangelistener method is called and then the 
> > > > new set of input
> > fields
> > > > are displayed. But the values entered for those conditionally 
> > > > rendered fields are not retaining values in the backing bean. 
> > > > They are all
> null.
> > > I've
> > > > been banging my head over this for quite a while.
> > > > Any ideas please!
> > > >
> > > > Thanks a lot,
> > > > -M
> > > >
> > > >
> > > > __
> > > > 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
>
>
>
>
>  __
> Do You Yaho

RE: jsf-comp OptionalValidation

2006-06-13 Thread Julian Ray
What is the scope for your backing bean? It probably needs to be request
otherwise it will only be craeted once. Also, how are you calling the method
which creates the view components? If you call it in the constructor it will
get built too early so you need to find some way to build the components on
the page. With the panel grid I found that the best time to call is when the
panel grid is requesting some other value such as the number of columns. 



-Original Message-
From: Andrew Robinson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 9:30 AM
To: MyFaces Discussion
Subject: OT: jsf-comp OptionalValidation

I was looking into the code of the optional validator, and was wondering if
it would be much better placed in JDK 1.5. Instead of creating
"optionalValidator" tags with embedded validator IDs, it could use JDK 1.5
proxy classes as Validator and StateHolder are interfaces.

Then, the proxy could catch all ValidationExceptions from validators and do
what it needs to do. The developer would not need to change their view code
at all. With facelets it should be relatively easy to build a tag handler
that would create the proxy from the real validator.

Just an idea

-Andrew



RE: Dynamically Changing Panel Grid

2006-06-13 Thread Julian Ray
Hi Daniel

Here are a couple of things you could try

[1] Your page includes all the components but you use the rendered=""
attribute on each panel using EL or a backing bean to determine if a
particular panel should be rendered

[2] Dynamically create the contents of the panel using a backing bean and
adding components directly to the panel via a binding. 

-Original Message-
From: Daniel Murley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 6:53 AM
To: 'MyFaces Discussion'
Subject: Dynamically Changing Panel Grid

Hi There,

I have a situation where I want to switch between different panel grids on
the screen using a drop down.  So essentially I have one component bound to
the screen, and in the backing bean I want to change what that component
actually is.

This however is causing me much grief, as it seems JSF only reads the
bindings when it first renders the page.  Is this correct?  No matter what I
can't seem to be able to get it to change to another PanelGrid once its been
rendered.

Does anyone know how to best approach this?  Have I missed something crucial
here?

Thanks,

Daniel



RE: Can Sandbox components be used in production app?

2006-06-09 Thread Julian Ray



We use sandbox compoenns but to control the process we have 
the sandbox source and compile the sandbox ourselves -- on our schedule. This 
way any issues which show up can be dealt with and we can debug. Changes to the 
tomahawk or sandbox components are downloaded from svn and tested before they go 
into to our app.
 
 


From: Grant Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 7:29 PMTo: MyFaces 
DiscussionSubject: Re: Can Sandbox components be used in production 
app?
I would not recommend it, however I do so myself for some components. 
Obviously bad things can happen, the scope of which is impossible to predict. 
Remember that when components get "promoted" from sandbox to tomahawk, you will 
have to change the namespace on your .jsp / .jspx sources. 
On 6/8/06, Raj 
Rajendran <[EMAIL PROTECTED]> wrote:

  Is it recommended ? I understand that sandbox stuff can change, but 
  curious if people are using it in real applications.When it works, what is 
  the worst thing that can happen?-- Grant Smith


RE: panelTabbedPane question

2006-06-08 Thread Julian Ray
Title: panelTabbedPane question



try using a value binding for the tabChangeListener handler 
eg. 
 
 


From: James Richards 
[mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 
12:30 PMTo: users@myfaces.apache.orgSubject: 
panelTabbedPane question

I have a tabbed pane with a tabChangeListener 
attached    
    
        
selectedIndex="#{dealForm.activeTab}"    
        
bgcolor="#ee"    
        
width="980"    
        
activeTabStyleClass="tabActive"    
        
inactiveTabStyleClass="tabActive"    
serverSideTabSwitch="true">    
      ...but 
on MyFaces 1.1.1, the TabListener's  public void 
processTabChange(TabChangeEvent event) {//...  }is not 
being invoked.  Is there something additional that need to be done to 
enable the tab listener?Thanks for any 
help,James


  1   2   >