[Trinidad] Dialogs and parent windows

2008-07-18 Thread Kevin . A . D'Arcy
Hi,  I'm using Trinidad in an application and have a popup window used to gather user input. Once the user has finished entering their data and the popup window has closed, I need to reload the main window. As far as I know there are only two ways of accomplishing this:   - Using _javascript_ to force a page reload  - Using a Faces action to reload the page  I haven't successfully achieved this with either solution. The issue with the _javascript_ is that there seems to be no link between the popup window and the parent page (i.e. the opener object is null). Faces actions also don't seem to be an option since the available ReturnEvent handler method can't lead to a Faces navigation event.  Has anyone any ideas for a solution to this problem?  Many thanks,  Kev - KevD'Arcy DepartmentalSolutions B2Bankcentre Ballsbridge Dublin4 Ireland Tel:+35316411794 Fax:+35316688626 Email: [EMAIL PROTECTED] 

Simple popup window with external URL

2008-03-12 Thread Kevin Shale
I am trying to open a popup window showing the contents of an external url.
The popup window shown has this external url appended to the url of my webapp 
path, however.

What am I doing wrong here:

h:outputLink onclick=window.open('#{nextBean.description.url}', 
'#{nextBean.name}', 'dependent=yes, menubar=no, toolbar=no'); return false; 
value=#
  nbsp;uh:outputText value=open//u
/h:outputLink

Thanks a lot!
_
In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten! 
Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114



t:navigationMenuItem param

2008-01-28 Thread Kevin R. Gutch

Is there anyway to use a f:param with a t:navigationMenuItem?

Thanks,

Kevin


smime.p7s
Description: S/MIME Cryptographic Signature


navigation-case

2008-01-23 Thread Kevin R. Gutch

I have a method that returns a String value I use in a navigation-case.
action=#{nav.step1}

Can this value be used from a specific page defined in the 
from-view-id or must it be a wildcard? I cannot seem to get it to work 
with the former.


From specific page it does not navigate.
  from-view-id/pages/draindog/wizard_color.xhtml/from-view-id

Wildcard works but this is not what I need.

   from-view-id*/from-view-id


Thanks

Kevin


smime.p7s
Description: S/MIME Cryptographic Signature


navigation case

2008-01-23 Thread Kevin R. Gutch

I have a method that returns a String value I use in a navigation-case.
action=#{nav.step1}

Can this value be used from a specific page defined in the 
from-view-id or must it be a wildcard? I cannot seem to get it to work 
with the former.


From specific page it does not navigate.
 from-view-id/pages/draindog/wizard_color.xhtml/from-view-id

Wildcard works but this is not what I need.

  from-view-id*/from-view-id


Thanks

Kevin


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Exadel with Trinidad?

2007-09-25 Thread Kevin R. Gutch
-class
 load-on-startup2/load-on-startup
/servlet
!--  Trinidad resources Servlet 
Mapping --

servlet
 servlet-nameTrinidad Resources/servlet-name
 
servlet-classorg.apache.myfaces.trinidad.webapp.ResourceServlet/servlet-class

/servlet
servlet-mapping
 servlet-nameFaces Servlet/servlet-name
 url-pattern*.htm/url-pattern
/servlet-mapping
servlet-mapping
 servlet-nameJenia internal servlet/servlet-name
 url-pattern/jenia4faces/*/url-pattern
/servlet-mapping
!-- This cannot be configured currently --
servlet-mapping
 servlet-nameTrinidad Resources/servlet-name
 url-pattern/adf/*/url-pattern
/servlet-mapping
login-config
 auth-methodBASIC/auth-method
/login-config

/web-app

begin:vcard
fn:Kevin Gutch
n:Gutch;Kevin
org:Protech Products, Inc.;IT
adr:;;511 Central Park Drive;Sanford;FL;32771;United States
email;internet:[EMAIL PROTECTED]
title:Interactive Services Manager
tel;work:407.328.5300
tel;fax:407-328-5250
tel;cell:321.282.8528
x-mozilla-html:FALSE
version:2.1
end:vcard



Re: Exadel with Trinidad?

2007-09-25 Thread Kevin R. Gutch

I am using (note that you need to get a4j-trinidad.jar)

a4j-trinidad.jar
ajax4jsf-1.1.1.jar
richfaces-3.0.1.jar
trinidad-api-1.0.1.jar
trinidad-impl-1.0.1.jar
myfaces-api-1.1.4.jar



Thai Dang Vu wrote:

Thanks, Kevin. I'll try it.

By the way, which version of RichFaces, MyFaces  Trinidad are you
using?

-Original Message-
From: Kevin R. Gutch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 25, 2007 4:50 PM

To: MyFaces Discussion
Subject: Re: Exadel with Trinidad?

I use RichFaces, Ajax4JSf, MyFaces and Trinidad.

I do not know if every component works but I know at least the 
ColorChooser does.

Here is some of my web.xml
 


?xml version=1.0 encoding=UTF-8?
web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

 descriptionWeb Application/description
 display-nameWeb Application/display-name
 context-param
 param-nameappSkin/param-name
 param-valueclassic/param-value
/context-param
  context-param
  param-namejavax.faces.CONFIG_FILES/param-name
  
param-value/WEB-INF/faces_config_ex.xml,/WEB-INF/faces_config_app.xml

/param-value
 /context-param
 context-param
  param-nameorg.ajax4jsf.SKIN/param-name
  param-value#{infoBean.skin}/param-value
 /context-param
 context-param
  param-namefacelets.SKIP_COMMENTS/param-name
  param-valuetrue/param-value
 /context-param
 context-param
  param-namejavax.faces.DEFAULT_SUFFIX/param-name
  param-value.xhtml/param-value
 /context-param
 context-param
  param-namefacelets.REFRESH_PERIOD/param-name
  param-value2/param-value
 /context-param
 context-param
  param-namefacelets.DEVELOPMENT/param-name
  param-valuefalse/param-value
 /context-param
 !--setting to server over client is supposed to increase
performance--
 context-param
  param-namejavax.faces.STATE_SAVING_METHOD/param-name
  param-valueserver/param-value
 /context-param
 context-param
  param-namecom.sun.faces.validateXml/param-name
  param-valuefalse/param-value
 /context-param
 context-param
  param-namecom.sun.faces.verifyObjects/param-name
  param-valuefalse/param-value
 /context-param
 context-param
  param-namefacelets.LIBRARIES/param-name
  
param-value/WEB-INF/tomahawk.taglib.xml;/WEB-INF/my.taglib.xml;/WEB-IN

F/sandbox.taglib.xml/param-value
 /context-param
 !--  START Trinidad Config 
 --

 context-param
  param-nameorg.apache.myfaces.trinidad.CACHE_VIEW_ROOT/param-name
  param-valuefalse/param-value
 /context-param
 context-param
  param-nameorg.apache.myfaces.trinidad.DEBUG_JAVASCRIPT/param-name
  param-valuefalse/param-value
 /context-param
 context-param
  param-nameorg.apache.myfaces.trinidad.resource.DEBUG/param-name
  param-valuefalse/param-value
 /context-param
 context-param
  
param-nameorg.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE/para

m-name
  param-valuefalse/param-value
 /context-param
 context-param
  
param-nameorg.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESS

ION/param-name
  param-valuetrue/param-value
 /context-param
 context-param
  
param-nameorg.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION/param-n

ame
  param-valuefalse/param-value
 /context-param
 context-param
  
param-nameorg.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER/param-na

me
  param-valuecom.sun.facelets.FaceletViewHandler/param-value
 /context-param
 !--  END Trinidad Config 
 --

 filter
  display-nameAjax4jsf Filter/display-name
  filter-nameajax4jsf/filter-name
  filter-classorg.ajax4jsf.Filter/filter-class
  init-param
   param-nameforceparser/param-name
   param-valuefalse/param-value
  /init-param
 /filter
 filter
  filter-nameextensionsFilter/filter-name
  
filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-

class
  init-param
   descriptionSet the size limit for uploaded files. Format: 10 - 10 
bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB/description

   param-nameuploadMaxFileSize/param-name
   param-value100m/param-value
  /init-param
  init-param
   descriptionSet the threshold size - files below this limit are 
stored in memory, files above this limit are stored on disk. Format: 10 
- 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB/description

   param-nameuploadThresholdSize/param-name
   param-value100k/param-value
  /init-param
  
!--init-paramparam-nameuploadRepositoryPath/param-nameparam-valu
e/temp/param-valuedescriptionSet 
the path where the intermediary files will be 
stored./description/init-param--

 /filter
 
 !--  Trinidad Filter 
 --

 filter
  filter-nameTrinidad/filter-name
  
filter-classorg.apache.myfaces.trinidad.webapp.TrinidadFilter/filter-

class
 /filter
 filter-mapping
  filter-nameajax4jsf/filter-name
  servlet-nameFaces Servlet/servlet-name
  dispatcherREQUEST/dispatcher
  dispatcherFORWARD/dispatcher

[Trinidad] tr:chooseColor part 2

2007-08-15 Thread Kevin R. Gutch


Does anyone have any examples that show binding the chosen color value 
to another component?
I want to bind it to a inline css style value. Any help is greatly 
appreciated.


tr:chooseColor id=cp2 onclick= colorData=#{color.colorList}
/tr:chooseColor
begin:vcard
fn:Kevin Gutch
n:Gutch;Kevin
org:Protech Products, Inc;IT
adr:;;511 Central Park Drive;Sanford;FL;32771;United States
email;internet:[EMAIL PROTECTED]
title:Interactive Services Manager
tel;work:407.328.5300
tel;fax:407.328.5250
tel;cell:321.282.8528
x-mozilla-html:FALSE
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature


[Trinidad] tr:chooseColor

2007-08-14 Thread Kevin R. Gutch
Can a tr:chooseColor/ bound to a custom colorData use an tr:inputColor 
controller? The code below does not seem to work.


Thanks,
Kevin

tr:inputColor id=sic1 chooseId=cp2
   shortDesc=Select color from pallette   
   label=Enter or select color from palette below

   value=#{color.colorValue1}/

tr:chooseColor id=cp2
   colorData=#{color.colorList} /
begin:vcard
fn:Kevin Gutch
n:Gutch;Kevin
org:Protech Products, Inc;IT
adr:;;511 Central Park Drive;Sanford;FL;32771;United States
email;internet:[EMAIL PROTECTED]
title:Interactive Services Manager
tel;work:407.328.5300
tel;fax:407.328.5250
tel;cell:321.282.8528
x-mozilla-html:FALSE
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature


Logging level

2007-08-01 Thread Kevin R. Gutch
How is the logging level for MyFaces set? I only want to print SEVERE 
not WARNINGS and INFO.


Thanks

Kevin
begin:vcard
fn:Kevin Gutch
n:Gutch;Kevin
org:Protech Products, Inc;IT
adr:;;511 Central Park Drive;Sanford;FL;32771;United States
email;internet:[EMAIL PROTECTED]
title:Interactive Services Manager
tel;work:407.328.5300
tel;fax:407.328.5250
tel;cell:321.282.8528
x-mozilla-html:FALSE
version:2.1
end:vcard



Re: Logging level

2007-08-01 Thread Kevin R. Gutch

ok thanks. Will do

Martin Marinschek wrote:

Hi Kevin,

include a log4j.properties file in the root-directory of your class-tree.

In include a sample log4j-file here - which will print only
log-statements of a level error or higher.

regards,

Martin

#for debugging log4j itself
log4j.debug=false

#Logger-Priorities:
#DEBUG lowest, prints all messages
#INFO  prints all messages with FATAL, ERROR, WARN or INFO priority
#WARN  prints all messages with FATAL, ERROR or WARN priority
#ERROR prints all messages with FATAL or ERROR priority
#FATAL highest, prints only FATAL messages

# root logger
log4j.rootLogger=INFO, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

# myfaces logger
log4j.logger.org.apache.myfaces=ERROR


On 8/2/07, Kevin R. Gutch [EMAIL PROTECTED] wrote:
  

How is the logging level for MyFaces set? I only want to print SEVERE
not WARNINGS and INFO.

Thanks

Kevin






  
begin:vcard
fn:Kevin Gutch
n:Gutch;Kevin
org:Protech Products, Inc;IT
adr:;;511 Central Park Drive;Sanford;FL;32771;United States
email;internet:[EMAIL PROTECTED]
title:Interactive Services Manager
tel;work:407.328.5300
tel;fax:407.328.5250
tel;cell:321.282.8528
x-mozilla-html:FALSE
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature


[Trinidad] breadcrumbs

2007-07-25 Thread Kevin R. Gutch

Hello,

Can the Trinidad breadcrumb component dynamically display a breadcrumb 
based on navigation or must a breadcrumb be hard coded? The example I 
have seen seems to only show

tr:commandNavigationItem  inside the breadcrumb component.


tr:breadCrumbs orientation=vertical
   tr:commandNavigationItem text=Table Demo 
action=guide.table/

   tr:commandNavigationItem text=Tree Demo action=guide.tree/
   tr:commandNavigationItem text=PanelPage Demo 
action=guide.panelPage/
   tr:commandNavigationItem text=BreadCrumbs Demo 
action=guide.breadCrumbs/


Thanks,

Kevin
begin:vcard
fn:Kevin Gutch
n:Gutch;Kevin
org:Protech Products, Inc;IT
adr:;;511 Central Park Drive;Sanford;FL;32771;United States
email;internet:[EMAIL PROTECTED]
title:Interactive Services Manager
tel;work:407.328.5300
tel;fax:407.328.5250
tel;cell:321.282.8528
x-mozilla-html:FALSE
version:2.1
end:vcard



Message prefixed with element id

2007-06-17 Thread Kevin . A . D'Arcy
Hi,Is it possible to disable MyFaces from prefixinging error messages in h:message tagswith the id of the component for which messages should be displayed?Kev
**
This document is strictly confidential and is intended for use by the addressee unless otherwise indicated.

This email has been scanned by an external email security system.

Allied Irish Banks

AIB and AIB Group are registered business names of Allied Irish Banks p.l.c. Allied Irish Banks, p.l.c. is regulated by the Financial Regulator.  Registered Office: Bankcentre, Ballsbridge, Dublin 4. Tel: + 353 1 6600311; Registered in Ireland: Registered No. 24173
**



Struts JSTL Migration

2007-05-15 Thread Kevin Gutch

Hi,

I have an existing application that I am completely migrating to JSF. 
Everything seems fine but I am trying to figure out what to do with an 
area of the app where I use
x:transform xml=${xml} xslt=${xslt} /. This does not want to seem 
to work with JSF. Should it? If not what are my alternatives?


Thanks

Kevin


smime.p7s
Description: S/MIME Cryptographic Signature


How to access portal user information in JSF application

2007-05-10 Thread Kevin Irmscher

Hi,

I have a JSF application in a Liferay Portal rendered as portlet using
MyFacesGenericPortlet class. I want to access user information that is
provided by the portal.

In a normal portlet application they can be accessed using
javax.portlet.RenderRequest.getAttribute(PortletRequest.USER_INFO);
in the render phase.

I tried it like that:
FacesContext fc = FacesContext.getCurrentInstance();
PortletRequest request = (PortletRequest) fc.getExternalContext().getRequest();
Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
String name = (String) userInfo.get(user.name.given);

The map does not contain a user.name.given key so name is null.

Has anyone an idea how to solve that?

Regards, Kevin


Documentation about MyFacesGenericPortlet

2007-05-09 Thread Kevin Irmscher

Hi

is there any documentation available about the structure of MyFaces,
especially about MyFacesGenericPortlet. I'm looking for an overview
how the JSF lifecycle is mapped to the portlet lifecycle, sequence
diagrams and so on. I couldn't find this information on the web. Can
anybody provide references to literature or other sources. I haven't
understood all the details while looking at the source code.

Regards,
Kevin


s:subForm

2007-05-09 Thread Kevin Gutch
I am looking into the use of s:subForm to get around the validation 
error  ID jsf_tree already defined. when I have multiple forms in a 
page.

Can s:subForm be used for navigation? If so does anyone have an example?

Thanks,


Kevin


smime.p7s
Description: S/MIME Cryptographic Signature


Problems with MyFacesGenericPortlet and WSRP

2007-05-08 Thread Kevin Irmscher
)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
com.liferay.portal.kernel.servlet.PortalServletWrapper.service(PortalServletWrapper.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:672)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:301)
at com.liferay.portal.wsrp.WSRPAction.execute(WSRPAction.java:56)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at 
com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:156)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at 
com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:479)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:169)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.portlet.PortletException
at 
com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:247)
at 
com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:83)
at 
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:167)
   ... 77 more

I'm not an expert of the MyFaces implementation, so I don't really
understand why the h:form element causes such a problem. Maybe someone
has already experienced similar issues.

Has anyone successfully consumed JSF Portlets through WSRP? If yes
which implementation did you use for producer and consumer.

Regards,
Kevin


Re: Access portal user information in JSF Portlet application

2007-05-08 Thread Kevin Irmscher

Hi,

thank you all very much for the information and sorry for the double posting.

Unfortunately I still can't get user information like name or email address.
(String) userInfo.get(liferay.user.id) and
PortletRequest.getRemoteUser() return a user id (here: liferay.com.1)
but not the actual name of the user.

Neither can I retrieve the information using
Map requestMap = externalContext.getRequestMap()

I can also do the cast to RenderRequest
RenderRequest request = (RenderRequest) fc.getExternalContext().getRequest()
but that doesn't help either.

I can see all attributes if I use a portlet implementation without JSF
so It must have something to do with the MyFaces implementation.

Regards,
Kevin


I'm sortof split on this.  Since it's an attribute, he should just use
the EC, it's cheaper and more robust then the cast.  If he needed
something ELSE on the native object that the EC didn't provide, casting
is the only option.

That said, Kevin, are you sure you have a RenderRequest?  Bridges will
serve you a render request on the first complete lifecycle and then a
combination of action/render requests for additional lifecycles.  I
noticed that you were casting to the PortletRequest which is the common
ancestor for both yet that parameter is only available on the render
request.

If you change you cast to RenderRequest and get a ClassCastException
then you'll know your in the wrong class.  In general you can only count
that you have a render request during the render phase of the JSF
lifecycle.  Every other phase may have either/or...

Hope this helps,
Scott


Ryan Wynn wrote:

On 5/4/07, Nebinger, David [EMAIL PROTECTED] wrote:

 First of all, it's easier to get the request map from the
 ExternalContext:

 Map requestMap = externalContext.getRequestMap();

For the http request parameters, sure you're correct.  But he's got a
portlet and he's looking for a portlet request parameter, so he's going
about things the correct way.


MyFacesGenericPortlet creates a special derivation of ExternalContext
for you that wraps the portlet request (and portletSession, etc).  So
getRequestMap() is going to give you a map backed by the
portletRequest parameters.  In essence alot of stuff works no matter
what container you are in, as long as you don't cast to container
specific classes.  So I would agree with Kito on the first point and
not cast specifically to PortletRequest.



Access portal user information in JSF Portlet application

2007-05-07 Thread Kevin Irmscher

Hi,

I have a JSF application in a Liferay Portal rendered as portlet using
MyFacesGenericPortlet class. I want to access user information that is
provided by the portal.

In a normal portlet application they can be accessed using
javax.portlet.RenderRequest.getAttribute(PortletRequest.USER_INFO);
in the render phase.

I tried it like that:
FacesContext fc = FacesContext.getCurrentInstance();
PortletRequest request = (PortletRequest) fc.getExternalContext().getRequest();
Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
String name = (String) userInfo.get(user.name.given);

The map does not contain a user.name.given key so name is null.

Has anyone an idea how to solve that?

Regards, Kevin


Access portal user information in JSF Portlet application

2007-05-04 Thread Kevin Irmscher

Hi,

I have a JSF application in a Liferay Portal rendered as portlet using
MyFacesGenericPortlet class. I want to access user information that is
provided by the portal.

In a normal portlet application they can be accessed using
javax.portlet.RenderRequest.getAttribute(PortletRequest.USER_INFO);
in the render phase.

I tried it like that:
FacesContext fc = FacesContext.getCurrentInstance();
PortletRequest request = (PortletRequest) fc.getExternalContext().getRequest();
Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
String name = (String) userInfo.get(user.name.given);

The map does not contain a user.name.given key so name is null.

Has anyone an idea how to solve that?

Regards, Kevin


JSF Myfaces and XHTML

2007-04-25 Thread Kevin Gutch
Does JSF and MyFaces only require HTML 4.01 validation. I have a site 
that uses Facelets and MyFaces and it fails validation. The biggest 
error I see repeatadly is:


/there is no attribute xmlns:/

Does anyone know a way around this?

Thanks,
Kevin


smime.p7s
Description: S/MIME Cryptographic Signature


Re: JSF Myfaces and XHTML

2007-04-25 Thread Kevin Gutch

Yes. I am doing this:

html
   xmlns=http://www.w3.org/1999/xhtml;
   xmlns:ui=http://java.sun.com/jsf/facelets;
   xmlns:h=http://java.sun.com/jsf/html;
   xmlns:f=http://java.sun.com/jsf/core;
   xmlns:t=http://myfaces.apache.org/tomahawk;
   xmlns:c=http://java.sun.com/jstl/core_rt;

Everything renders correctly but the renderer does not like the presence 
of the xmlns.




Mike Kienenberger wrote:

Yes, JSF 1.1 only requires HTML 4.01 validation.

However, aren't you providing xmlns: attributes in your xhtml files
for facelets?


On 4/25/07, Kevin Gutch [EMAIL PROTECTED] wrote:

Does JSF and MyFaces only require HTML 4.01 validation. I have a site
that uses Facelets and MyFaces and it fails validation. The biggest
error I see repeatadly is:

/there is no attribute xmlns:/

Does anyone know a way around this?

Thanks,
Kevin






--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)




smime.p7s
Description: S/MIME Cryptographic Signature


Re: JSF Myfaces and XHTML

2007-04-25 Thread Kevin Gutch

I am sorry I misspoke.


Everything renders correctly. However, using the Firefox Web Developer 
toolkit I select Tools/Validate HTML. The results report errors for the 
namespace.

Here is the error:

Error /Line 2 column 92/: there is no attribute xmlns:c.

|...ttp://java.sun.com/JSP/Page xmlns:c=**http://java.sun.com/jstl/core_rt;|

You have used the attribute named above in your document, but the 
document type you are using does not support that attribute for this 
element. This error is often caused by incorrect use of the Strict 
document type with a document that uses frames (e.g. you must use the 
Transitional document type to get the target attribute), or by using 
vendor proprietary extensions such as marginheight (this is usually 
fixed by using CSS to achieve the desired effect instead).


This error may also result if the element itself is not supported in the 
document type you are using, as an undefined element will have no 
supported attributes; in this case, see the element-undefined error 
message for further information.


This is what it says in the  XHTML spec located here  
http://www.w3.org/TR/xhtml1/normative.html



 3.1.2. Using XHTML with other namespaces

The XHTML namespace may be used with other XML namespaces as per [XMLNS 
references.html#ref-xmlns], although such documents are not strictly 
conforming XHTML 1.0 documents as defined above. Work by W3C is 
addressing ways to specify conformance for documents involving multiple 
namespaces.





smime.p7s
Description: S/MIME Cryptographic Signature


Re: JSF Myfaces and XHTML

2007-04-25 Thread Kevin Gutch
I will try it but this error repeats itself for all of the namespaces. I 
just picked that one.


Mike Kienenberger wrote:

I don't know if this is the problem, but I use

  xmlns:c=http://java.sun.com/jstl/core;



On 4/25/07, Kevin Gutch [EMAIL PROTECTED] wrote:

I am sorry I misspoke.


Everything renders correctly. However, using the Firefox Web Developer
toolkit I select Tools/Validate HTML. The results report errors for the
namespace.
Here is the error:

Error /Line 2 column 92/: there is no attribute xmlns:c.

|...ttp://java.sun.com/JSP/Page 
xmlns:c=**http://java.sun.com/jstl/core_rt;|


You have used the attribute named above in your document, but the
document type you are using does not support that attribute for this
element. This error is often caused by incorrect use of the Strict
document type with a document that uses frames (e.g. you must use the
Transitional document type to get the target attribute), or by using
vendor proprietary extensions such as marginheight (this is usually
fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the
document type you are using, as an undefined element will have no
supported attributes; in this case, see the element-undefined error
message for further information.

This is what it says in the  XHTML spec located here
http://www.w3.org/TR/xhtml1/normative.html


  3.1.2. Using XHTML with other namespaces

The XHTML namespace may be used with other XML namespaces as per [XMLNS
references.html#ref-xmlns], although such documents are not strictly
conforming XHTML 1.0 documents as defined above. Work by W3C is
addressing ways to specify conformance for documents involving multiple
namespaces.








--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)




smime.p7s
Description: S/MIME Cryptographic Signature


Re: JSF Myfaces and XHTML

2007-04-25 Thread Kevin Gutch
Can I ask this. Has anyone else tried validating? Do you get this 
message? I have a feeling the validator just does not know what to do 
with them.



Mike Kienenberger wrote:

Ok. I  wasn't sure if you picked it because that was wrong (it looked
wrong to me) or if it was happening for all of them.

I can't be of much more help.

On 4/25/07, Kevin Gutch [EMAIL PROTECTED] wrote:

I will try it but this error repeats itself for all of the namespaces. I
just picked that one.

Mike Kienenberger wrote:
 I don't know if this is the problem, but I use

   xmlns:c=http://java.sun.com/jstl/core;



 On 4/25/07, Kevin Gutch [EMAIL PROTECTED] wrote:
 I am sorry I misspoke.


 Everything renders correctly. However, using the Firefox Web 
Developer
 toolkit I select Tools/Validate HTML. The results report errors 
for the

 namespace.
 Here is the error:

 Error /Line 2 column 92/: there is no attribute xmlns:c.

 |...ttp://java.sun.com/JSP/Page
 xmlns:c=**http://java.sun.com/jstl/core_rt;|

 You have used the attribute named above in your document, but the
 document type you are using does not support that attribute for this
 element. This error is often caused by incorrect use of the Strict
 document type with a document that uses frames (e.g. you must use the
 Transitional document type to get the target attribute), or by 
using

 vendor proprietary extensions such as marginheight (this is usually
 fixed by using CSS to achieve the desired effect instead).

 This error may also result if the element itself is not supported 
in the

 document type you are using, as an undefined element will have no
 supported attributes; in this case, see the element-undefined error
 message for further information.

 This is what it says in the  XHTML spec located here
 http://www.w3.org/TR/xhtml1/normative.html


   3.1.2. Using XHTML with other namespaces

 The XHTML namespace may be used with other XML namespaces as per 
[XMLNS
 references.html#ref-xmlns], although such documents are not 
strictly

 conforming XHTML 1.0 documents as defined above. Work by W3C is
 addressing ways to specify conformance for documents involving 
multiple

 namespaces.






--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)








--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)




smime.p7s
Description: S/MIME Cryptographic Signature


address bar

2007-04-16 Thread Kevin Gutch

Hi,

I am not 100% sure this is a MyFaces issue but I thought I would start 
here. I am using Facelets with MyFaces.
Whenever I click on a commandlink, my navigation is successful but the 
address in my address bar is always one page behind my current view.
For instance, if I at at Home and click 'About Us' the about us page is 
rendered but my navigation still says something like


http://localhost:8080/mycontext/pages/main.htm

If I then click 'Contact Us' the contact page is rendered and the 
address bar says:


http://localhost:8080/mycontext/pages/common/about.htm

If I then select 'home' I get

http://localhost:8080/mycontext/pages/common/contact.htm

This really just seems to be a pain more than anything. Does anyone have 
any idea what is causing it?


Note that my web.xml Faces Servlet value is *.htm

servlet-mapping
   servlet-nameFaces Servlet/servlet-name
   url-pattern*.htm/url-pattern
   /servlet-mapping


smime.p7s
Description: S/MIME Cryptographic Signature


Re: address bar

2007-04-16 Thread Kevin Gutch

Oh Ok! I just figured I was doing something incorrect!

Simon Kitching wrote:

Kevin Gutch wrote:
Whenever I click on a commandlink, my navigation is successful but 
the address in my address bar is always one page behind my current view.


Yep, that's a well known issue. It's caused by the fact that JSF uses 
internal forwards a lot. When the browser POSTs data to /foo.jsf the 
server-side code can decide to render page /bar.jsf back to the user. 
However what the browser sees is that it POSTed to /foo.jsf and got 
back some content. It doesn't know that the content was generated by 
page /bar.jsp.


A solution is to mark your JSF navigation rules with redirect/. 
When the code handling the POST decides to navigate to bar.jsp it will 
then send an HTTP redirect message back to the browser telling it to 
fetch bar.jsp, which fixes the problem. However that has a number of 
drawbacks, of which performance is one.


Note that this isn't really a JSF issue as such, more a problem with 
any framework that uses forwards within the server. I don't know PHP 
or ruby-on-rails or Tapestry but would expect them all to have exactly 
the same issue.


What is really needed is some extension to HTTP to allow the served 
page to tell the browser what to display as the page url. However that 
may be undesirable for security reasons..



Regards,

Simon



--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)




smime.p7s
Description: S/MIME Cryptographic Signature


t:swapImage

2007-03-20 Thread Kevin Gutch
Has anyone used t:swapImage with facelets. If so can you show me the tag 
for the taglib file?


Thanks,

Kevin




smime.p7s
Description: S/MIME Cryptographic Signature


Migrate from a:href to commandLink

2007-03-19 Thread Kevin Gutch

I have a html link styled with CSS (see below).

.a#j {display:block; width:105px; height:0; padding-top:115px; 
overflow:hidden; position:absolute; left:5px; top:47px; 
background:transparent 
url(#{facesContext.externalContext.requestContextPath}/images/j.jpg) 
no-repeat 340px 200px;}

* html a#j {height:120px; he\ight:0;}
a#j:hover {background-position: 0 0; overflow:visible;}

I want to replace the a/ with an commandLink and maintain the style. 
However, just switching out the tag breaks the style. I can add the 
style to inline to the commandLink by adding the  style attribute. 
However, I am not sure how to add the hover style?


Any suggestions?

Thanks,

Kevin


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Migrate from a:href to commandLink

2007-03-19 Thread Kevin Gutch
Oh yes. I believe I could do that but it does not really solve the hover 
issue. Does it?




Simon Kitching wrote:

Kevin Gutch wrote:

I have a html link styled with CSS (see below).

.a#j {display:block; width:105px; height:0; padding-top:115px; 
overflow:hidden; position:absolute; left:5px; top:47px; 
background:transparent 
url(#{facesContext.externalContext.requestContextPath}/images/j.jpg) 
no-repeat 340px 200px;}

* html a#j {height:120px; he\ight:0;}
a#j:hover {background-position: 0 0; overflow:visible;}

I want to replace the a/ with an commandLink and maintain the 
style. However, just switching out the tag breaks the style. I can 
add the style to inline to the commandLink by adding the  style 
attribute. However, I am not sure how to add the hover style?


You mention inline style on the commandLink. Have you considered 
using the styleClass attribute to assign a css *class* rather than 
an inline style?




--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)




smime.p7s
Description: S/MIME Cryptographic Signature


Re: JSF - New window to confirm delete

2007-03-12 Thread Kevin Gutch

Hi,

I am trying to use JSCookMenu with facelets. My taglib is configured as 
shown below. I  believe my web.xml is configured correctly as the   
t:inputCalendar/ works. However, the

jscookMenu fails and throws:
org.apache.jasper.JasperException: ExtensionsFilter not correctly 
configured. JSF mapping missing. JSF pages not covered.


My web.xml is also shown below.
Does anyone see any obvious errors?

_taglib.xml_

tag-namejscookMenu/tag-name
   !--
   ![CDATA[
Requires input type=hidden name=jscook_action / to be manually 
added to the form

   ]]
   --
   component
   component-typeorg.apache.myfaces.JSCookMenu/component-type
   renderer-typeorg.apache.myfaces.JSCookMenu/renderer-type
   /component
   /tag

web.xml

?xml version=1.0 encoding=UTF-8?
web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

   descriptionRoofdrain Express Web Application/description
   display-nameRoofdrain Express Web Application/display-name
   context-param
   param-namejavax.faces.CONFIG_FILES/param-name
   param-value
   
/WEB-INF/faces_config_ex.xml,/WEB-INF/faces_config_app.xml,/WEB-INF/faces_config_universal.xml

   /param-value
   /context-param
   context-param
   param-namefacelets.SKIP_COMMENTS/param-name
   param-valuetrue/param-value
   /context-param
   context-param
   param-nameorg.ajax4jsf.VIEW_HANDLERS/param-name
   param-valuecom.sun.facelets.FaceletViewHandler/param-value
   /context-param
   context-param
   param-namejavax.faces.DEFAULT_SUFFIX/param-name
   param-value.xhtml/param-value
   /context-param
   context-param
   param-namefacelets.REFRESH_PERIOD/param-name
   param-value2/param-value
   /context-param
   context-param
   param-namefacelets.DEVELOPMENT/param-name
   param-valuefalse/param-value
   /context-param
   !--setting to server over client is supposed to increase performance--
   context-param
   param-namejavax.faces.STATE_SAVING_METHOD/param-name
   param-valueserver/param-value
   /context-param
   context-param
   param-namecom.sun.faces.validateXml/param-name
   param-valuefalse/param-value
   /context-param
   context-param
   param-namecom.sun.faces.verifyObjects/param-name
   param-valuefalse/param-value
   /context-param
   context-param
   param-namefacelets.LIBRARIES/param-name
   param-value
   /WEB-INF/tomahawk.taglib.xml;/WEB-INF/protech.taglib.xml
   /param-value
   /context-param
   context-param
   param-nameorg.ajax4jsf.SKIN/param-name
   param-value#{infoBean.skin}/param-value
   /context-param
   !--OTHER PERFORMANCE SETTINGS--
   context-param
   param-name
   org.apache.myfaces.COMPRESS_STATE_IN_SESSION
   /param-name
   param-valuefalse/param-value
   /context-param
   context-param
   param-name
   org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
   /param-name
   param-valuefalse/param-value
   /context-param
   context-param
   param-name
   org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
   /param-name
   param-value20/param-value
   /context-param
   !--END PERFORMANCE SETTINGS
   BEGIN MyFacesExtensionsFilter SETTINGS--
   filter
   filter-nameMyFacesExtensionsFilter/filter-name
   filter-class
   org.apache.myfaces.webapp.filter.ExtensionsFilter
   /filter-class
   init-param
   param-namemaxFileSize/param-name
   param-value20m/param-value
   /init-param
   /filter
   !--END MyFacesExtensionsFilter SETTINGS
   BEGIN Ajax4jsf Filter SETTINGS--
   filter
   display-nameAjax4jsf Filter/display-name
   filter-nameajax4jsf/filter-name
   filter-classorg.ajax4jsf.Filter/filter-class
   /filter
   filter-mapping
   filter-nameMyFacesExtensionsFilter/filter-name
   !-- servlet-name must match the name of your 
javax.faces.webapp.FacesServlet entry --

   servlet-nameFaces Servlet/servlet-name
   /filter-mapping
   !-- extension mapping for serving page-independent resources 
(javascript, stylesheets, images, etc.)  --

   filter-mapping
   filter-nameMyFacesExtensionsFilter/filter-name
   url-pattern/faces/myFacesExtensionResource/*/url-pattern
   /filter-mapping
   !-- extension mapping for adding script/, link/, and other 
resource tags to JSF-pages  --

   filter-mapping
   filter-nameMyFacesExtensionsFilter/filter-name
   url-pattern*.htm/url-pattern
   /filter-mapping
   filter-mapping
   filter-nameajax4jsf/filter-name
   servlet-nameFaces Servlet/servlet-name
   dispatcherREQUEST/dispatcher
   dispatcherFORWARD/dispatcher
   dispatcherINCLUDE/dispatcher
   /filter-mapping
   !--END Ajax4jsf Filter SETTINGS
   extension mapping for adding 

JSCookMenu Facelets

2007-03-12 Thread Kevin Gutch

Sorry about my last post under the wrong subject!

Hi,

I am trying to use JSCookMenu with facelets. My taglib is configured as 
shown below. I  believe my web.xml is configured correctly as the   
t:inputCalendar/ works. However, the

jscookMenu fails and throws:
org.apache.jasper.JasperException: ExtensionsFilter not correctly 
configured. JSF mapping missing. JSF pages not covered.


My web.xml is also shown below.
Does anyone see any obvious errors?

_taglib.xml_

tag-namejscookMenu/tag-name
  !--
  ![CDATA[
Requires input type=hidden name=jscook_action / to be manually 
added to the form

  ]]
  --
  component
  component-typeorg.apache.myfaces.JSCookMenu/component-type
  renderer-typeorg.apache.myfaces.JSCookMenu/renderer-type
  /component
  /tag

web.xml

?xml version=1.0 encoding=UTF-8?
web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

  descriptionRoofdrain Express Web Application/description
  display-nameRoofdrain Express Web Application/display-name
  context-param
  param-namejavax.faces.CONFIG_FILES/param-name
  param-value
  
/WEB-INF/faces_config_ex.xml,/WEB-INF/faces_config_app.xml,/WEB-INF/faces_config_universal.xml 


  /param-value
  /context-param
  context-param
  param-namefacelets.SKIP_COMMENTS/param-name
  param-valuetrue/param-value
  /context-param
  context-param
  param-nameorg.ajax4jsf.VIEW_HANDLERS/param-name
  param-valuecom.sun.facelets.FaceletViewHandler/param-value
  /context-param
  context-param
  param-namejavax.faces.DEFAULT_SUFFIX/param-name
  param-value.xhtml/param-value
  /context-param
  context-param
  param-namefacelets.REFRESH_PERIOD/param-name
  param-value2/param-value
  /context-param
  context-param
  param-namefacelets.DEVELOPMENT/param-name
  param-valuefalse/param-value
  /context-param
  !--setting to server over client is supposed to increase performance--
  context-param
  param-namejavax.faces.STATE_SAVING_METHOD/param-name
  param-valueserver/param-value
  /context-param
  context-param
  param-namecom.sun.faces.validateXml/param-name
  param-valuefalse/param-value
  /context-param
  context-param
  param-namecom.sun.faces.verifyObjects/param-name
  param-valuefalse/param-value
  /context-param
  context-param
  param-namefacelets.LIBRARIES/param-name
  param-value
  /WEB-INF/tomahawk.taglib.xml;/WEB-INF/protech.taglib.xml
  /param-value
  /context-param
  context-param
  param-nameorg.ajax4jsf.SKIN/param-name
  param-value#{infoBean.skin}/param-value
  /context-param
  !--OTHER PERFORMANCE SETTINGS--
  context-param
  param-name
  org.apache.myfaces.COMPRESS_STATE_IN_SESSION
  /param-name
  param-valuefalse/param-value
  /context-param
  context-param
  param-name
  org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
  /param-name
  param-valuefalse/param-value
  /context-param
  context-param
  param-name
  org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
  /param-name
  param-value20/param-value
  /context-param
  !--END PERFORMANCE SETTINGS
  BEGIN MyFacesExtensionsFilter SETTINGS--
  filter
  filter-nameMyFacesExtensionsFilter/filter-name
  filter-class
  org.apache.myfaces.webapp.filter.ExtensionsFilter
  /filter-class
  init-param
  param-namemaxFileSize/param-name
  param-value20m/param-value
  /init-param
  /filter
  !--END MyFacesExtensionsFilter SETTINGS
  BEGIN Ajax4jsf Filter SETTINGS--
  filter
  display-nameAjax4jsf Filter/display-name
  filter-nameajax4jsf/filter-name
  filter-classorg.ajax4jsf.Filter/filter-class
  /filter
  filter-mapping
  filter-nameMyFacesExtensionsFilter/filter-name
  !-- servlet-name must match the name of your 
javax.faces.webapp.FacesServlet entry --

  servlet-nameFaces Servlet/servlet-name
  /filter-mapping
  !-- extension mapping for serving page-independent resources 
(javascript, stylesheets, images, etc.)  --

  filter-mapping
  filter-nameMyFacesExtensionsFilter/filter-name
  url-pattern/faces/myFacesExtensionResource/*/url-pattern
  /filter-mapping
  !-- extension mapping for adding script/, link/, and other 
resource tags to JSF-pages  --

  filter-mapping
  filter-nameMyFacesExtensionsFilter/filter-name
  url-pattern*.htm/url-pattern
  /filter-mapping
  filter-mapping
  filter-nameajax4jsf/filter-name
  servlet-nameFaces Servlet/servlet-name
  dispatcherREQUEST/dispatcher
  dispatcherFORWARD/dispatcher
  dispatcherINCLUDE/dispatcher
  /filter-mapping
  !--END Ajax4jsf Filter SETTINGS
  extension mapping for adding script/, link/, and other 
resource tags to JSF-pages  --

  listener

AOP issue

2007-03-12 Thread Kevin Wu
I want to use AOP to deal with the exception that thrown by the managed bean
of JSF or MyFaces. Can I do it, and how to do it?

By the way I use spring too, is there any way to integrate JSF AOP and
Spring AOP?

 



Re: [Solved] ERROR: Value is not a valid option

2007-02-26 Thread Kevin Galligan

I'm having the same problem.  I had some code that was working for a long
time with 1.1.5-SNAPSHOT, and now I'm getting that error.

h:selectOneMenu value=#{shared$FavoriteDocumentAdd.documentTypeId}
onchange=toggleInputRow() id=documentTypeSelect
style=background-color:rgb(204,204,255)
   f:selectItem itemLabel=Website URL itemValue=3/
   f:selectItem itemLabel=File Upload itemValue=1/
   f:selectItem itemLabel=Description Only itemValue=2/
/h:selectOneMenu

The value being set is a short.  Essentially it looks like the code was
doing an automatic conversion before, but now chokes.

I just reverted the code to 1.1.5-SNAPSHOT, and it works again.  I'm going
to try to take a quick look at the differences between
UISelectOne.javabetween those two versions, but in practice I've found
with any large code
base, it'll take a little time to really understand the layout.

On 2/26/07, CarlHowarth [EMAIL PROTECTED] wrote:



Hi,

I am having this problem too. My select one is set up as follows:

h:selectOneMenu id=regionList binding=#{Bean.regionListUI}
value=#{Bean.region} 
  f:converter converterId=myapp.Region/
  f:selectItem itemValue=0 itemLabel=(all)/
  t:selectItems var=r itemLabel=#{r.name} itemValue=#{r.idString}
value=#{applicationBean.regionMap} /
  f:attribute name=fieldRef value=Region List/
/h:selectOneMenu

- This was working fine with 1.1.4 but since the upgrade to 1.1.5 it now
falls over.
- The application bean is at application scope, so the values should
always
be available.
- The converter changes an ID to a region and vice versa.
- The page loads up fine, I only have the problem when I select a command
button that runs an action listener.
- I use a 't:saveState value=#{Bean_track}/' for my request-scoped
bean.
- The region bean implements a working 'equals' method.
- If I select the manually populated select item, (all), it works
correctly.

My converter is like this:

public final static String CONVERTER_ID = myapp.Region;
public Object getAsObject(FacesContext facesContext, UIComponent
uiComponent, String string)
throws ConverterException {

   return
JSFUtils.getAppBackingBean().getRegionMap().get(Integer.parseInt(string));
}

public String getAsString(FacesContext facesContext, UIComponent
uiComponent, Object object)
throws ConverterException {
if (object == null) {
return null;
} else if (object instanceof Region) {
final Region region = (Region) object;
return region.getId().toString();
}

return object.toString();
}


I am at a complete loss at the moment, so any thoughts on what could be
causing this error would be appreciated.

Thanks, Carl



Ernst Fastl wrote:

 Hi,

 I have had a similar problem recently. Generally happens if the
 application is not able to find the selected value in the List of
 selectItems.
 This can be due to 2 possible situations:

 1. The list is not available during validation
 - try using a t:saveState value=#{reportsBean.containerTypeList } /
 to ensure it is

 2. The values of the selectItems (getValue() and setValue()) do not
 contain
 Strings and there is no converter:

 - use a corresponding converter e.g. for Long - LongConverter
 for the selectOneMenu

 hope that helps

 regards

 Ernst

 On 2/22/07, Srinivas V [EMAIL PROTECTED] wrote:
 Hi All,
 Please help me!!
 I am having an issue with SelectOneMenu.

 I have installed JSF 1.1.5-SNAPSHOT,Tomahawk1.1.5- SNAPSHOT and
 tomahawk-sandbox-1.1.5-SNAPSHOT.

 Previously i had myfaces1.1 jar
 I dint have issue with selectOneMenu before.

 Now when I submit the page, I am getting this jsf validation error:
 Container:Value is not a valid option
 for a selectOneMenu even if i select some option.

 code:
 h:panelGroup rendered=#{reportsBean.renderContainerType}
x:outputLabel for=containerfilter
 value=#{msgBundle.EPCMgr_ContainerLbl}:
 styleClass=standard_text_bold/
f:verbatimbr//f:verbatim
h:selectOneMenu id=containerfilter
 value=#{reportsBean.containerType} immediate=true disabled=#{
 reportsBean.optionDisabled } styleClass=standard_input
 f:selectItem itemValue= itemLabel=  /
 f:selectItems value=#{reportsBean.containerTypeList }/
/h:selectOneMenu
   /h:panelGroup

 Can anybody tell me why it is happening?

 regards
 srinivas




--
View this message in context:
http://www.nabble.com/ERROR%3A-Value-is-not-a-valid-option-tf3270984.html#a9155607
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: [Solved] ERROR: Value is not a valid option

2007-02-26 Thread Kevin Galligan

More info.  I took a look at the code.  Revision 449566, repo path...

https://svn.apache.org/repos/asf/myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectOne.java

The original code does the following:

_ValueConverter converter = new _ValueConverter()
   {
   public Object getConvertedValue(FacesContext context, String
value)
   {
   return UISelectOne.this.getConvertedValue(context, value);
   }
   };

   // selected value must match to one of the available options
   if (!_SelectItemsUtil.matchValue(context, value, new
_SelectItemsIterator(this), converter))

In summary, inside 'matchValue', this attempts to convert the value based on
the bound value type in the backing bean.  So, in my case, it recognizes a
Short, and attempts to convert the string to a short.  r449566 looks like
the following...

// selected value must match to one of the available options
   if (!_SelectItemsUtil.matchValue(value, new
_SelectItemsIterator(this)))

The converter isn't being used anymore.

Now, this revision was checked in on 9/25/06.  That looks a little old to be
showing up in 1.1.5-SNAPSHOT.  The file I have locally is 11/25/06.  I
decompiled it and it does have the old version.  I think on 11/25 I did a
local build of 1.1.5-SNAPSHOT and that may be insulating me from the change.

Not sure.  Anyway, the select menu is going to be more strict in this
version.  Is that correct, or should it attempt the conversion?  I tried
putting in a number converter, but it choked as well.  The message was very
long, but it looked like it was putting out a Long, and failing with the
attempted to setting of the Short.  I could write my own converter, but the
old way was a lot easier.  Just want to make sure that's my only option
before I start hacking away.

Thanks,
-Kevin

On 2/26/07, Kevin Galligan [EMAIL PROTECTED] wrote:


I'm having the same problem.  I had some code that was working for a long
time with 1.1.5-SNAPSHOT, and now I'm getting that error.

h:selectOneMenu value=#{shared$FavoriteDocumentAdd.documentTypeId}
onchange=toggleInputRow() id=documentTypeSelect
style=background-color:rgb(204,204,255)
f:selectItem itemLabel=Website URL itemValue=3/
f:selectItem itemLabel=File Upload itemValue=1/
f:selectItem itemLabel=Description Only itemValue=2/
/h:selectOneMenu

The value being set is a short.  Essentially it looks like the code was
doing an automatic conversion before, but now chokes.

I just reverted the code to 1.1.5-SNAPSHOT, and it works again.  I'm going
to try to take a quick look at the differences between UISelectOne.javabetween 
those two versions, but in practice I've found with any large code
base, it'll take a little time to really understand the layout.

On 2/26/07, CarlHowarth [EMAIL PROTECTED] wrote:


 Hi,

 I am having this problem too. My select one is set up as follows:

 h:selectOneMenu id=regionList binding=#{Bean.regionListUI}
 value=#{Bean.region} 
   f:converter converterId= myapp.Region/
   f:selectItem itemValue=0 itemLabel=(all)/
   t:selectItems var=r itemLabel=#{r.name} itemValue=#{ r.idString
 }
 value=#{applicationBean.regionMap} /
   f:attribute name=fieldRef value=Region List/
 /h:selectOneMenu

 - This was working fine with 1.1.4 but since the upgrade to 1.1.5 it now
 falls over.
 - The application bean is at application scope, so the values should
 always
 be available.
 - The converter changes an ID to a region and vice versa.
 - The page loads up fine, I only have the problem when I select a
 command
 button that runs an action listener.
 - I use a 't:saveState value=#{Bean_track}/' for my request-scoped
 bean.
 - The region bean implements a working 'equals' method.
 - If I select the manually populated select item, (all), it works
 correctly.

 My converter is like this:

 public final static String CONVERTER_ID = myapp.Region;
 public Object getAsObject(FacesContext facesContext, UIComponent
 uiComponent, String string)
 throws ConverterException {

return
 JSFUtils.getAppBackingBean().getRegionMap().get(Integer.parseInt
 (string));
 }

 public String getAsString(FacesContext facesContext, UIComponent
 uiComponent, Object object)
 throws ConverterException {
 if (object == null) {
 return null;
 } else if (object instanceof Region) {
 final Region region = (Region) object;
 return region.getId().toString();
 }

 return object.toString();
 }


 I am at a complete loss at the moment, so any thoughts on what could be
 causing this error would be appreciated.

 Thanks, Carl



 Ernst Fastl wrote:
 
  Hi,
 
  I have had a similar problem recently. Generally happens if the
  application is not able to find the selected value in the List of
  selectItems.
  This can be due to 2 possible situations:
 
  1. The list is not available during validation
  - try using a t:saveState value

Re: [Solved] ERROR: Value is not a valid option

2007-02-26 Thread Kevin Galligan

I did try that and didn't have any luck.  I think that was due to the fact
that I was using shorts rather than ints, but I'd have to try it again now
that I have a better understanding of everything involved.

I looked at TOMAHAWK-152 briefly.  I'll have to sit down and take a better
look at it.  It looks to be in the realm.  The string value of 'true' not
matching with a boolean type value?

I guess the bottom line is I'd like to find out if I should be using an
explicit converter to go from String to Short, or if the JSF api being used
should be able to handle a simple[r] conversion like that.  It was doing
that conversion originally.  Does the JSF spec cover this?  Anybody happen
to know what the reference implementation does?  I'd love to try it out, but
we're trying to push this out the door, so for the near future I have to
focus on what's right in front of me.

On 2/26/07, Martin Grotzke [EMAIL PROTECTED] wrote:


Does it work when you use itemValue=#{3} as workaround?

I also had the same problem with itemValue=true, what I think is
http://issues.apache.org/jira/browse/TOMAHAWK-152 ...

Cheers,
Martin


On Mon, 2007-02-26 at 11:23 -0500, Kevin Galligan wrote:
 I'm having the same problem.  I had some code that was working for a
 long time with 1.1.5-SNAPSHOT, and now I'm getting that error.

 h:selectOneMenu value=#{shared$FavoriteDocumentAdd.documentTypeId}
 onchange=toggleInputRow() id=documentTypeSelect
 style=background-color:rgb(204,204,255)
 f:selectItem itemLabel=Website URL itemValue=3/
 f:selectItem itemLabel=File Upload itemValue=1/
 f:selectItem itemLabel=Description Only itemValue=2/
 /h:selectOneMenu

 The value being set is a short.  Essentially it looks like the code
 was doing an automatic conversion before, but now chokes.

 I just reverted the code to 1.1.5-SNAPSHOT, and it works again.  I'm
 going to try to take a quick look at the differences between
 UISelectOne.java between those two versions, but in practice I've
 found with any large code base, it'll take a little time to really
 understand the layout.

 On 2/26/07, CarlHowarth [EMAIL PROTECTED] wrote:

 Hi,

 I am having this problem too. My select one is set up as
 follows:

 h:selectOneMenu id=regionList
 binding=#{Bean.regionListUI}
 value=#{Bean.region} 
   f:converter converterId= myapp.Region/
   f:selectItem itemValue=0 itemLabel=(all)/
   t:selectItems var=r itemLabel=#{r.name}
 itemValue=#{ r.idString}
 value=#{applicationBean.regionMap} /
   f:attribute name=fieldRef value=Region List/
 /h:selectOneMenu

 - This was working fine with 1.1.4 but since the upgrade to
 1.1.5 it now
 falls over.
 - The application bean is at application scope, so the values
 should always
 be available.
 - The converter changes an ID to a region and vice versa.
 - The page loads up fine, I only have the problem when I
 select a command
 button that runs an action listener.
 - I use a 't:saveState value=#{Bean_track}/' for my
 request-scoped bean.
 - The region bean implements a working 'equals' method.
 - If I select the manually populated select item, (all), it
 works correctly.

 My converter is like this:

 public final static String CONVERTER_ID = myapp.Region;
 public Object getAsObject(FacesContext facesContext,
 UIComponent
 uiComponent, String string)
 throws ConverterException {

return
 JSFUtils.getAppBackingBean().getRegionMap().get(Integer.parseInt
(string));
 }

 public String getAsString(FacesContext facesContext,
 UIComponent
 uiComponent, Object object)
 throws ConverterException {
 if (object == null) {
 return null;
 } else if (object instanceof Region) {
 final Region region = (Region) object;
 return region.getId().toString();
 }

 return object.toString();
 }


 I am at a complete loss at the moment, so any thoughts on what
 could be
 causing this error would be appreciated.

 Thanks, Carl



 Ernst Fastl wrote:
 
  Hi,
 
  I have had a similar problem recently. Generally happens if
 the
  application is not able to find the selected value in the
 List of
  selectItems.
  This can be due to 2 possible situations:
 
  1. The list is not available during validation
  - try using a t:saveState
 value=#{reportsBean.containerTypeList } /
  to ensure it is
 
  2. The values of the selectItems (getValue() and setValue())
 do

Re: [Solved] ERROR: Value is not a valid option

2007-02-26 Thread Kevin Galligan

I am using facelets.  Where would that function go?  Each f:selectItem
entry?

f:selectItem itemLabel=Website URL
itemValue=#{myfn:convertStringToShort(3)}/



On 2/26/07, Mike Kienenberger [EMAIL PROTECTED] wrote:


Take a look at http://issues.apache.org/jira/browse/MYFACES-1328.   It
looks like the RI does not have this convenience conversion.   I don't
know what the spec says, but that'd be the place to get a definitive
answer.

If you're using facelets, as a temporary workaround you could create a
convertStringToShort() function (or whatever conversion you're
expecting to have happen automatically).


On 2/26/07, Kevin Galligan [EMAIL PROTECTED] wrote:
 I did try that and didn't have any luck.  I think that was due to the
fact
 that I was using shorts rather than ints, but I'd have to try it again
now
 that I have a better understanding of everything involved.

  I looked at TOMAHAWK-152 briefly.  I'll have to sit down and take a
better
 look at it.  It looks to be in the realm.  The string value of 'true'
not
 matching with a boolean type value?

 I guess the bottom line is I'd like to find out if I should be using an
 explicit converter to go from String to Short, or if the JSF api being
used
 should be able to handle a simple[r] conversion like that.  It was doing
 that conversion originally.  Does the JSF spec cover this?  Anybody
happen
 to know what the reference implementation does?  I'd love to try it out,
but
 we're trying to push this out the door, so for the near future I have to
 focus on what's right in front of me.


 On 2/26/07, Martin Grotzke [EMAIL PROTECTED] wrote:
  Does it work when you use itemValue=#{3} as workaround?
 
  I also had the same problem with itemValue=true, what I think is
  http://issues.apache.org/jira/browse/TOMAHAWK-152 ...
 
  Cheers,
  Martin
 
 
  On Mon, 2007-02-26 at 11:23 -0500, Kevin Galligan wrote:
   I'm having the same problem.  I had some code that was working for a
   long time with 1.1.5-SNAPSHOT, and now I'm getting that error.
  
   h:selectOneMenu
 value=#{shared$FavoriteDocumentAdd.documentTypeId}
   onchange=toggleInputRow() id=documentTypeSelect
   style=background-color:rgb(204,204,255)
   f:selectItem itemLabel=Website URL itemValue=3/
   f:selectItem itemLabel=File Upload itemValue=1/
   f:selectItem itemLabel=Description Only itemValue=2/
   /h:selectOneMenu
  
   The value being set is a short.  Essentially it looks like the code
   was doing an automatic conversion before, but now chokes.
  
   I just reverted the code to 1.1.5-SNAPSHOT, and it works again.  I'm
   going to try to take a quick look at the differences between
   UISelectOne.java between those two versions, but in practice I've
   found with any large code base, it'll take a little time to really
   understand the layout.
  
   On 2/26/07, CarlHowarth [EMAIL PROTECTED] wrote:
  
   Hi,
  
   I am having this problem too. My select one is set up as
   follows:
  
   h:selectOneMenu id=regionList
   binding=#{Bean.regionListUI}
   value=#{Bean.region} 
 f:converter converterId= myapp.Region/
 f:selectItem itemValue=0 itemLabel=(all)/
 t:selectItems var=r itemLabel=#{r.name }
   itemValue=#{ r.idString}
   value=#{applicationBean.regionMap} /
 f:attribute name=fieldRef value=Region List/
   /h:selectOneMenu
  
   - This was working fine with 1.1.4 but since the upgrade to
   1.1.5 it now
   falls over.
   - The application bean is at application scope, so the
values
   should always
   be available.
   - The converter changes an ID to a region and vice versa.
   - The page loads up fine, I only have the problem when I
   select a command
   button that runs an action listener.
   - I use a 't:saveState value=#{Bean_track}/' for my
   request-scoped bean.
   - The region bean implements a working 'equals' method.
   - If I select the manually populated select item, (all), it
   works correctly.
  
   My converter is like this:
  
   public final static String CONVERTER_ID =  myapp.Region;
   public Object getAsObject(FacesContext facesContext,
   UIComponent
   uiComponent, String string)
   throws ConverterException {
  
  return
  
 JSFUtils.getAppBackingBean().getRegionMap().get(Integer.parseInt
(string));
   }
  
   public String getAsString(FacesContext facesContext,
   UIComponent
   uiComponent, Object object)
   throws ConverterException {
   if (object == null) {
   return null;
   } else if (object instanceof Region) {
   final Region region = (Region) object;
   return region.getId

Re: [Solved] ERROR: Value is not a valid option

2007-02-26 Thread Kevin Galligan

Thanks for the quick replies.  I think that clears it up.

On 2/26/07, Mike Kienenberger [EMAIL PROTECTED] wrote:


Yes, that's how I would do it.  If you specify an itemValue, then that
value must be of the correct type.  Ie,   is not a containerType
(Srinivas) and 0 is not a region (Carl).

On 2/26/07, Kevin Galligan [EMAIL PROTECTED] wrote:
 I am using facelets.  Where would that function go?  Each f:selectItem
 entry?

 f:selectItem itemLabel=Website URL
 itemValue=#{myfn:convertStringToShort(3)}/




  On 2/26/07, Mike Kienenberger [EMAIL PROTECTED] wrote:
  Take a look at
 http://issues.apache.org/jira/browse/MYFACES-1328.   It
  looks like the RI does not have this convenience conversion.   I don't
  know what the spec says, but that'd be the place to get a definitive
  answer.
 
  If you're using facelets, as a temporary workaround you could create a
  convertStringToShort() function (or whatever conversion you're
  expecting to have happen automatically).
 
 
  On 2/26/07, Kevin Galligan [EMAIL PROTECTED] wrote:
   I did try that and didn't have any luck.  I think that was due to
the
 fact
   that I was using shorts rather than ints, but I'd have to try it
again
 now
   that I have a better understanding of everything involved.
  
I looked at TOMAHAWK-152 briefly.  I'll have to sit down and take a
 better
   look at it.  It looks to be in the realm.  The string value of
'true'
 not
   matching with a boolean type value?
  
   I guess the bottom line is I'd like to find out if I should be using
an
   explicit converter to go from String to Short, or if the JSF api
being
 used
   should be able to handle a simple[r] conversion like that.  It was
doing
   that conversion originally.  Does the JSF spec cover this?  Anybody
 happen
   to know what the reference implementation does?  I'd love to try it
out,
 but
   we're trying to push this out the door, so for the near future I
have to
   focus on what's right in front of me.
  
  
   On 2/26/07, Martin Grotzke  [EMAIL PROTECTED] wrote:
Does it work when you use itemValue=#{3} as workaround?
   
I also had the same problem with itemValue=true, what I think is
http://issues.apache.org/jira/browse/TOMAHAWK-152 ...
   
Cheers,
Martin
   
   
On Mon, 2007-02-26 at 11:23 -0500, Kevin Galligan wrote:
 I'm having the same problem.  I had some code that was working
for a
 long time with 1.1.5-SNAPSHOT, and now I'm getting that error.

 h:selectOneMenu
   value=#{shared$FavoriteDocumentAdd.documentTypeId}
 onchange=toggleInputRow() id=documentTypeSelect
 style=background-color:rgb(204,204,255)
 f:selectItem itemLabel=Website URL itemValue=3/
 f:selectItem itemLabel=File Upload itemValue=1/
 f:selectItem itemLabel=Description Only itemValue=2/
 /h:selectOneMenu

 The value being set is a short.  Essentially it looks like the
code
 was doing an automatic conversion before, but now chokes.

 I just reverted the code to 1.1.5-SNAPSHOT, and it works
again.  I'm
 going to try to take a quick look at the differences between
 UISelectOne.java between those two versions, but in practice
I've
 found with any large code base, it'll take a little time to
really
 understand the layout.

 On 2/26/07, CarlHowarth  [EMAIL PROTECTED] wrote:

 Hi,

 I am having this problem too. My select one is set up as
 follows:

 h:selectOneMenu id=regionList
 binding=#{Bean.regionListUI}
 value=#{ Bean.region} 
   f:converter converterId= myapp.Region/
   f:selectItem itemValue=0 itemLabel=(all)/
   t:selectItems var=r itemLabel=#{ r.name }
 itemValue=#{ r.idString}
 value=#{applicationBean.regionMap} /
   f:attribute name=fieldRef value=Region List/
 /h:selectOneMenu

 - This was working fine with 1.1.4 but since the upgrade
to
 1.1.5 it now
 falls over.
 - The application bean is at application scope, so the
 values
 should always
 be available.
 - The converter changes an ID to a region and vice
versa.
 - The page loads up fine, I only have the problem when I
 select a command
 button that runs an action listener.
 - I use a 't:saveState value=#{Bean_track}/' for my
 request-scoped bean.
 - The region bean implements a working 'equals' method.
 - If I select the manually populated select item, (all),
it
 works correctly.

 My converter is like this:

 public final static String CONVERTER_ID =  myapp.Region
;
 public Object getAsObject(FacesContext facesContext,
 UIComponent
 uiComponent, String string)
 throws

rendered

2007-02-20 Thread Kevin Gutch

I believe that the rendered attribute takes a boolean.

Is there anyway to do something like this to determine if a t:div gets 
rendered?


t: div rendered=#{bean.subCategory=='A'  ||  bean.subCategory=='B'}



--



smime.p7s
Description: S/MIME Cryptographic Signature


Re: rendered

2007-02-20 Thread Kevin Gutch

That was easy thanks!

Mike Kienenberger wrote:

t: div rendered=#{bean.subCategory=='A'  or  bean.subCategory=='B'}

On 2/20/07, Kevin Gutch [EMAIL PROTECTED] wrote:

I believe that the rendered attribute takes a boolean.

Is there anyway to do something like this to determine if a t:div gets
rendered?

t: div rendered=#{bean.subCategory=='A'  ||  bean.subCategory=='B'}



--







--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)




smime.p7s
Description: S/MIME Cryptographic Signature


JSF and Ajax combine issue

2007-02-14 Thread kevin wu
Are there mature JSF and Ajax combine technology in MyFaces or the other JSF
Implementations.



WAP components issue

2007-02-14 Thread kevin wu
Are there mature JSF WAP components in MyFaces or the other JSF implements?
Where can I find them?



multimedia components issue

2007-02-14 Thread kevin wu
Are there multimedia components in MyFaces or the other implements of JSF?
Such as Flash and video components.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-13 Thread Kevin Gutch

Not sure if this will work with

h:selectOneMenu 

  but you could try it this way. I have done this with a commandLink.

h:commandLink id=manufacturer_x
action=go_Test actionListener=#{testList.execute}
f:param name=queryTableParam value=ALL /
/h:commandLink

Inside bean.

public void execute(ActionEvent event) {
queryTable = (String) map.get(queryTableParam);
//then call  whatever you need to do
this.go();

}





Lisa wrote:
 I tried the following but could not get it to work:

   
 h:selectOneMenu id=areaCode value=#{areaCodeBean.areaCode}
 f:selectItems value=#{areaCodeBean.selectList}/
 f:param name=codeType value=US.AREA_CODES /
 /h:selectOneMenu

 And in the BB to retrieve the codeType I have the following method that is
 called:

 private String getCodeType()
 {
 String codeType = (String)FacesContext.getCurrentInstance()

 .getExternalContext().getRequestParameterMap().get(codeType);


 return codeType;
 }

 ---
 When I look at the value for codeType it is always null.  getCodeType is
 called by 

public ListSelectItem getSelectList() {
  // query from types table here and pass codeType (call to getCodeType()
 which uses faces context
 // to get a param set in the XHTML.
} 






 sahil wrote:
   
 you can use the f:param tag to pass a parameter in jsf.

 although I havent tried it in jsf, but i use it in jboss-seam. I think it
 will work.


 Lisa wrote:
 
 I want to build a SelectItem list by calling a method in my backing bean,
 but I want to be able to pass the backing bean a String (from the XHTML).


 ---
 This is what I currently have:

 h:selectOneListbox
 rendered=#{carBean.listMode}
 id=idSelectVehicleType
 value=#{carBean.vehicleType}
 size=1

 f:selectItems id=idCarBeanTypeList
 value=#{carBean.vehicleTypeList}/
 /h:selectOneListbox

 where vehicleTypeList is a method in CarBean.getVehicleTypeList()

 ---
 So I want to change the method signature to accept a String like so:

   CarBean.getVehicleTypeList(String s)

 and in the XHTML pass String s to CarBean.getVehicleTypeList(String s).

 Is this possible?
   value=#{carBean.vehicleTypeList(myString)}


 thanks


 Lisa

   
 

   



t:popup

2007-02-05 Thread Kevin Gutch

Hi,

I am trying to use multiple t:popup tags within the same page. I am also 
using Facelets. If I use one t:popup everything works fine. With 
several, however, I get a duplicate ID error. I have tried manually 
assigning ID's but  the error still seems to occur. I believe it has 
something to do with the f:facet name=popup / but I am not sure


Has anyone seen this behavior before?


-Kevin


t:popup

2007-02-05 Thread Kevin Gutch

Hi,

I am trying to use multiple t:popup tags within the same page. I am also 
using Facelets. If I use one t:popup everything works fine. With 
several, however, I get a duplicate ID error. I have tried manually 
assigning ID's but  the error still seems to occur. I believe it has 
something to do with the f:facet name=popup / but I am not sure


Has anyone seen this behavior before?


-Kevin



Re: ajax4jsf, checkbox, and reRender

2007-02-01 Thread Kevin Gutch
I had a similar issue with a4j:outputPanel. Try the ajaxRendered 
attribute. ajaxRendered =true


ajaxRendered= Defines, whether the content of this component must be (or 
not) included in AJAX response created by parent AJAX Container, even if 
it is not forced by reRender list of ajax action. Ignored if component 
marked to output by Ajax action. default false





Garner, Shawn wrote:


h:panelGroup

h:selectBooleanCheckbox id=enrollSchoolSecContDispCB 
value=#{enrollHandler.isSecondaryContactDisplayed}


a4j:support id=enableContactCBEvent event=onchange 
reRender=enrollSchoolSecContDispCB,secTechContPanel/


/h:selectBooleanCheckbox

h:outputText 
value=#{bundle['enroll.school.include.sec.cont.info.label']}/


/h:panelGroup

a4j:outputPanel id=secTechContPanel 
rendered=#{enrollHandler.isSecondaryContactDisplayed}


...couplde panelGrids

/a4j:outputPanel

I’ve tried it with different events and with and without the checkbox 
id in the reRender.


It never renders the contents of the outputPanel. I can’t tell that it 
does anything.


I tried adding an action to the support but it doesn’t call it either.

If I check the box and go to the next page and then return the 
outputPanelDisplays so I know they are mapped correctly.


Shawn



*From:* Adrian Mitev [mailto:[EMAIL PROTECTED]
*Sent:* Thursday, February 01, 2007 10:16 AM
*To:* MyFaces Discussion
*Subject:* Re: ajax4jsf, checkbox, and reRender

Whats your issue? Please paste your code.

2007/2/1, Garner, Shawn [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:


Has anyone had any problems getting a a4j:outputPanel to reRender when 
checking a checkbox?


I'm having such issues and need some help.

Shawn

 



This email may contain confidential
material. If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.

*** 



 



This email may contain confidential
material. If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.

*** 







Redirect tracker

2006-12-31 Thread Kevin Galligan

So, I saw some mention of the redirect tracker being in the wiki, but I
can't find the page.  Is it in there?


Spoofing commandLink

2006-12-13 Thread Kevin Galligan

I've been wondering something for a little while now.  Some of the crud
style links in my app use 'h:commandLink', with 't:updateActionListener' to
set the particular element id value for that page.  In days past I'd put the
id on the query string, so like ...

/app/DetailPage.do?itemId=1234

Now, obviously, you had to be careful because somebody could change the id
value manually.  With JSF, using t:updateActionListener, can somebody change
the id value sent?  If I'm 100% sure they couldn't, I could relax the access
checking a little.

Most of these links are in t:dataTable's, with preserveDataModel=true.  If
state is kept on the server, or encrypted on client (I think you can do
that, right?), do I have to worry about the user getting access to something
they shouldn't?

Thanks in advance,
-Kevin


Re: JSF is the answer? I don't think so...

2006-12-11 Thread Kevin Galligan

Second on that.  I was struggling with some of the concepts with the
commandLink and whatnot, and missing the days of struts where I'd just stick
an href with an id attached to the query string.  Then it was like somebody
slapped me in the face.  You can still do that, if you want to.  Its just
that, when you read a JSF book, they give you the examples with the new
components and not the plain old href's.  I'm trying to find the happy
medium, but I have found myself doing a mix as my first large app nears
completion.

On 12/11/06, Roger Keays [EMAIL PROTECTED] wrote:


Andrew Robinson wrote:
 Almost all of your issues relate to web pages that are information based
 instead of form based. If you are not submitting data, you should
 consider using all outputLinks instead of commandLinks. That way your
 pages will be bookmark-able and have the ability to open in a new
 window. If you must use commands on non-data data positing events, then
 use redirect set to true to make sure the URL of the browser is updated.

I think people coming to JSF get so swamped with lifecycles, validators,
converters etc that they forget you can always just put in an ordinary
a href=, or even a plain old form method=GET if you want.

Heck, just make all your pages static HTML and get the default servlet
to serve them.


 As for the browser back button, it has always worked for me in JSF with
 server side state saving and should work fine with client side state
 even better, what MyFaces version are you using?

 Double form submission: this is not a framework issue, it is a user one
 and an HTML one. There are many ways to fix this, like disabling the
 button on click, disabling the form after submit, a phase listener that
 counts submissions and skips the validation  update phases if a
 repeat post, etc.

 having multiple copies of a page/service in different browser
tabs/windows:
 This is not an issue, why is it for you? Just avoid session scope. Use
 request scope plus t:saveState or use the JBoss-Seam conversation
 state (which is per window).

 -Andrew

 On 12/10/06, *Adam Koprowski* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Hello,
   Approximately one year ago, together with my colleague, we had to
 make a decision what technology to use for the development in some
 project of ours. At the time, after quick investigation, we came up
 with the idea of using J2EE, that is EJB + JSF. Let alone the EJB
 but let me share with you some thoughts that I have about JSF after
 this year of work with it.
   Below you will find a mixture of features (that I would expect any
 decent web framework to support) and problems (that I would expect
 any decent framework to solve and let developer not worry about it).
 Here we go:
  -) use of browser back button,
  -) page bookmarking,
  -) double form submission (by double user click),
  -) opening link in new browser tab/window,
  -) having multiple copies of a page/service in different browser
 tabs/windows
   Now, correct me if I'm wrong, but I think all of the above pose
 some (lots of?) difficulties in JSF. And I know that some of those
 are not easy issues (like browser's back button) but personally I
 think this list is way too long...
   I don't really know any alternative web frameworks so I cannot
 compare but is it really that the developer has to deal with all of
 those issues on his own? Or are there frameworks where one does not
 need to worry about those irritating problems and can concentrate on
 real development... and JSF is just too immature to provide that? I
 know this is not a myfaces specific question but I decided to post
 this provocative question on this list as I'm curious about your
 opinion guys...
   Best wishes,
Adam Koprowski

 --
 =
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED], ICQ:
3204612
 http://www.win.tue.nl/~akoprows http://www.win.tue.nl/%7Eakoprows
 The difference between impossible and possible
 lies in determination (Tommy Lasorda)
 =




--

Ninth Avenue Software
p: +61 7 3137 1351 (UTC +10)
f: +61 7 3102 9141
w: http://www.ninthavenue.com.au
e: [EMAIL PROTECTED]





Re: tiny mce and ajax4jsf

2006-12-08 Thread Kevin Galligan

Its in the wiki.  Pretty simple, actually...

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

Just add the tiny mce code to your webapp, then on the page add the '
tinyMCE.init' function.  It wraps itself onto standard textarea's.


On 12/8/06, Alin Dosoniu [EMAIL PROTECTED] wrote:


 Hi,

I have a similar problem but using t:inputHtml control. When it is used
with ajax4jsf it does not work... the value from bean is not shown in the
control and if editing something into it and submit, the value does not get
to server.
Is there a tiny mce control in myfaces? Where can I find this control?
I will try to find such a triggerSave method for t:inputHtml.

Alin.

After you email I tried posting to ajax4jsf.  I'm not sure if it went
through.

However, I dug around the code for tinymce and figured out a way to do it,
which I'll share in case anybody has the same issue.

I figured the reason was that tinymce isn't actually modifying the
textarea's data when you edit it and might be attaching something to the
form's onsubmit event to save the value.  I'm not 100% of the mechanism, but
it appears to be something like that.

I added the following the ajax4jsf command button...

onclick=tinyMCE.triggerSave()

This appears to save the formatted value to the textarea, which is then
sent to server.  Now the formatted text shows up.

In case anybody with tinymce experience knows what triggerSave does, and
its a bad thing, please let me know.

-Kevin




tiny mce and ajax4jsf

2006-12-07 Thread Kevin Galligan

I'm using facelets and myfaces (1.1.5-SNAPSHOT).  I use the tiny mce editor
for formatted text.  Recently I tried adding ajax4jsf to certain pages.
This works great for plain textareas, but when the text area is a tiny mce
one, it doesn't work.

I know this is pretty specific, but I'm hoping somebody tried the same and
can get it to work.  Its not absolutely required, but I'd like to have the
formatted text and the ajax.

Thanks in advance,
-kevin


Re: tiny mce and ajax4jsf

2006-12-07 Thread Kevin Galligan

After you email I tried posting to ajax4jsf.  I'm not sure if it went
through.

However, I dug around the code for tinymce and figured out a way to do it,
which I'll share in case anybody has the same issue.

I figured the reason was that tinymce isn't actually modifying the
textarea's data when you edit it and might be attaching something to the
form's onsubmit event to save the value.  I'm not 100% of the mechanism, but
it appears to be something like that.

I added the following the ajax4jsf command button...

onclick=tinyMCE.triggerSave()

This appears to save the formatted value to the textarea, which is then sent
to server.  Now the formatted text shows up.

In case anybody with tinymce experience knows what triggerSave does, and its
a bad thing, please let me know.

-Kevin

On 12/7/06, Jeff Bischoff [EMAIL PROTECTED] wrote:


Kevin,

You might try asking this on the Ajax4jsf mailing list or the tinymce
forum... unless you already sent it to the ajax list, and I just haven't
gotten it yet? :)

Regards,

Jeff Bischoff
Kenneth L Kurz  Associates, Inc.

Kevin Galligan wrote:
 I'm using facelets and myfaces (1.1.5-SNAPSHOT).  I use the tiny mce
editor
 for formatted text.  Recently I tried adding ajax4jsf to certain pages.
 This works great for plain textareas, but when the text area is a tiny
mce
 one, it doesn't work.

 I know this is pretty specific, but I'm hoping somebody tried the same
and
 can get it to work.  Its not absolutely required, but I'd like to have
the
 formatted text and the ajax.

 Thanks in advance,
 -kevin






Re: extend HtmlJSCookMenuRenderer...

2006-10-27 Thread Kevin Galligan
Party starts at 10:30 and then keeps going..HK - 523 Ninth Ave (at 39th St. )I'd say 65% or more. Could be a lot more, but as people are older now, its possible that they won't bother.
On 10/27/06, Jorge Vásquez [EMAIL PROTECTED] wrote:













Regards to all,

I need to overwrite the rendering behaviour of HtmlJSCookMenuRenderer
and after looking at the source code I have a line that is causing me trouble:




 FormInfo parentFormInfo =
RendererUtils.findNestingForm(component, context);



I am kind of lost here ´cause I am getting the error
here that this method isn´t defined by RenderUtils. (being org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils).
Therefore I am totally confused, in the first place how is this working if this
method isn´t defined anywhere?. I am using tomahawk-1.1.5-SNAPSHOT.jar and I
downloaded the source files for this same distribution and I haven´t found this
method. 



Any ideas on what is happening here?



Thanks,

JV










Re: extend HtmlJSCookMenuRenderer...

2006-10-27 Thread Kevin Galligan
Deeply sorry. Fumbled the gmail.On 10/27/06, Kevin Galligan [EMAIL PROTECTED] wrote:
Party starts at 10:30 and then keeps going..HK - 523 Ninth Ave (at 39th St. )I'd say 65% or more. Could be a lot more, but as people are older now, its possible that they won't bother.
On 10/27/06, Jorge Vásquez 
[EMAIL PROTECTED] wrote:













Regards to all,

I need to overwrite the rendering behaviour of HtmlJSCookMenuRenderer
and after looking at the source code I have a line that is causing me trouble:




 FormInfo parentFormInfo =
RendererUtils.findNestingForm(component, context);



I am kind of lost here ´cause I am getting the error
here that this method isn´t defined by RenderUtils. (being org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils).
Therefore I am totally confused, in the first place how is this working if this
method isn´t defined anywhere?. I am using tomahawk-1.1.5-SNAPSHOT.jar and I
downloaded the source files for this same distribution and I haven´t found this
method. 



Any ideas on what is happening here?



Thanks,

JV












Re: How to respect / limit number of simultanously javascript popups allowed

2006-10-17 Thread Kevin Galligan
I'd suggest doing this (if absolutely necessary, because it seems clunky) in your _javascript_ code on the front end. Why? Browsers tend to allow popups for a site if they are triggered by a user event (button click, for example) rather than when the page opens (porn ad).
In the onclick, have a funciton that keeps count. When you have your max, just pop up an alert box (rather than another window).When the user closes a window, in the 'onunload', call opener.[your js function]. You might have to call '
opener.document.[your js function]'. One of them will work. Anyway, in this function, just free up one of the windows.I'd second the div suggestion, or you could open a single long window with these values side by side, if you want to compare them.
Have a page refresh and non-event popups is asking for headaches.On 10/17/06, David Delbecq [EMAIL PROTECTED]
 wrote:Rønnevik a écrit : Hi!Hi Does anybody see another/a better way of handling this? How to respect a popup limit? Any ideas / new approaches would have been appreciated. I've been thinking of having a global array in _javascript_ that holds the handlers to the popup-windows, and then somehow manage the rendering based on the size of this array, but the problem is that when I refresh the parent page this array is reset as well, so I cannot go down that path.
Couldn't you do one of those simpler solutions?1) don't care about number of popups (fast, easy, but sometimes theclient want ... strange specifications like popup limitations)2) Have your application cycle amongst popup names (popup-1, popup-2,
...), this way, when you click, you just select the next name. No needto handle popups states in hashmap and play with onload. If popup wasclosed, it will be reopen, else, it will have the new content)3) Handle you popup as draggable DIV inside main window. This is a bit
of work and might not meet gui requirements, but at least the only wayuser can close the DIV is clicking the [X] button. Regards, Eivind



Re: After refresh page is again form is again getting submitted

2006-10-12 Thread Kevin Galligan
RedirectTracker in the sandbox.http://issues.apache.org/jira/browse/TOMAHAWK-503Solved.On 10/12/06, 
Chandra Sekhar [EMAIL PROTECTED] wrote:
Hi, Can you please solve my problem of restricting the page to resubmitafter the refresh button is clicked.Regards,Chandra Sekhar S.V.R.


Re: Tomahawk 1.1.3 datatable row selection returns previous row

2006-10-11 Thread Kevin Galligan
Code please.On 10/11/06, Sajja, Vinod K (Vinod) [EMAIL PROTECTED] wrote:
We are trying to migrate from MyFaces/Tomahawk 1.1.1 to 1.1.4 andencountered a problem with row selection in the datatable component.Selecting a row returns the previous row information instead of thecurrent selection.
Is there an issue related to this problem with Tomahawk 1.1.4 ?Can any throw some light on this ?Thanks,Vinod


Re: t:savestate.. component binding serializable problem

2006-10-06 Thread Kevin Galligan

You could do the following:

1) Mark the bound reference 'transient'.  It won't be serialized.

2) Manually implement the Serialize methods.

3) Implement the 'StateHolder' interface, which is similar to #2,
except closely tied to JSF/Myfaces.  For this to work, you need a
recent tomcat source build as it was fixed not too long ago.

4) Change your design to not run 'saveState' on the whole bean (I have
no idea how your app is designed, so might not be viable).

Personally I'm going to start using #3 when needed, but my app is set
up to deal with mostly singular id values, so I generally use
'saveState' on just those values specifically rather than the whole
bean, and so I tend to avoid these issues.

Friends don't let friends use the session to store request level data.

On 10/6/06, CarlHowarth [EMAIL PROTECTED] wrote:


Hi,

I have an app that uses the tomahawk savestate component to save the state
of the backing bean. I have just tried bind a selectonemenu component to the
backing bean however as the HtmlSelectOneMenu class is not serializable I
get an error as this can not be saved.

If I change to session scope, removing the savestate component the app
works, however I do not want the bean to be stored at session level. Has
anyone had this problem/got a work-around?

Many thanks, Carl
--
View this message in context: 
http://www.nabble.com/%3Ct%3Asavestate..-component-binding-serializable-problem-tf2394756.html#a6677044
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: Help!! - html problems in jsf

2006-10-05 Thread Kevin Galligan

Absolute path doesn't matter.  Dave is right.  If you have your css
files under a protected path, you can't access them until you log in.

Here are a few suggestions.

In your security descriptor, use file extension matching rather than
path.  Then, just don't match against 'css', 'jpg', and 'gif' files
(or 'png', 'jpeg', etc).  If you don't match these file extensions,
you should be able to access them.

If you use path matching, specify the *other* paths in your app.

As for the css, if you pull your login page through the jsp compilier,
you do a hard include of the css file..

style
%@ include file=/somepath/your.css%
/style

On 10/5/06, Tom Innes [EMAIL PROTECTED] wrote:

Try

href=#{facesContext.externalContext.requestContextPath}/pages/css/styles.cs

This makes an absolute path to your style sheet.

Tom

-Original Message-
From: Brian Ehmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 04, 2006 10:42 PM
To: MyFaces Discussion
Subject: Help!! - html problems in jsf

I have a myfaces app that is going to the testers on monday and I
just ran into a snag, so ANY help would be much appreciated.

The app works great for all of the *.jsp pages.  However I am using
container managed authentication on tomcat.  When the user tries to
access any page before they are authenticated, they are forwarded to
a login.html page.  The login functionality on the page works great,
however I can not get any of the images on that page to render and
the page does not find the css stylesheet.  (this is what I get for
putting the eye-candy off until the last minute).

This is my first myfaces app so I've pretty much followed the
architecture in the Core JSF (by sun) and Java Server Faces (by
oreilly).

Does anyone have any ideas?  I can send code and overall design if
needed but I can't figure out what I am missing here.

Thanks,

Brian




Re: Tree2

2006-10-04 Thread Kevin Galligan

Not sure about the whole dyamic rendering thing, but I also noticed
that the html was huge.  Any thoughts about that?  That was on the
list of things to look at and see if there was possibly a way to cut
that down.

On 10/4/06, Martin Marinschek [EMAIL PROTECTED] wrote:

Hi *,

I'm reviewing the tree2 currently, and I was wondering if we could
have a discussion about some of the concepts.

First thing I'd like to discuss is what happens with selected nodes.
Currently, selecting a node fires an action-listener. This is somewhat
ok, but I believe the selection-model of a tree should rather be a
list of values, stored at a useful place. Therefore, the tree should
implement the EditableValueHolder-interface, then we could do a lot
more with the values of the tree as well.

The change would necessitate to move the current value attribute to
some other name - I suppose the name model would be more appropriate
anyways (I've never understood why a dataTable has a
value-attribute, by the way, the semantics for the value-attribute
are generally quite different).

Additionally, the tree is doing a lot with respect to the markup of
the component. I'm not sure if this is useful as very large HTML-bases
result from this. I suspect it would be better to only transfer the
data-model to the client (and maybe templates for each node-type), and
then render the nodes on the client dynamically.

Thoughts?

regards,

Martin

--

http://www.irian.at

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

Professional Support for Apache MyFaces



Re: Corporate Open Source Strategy

2006-10-04 Thread Kevin Galligan

In my personal experience, commercial support sounds nice, but you're
more likely to run into resistance and denail.  No offense to BEA, but
we had to figure out all sorts of problems with their app server and
workflow product, and then convince them of their problems, and
essentially code around them, in proudction no less.

There were times I would've begged to have been on an open source
platform.  I don't think non-tech corporate people understand the
concept.

Commercial support for myfaces doesn't seem like too bad of an idea.

On 10/4/06, Mike Kienenberger [EMAIL PROTECTED] wrote:

The best way to fix a showstopper in open source is to do it yourself
and submit a patch back to the project :-)

If you are asking if your local changes have to be submitted back to
ASF, the answer is no.

If you are asking what guaranteed support services are provided
directly by ASF, the answer is none.   The project (and community
support) is provided on a voluntary basis.

http://www.irian.at/ is one possibility for obtaining commercial
support for JSF and MyFaces if that's something you want to purchase.
 A number of the MyFaces committers appear to do work for irian.at.

There is currently no process in place for fixing bugs on older
release branches, although I'm hopeful that we will start doing so
from 1.1.4 onward.


On 10/4/06, Ryan Wynn [EMAIL PROTECTED] wrote:
 Trying to get approval for a myfaces-shale stack in a corporate
 environment and facing the question of what is the strategy for fixing
 a production showstopper in the open source code.  Anyone have any
 recommendations on this topic?  Or any links regarding the topic?

 Filing through JIRA does not seem to be an answer for these
 emergencies because there is really no guarantee there?  Especially
 for previous versions.

 What is the protocol if say myfaces-1.1.1 src is modified?  Is the
 requirement the same that the fix needs to be looped back in?  Or is
 the policy different for older versions?

 Thanks for the consideration.




Re: Corporate Open Source Strategy

2006-10-04 Thread Kevin Galligan

I wouldn't agree with the Right from the get go plan.  I mean, if
you were REALLY concerned you could, but its more work than its worth.
You might want to note from what revision (hopefully subversion,
which makes life significantly easier IMHO) your build came from in
case you do need to build from source.

I think it also depends on how heavily trafficed the code is.
Myfaces?  I wouldn't worry about it so much.

I'd just build when disaster struck.  If we're comparing to commercial
black box software, even if you have to get the source and set up
the build, you're probably better off.  Imagine how long it would take
to explain to the commercial company your problem, convince them its
their problem, get them to grab their own branched version of source
(assuming, of course, they can), set up a test case, fix, build,
package, send you the final output, and you still really should do
some form of testing on it.  Hmm.  Sounds awesome.

To drag BEA back through the mud, we had several days of production
being down because of issues with their workflow product, and to be
honest, we just ran profilers or decompiled (in violation of the EULA)
to figure out the problems.  I mean, sometimes we'd try to get them to
look at things, but generally the problems were so buried and specific
that explaining it would've taken more effort than figuring it out
ourselves.  I'm not saying BEA is bad.  Just that having them try to
fix your issue remotely is like building a ship in a bottle.

On 10/4/06, Ryan Wynn [EMAIL PROTECTED] wrote:

I guess the tricky part is when do you build from source?  Right from
the get go or when something bad happens.

I think it's nice to build the vanilla source from go so that you
don't have to worry about integrating anything into a build on the day
disaster strikes.  But then you get into the business of building lots
of things you really don't need to.


On 10/4/06, Kevin Galligan [EMAIL PROTECTED] wrote:
 In my personal experience, commercial support sounds nice, but you're
 more likely to run into resistance and denail.  No offense to BEA, but
 we had to figure out all sorts of problems with their app server and
 workflow product, and then convince them of their problems, and
 essentially code around them, in proudction no less.

 There were times I would've begged to have been on an open source
 platform.  I don't think non-tech corporate people understand the
 concept.

 Commercial support for myfaces doesn't seem like too bad of an idea.

 On 10/4/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
  The best way to fix a showstopper in open source is to do it yourself
  and submit a patch back to the project :-)
 
  If you are asking if your local changes have to be submitted back to
  ASF, the answer is no.
 
  If you are asking what guaranteed support services are provided
  directly by ASF, the answer is none.   The project (and community
  support) is provided on a voluntary basis.
 
  http://www.irian.at/ is one possibility for obtaining commercial
  support for JSF and MyFaces if that's something you want to purchase.
   A number of the MyFaces committers appear to do work for irian.at.
 
  There is currently no process in place for fixing bugs on older
  release branches, although I'm hopeful that we will start doing so
  from 1.1.4 onward.
 
 
  On 10/4/06, Ryan Wynn [EMAIL PROTECTED] wrote:
   Trying to get approval for a myfaces-shale stack in a corporate
   environment and facing the question of what is the strategy for fixing
   a production showstopper in the open source code.  Anyone have any
   recommendations on this topic?  Or any links regarding the topic?
  
   Filing through JIRA does not seem to be an answer for these
   emergencies because there is really no guarantee there?  Especially
   for previous versions.
  
   What is the protocol if say myfaces-1.1.1 src is modified?  Is the
   requirement the same that the fix needs to be looped back in?  Or is
   the policy different for older versions?
  
   Thanks for the consideration.
  
 




forEach accesses 'items' collection multiple times

2006-10-03 Thread Kevin Galligan

I'm using the 'forEach' tag in a page.  When I ran a debugger against
my code, it looks like the forEach is grabbing the collection in the
'items' attribute each time it runs through the loop.  I'd think it
would only do this once.  Here's the code...

c:forEach items=#{sharedPortalsSpecialtySponsorProgramMixer.sponsorProducts}
var=sponsorProduct
tr
td style=border-bottom: 0px
h:outputText value=#{sponsorProduct.title}/
/td
/tr
/c:forEach

Each row in 'sponsorProducts' causes a call to grab the whole list.
If I take the 'h:outputText' out of the cell and just dump out some
regular text (ie. don't access the 'sponsorProduct'), it only grabs
the list once.

Facelets version '1.1.11'.  I can make this work by caching the list
rather than having it hit the db each time, but it seems really odd.
Like I have something configured wrong.

Thanks in advance,
-Kevin


Facelets and JSP editors/Bea Studio tool

2006-10-02 Thread Kevin Galligan

If anybody uses a JSP editor for their JSF development but wants to
use Facelets for the view technology, I've coded something that
*might* be useful.

I personally use Bea's (formerly M7's) JSP/JSF editor eclipse plugin.
Love it.  It doesn't support Facelets.  Since Facelets is so close to
JSP syntax, having a process convert the files during the build
process seemed like a reasonable approach.

http://www.bigheadco.com/jsptofacelets

It includes a maven plugin for converting the files during the build,
as well as an eclipse plugin that will convert files when saved.  If
you're an ant user, you can get the source from sourceforge and add an
ant target.  Better yet, I can set you up on the sourceforge project
and you can contribute.

In order to get the eclipse plugin to work, I added a more general
maven war builder eclipse plugin.  It essentially copies war project
output to the exploded directory when saved in eclipse (as opposed to
running the maven war plugin on each edit).

http://www.bigheadco.com/warplugineclipsebuilder

This should work with other JSP editors.  I've personally only used
the Bea one.  Well, and Exadel, but exadel has support for Facelets
built in, so its kind of pointless, right?

Comments welcome.

-Kevin


Re: commandLink and back button

2006-09-29 Thread Kevin Galligan
I use facelets. Haven't had any trouble.Unless there's a bug, there really shouldn't be any difference. But if its working now...On 9/29/06, Chris Pro
 [EMAIL PROTECTED] wrote:I don't know exactly!
But it looks like that the UI-Tree wasn't rebuild correctly (after back button) with set that parameter to false. After changed parameter to true, the back button is working like expected!
I have to say, that I use Facelets for the view. Maybe there was an issue? Original-Nachricht Datum: Thu, 28 Sep 2006 18:50:24 -0400Von: Kevin Galligan 
[EMAIL PROTECTED]An: MyFaces Discussion users@myfaces.apache.orgBetreff: Re: commandLink and back button How would SERIALIZE_STATE_IN_SESSION help?
 On 9/28/06, Chris Pro [EMAIL PROTECTED] wrote:   Thanks for the reply!   I've just found the solution. I changed the SERIALIZE_STATE_IN_SESSION
 to  true. Before I got that parameter to false. However, it's working  now.In addition I set the bean scope to request and use therefore  saveState in the page. And because of I reload the data from the
 database  on each each request I only need one View in the Session.   context-param  param-namejavax.faces.STATE_SAVING_METHOD
/param-name  param-valueserver/param-value  /context-param  !-- disable compression of state in server --  context-param
  param-nameorg.apache.myfaces.COMPRESS_STATE_IN_SESSION  /param-name  param-valuetrue/param-value  /context-param
  !-- Very important, too, is to disable the serialization of  state,  serialization and deserialization of the component tree is a  major performance hit. --
  context-param  param-nameorg.apache.myfaces.SERIALIZE_STATE_IN_SESSION  /param-name  param-valuetrue/param-value
  /context-param  !-- If you find that memory is a constraining factor, then  reducing the number of views stored in the session might help --  context-param
  param-nameorg.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION  /param-name  param-value1/param-value  /context-param
 Original-Nachricht   Datum: Wed, 27 Sep 2006 11:20:35 -0400  Von: Kevin Galligan 
[EMAIL PROTECTED]  An: MyFaces Discussion users@myfaces.apache.org  Betreff: Re: commandLink and back button 
   I think the problem has more to do with the managed bean hanging out in   the   session.In my personal experience, since the session was first   invented,
   way before JSF came around, the session has been a horrible place to put   anything except the user's login info.If you're keeping state on the   server, it will hold onto many sequential view states, even for the
 same   page.If you're going to need a lot, consider bumping up the '   org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION' value. state #1 - with command link A
   state #2 - without I'm guessing you've got a situation where the managed bean is in state  #2,   but you're clicking command link A from a page that looks like its in
   state   #1.If things are set up correctly and you're using a recent myfaces   build,   I *believe* the JSF view will be in the correct state, but I'm sure
 your   managed bean is in a bad way because its a session variable. I would suggest the following as a possible solution.Call t:saveState   and
   keep your bean in the request scope.You can explicitly control your   bean's   state... 
http://myfaces.apache.org/tomahawk/uiSaveState.html Somewhere it states you can also implement StateHolder interface to   explicitly control state for the whole bean instead of simply
  implementing   serializable.However, I think currently you'd need to build tomahawk  by   hand as the fix for this was very recent. I do remember the view state on the server being pretty brittle with
 the   back button when I started with JSF, and i used client state for a long   time.However, it seems to be handled better now.Make sure you have a   recent version.
 On 9/27/06, Jeff Bischoff [EMAIL PROTECTED] wrote:   I don't think that what you are trying to do with the browser back
button is supported through server-side state saving and session  beans.The problem you are having actually sounds like the correct  behaviour
for these settings. You may consider client-side state, t:saveState,  orsome other approach. These links may get you started:   [1] 
http://wiki.apache.org/myfaces/How_JSF_State_Management_Works[2] http://wiki.apache.org/myfaces/SaveState
[3]  
http://bugs.sakaiproject.org/confluence/pages/viewpage.action?pageId=4981showComments=true   Regards,   Jeff BischoffKenneth L Kurz  Associates, Inc.
   Chris Pro wrote: Hi I've got a problem with the browser back button. The 
detai.jsf got several commandLinks. One of them is showing detai.jsf again, with another product. In some case the commandLink Aisn't rendered. If
 the back button is pressed, the page before with the commandLink isshown. But when I click on that commandLink the action is not invoked? I've got the same problem

Re: commandLink and back button

2006-09-28 Thread Kevin Galligan
How would SERIALIZE_STATE_IN_SESSION help?On 9/28/06, Chris Pro [EMAIL PROTECTED] wrote:
Thanks for the reply!I've just found the solution. I changed the SERIALIZE_STATE_IN_SESSION to true. Before I got that parameter to false. However, it's working now.In addition I set the bean scope to request and use therefore saveState in the page. And because of I reload the data from the database on each each request I only need one View in the Session.
context-paramparam-namejavax.faces.STATE_SAVING_METHOD/param-nameparam-valueserver/param-value/context-param
!-- disable compression of state in server --context-paramparam-nameorg.apache.myfaces.COMPRESS_STATE_IN_SESSION/param-nameparam-valuetrue/param-value
/context-param!-- Very important, too, is to disable the serialization of state,serialization and deserialization of the component tree is a major performance hit. --
context-paramparam-nameorg.apache.myfaces.SERIALIZE_STATE_IN_SESSION/param-nameparam-valuetrue/param-value/context-param
!-- If you find that memory is a constraining factor, then reducing the number of views stored in the session might help --context-paramparam-nameorg.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
/param-nameparam-value1/param-value/context-param Original-Nachricht Datum: Wed, 27 Sep 2006 11:20:35 -0400Von: Kevin Galligan 
[EMAIL PROTECTED]An: MyFaces Discussion users@myfaces.apache.orgBetreff: Re: commandLink and back button
 I think the problem has more to do with the managed bean hanging out in the session.In my personal experience, since the session was first invented, way before JSF came around, the session has been a horrible place to put
 anything except the user's login info.If you're keeping state on the server, it will hold onto many sequential view states, even for the same page.If you're going to need a lot, consider bumping up the '
 org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION' value. state #1 - with command link A state #2 - without I'm guessing you've got a situation where the managed bean is in state #2,
 but you're clicking command link A from a page that looks like its in state #1.If things are set up correctly and you're using a recent myfaces build, I *believe* the JSF view will be in the correct state, but I'm sure your
 managed bean is in a bad way because its a session variable. I would suggest the following as a possible solution.Call t:saveState and keep your bean in the request scope.You can explicitly control your
 bean's state... http://myfaces.apache.org/tomahawk/uiSaveState.html Somewhere it states you can also implement StateHolder interface to
 explicitly control state for the whole bean instead of simply implementing serializable.However, I think currently you'd need to build tomahawk by hand as the fix for this was very recent.
 I do remember the view state on the server being pretty brittle with the back button when I started with JSF, and i used client state for a long time.However, it seems to be handled better now.Make sure you have a
 recent version. On 9/27/06, Jeff Bischoff [EMAIL PROTECTED] wrote:   I don't think that what you are trying to do with the browser back
  button is supported through server-side state saving and session beans.  The problem you are having actually sounds like the correct behaviour  for these settings. You may consider client-side state, t:saveState, or
  some other approach. These links may get you started:   [1] http://wiki.apache.org/myfaces/How_JSF_State_Management_Works
  [2] http://wiki.apache.org/myfaces/SaveState  [3]   
http://bugs.sakaiproject.org/confluence/pages/viewpage.action?pageId=4981showComments=true   Regards,   Jeff Bischoff  Kenneth L Kurz  Associates, Inc.
   Chris Pro wrote:   Hi I've got a problem with the browser back button.   The detai.jsf got several commandLinks. One of them is showing 
  detai.jsf again, with another product. In some case the commandLink A  isn't rendered. If   the back button is pressed, the page before with the commandLink is  shown. But when I click on that commandLink the action is not invoked?
   I've got the same problem with the dataTable. There I was able to  eliminate that back button problem with preserveDataModel=true. But for a  normal   commandLink (t:commandLink or h:commandLink) there isn't a method like
  that, or? In other words:   1. detail.jsf (with commandLink A) - detail.jsf (without commandLink A)   2. backButton to the first 
detail.jsf (with commandLink A)   3. Click on commandLink A - nothing happens. It looks like the action  is disappeared!? Some more information:   -STATE_SAVING_METHOD = Server
   -Managed-Bean = Session   Could some please give me a hint to resolve that problem? Thanks a lot! 
  --Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



Re: Tomahawk t:datatable detail row

2006-09-27 Thread Kevin Galligan
What's a 'detail row feature' supposed to do?On 9/27/06, Aneesha Govil [EMAIL PROTECTED] wrote:
Hi,I want to know more about the detail row feature in tomahawk. I cannot find appropriate documentation/samples. In fact the feature isn't even listed on the wiki (

http://wiki.apache.org/myfaces/Extended_Data_Table) or the tomahawk page (http://myfaces.apache.org/tomahawk/extDataTable.html
). Does this feature even exist or is it just in my imagination?
If it does exist, please point me to demos/samples/documentation or anything!Thanks,Aneesha




Re: commandLink and back button

2006-09-27 Thread Kevin Galligan
I think the problem has more to do with the managed bean hanging out in the session. In my personal experience, since the session was first invented, way before JSF came around, the session has been a horrible place to put anything except the user's login info. If you're keeping state on the server, it will hold onto many sequential view states, even for the same page. If you're going to need a lot, consider bumping up the '
org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION' value.state #1 - with command link Astate #2 - withoutI'm guessing you've got a situation where the managed bean is in state #2, but you're clicking command link A from a page that looks like its in state #1. If things are set up correctly and you're using a recent myfaces build, I *believe* the JSF view will be in the correct state, but I'm sure your managed bean is in a bad way because its a session variable.
I would suggest the following as a possible solution. Call t:saveState and keep your bean in the request scope. You can explicitly control your bean's state...
http://myfaces.apache.org/tomahawk/uiSaveState.htmlSomewhere it states you can also implement StateHolder interface to explicitly control state for the whole bean instead of simply implementing serializable. However, I think currently you'd need to build tomahawk by hand as the fix for this was very recent.
I do remember the view state on the server being pretty brittle with the back button when I started with JSF, and i used client state for a long time. However, it seems to be handled better now. Make sure you have a recent version.
On 9/27/06, Jeff Bischoff [EMAIL PROTECTED] wrote:
I don't think that what you are trying to do with the browser backbutton is supported through server-side state saving and session beans.The problem you are having actually sounds like the correct behaviour
for these settings. You may consider client-side state, t:saveState, orsome other approach. These links may get you started:[1] http://wiki.apache.org/myfaces/How_JSF_State_Management_Works
[2] http://wiki.apache.org/myfaces/SaveState[3]
http://bugs.sakaiproject.org/confluence/pages/viewpage.action?pageId=4981showComments=trueRegards,Jeff BischoffKenneth L Kurz  Associates, Inc.Chris Pro wrote: Hi
 I've got a problem with the browser back button. The detai.jsf got several commandLinks. One of them is showing detai.jsf again, with another product. In some case the commandLink A isn't rendered. If
 the back button is pressed, the page before with the commandLink is shown. But when I click on that commandLink the action is not invoked? I've got the same problem with the dataTable. There I was able to eliminate that back button problem with preserveDataModel=true. But for a normal
 commandLink (t:commandLink or h:commandLink) there isn't a method like that, or? In other words: 1. detail.jsf (with commandLink A) - detail.jsf (without commandLink A) 2. backButton to the first 
detail.jsf (with commandLink A) 3. Click on commandLink A - nothing happens. It looks like the action is disappeared!? Some more information: -STATE_SAVING_METHOD = Server -Managed-Bean = Session
 Could some please give me a hint to resolve that problem? Thanks a lot!


Re: MyFaces/Tomahawk Redirect Tracker - can you turn it off?

2006-09-17 Thread Kevin Galligan
Hey. I put a patch up for redirecttracker. Essentially, you need to explicitly enable redirecttracker for a request by way of a static util method rather than have it on by default.It also allows you to enable only messages, or the full set of beans.
See bug...http://issues.apache.org/jira/browse/TOMAHAWK-503On 9/15/06, Mike Kienenberger
 [EMAIL PROTECTED] wrote:Sorry, I lost internet access right after I sent a response, but
before I had a chance to update the issue.I've put in what I think will work as a workaround (although I haven'ttested it).On 9/15/06, Richard Koch [EMAIL PROTECTED]
 wrote: Thanks for this information/link.The bug conversation implies that you can disable the RedirectTracker but doesn't say how. Can anyone tell me if there is an archive that I can get earlier sandbox jar
 files (preferably one without this RedirectTracker feature/bug in it)? If not I guess I will have to rip out the url validation (which I would prefer not to do). Thanks.
 Rich -Original Message- From: Mike Kienenberger [mailto:[EMAIL PROTECTED]] Sent: Friday, September 15, 2006 10:26 AM To: MyFaces Discussion; 
[EMAIL PROTECTED] Subject: Re: MyFaces/Tomahawk Redirect Tracker - can you turn it off? http://issues.apache.org/jira/browse/TOMAHAWK-672
 On 9/15/06, Richard Koch [EMAIL PROTECTED] wrote:  We are using Sun's RI for our application.I recently integrated Tomahawk
  and commons validators into our application so we can get file upload  functionality easily implemented along with email and url validation.To  get url validation I had to include the sandbox jar too.
 For file upload I:   Configured the use of the ExtensionsFilter in the web.xml  Using t:inputFileUpload./ tag in the jsp page
   For validation I am using the following tags in our JSP:   t:validateEmail ./  s:validateUrl ./
 I am also using the  org.apache.commons.validator.GenericValidator directly to  validate email in our api in a couple of places. 
Everything seemed great then during testing we noticed that ?_rtid=  started being appended to some of the URLs as we navigate through the site  and causing us problems/conflicts.
 I found some other people asking about _rtid in the apache archives and  found the Redirect Tracker functionality somewhat documented here: 
  http://www.mail-archive.com/dev@myfaces.apache.org/msg16831.html I don't want this redirect tracker functionality mixed in with what we
  already have in place with the RI, but I have not been able to find out if  you can turn this off or not. -Can you turn the redirect tracker off in a config file somewhere?
   Can anyone explain to me if redirect tracking started happening because of  the use of file upload, the jsp tags, the direct use of the  GenericValidator, or because I am using any tomahawk and validator
  functionality at all? Any help would be appreciated. Thanks.   
  Rich


Re: MyFaces/Tomahawk Redirect Tracker - can you turn it off?

2006-09-17 Thread Kevin Galligan
Used the wrong email. Anyway...I put a patch up for redirecttracker. Essentially, you need to
explicitly enable redirecttracker for a request by way of a static util
method rather than have it on by default.It also allows you to enable only messages, or the full set of beans.
See bug...http://issues.apache.org/jira/browse/TOMAHAWK-503
On 9/17/06, Kevin Galligan [EMAIL PROTECTED] wrote:
Hey. I put a patch up for redirecttracker. Essentially, you need to explicitly enable redirecttracker for a request by way of a static util method rather than have it on by default.It also allows you to enable only messages, or the full set of beans.
See bug...http://issues.apache.org/jira/browse/TOMAHAWK-503
On 9/15/06, Mike Kienenberger
 [EMAIL PROTECTED] wrote:
Sorry, I lost internet access right after I sent a response, but
before I had a chance to update the issue.I've put in what I think will work as a workaround (although I haven'ttested it).On 9/15/06, Richard Koch 
[EMAIL PROTECTED]
 wrote: Thanks for this information/link.The bug conversation implies that you can disable the RedirectTracker but doesn't say how. Can anyone tell me if there is an archive that I can get earlier sandbox jar
 files (preferably one without this RedirectTracker feature/bug in it)? If not I guess I will have to rip out the url validation (which I would prefer not to do). Thanks.

 Rich -Original Message- From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
] Sent: Friday, September 15, 2006 10:26 AM To: MyFaces Discussion; 
[EMAIL PROTECTED] Subject: Re: MyFaces/Tomahawk Redirect Tracker - can you turn it off? 
http://issues.apache.org/jira/browse/TOMAHAWK-672
 On 9/15/06, Richard Koch [EMAIL PROTECTED] wrote:  
We are using Sun's RI for our application.I recently integrated Tomahawk
  and commons validators into our application so we can get file upload  functionality easily implemented along with email and url validation.To  get url validation I had to include the sandbox jar too.
 For file upload I:   Configured the use of the ExtensionsFilter in the web.xml  Using t:inputFileUpload./ tag in the jsp page
   For validation I am using the following tags in our JSP:   t:validateEmail ./  s:validateUrl ./
 I am also using the  org.apache.commons.validator.GenericValidator directly to  validate email in our api in a couple of places. 

Everything seemed great then during testing we noticed that ?_rtid=  started being appended to some of the URLs as we navigate through the site  and causing us problems/conflicts.
 I found some other people asking about _rtid in the apache archives and  found the Redirect Tracker functionality somewhat documented here: 

  http://www.mail-archive.com/dev@myfaces.apache.org/msg16831.html
 I don't want this redirect tracker functionality mixed in with what we
  already have in place with the RI, but I have not been able to find out if  you can turn this off or not. -Can you turn the redirect tracker off in a config file somewhere?
   Can anyone explain to me if redirect tracking started happening because of  the use of file upload, the jsp tags, the direct use of the  GenericValidator, or because I am using any tomahawk and validator
  functionality at all? Any help would be appreciated. Thanks.   

  Rich




Re: Preserve Data Model

2006-09-01 Thread Kevin Galligan
Please post bean code.On 9/1/06, Gary1977 [EMAIL PROTECTED] wrote:
Here is the problem, I have a screen which is JSF page when we have searchcriteria in one tile on the top and results in the bottom tile which isresults page.when I enter the search criteria I get some results say 10 rows in the
bottom tile for that criteria, now I change the criteria and hit searchagain now I expect it see zero rows instead i see previous 10 rows from thepevious results set.Results page Page t:dataTable id=riskMeetingTable border=0 cellpadding=0
cellspacing=0 styleClass=dataTableLeftvalue=#{riskMeetingNotesSearchListBean.searchResults.results}var=dataItem
 '#CC') '#EE')headerClass=tableHeader
columnClasses=riskMeetingNotesSearchColumnOne, riskMeetingNotesSearchColumnTwo, riskMeetingNotesSearchColumnThree,
 riskMeetingNotesSearchColumnFourpreserveDataModel=trueKevin Galligan-4 wrote: Need more details.Not exactly sure what you're asking.Code?
 On 8/25/06, Gary1977 [EMAIL PROTECTED] wrote: Hi All, We have Application which used the PreserveDataModel = true atrribute
 of Extended Data Table of Tomahawk which we are doing because we wanted to implement client side sorting in our application. But I see a strange behaviour if I get results based on the criteria from
 the database for the first time in our Application then everything seems to be fine and it seems if you have the preserve data model= true then it stores the values returned from the preserve data model first time and
 shows the same values when you don't get the results back from the database. Is this the behaviour of the preserve data model or something is wrong at my end.
 Ideally it should not show the previous results for the criteria which should show zero results. Let me know what is the understanding of preserveDataModel and how to
 solve my problem and has anyone experienced this. Thks, Gary -- View this message in context: 
http://www.nabble.com/Preserve-Data-Model-tf2165421.html#a5985809 Sent from the MyFaces - Users forum at Nabble.com.--View this message in context: 
http://www.nabble.com/Preserve-Data-Model-tf2165421.html#a6105767Sent from the MyFaces - Users forum at Nabble.com
.


Re: RedirectTracker usage

2006-09-01 Thread Kevin Galligan
Interesting. My only concern would be if my IDE started to complain about the non-standard urls for the navigation cases, but that's minor.I've started using the patch I put in, and the whole thing is quite useful. I've really been wanting this redirect state type of thing for quite a while. Very cool.
I just posted another patch with another semi-hacky addition. The '_rtid' param worried me because its a simple numeric, so a user could just change that value with undefined results. I took the easy route and appended a dash and the current timestamp. Significantly more difficult to just type in a different value. Would be better with a random number, or even a hash (although, in theory, a hash would have the astronomically small chance of a duplicate, so I think either [request #]-[timestamp] or [request #]-[random] would be best).
Please keep me posted as to additions or changes.-KevinOn 8/30/06, Mario Ivankovits 
[EMAIL PROTECTED] wrote:
Hi! http://issues.apache.org/jira/browse/TOMAHAWK-503 This patch is really meant to start discussions about ideas rather
 than be the actual implementation.But, again, it works.
I plan to allow to add a REDIRECT_POLICY parameter which accepts aFQN-classname and two implementations for it:TrackRedirectAlways and TrackRedirectManualIn case of Manual you can use methods like those from Kevin's patch
(btw, thanks for this patch)Hmmm ... The plan is, that it should eventually be possible to have ae.g TrackRedirectNavigational implementation where you can intercept thenavigation redirect url and e.g
. react on special added redirectTracker
hints - e.g. /to/view.jsp|trackRedirect=true or/to/view.jsp|trackBeans=myBean1,myBean2Not sure whats required to make this work, at least its a plan ;-)Ciao,Mario




Re: Is navigation possible from server error page?

2006-08-31 Thread Kevin Swanson

I am having the exact same problem using MyFaces with Facelets. It seems like
both the bean name and method are ignored for the action attribute of
commandLink in my error page. I can define a totally bogus commandLink with
action=foo.bar where there is no managed bean named foo and still it does
nothing and reports no error. I know my error page is OK, because I can
manually get to it by typing the url and it works. Something about how Faces
is transferring to the error page is breaking things.

I did try updating my web.xml like this:

 filter-mapping
  filter-nameMyFacesExtensionsFilter/filter-name
  url-pattern*.faces/url-pattern
  dispatcherERROR/dispatcher
  dispatcherREQUEST/dispatcher
  dispatcherINCLUDE/dispatcher
  dispatcherFORWARD/dispatcher
 /filter-mapping

to make sure that the Extension filter was called when directed to the error
page.

Have you had any luck figuring this out yet? If not, you could try the above
web.xml change and let me know if it works. If it works for you and not me,
then I have some other problem likely due to using Facelets.

Kevin



Jeff Bischoff wrote:
 
 Hi guys,
 
 I've followed the wiki [1] for handling server errors. (e.g. 500, 404)
 
 The page that I have made for this displays fine. But when I try to add 
 a button for the user to navigate to another page, it does nothing. Such 
 a button is necessary because simply hitting the back button on their 
 browsers will most likely leave them at the same page, staring at the 
 error message.
 
 I have tried both h:commandButton and h:commandLink. Is it normal for 
 navigation away from one of these pages to fail? My button links to an 
 action on a session-scoped managed bean. The action works fine from 
 commandLinks in other pages, even after an error occurs (in cases where 
 the back button gets me back to a non-error page)
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-navigation-possible-from-server-error-page--tf2160725.html#a6086096
Sent from the MyFaces - Users forum at Nabble.com.



Re: h:dataTable on an object containing a Set generated by Hibernate

2006-08-31 Thread Kevin Galligan
Speaking of which, you need to be careful with a setup like this. I use hibernate extensively to populate my tables, and there are several potential issues.1) Just converting a set to a List. You're not going to guarantee the ordering of the data on a postback. So, you might select row #3, but the row #3 you get when you get back to the server isn't the same anymore. Problem.
2) You figure out the ordering issue, but data has changed since you showed the page. Lets say you sort by end date (or any other arbitrary value). If somebody added a record since you got the page, and you select row #3, its possible that row #3 will no longer be what you expect.
Possible solutions.1) preserveDataModel on the tomahawk table. This is a pretty cool thing, as it keeps the data in the request. However, this is also bad, because it will attempt to serialize your dataset. Somebody correct me if I'm wrong, but will serializing that data cause the whole hibernate tree to be pulled down by reachability? Even if not, if you've accessed much of the data such that the proxys have pulled the db data, you're still going to serialize a lot of extra data. I don't think this is a problem if you turn on server side storage AND turn off serialization. Not sure what that does to replication if you try to run a cluster, though. Session replication requires serilization, so you would be right back where you started.
2) forceIdIndexFormula on tomahawk table. For hibernate style stuff, I'd suggest this. Technically, you wouldn't even have to worry about problem #1 above. It'll figure out what id to use. However, for large datasets I think this is bad.
3) You could always do the old standby. Just print links with id params. I'm leaning this way with more performance intensive situations. We tend to use new cool technologies, but sometimes the old stuff works just fine.

On 8/31/06, Mike Kienenberger [EMAIL PROTECTED] wrote:

Actually, the restriction is ordered, not list.There needs to be a way to get from table row #12 back to backing item #12.On 8/31/06, Frank Russo 
[EMAIL PROTECTED]
 wrote: I didn't realize that was a restriction. Thanks for the feedback... Frank Russo Senior Developer FX Alliance, LLC -Original Message-
 From: Mike Kienenberger [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 31, 2006 2:51 PM
 To: MyFaces Discussion Subject: Re: h:dataTable on an object containing a Set generated by
 Hibernate UIData Iterators require an ordered list as a value. Sets are not ordered.You'll need to convert your Sets into a List first --List list = new ArrayList(Set);
 On 8/31/06, Frank Russo [EMAIL PROTECTED] wrote:Has anyone tried the following:
   I have an object that is managed by Hibernate. It contains a
  one-to-many relationship implemented as a Set. Hibernate actually  creates an org.hibernate.collection.PersistentSet object. I have a  dataTable on that Set as follows: 

  h:dataTable id=senderCompIDsTable var=compID   value=#{participantBean.participant.senderCompIDs}h:inputHidden id=senderParticipantID
  value=#{compID.key.participantID}/  h:column id=selectColumn rendered=#{false}  f:facet name=header#160;/f:facet
  h:selectBooleanCheckbox id=selectForDelete  value=#{compID.active} /  /h:column  h:column id=senderCompIDColumn
  f:facet name=headerSenderCompID/f:facet  h:inputText id=senderCompID value=#{compID.key.senderCompID}/  /h:column
  h:column id=passwordColumn  f:facet name=headerPassword/f:facet  h:inputSecret id=password value=#{
compID.password}/  /h:column  f:facet name=footer  h:commandButton  action=""

}  styleClass=linkButton  value=Add  >  
this.className='linkButton'  /  /f:facet  /h:dataTable  When the dataTable renders, there are no rows in the table, even  though there is at least one item in Set. The only row generated has
  one empty column. The header row doesn't even render. I have an  h:message tag on my page, but no errors are showing there or in the  log file. Something is not right, but I can't track it down. I have
  this working on another screen with similar objects without the one to  many in the hibernate, so I'm wondering if it has to do anything with the hibernate Set.   Has anyone worked with a similar configuration, or seen a problem like
 this?  If I'm not posting enough info, let me know what other info I can post.   Thanks...Frank Russo  Senior Developer
  FX Alliance, LLC  900 Third Avenue, 3rd Floor  New York, NY 10022  646.268.9949 



Re: Preserve Data Model

2006-08-25 Thread Kevin Galligan
Need more details. Not exactly sure what you're asking. Code?On 8/25/06, Gary1977 [EMAIL PROTECTED] wrote:
Hi All,We have Application which used the PreserveDataModel = true atrribute of
Extended Data Table of Tomahawk which we are doing because we wanted toimplement client side sorting in our application.But I see a strange behaviour if I get results based on the criteria fromthe database for the first time in our Application then everything seems to
be fine and it seems if you have the preserve data model= true then itstores the values returned from the preserve data model first time and showsthe same values when you don't get the results back from the database.
Is this the behaviour of the preserve data model or something is wrong at myend.Ideally it should not show the previous results for the criteria whichshould show zero results.Let me know what is the understanding of preserveDataModel and how to solve
my problem and has anyone experienced this.Thks,Gary--View this message in context: http://www.nabble.com/Preserve-Data-Model-tf2165421.html#a5985809
Sent from the MyFaces - Users forum at Nabble.com.


RedirectTracker usage

2006-08-25 Thread Kevin Galligan
I've built sandbox 1.1.5-snapshot locally to try out RedirectTracker. Its pretty sweet, but now it passes state even when I really want it to redirect without state. I've seen some description of how to differentiate some requests from others with regards to RedirectTracker, but nothing in detail. Is there a page about it somewhere?
Thanks in advance,-Kevin


Re: Newbie Question

2006-08-21 Thread Kevin Galligan
Where's the accessor for 'country.selectedCountry'?Also, please post the actual error. After running the thing, look in tomcat's 'logs' directory, probably the localhost.[date].log file.
On 8/21/06, tukutela [EMAIL PROTECTED] wrote:
Hi all,I'm just starting out with Java/JSF having come from a .net c# background.I'm having some trouble in starting out with JSF and I was hoping thatsomeone can point me in the right direction, this error is driving me
nuts!!!I'm using MyEclipse and the server is Apache2, Tomcat5.5, and MyFaces 1.1.1.I'm trying to fill a selectOneMenu list using a backend bean and are gettingan error that says that the server cannot get value from _expression_
#{bean.list}Here's the JSP codeh:selectOneMenu id=countryListItems styleClass=listsvalue=#{country.selectedCountry}f:selectItems value=#{
country.countryList} //h:selectOneMenuHere's the Beanpackage com.blah.mgr;public class Country {private ArrayListSelectItem countryList; //variable array list to display
set to countries.// Constructor, initializes class variables, sets up connection withdatabase.public Country(){buildList();}// Returns the arrayList, ensure that the constructor reads the database
first.public ArrayList getCountryList(){return this.countryList;}// Sets the country List (not really required but in here anyway.public void setCountryList(ArrayListSelectItem CountryList)
{this.countryList = CountryList;}private void buildList(){countryList.add(new SelectItem(Canada, Canada));
countryList.add(new SelectItem(US, US));}}Here's the link in faces-config.xml:managed-beanmanaged-bean-namecountry/managed-bean-name
managed-bean-classcom.blah.mgr.Country/managed-bean-classmanaged-bean-scopesession/managed-bean-scope/managed-beanI'm sure the solution is simple but I've found it difficult to get good
documentation, might be where I'm looking (or not looking) but I'm stillgetting lost. Any help is greatly appreciated, thanks in advance.--View this message in context: 
http://www.nabble.com/Newbie-Question-tf2141924.html#a5912338Sent from the MyFaces - Users forum at Nabble.com.


Re: Newbie Question

2006-08-21 Thread Kevin Galligan
If you dig around in the logs, there's generally the root exception that caused the issue. Try looking around for that. Otherwise we're flying blind.I'd also suggest posting what '#{country.selectedCountry}' points to. Its not in the class. If this doesn't exist, its possible that JSF is getting upset because it wants to convert the type of the SelectItem, but doesn't really have a target type, so it fails or whatever.
Regardless you need that value available.On 8/21/06, tukutela [EMAIL PROTECTED] wrote:
Sorry all, the bean.list was mean to be an example, typing too quickly.Here's the error from console.
21-Aug-2006 3:16:04 PM org.apache.catalina.core.StandardWrapperValve invokeSEVERE: Servlet.service() for servlet Faces Servlet threw exceptionjavax.faces.FacesException: Cannot get value for _expression_'#{country.countryList
}'atorg.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)atorg.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java
:234)atorg.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
:213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at 
java.lang.Thread.run(Thread.java:595)Kevin Galligan-2 wrote: Where's the accessor for 'country.selectedCountry'? Also, please post the actual error.After running the thing, look in
 tomcat's 'logs' directory, probably the localhost.[date].log file. On 8/21/06, tukutela [EMAIL PROTECTED] wrote: Hi all,
 I'm just starting out with Java/JSF having come from a .net c# background. I'm having some trouble in starting out with JSF and I was hoping that someone can point me in the right direction, this error is driving me
 nuts!!! I'm using MyEclipse and the server is Apache2, Tomcat5.5, and MyFaces 1.1.1. I'm trying to fill a selectOneMenu list using a backend bean and are getting
 an error that says that the server cannot get value from _expression_ #{bean.list} Here's the JSP code h:selectOneMenu id=countryListItems styleClass=lists
 value=#{country.selectedCountry} f:selectItems value=#{ country.countryList} / /h:selectOneMenu
 Here's the Bean package com.blah.mgr; public class Country { private ArrayListSelectItem countryList; //variable array list
 to display set to countries. // Constructor, initializes class variables, sets up connection with database. public Country()
 { buildList(); } // Returns the arrayList, ensure that the constructor reads the database first.
 public ArrayList getCountryList() { return this.countryList; } // Sets the country List (not really required but in here anyway.
 public void setCountryList(ArrayListSelectItem CountryList) { this.countryList = CountryList; } private void buildList()
 { countryList.add(new SelectItem(Canada, Canada)); countryList.add(new SelectItem(US, US)); }
 } Here's the link in faces-config.xml: managed-bean managed-bean-namecountry/managed-bean-name managed-bean-class
com.blah.mgr.Country/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean I'm sure the solution is simple but I've found it difficult to get good
 documentation, might be where I'm looking (or not looking) but I'm still getting lost. Any help is greatly appreciated, thanks in advance. -- View this message in context:
 http://www.nabble.com/Newbie-Question-tf2141924.html#a5912338 Sent from the MyFaces - Users forum at 
Nabble.com.--View this message in context: http://www.nabble.com/Newbie-Question-tf2141924.html#a5913047
Sent from the MyFaces - Users forum at Nabble.com.


Re: the biggest myfaces webapp

2006-08-19 Thread Kevin Galligan
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 anylarge websites done in JSF.I'm in the same boat as you. I'm developing an application whichpotentially could have 200/300 users concurrently logged on and this is
a worry for me too. I'm trying to code the application as carefully as Ipossibly can with the fact that LOTS of users will be logged on at thesame time, always in the back of my mind. Like with any web framework,
you need to code the application in best possible practices and asefficiently as possible (avoid using session beans as much as youpossibly can. etc.)My concerns are memory usage more than anything. But this is a concern
not with JSF but with developing my site with Tomcat and J2EE ingeneral. As for performance, to be honest with you, I feel like I'msailing into unchartered waters, because I really don't know! I can'thelp looking at PHP/Apache and thinking how efficient and proven it is
under heavy load (And that wasn't a call for a start on a PHP/Java debate).Regards,EurigRogerio Pereira wrote: Somebody has myfaces webapps with more than 50/100 concurrent users?
 -- Yours truly (Atenciosamente), Rogério (_rogerio_)


2nd Try: s:inputTextAjax does not render validation errors

2006-07-05 Thread Kevin Shale



The example jsp code I am using from http://www.irian.at/myfaces-sandbox/inputAjax.jsp.sourcerenders 
an ajax-aware input box.
However, when I set the value and the 
backing-bean-validator updates, nothing happens to my form.
The Pulse icon rotates and rotates and my log file 
simply says:

2006-07-05 17:27:19,468 DEBUG 
[de.freenet.aspects.TraceJSF] 
Entering:org.apache.myfaces.context.servlet.ServletFacesContextImpl(ReleaseableExternalContext)2006-07-05 
17:27:19,468 DEBUG [de.freenet.aspects.TraceJSF] 
Leaving:org.apache.myfaces.context.servlet.ServletFacesContextImpl(ReleaseableExternalContext)2006-07-05 
17:27:19,468 DEBUG [de.freenet.aspects.TraceJSF] 
Entering:org.apache.myfaces.context.servlet.ServletFacesContextImpl(ServletContext, 
ServletRequest, ServletResponse)2006-07-05 17:27:19,468 DEBUG 
[de.freenet.aspects.TraceJSF] 
Leaving:org.apache.myfaces.context.servlet.ServletFacesContextImpl(ServletContext, 
ServletRequest, ServletResponse)2006-07-05 17:27:19,468 INFO 
[de.freenet.customercenter.model.demo.DebugPhaseListener] BEFORE PHASE 
RESTORE_VIEW(1)2006-07-05 17:27:19,484 DEBUG 
[de.freenet.aspects.TraceJSF] 
Entering:javax.faces.component.UIViewRoot()2006-07-05 
17:27:19,484 DEBUG [de.freenet.aspects.TraceJSF] 
Leaving:javax.faces.component.UIViewRoot()2006-07-05 
17:27:19,484 DEBUG [de.freenet.aspects.TraceJSF] 
Entering:javax.faces.component.UICommand()2006-07-05 
17:27:19,484 DEBUG [de.freenet.aspects.TraceJSF] 
Leaving:javax.faces.component.UICommand()2006-07-05 17:27:19,484 
DEBUG [de.freenet.aspects.TraceJSF] 
Entering:javax.faces.component.UICommand()2006-07-05 
17:27:19,484 DEBUG [de.freenet.aspects.TraceJSF] 
Leaving:javax.faces.component.UICommand()2006-07-05 17:27:19,484 
INFO [de.freenet.customercenter.model.demo.DebugPhaseListener] AFTER PHASE 
RESTORE_VIEW(1)2006-07-05 17:27:19,500 INFO 
[de.freenet.customercenter.model.demo.DebugPhaseListener] BEFORE PHASE 
APPLY_REQUEST_VALUES(2)2006-07-05 17:27:19,500 INFO 
[de.freenet.customercenter.model.demo.DebugPhaseListener] AFTER PHASE 
APPLY_REQUEST_VALUES(2)

-- I have looked everywhere and have tried 
everything I can possibly think of. Is anyone who was able to get this working 
willing to share some big secret?
Or is the laugh on me?

Kindest Regards,
Kevin


Tomahawk Sandbox: s:inputTextAjax does not display error msg when field focus changes

2006-07-03 Thread Kevin Shale



Does anyone have an idea why the 
s:inputTextAjax tag might not display the error message when the input 
field focus changes?

I have copied the source code directly from http://www.irian.at/myfaces-sandbox/inputAjax.jsp.source

h:panelGrid
h:outputText styleClass="standard_bold" value="Input Some Text"/
h:panelGrid columns="2"
s:inputTextAjax value="#{inputAjaxBean.text1}" id="text1"
 validator="#{inputAjaxBean.validateText1}"
 errorStyle="border:1px solid red; color:red;"/
t:message forceSpan="true" styleClass="errorMessage" for=""/t:message
/h:panelGrid
f:verbatimThis component demonstrates ajax updating ability when you change the
text. br/ An error message is displayed if the given String is greater than 5 characters./f:verbatim
/h:panelGridP.S. The validate method is reaching my backing bean but the GUI does not display the error message. Only when I press the return key does the entire page refresh, and then I can see the "ajax" error message!


jsValueChangeListener

2006-06-23 Thread Kevin
Can the t:jsValueChangeListener/ be used to change the disabled 
attribute of a h:selectOneMenu? I know you can change the CSS but not 
sure how to access the component.




  t:jsValueChangeListener for=selone_menu_subcolors2

h:selectOneMenu disabled=true id=selone_menu_colors2

Thanks

Kevin



Re: SubView and CSS ID selectors

2006-06-19 Thread Kevin

Thank you both so much!



source for core 1.1.3 and tomahawk 1.1.2

2006-06-13 Thread Kevin Hale Boyes

I'm looking for the source for the versions in $subject.
I can check it out from SVN if needed but I'm not sure
how to do that.  I've read Building_With_Maven on the wiki
but it talks about current/HEAD.

So maybe something like:

svn checkout http://svn.apache.org/repos/asf/myfaces/tomahawk/branches/1_1_2
t1.1.2
svn checkout http://svn.apache.org/repos/asf/myfaces/core/branches/1_1_3 c1.1.3

then in each directory run: m2 clean install

But that doesn't seem right.
Any better ways?
Thanks,
Kevin.


Re: Are there any problems with using Tomahawk/Sandbox with Facelets?

2006-06-09 Thread Kevin Swanson

I did have a problem with Tomahawk's dataTable where some of its attributes
stopped working when I moved to Facelets. The workaround was pretty easy
though.

See this post for more details:

https://facelets.dev.java.net/servlets/ReadMsg?listName=usersmsgNo=2753

--
View this message in context: 
http://www.nabble.com/Are-there-any-problems-with-using-Tomahawk-Sandbox-with-Facelets--t1761742.html#a4793434
Sent from the MyFaces - Users forum at Nabble.com.



checkbox in t:dataTable getting reset to false

2006-06-08 Thread Kevin Swanson
I have a checkbox (h:selectBooleanCheckbox) in one column of a Tomahawk 
dataTable which I am using to mark selected rows. I'm trying to use a 
JSCookMenu that executes an action in a backing bean to process all the 
selected rows in the table.


I know there's lots of ways to do this, but I'm fairly new to JSF and 
I'm interested in learning why what I'm doing isn't working.


The rows of the table are mapped to a bean with a selected property 
where I store if the bean is selected. I can click on the checkbox in 
the table and see that it's setting the backing bean value. But when I 
click on the menu item to process the selected rows(objects) in the 
table, it resubmits the form and during the Update Model Values phase, 
it resets all of the checkbox's backing bean values to false.


I'm wondering why it wouldn't be remembering the backing bean's state 
for the checkboxes. The bean is session scope.


Here is a snippet of my page where I'm using these components:


			t:dataTable id=chidrenTable 
value=#{home.env.modelBean.childrenTable.childrenModel} var=child

   styleClass=scrollerTable 
headerClass=fancyTableHeader
   columnClasses=oddColumn,evenColumn
 
sortColumn=#{home.env.modelBean.childrenTable.sortColumn}
			 
sortAscending=#{home.env.modelBean.childrenTable.ascending}

 preserveDataModel=false
 preserveSort=true  
 rows=3
rowId=#{child.modelObject.name}
rowOnClick=status=clickedRow(this.id)

   h:column
 f:facet name=header
	t:commandSortHeader columnName=name arrow=true 
immediate=false

h:outputText 
value=#{msgs.nameColumnHeader}/
/t:commandSortHeader
 /f:facet
 h:outputText 
value=#{child.modelObject.name}/
   /h:column

   h:column
  f:facet name=header
		t:commandSortHeader columnName=creator arrow=true 
immediate=false

h:outputText 
value=#{msgs.creatorColumnHeader}/
 /t:commandSortHeader   
  /f:facet
  h:outputText 
value=#{child.modelObject.properties['creator'].string}/

   /h:column

   h:column
  f:facet name=header
  	t:commandSortHeader columnName=creationTime arrow=true 
immediate=false

h:outputText 
value=#{msgs.creationColumnHeader}/
/t:commandSortHeader
  /f:facet
  h:outputText 
value=#{child.modelObject.properties['creationTime'].date.time}

f:convertDateTime pattern=d MMM  
HH:mm:ss/
  /h:outputText 
   /h:column

   h:column
   f:facet name=header
  h:outputText 
value=#{msgs.selectColumnHeader}/
   /f:facet
   h:selectBooleanCheckbox id=selectCheckBox
 
value=#{child.selected}
 
onchange=submit()
 
immediate=false/
/h:column

/t:dataTable


Thanks,

Kevin


SandBox Dojo

2006-06-05 Thread Kevin

Hello,

I am trying to integrate the s:accordionPanel/ and 
s:fishEyeNavigationMenu/ into an existing app that already has some 
Dojo functionally. In some cases they seem to break one another. I 
assume it is obviously a version issue. I have tried removing the script 
references to see if they are still being loaded by the tags but that 
does not work.


Does anyone have any suggestions for integrating these tags into a site 
that already calls:


script src=./js/prototype.js type=text/javascript/script
script src=./js/scriptaculous.js type=text/javascript/script


Here is one of the errors  I receive:
Object does not support this property or method

Effect.BlindDown = function(element) {
  element = $(element);
  var elementDimensions = element.getDimensions();
---return new Effect.Scale(element, 100,

If this is not a question for this list then I apologize.



Re: IDE jsf

2006-06-01 Thread Kevin Galligan
MyEclipse is not almost the same as the bea/nitro tool. I own exadel and the bea tool. The bea tool is by far my favorite. I tried myeclipse and it wasn't even close. I just tried it again. Its like saying a car without an engine is almost the same as a car with an engine. The bea tool has a grip on the application itself. It has some intelligent auto-complete and can spot issues. Myeclipse just gives you text boxes where you can type this info in, and has buttons that will auto-insert info. Beyond that, though, its not really helping you. I still don't understand why people like the tool quite as much as public forums and mailing lists would lead one to believe. When using myeclipse I feel like I'm trying to fix a watch with a butter knife. I know that's harsh, but it just feels clunky to me.
The only major concern I have about the bea tool is its future plans. I get the impression that it may be packaged into the broader tool for weblogic. That would be bad.
However, as a jsf editor, its quite good. I've tried others and nothing seems to be up to the same level. It doesn't insert too much or wreck your code with the visual editor, but it does a lot for you.
It does not support faclets, which I've recently started using, but I came up with a big maven related hack to get that to work. If anybody is interested, let me know.On 6/1/06, 
Remo Liechti [EMAIL PROTECTED] wrote:















Or give myEclipse a try. It's
cheaper but almost the same.



Remo













From: Joris Wijlens
[mailto:[EMAIL PROTECTED]] 
Sent: Donnerstag, 1. Juni 2006
15:23
To: MyFaces Discussion
Subject: Re: IDE jsf






If you have some budget to spend ($499 for an annual
subscription) I would advice to try BEA workshop for JSF (formerly
Nitrox). It is a very intelligent plugin and helps you wtih a lot of errors.



Joris
Wijlens 





Hello somebody knows an IDE jsf, I practice and stable that is not exadel
please I am working with and is very very unstable. thanks 


LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.


http://es.voice.yahoo.com












does h:commandLink need a h:form

2006-05-25 Thread Kevin Hale Boyes

I have the following findex.jsp file

%@ taglib uri=http://java.sun.com/jsf/html; prefix=h %
%@ taglib uri=http://java.sun.com/jsf/core; prefix=f %

htmlheadtitletitle/title/headbody
f:view
h:commandLink action=navoutcome value=Go /
/f:view
/body/html


but when I click Go I get an error in my JavaScript Console.
clear_linkDummyForm is not defined
 in http://localhost:8080/findex.jsf#


If I wrap the commandLink in an h:form then I don't get an
error and it navigates properly.

Do commandLink's need a surounding form?
I didn't think so but wanted to ask.

Using
MyFaces 1.1.3
Tomahawk 1.1.2


Thanks,
K.


Re: Mixing plain HTML and JSF-Tags

2006-05-21 Thread Kevin Galligan
You may be in the market for facelets. See the following...https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-use-jsfc
It is possible to map simple input elements to jsf ui objects, but keeping standard html syntax. I haven't personally used this, and I assume it wouldn't work for more complex objects, but its something to look at.
You might be able to use composition in facelets for more complex situations. For example, lets say you wanted a table in the page. I don't imagine the table tag and the panelGrid objects play well together with the jsfc attribute, but you could have the following on the page...
html xmlns:h=http://java.sun.com/jsf/html xmlns:f=http://java.sun.com/jsf/core(etc)...ui:insert name=customTable
  table trtdThis is a sample name/tdtdinput type=text value=This is a sample input object//td/tr /table
/ui:insert(more fluff).../htmlThis could be on the template version of the page that a designer would create. You'd have to train them to work around the 'ui:insert' tag. But I think that would be it. The real page would just be...
html xmlns:h=http://java.sun.com/jsf/html xmlns:f=http://java.sun.com/jsf/coreui:composition template=[point to template above]
  ui:define name=customTable h:panelGrid width=100% columns=2  h:panelGroup   NOT a sample name  /h:panelGroup
  h:panelGroup   h:inputText value=NOT a sample value/  /h:panelGroup /ui:define/ui:composition/html
On 5/21/06, Chrisi [EMAIL PROTECTED] wrote:
Hi Gerald,you wrote: It`s not best practice to have jsf corresponding tags and plain html on the same page ...Sure, it would be nice to have jsf pages without plain html.But in reallity this wouldn't happen:
In 90% of the projects I know, HTML is delivered from web-designer experts.Those people don't know about JSF and components. And I think theydon't have to.In real projects this HTML is taken as the view component and the
developer enhances the view with bean values and some navigationrules.But it isn't practical to force the developer to remap all the HTMLinto JSF components (and for complex HTML this doesn't really work).
When looking at JSF example-applications I always see mixing of plainhtml and JSF components. It works for f:view.The question is: Why doesn't it work for f:subview?Is there aworkaround without wrapping anything in jsf-tags or using facelets?
GreetingsChrisiOn 5/20/06, Gerald Müllan [EMAIL PROTECTED] wrote: Hi, I see the main problem in this that you mix up jsf presentation with
 html markup. It`s not best practice to have jsf corresponding tags and plain html on the same page. Try where ever possible to use only jsf related stuff. Normally it should be possible to get along with your requirements
 when doing it like this. If not, you can also use tomahawks t:html component. Furthermore t:document can help out. Apart from your problem, doing it like this makes you independent from
 html renderkit. cheers, Gerald On 5/20/06, Chrisi [EMAIL PROTECTED] wrote:  Hi Andrew, 
  thanks for response.  It's a pitty.We can't use facelets in our project currently.   There must be a way to use subviews without messing the things up  without using facelets, or?
   On 5/20/06, Andrew Robinson [EMAIL PROTECTED] wrote:   Facelets. Does includes very nicely (no subviews), is faster than JSP and you
   don't need verbatim tags. On 5/20/06, Chrisi [EMAIL PROTECTED] wrote:Hello,   
I'm driving crazy with myfaces:   I've got an JSF page with the following content:   pSome HTML tags and text
/ph:outputText value=And here JSF text /   Let it run and you seeSome HTML tags and text
And here JSF texton your browser. That's ok!  Now I wanna make some refactoring and like to put the
content into a subview. The content from above is inlcuded als follow:   f:subview id=testjsp:include page=
test.jsp //f:subview   I let it run again and you see the output messed up (lines are not in order):
And here JSF textSome HTML tags and text   When putting f:verbatim or t:htmlTag around the HTML in the
subview it seems to work.But that's no adequate way. It messes up you view-code and makes it unreadable!   Why is there a different behavior in subview vs. views?
   What is the way to go? Thanks and GreetingsChrisi   
  --  Thanks and Greetings  Chrisi  -- Gerald Müllan Schelleingasse 2/11 1040 Vienna, Austria
 0043 699 11772506 [EMAIL PROTECTED]


Shale setup

2006-05-13 Thread Kevin Galligan
Anybody use shale? Is there anything special for configuration? I set up the shale filter, and it is set to catch everything '/*'. I have a managed bean in a page that is used for various things. I've extended AbstractViewController, and implemented 'init()'. It doesn't get called. I also tried 'preprocess' and 'prerender', just to see what happened. Nothing. My brain is telling me that there must be a place that explicitly maps that view with that managed bean. Right now, the managed bean is declared and I'm just using it in the page. It would seem that shale needs a little more info. Like that bean is designated for that page. Any thoughts? Wrong mailing list?
Thanks in advance,-Kevin


Re: Shale setup

2006-05-13 Thread Kevin Galligan
Wild. Thanks for the response. I can honestly say I saw nothing like that in the docs I had come across, but my research tends to happen when I'm too tired to code, so I could've easily missed it.I just tried it, and it certainly does pick it up, although I'm having some trouble with managed properties off the bean (but that's a different issue to explore).
As a general jsf question, I know some tools generated a backing bean per page behind the scenes. The naming scheme here seems odd to me, but does it happen to match the backing beans generated with these types of tools?
On 5/13/06, Craig McClanahan [EMAIL PROTECTED] wrote:
On 5/13/06, Kevin Galligan 
[EMAIL PROTECTED] wrote:
Anybody use shale? Is there anything special for configuration? I set up the shale filter, and it is set to catch everything '/*'.Complete configuration instructions are on the website[1]. You can also download a blank starter app from the nightly builds area[2]. 
 I have a managed bean in a page that is used for various things. I've extended AbstractViewController, and implemented 'init()'. It doesn't get called. I also tried 'preprocess' and 'prerender', just to see what happened. Nothing. My brain is telling me that there must be a place that explicitly maps that view with that managed bean. Right now, the managed bean is declared and I'm just using it in the page. It would seem that shale needs a little more info. Like that bean is designated for that page. Any thoughts?
You are correct that Shale does need to know how to get from the view identifier of your page to the managed bean name of the corresponding backing bean (which optionally implements ViewController). The strategy used is pluggable; the default algorithm is described in the Javadocs for DefaultViewControllerMapper[3].
 Wrong mailing list?
The Struts user list would be the right place for purely Shale related questions (although because Shale is based on JSF there's often a bit of overlap in the audiences that might be interested). 
Thanks in advance,-Kevin

Craig[1] http://struts.apache.org/struts-shale/using.html
[2] 

  http://cvs.apache.org/builds/struts/nightly/struts-shale/[3] 
http://struts.apache.org/struts-shale/shale-core/apidocs/org/apache/shale/view/impl/DefaultViewControllerMapper.html





Re: Shale setup

2006-05-13 Thread Kevin Galligan
I'm using the bea, formerly m7 nitro tool. I was a little worried it wouldn't like the format, but it appears to be just fine with it.On 5/13/06, Craig McClanahan
 [EMAIL PROTECTED] wrote:
On 5/13/06, Kevin Galligan 
[EMAIL PROTECTED] wrote:
Wild. Thanks for the response. I can honestly say I saw nothing like that in the docs I had come across, but my research tends to happen when I'm too tired to code, so I could've easily missed it.I just tried it, and it certainly does pick it up, although I'm having some trouble with managed properties off the bean (but that's a different issue to explore).
As a general jsf question, I know some tools generated a backing bean per page behind the scenes. The naming scheme here seems odd to me, but does it happen to match the backing beans generated with these types of tools?
Java Studio Creator uses basically the same algorithm, for pretty much the same reason (there needs to be a way to tie the JSP page and the corresponding backing bean source class), but here it's needed at design time as well as at runtime. NetBeans lets you decide what the mapping is, by virtue of letting you type whatever you want for the binding expressions. I don't know the innards of the other tools well enough to know whether they provide something similar.
Craig




Re: populating request scope managed bean

2006-05-12 Thread Kevin Galligan
I still can't get the request scope top level beans to populate. I can get a reference to a request scope bean and set an object value on it. Strange.However, regardless, after trying out 't:updateActionListener' I see why its cool. I have to rearchitect my app a bit, but it does make life quite a bit easier.
Thanks.On 5/10/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
On 5/10/06, Kevin Galligan [EMAIL PROTECTED] wrote: I'm frustrated because I'm not doing a redirect, but it still just won't work.So, how would I set a top level managed bean with a value at the
 request scope without putting it into the session?It is possible to do this programmically (I used to do it this way),but it's far easier to use t:updateActionListener.If you want to keep fighting it, you can take a look at
http://wiki.apache.org/myfaces/AccessingOneManagedBeanFromAnotherOption 1) context.getExternalContext().getRequestMap().put(testObject,
testObject) looks like the right track to me, so that'd probably thepath to pursue (Search MyFaces user list archives for postings onmanaged beans and maps, probably written by Craig McClanahan.)However,doing it like this is far easier:
h:commandLinkvalue=Select Detail action="" do something t:updateActionListenerproperty=#{testObject}value=#{currentRowObject} /
/h:commandLinkOne thing that might be required is to add a layer of indirection: t:updateActionListenerproperty=#{someBean.testObject}value=#{currentRowObject} /



wiki correction

2006-05-11 Thread Kevin Galligan
On the Building With Maven page of the wiki...svn co http://svn.apache.org/repos/asf/myfaces/maven/trunk/maven-archetype
 myfaces-archetypeShould be...svn co http://svn.apache.org/repos/asf/myfaces/maven/trunk/myfaces-archetype myfaces-archetype
And...mvn archetype:create -DarchetypeGroupId=org.apache.myfaces -DarchetypeArtifactId=myfaces-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=myAppId -DartifactId=testAppShould be...mvn archetype:create -DarchetypeGroupId=
org.apache.myfaces.maven -DarchetypeArtifactId=myfaces-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=myAppId -DartifactId=testAppNot sure where I would post this.  Thanks.


populating request scope managed bean

2006-05-10 Thread Kevin Galligan
I'm have a really hard time doing something that, in my mind, should be very simple. Populating a managed bean with scope 'request'. Essentially, I have a dataTable, which is bound to a UIData variable in the backing bean, and a commandLink which pulls the selected object and pushes it into the request collection with...
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(key, value);Then we go to the detail page. By the time we get there, no object. It is not redirecting, so this *should* work, I think.
I changed it to use session instead of request, and set the object with...FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(key, value);This works. Any ideas? I assume that I'm initalizing the request bean incorrectly, but I don't know how. I'm probably going back to the session method so I can move on for now, but any help would be greatly appreciated. I want to use 'saveState' to handle 'request-session' or 'request-thread' scope state, as if this works, it looks to be just the thing I've been missing with struts and jsf. However, the simple part I can't get past.
Thanks in advance,-Kevin


Re: populating request scope managed bean

2006-05-10 Thread Kevin Galligan
Sorry for the self-followup. I'm pulling my hair out.Basically, I've modified my code to following this...
http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/2005/04/06/Drilldown_Edit_with_JSF.html?page=commentsStill doesn't work. Then I created a set of test objects and screens that went down to the absolute basics. Didn't work. I then changed my value object to be session scope instead of request, but still set it with ...
ValueBinding binding = context.getApplication().createValueBinding(#{testObject}); binding.setValue(context,testObject);Even set as session, this didn't work. I know that if I just put it in the session map, that will work, but there must be a way to set a managed bean in request scope from code. However, I cannot get it to work. Please, please help. At least tell me you do something like this, and generally how you accomplish it. Losing my mind.
On 5/10/06, Kevin Galligan [EMAIL PROTECTED] wrote:
I'm have a really hard time doing something that, in my mind, should be very simple. Populating a managed bean with scope 'request'. Essentially, I have a dataTable, which is bound to a UIData variable in the backing bean, and a commandLink which pulls the selected object and pushes it into the request collection with...
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(key, value);Then we go to the detail page. By the time we get there, no object. It is not redirecting, so this *should* work, I think.
I changed it to use session instead of request, and set the object with...FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(key, value);This works. Any ideas? I assume that I'm initalizing the request bean incorrectly, but I don't know how. I'm probably going back to the session method so I can move on for now, but any help would be greatly appreciated. I want to use 'saveState' to handle 'request-session' or 'request-thread' scope state, as if this works, it looks to be just the thing I've been missing with struts and jsf. However, the simple part I can't get past.
Thanks in advance,-Kevin




Re: populating request scope managed bean

2006-05-10 Thread Kevin Galligan
I see how those work, but none of them is really doing what I want to do. You know? Is it not possible to manually populate a request scope bean?On 5/10/06, 
Mike Kienenberger [EMAIL PROTECTED] wrote:
Seehttp://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParametersUnderWorking with tablesin the wiki
On 5/10/06, Kevin Galligan [EMAIL PROTECTED] wrote: Sorry for the self-followup.I'm pulling my hair out. Basically, I've modified my code to following this...
 http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/2005/04/06/Drilldown_Edit_with_JSF.html?page=comments
 Still doesn't work.Then I created a set of test objects and screens that went down to the absolute basics.Didn't work.I then changed my value object to be session scope instead of request, but still set it with ...
 ValueBinding binding = context.getApplication().createValueBinding(#{testObject});binding.setValue(context,testObject); Even set as session, this didn't work.I know that if I just put it in the
 session map, that will work, but there must be a way to set a managed bean in request scope from code.However, I cannot get it to work.Please, please help.At least tell me you do something like this, and generally how
 you accomplish it.Losing my mind. On 5/10/06, Kevin Galligan [EMAIL PROTECTED] wrote:   I'm have a really hard time doing something that, in my mind, should be
 very simple.Populating a managed bean with scope 'request'.Essentially, I have a dataTable, which is bound to a UIData variable in the backing bean, and a commandLink which pulls the selected object and pushes it into the
 request collection with...   FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(key, value);   Then we go to the detail page.By the time we get there, no object.It
 is not redirecting, so this *should* work, I think.   I changed it to use session instead of request, and set the object with...   FacesContext.getCurrentInstance
().getExternalContext().getSessionMap().put(key, value);   This works.Any ideas?I assume that I'm initalizing the request bean incorrectly, but I don't know how.I'm probably going back to the session
 method so I can move on for now, but any help would be greatly appreciated. I want to use 'saveState' to handle 'request-session' or 'request-thread' scope state, as if this works, it looks to be just the thing I've been
 missing with struts and jsf.However, the simple part I can't get past.   Thanks in advance,   -Kevin 



  1   2   >