some functioanlity questions

2007-02-25 Thread Colin Chalmers

Hi all,

We've been using MyFaces for some time now but are facing some problems 
which our client deems as must_have for any web_based_app.
These questions have been posed on the list before but I haven't seen 
any definitive answers, plz point me to them if I'm wrong.


1. The browser Back-button
   when the user clicks on the browser back-button he should be taken 
back a page without loss of data .
   I've seen comments about client/side state saving in connection with 
cache expiry settings

   I've also seen solutions based on seam  shale.
   Can someone comment on this as to what works for them?

2. Bookmarking pages
   I've seen workarounds with servlet-filters. Does MyFaces have a 
solution or should I be looking at Jsf_sping?


3. Google findable
   Is anyone able to tweak faces to allow Google to crawl and index?

4. Initializing data-sources
   We had an ugly workaround to init/destroy data in backing-beans. I 
see that Shale has methods for this (aptly called init/destroy)
   How do others do this with *basic* myfaces to ensure that data is 
retrieved once during the life-cycle?


thx in advance

Colin


sandbox floatingPanel css control

2007-02-25 Thread Joe Ersinghaus

Hello,

Does anyone know how to control the style (width or height) in the sandbox
floatingPane.jsp example?

I've tried adding sized elements inside the s:floatingPane control, and this
will increase width (adjusted to the internal control), but the pane
scroll-bar overflows.



Thanks,
Joe


-- 
View this message in context: 
http://www.nabble.com/sandbox-floatingPanel-css-control-tf3286566.html#a9141969
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Problem with Tiles Can't get definitions factory from context

2007-02-25 Thread Raymund Nickel
Hi,
i have a problem with Tiles. The application deploys without an error,
but as soon i try to open the index.jsp i get the error: Can't get
definitions factory from context. The error says, that it has something
to do with the tag tiles:insert, but i cant?t find the reason.

Im using a JBoss 4.0.5, but without using the provided myFaces-libs. The
jar?s i use are: commons-beanutils-1.7.0.jar, commons-codec-1.3.jar,
commons-collections-3.1.jar, commons-digester-1.6.jar,
commons-lang-2.1.jar, jstl-1.1.0.jar, myfaces-api-1.1.4.jar,
myfaces-impl-1.1.4.jar, struts-tiles-1.3.5.jar, tomahawk-1.1.3.jar.

Here are the web.xml, tiles.xml, faces-config.xml, index.jsp, main.jsp,
header.jsp und the full error message.


web.xml:

?xml version=1.0?

!DOCTYPE web-app PUBLIC
  -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
context-param
  param-nametiles-definitions/param-name
  param-value/WEB-INF/tiles.xml/param-value
/context-param

context-param
param-namejavax.faces.CONFIG_FILES/param-name
param-value/WEB-INF/faces-config.xml/param-value
/context-param

context-param
param-namejavax.faces.STATE_SAVING_METHOD/param-name
param-valueserver/param-value
/context-param

context-param
param-nameorg.apache.myfaces.ALLOW_JAVASCRIPT/param-name
param-valuetrue/param-value
/context-param

context-param
param-nameorg.apache.myfaces.DETECT_JAVASCRIPT/param-name
param-valuefalse/param-value
/context-param

context-param
param-nameorg.apache.myfaces.PRETTY_HTML/param-name
param-valuetrue/param-value
/context-param

context-param
param-nameorg.apache.myfaces.AUTO_SCROLL/param-name
param-valuetrue/param-value
/context-param



!-- WelcomeFile Filter --
!--
filter
filter-nameWelcomeFile Filter/filter-name

filter-classorg.apache.myfaces.webapp.filter.WelcomeFileFilter/filter-class
description
Due to the manner in which the JSP / servlet lifecycle
functions, it is not currently possible to specify default
welcome files for a web application and map them to the
MyFacesServlet.  Normally they will be mapped to the
default servlet for the JSP container.  To offset this
shortcoming, we utilize a servlet Filter which examines
the URI of all incoming requests.
/description
/filter
--

!-- JavaScriptDetector Filter --

!-- Extensions Filter --
filter

filter-nameextensionsFilter/filter-name

filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class
init-param
param-nameuploadMaxFileSize/param-name
param-value100m/param-value
/init-param
init-param
param-nameuploadThresholdSize/param-name
param-value100k/param-value
/init-param
/filter


!-- Filter Mappings --

!-- see MyFaces Filter above for a description --

filter-mapping
filter-nameextensionsFilter/filter-name
url-pattern*.jsf/url-pattern
/filter-mapping
filter-mapping
filter-nameextensionsFilter/filter-name
url-pattern/faces/*/url-pattern
/filter-mapping

listener

listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class
/listener


!-- Faces Servlet --
servlet
servlet-nameFaces Servlet/servlet-name
servlet-classjavax.faces.webapp.FacesServlet/servlet-class
load-on-startup1/load-on-startup
/servlet

!-- FacesServlet Mapping --

!-- virtual path mapping --
servlet-mapping
servlet-nameFaces Servlet/servlet-name
url-pattern/gbase4j/*/url-pattern
/servlet-mapping

!-- Welcome files --
welcome-file-list
welcome-fileindex.jsf/welcome-file
welcome-fileindex.jsp/welcome-file
welcome-fileindex.html/welcome-file
/welcome-file-list

/web-app


tiles.xml:

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration//EN
   http://jakarta.apache.org/struts/dtds/tiles-config.dtd;

tiles-definitions
definition name=layout.main path=/main.jsp 
put name=header value=/header.jsp /
/definition
/tiles-definitions


faces-config.xml:

?xml version=1.0 encoding=UTF-8?

!DOCTYPE faces-config PUBLIC
-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN
http://java.sun.com/dtd/web-facesconfig_1_1.dtd;

faces-config
render-kit
render-kit-class
org.apache.myfaces.renderkit.html.HtmlRenderKitImpl
/render-kit-class
/render-kit

application
view-handlerorg.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl/view-handler

Screwed up JSF lifecycle/component tree when using portlet2portlet communication

2007-02-25 Thread Jörn Zaefferer

Hi myfacers,

I'm working on an application that is running on WebSphere Portal 5.1. I've
managed to exchange the IBM/Sun JSF implementation (and portlet bridge) with
MyFaces and Facelets, but one particular problem persists, caused by the
communication from portlet to portlet. It doesn't even matter if I use IBMs
portlet wiring (which doesn't work with MyFaces at all) or via the portlet
session in application scope (which is nothing more then the normal
HTTPSession).

So far IBM couldn't help at all, so maybe there is a MyFaces specific fix
for this. Or a generic JSF fix that I don't yet, which is quite likely.

Ok, on to the actual problem:

  1. I select an item in the first portlet, it is then opened in the
  second
  2. I edit some fields, causing validation errors when pressing Save
  3. I select a different item in the first portlet, it is displayed in
  the second, but the errors are still there


  1. Same steps as 1. and 2. above, but now I select Cancel
  (commandButton with immediate=true)
  2. I select a different item in the first portlet, it is displayed in
  the second, but:
  Only those fields that were empty after causing the validation error
  are now filled correctly, other fields still have the old value, though the
  underlying object has defnitely the correct data; The old data must come
  somewhere from the component tree

Our attemtps so far to clear the values from the component tree were
unsuccesful: I tried creating a new UIViewRoot (copying the RendererType
from the old one) and setting it as the new viewroot. A colleague tried to
set all submitted values in the tree to null, which didn't help either.

As IBMs porlet wiring doesn't work with MyFaces, I describe how I
implemented the communication via the application session:

  1. The first portlet sets an object to the portlet session in
  appliction scope in an action listener:
  public void selectMeeting(ActionEvent e) {
  DtreeNavEntry entry = entry(e);
  FacesUtil.saveApplicationSessionObject(Meeting, entry);
  }
  FacesUtil encapsulates some of the noisy JSF API calls, no magic there
  2. The other side is a bit more complicated:
 1. There is a PhaseListener registered in the
faces-config.xmlcalled PortletLifecycle
 2. This class manages a list of PhaseListeners, stored in the
 PortletSession, therefore each portlet can register one or more
 PhaseListeners that are only executed for that portlet (at least
that is how
 I'd like it to behave, but that isn't the problem here)
 3. The controller used in the second portlet registers a
 PhaseListener at this PortletLifecycle, adding a callback that
is executed
 before the RENDER_RESPONSE phase
 4. The callback checks if there is an object in the portlet
 session in application scope and if there is any, it removes it
 5. If there is an object, it does something with it, displaying
 the correct view (via fc.getViewRoot().setViewRoot(...) for the
 type of object (here: meetings, agenda items and activities)

Maybe someone on this list had already a similar problem and can provide a
hint for a solution. Let me know if it would help to post the code of the
controllers and the PortletLifecycle.

Any help is highly appreciated, thanks!

Regards
Jörn Zaefferer


Re: Fwd: [Tobago] How to export data to excel sheet in Tobago

2007-02-25 Thread Bernd Bohmann

Hello Vinay,

just added an export excel example to test.

Please look at

http://svn.apache.org/repos/asf/myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/ExportUIDataToWorkbookUtil.java

Regards

Bernd

Vinay Konanki wrote:

Hi all,

Please help me in this regard,

Thanks,
Vinay

-- Forwarded message --
From: Vinay Konanki [EMAIL PROTECTED]
Date: Feb 22, 2007 11:40 PM
Subject: [Tobago] How to export data to excel sheet in Tobago
To: users@myfaces.apache.org

Hi all,

I have very quick question.
I have data in Sheet(tc:sheet) and i need to export that data into excel
Sheet,
im using Tobago1.0.10

Can any one suggest me how i can achieve this.
is there any tags available in tobago.

Is there any examples available online.


Thanks in advance,

Vinay



tobago demo 109 : tc tree control: Faces Tree recurring problem

2007-02-25 Thread ws_dev2001
Hi all,
I am using tobago 109 and myfaces 114 on tomcat. My
interest is in the tobago component tree control. I am
not able to operate the copy and edit functionality.
If anyone can help me out it would be really useful. I
get this stack trace in the tobago demo log :
Caused by: org.apache.jasper.JasperException:
Client-id : m1172375745580 is duplicated in the faces
tree. Component : page:mytree:m1172375745580, path:
{Component-Path : [Class:
org.apache.myfaces.tobago.component.UIViewRoot,ViewId:
/overview/treeCnt.jsp][Class:
org.apache.myfaces.tobago.component.UIPage,Id:
page][Class:
org.apache.myfaces.tobago.component.UITreeOld,Id:
mytree][Class:
org.apache.myfaces.tobago.component.UITreeOldNode,Id:
root][Class:
org.apache.myfaces.tobago.component.UITreeOldNode,Id:
movies][Class:
org.apache.myfaces.tobago.component.UITreeOldNode,Id:
m1172375745580]}

TIA,
May the source be with u 
R2D2.



___ 
All New Yahoo! Mail – Tired of unwanted email come-ons? Let our SpamGuard 
protect you. http://uk.docs.yahoo.com/nowyoucan.html


sitemesh with JSF

2007-02-25 Thread Garner Shawn

I'm trying to use sitmesh with JSF and am getting the following exception:
This is my template decorator page and has a f:view page.
Is there something I have to do with this to initialize the
FacesContext for the decorators/templates?


javax.faces.FacesException: Faces context not found. getResponseWriter
will fail. Check if the FacesServlet has been initialized at all in
your web.xml configuration fileand if you are accessing your jsf-pages
through the correct mapping. E.g.: if your FacesServlet is mapped to
*.jsf (with the servlet-mapping-element), you need to access your
pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get
this error-message.

javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:926)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:313)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:73)

org.apache.jsp.decorators.andreasTemplate_jsp._jspx_meth_f_view_0(andreasTemplate_jsp.java:146)

org.apache.jsp.decorators.andreasTemplate_jsp._jspService(andreasTemplate_jsp.java:122)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

com.age.j.soft.sitemesh.TemplateFilterImpl.applyDecorator(TemplateFilterImpl.java:49)

com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)

org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)


Re: Where are the UIViewRoot instances stored??

2007-02-25 Thread Simon Kitching

Julien Martin wrote:

Hello,
I have a basic question about JSF: I would like to know where the 
UIViewRoot instances are stored (for a given app with several 
UIViewRoots). Is it in some sort of java.util collection or in a 
specific class?


I'm not sure what you mean by an app having several UIViewRoots.

When a user first visits a particular view (ie a particular page) the 
component tree is created (ie a UIViewRoot plus children).


If you have configured MyFaces to use client-side state saving then at 
the end of every request the current component tree is serialized 
(using a custom JSF serialization mechanism) and stored as a (very 
large) hidden field in the form. When the page is later submitted back 
to the server the component tree is recreated from the serialized data. 
When the user then moves on to some other view the component tree is 
discarded and a new one created for the new view using the appropriate 
technology (jsp, facelets, clay, whatever).


If server-side state saving with serialization is configured then at 
the end of each request the current component tree is serialized and 
stored in the http-session.


If server-side state saving without serialization is configured then 
at the end of the request a reference to the component tree is just 
cached in the http-session.


In addition, if server-side state saving is configured then MyFaces 
keeps a list of the most recent N component trees in a FIFO queue stored 
in the http session; this is managed by class JspStateManagerImpl. This 
data supports the use of the back-button. Storing old component trees is 
not needed when using client-side state saving (the browser effectively 
does this instead).


Regards,

Simon


t:commandLink not working: Error: clear__5Fid0 is not defined

2007-02-25 Thread Marko Asplund

I'm having problems using with the Tomahawk t:commandLink tag. The
usage is very basic:

t:commandLink value=tomahawk action=#{test.process}/

but for some reason clicking the link doesn't invoke the correct
target view. With h:commandLink everything works as expected. The
Firefox Error Console displays the following message with every click:

Error: clear__5Fid0 is not defined

Any ideas on what's going wrong here?


I have configured the MyFaces extensions filter in web.xml and defined
a navigation rule.

Here're the environment details:
- Oracle OC4J (JDeveloper 10.1.3.2.0 embedded OC4J)
- Sun JSF RI 1.1
- Tomahawk 1.1.3
- ADF Faces is not being used


Upcoming Tobago Release 1.0.10

2007-02-25 Thread Bernd Bohmann

Hello,

I think we can release the next version of Tobago this week.
Please report all serious problems with the current snapshot.

Regards

Bernd