RE: aliasBean + f:actionListener (addendum)

2006-01-10 Thread Saumil Mehta
Sorry for being a scatterbrain (its late at night). 

So the f:actionListener *does* take EL with the base bean defined in
examples.config.xml. 

So this:

f:actionListener type=#{myBean.fullName}/

is legit, while:

f:actionListener type=#{aliasBean.fullName}/

is not. 

I know for a fact that the aliasBean is defined correctly since I am
picking up other values using the aliased bean, except for the
f:actionListener tag. 

Cool, thanks for reading...

-S


From: Saumil Mehta 
Sent: Tuesday, January 10, 2006 2:26 AM
To: users@myfaces.apache.org
Subject: t:aliasBean + f:actionListener

So I've been using the aliasBean tag for a little while with some
success, but the f:actionListener tag has tripped me up. I have a
commandlink in the included page that is nested in the t:aliasBean
tag. Ths commandLink already has an actionListener attribute defined,
and I need to use the f:actionListener tag to attach another to the
commandlink. 

This is a problem because the f:actionListener barfs out on all EL
expressions for attribute type (forget aliasBean, it wont even take EL
for beans directly mapped in faces.config.xml). How can I rectify this?
Seems pretty strange that f:actionListener has to take a static string
as opposed to EL. 

Note that the Javadoc for the f:actionListener tag includes the generic
will take EL unless otherwise specified after which the attribute
description for attribute type simply claims that the fully qualified
class name of the actionlistener is required. 

Any ideas, clues, hacks?

-Saumil



RE: Issue with images in jscookmenu

2006-01-10 Thread Lefevre, Daniel
I think that the correction should be made in the method 
addThemeSpecificResources of the 
org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer class.

The lines:
StringBuffer buf = new StringBuffer();
buf.append(my);
buf.append(themeName);
buf.append(Base=');

should be replaced by:
StringBuffer buf = new StringBuffer();
buf.append(my);
buf.append(themeName);
buf.append(Base=location.protocol+'//'+location.host+');

This way, the variable will always contain the absolute reference to the theme 
and that will work with a reverse proxy.

Bye, Dan

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: mardi 6 décembre 2005 16:58
To: MyFaces Discussion
Subject: Re: Issue with images in jscookmenu

Dan,

I don't know enough to work on this issue, but you probably want to
take a look at the following method to see if you can get it working.

myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java
serveResource(HttpServletRequest request, HttpServletResponse response)

After a bug fix I added yesterday, I suspect you need to modify this
method to add the absolute path information.

On 12/6/05, Lefevre, Daniel [EMAIL PROTECTED] wrote:
 Hello Bruno,

 Jira issue MYFACES-908 has been created.

 Bye, Dan



autoUpdateDataTable commandLink

2006-01-10 Thread Harald Müller
Hi!

I've some problems getting the commandLink working correctly within an 
autoUpdateDataTable.

My code looks like:

h:form id=form_tasklist
  s:autoUpdateDataTable id=data1
rows=5
headerClass=tableheader 
columnClasses=tablecell
var=taskInstance
value=#{homeBean.ajaxTaskInstances}
preserveDataModel=true
frequency=30
  
h:column 
  f:facet name=header
h:outputText value=Link /
  /f:facet
  t:commandLink immediate=true 
action=#{homeBean.selectTaskInstance}
f:param name=taskInstanceId value=#{taskInstance.id}/
h:outputText value=#{taskInstance.name} /
  /t:commandLink
/h:column
  /s:autoUpdateDataTable
/h:form

After a new datatable-entry was added to the existing datatable the 
commandLink doesn't
seem to work on the first klick (have to klick it twice). 

Any suggestions?

Thanks,
H


RE: aliasBean + f:actionListener (addendum)

2006-01-10 Thread Simon Kitching
It's late at night for me too:-)

From a peek at the ActionListenerTag class, it seems that the type
attribute is evaluated when the parent component is first created. An
instance of that type is created and attached to the parent component. 

So note that the type can never change; it is evaluated on first render
of the page, and is fixed for the lifetime of that view tree.

However I would have thought that if there was an enclosing AliasBean
tag, then encodeBegin would have been called on the component, and hence
the alias would exist. So it seems to me your code should work...

Regards,

Simon

On Tue, 2006-01-10 at 02:44 -0800, Saumil Mehta wrote:
 Sorry for being a scatterbrain (its late at night). 
 
 So the f:actionListener *does* take EL with the base bean defined in
 examples.config.xml. 
 
 So this:
 
   f:actionListener type=#{myBean.fullName}/
 
 is legit, while:
 
   f:actionListener type=#{aliasBean.fullName}/
 
 is not. 
 
 I know for a fact that the aliasBean is defined correctly since I am
 picking up other values using the aliased bean, except for the
 f:actionListener tag. 
 
 Cool, thanks for reading...
 
 -S
 
 
 From: Saumil Mehta 
 Sent: Tuesday, January 10, 2006 2:26 AM
 To: users@myfaces.apache.org
 Subject: t:aliasBean + f:actionListener
 
 So I've been using the aliasBean tag for a little while with some
 success, but the f:actionListener tag has tripped me up. I have a
 commandlink in the included page that is nested in the t:aliasBean
 tag. Ths commandLink already has an actionListener attribute defined,
 and I need to use the f:actionListener tag to attach another to the
 commandlink. 
 
 This is a problem because the f:actionListener barfs out on all EL
 expressions for attribute type (forget aliasBean, it wont even take EL
 for beans directly mapped in faces.config.xml). How can I rectify this?
 Seems pretty strange that f:actionListener has to take a static string
 as opposed to EL. 
 
 Note that the Javadoc for the f:actionListener tag includes the generic
 will take EL unless otherwise specified after which the attribute
 description for attribute type simply claims that the fully qualified
 class name of the actionlistener is required. 
 
 Any ideas, clues, hacks?
 
 -Saumil
 



AW: Can panelTabbedPane remember the last selected index?

2006-01-10 Thread Matthias Kahlau
Many thanks for your advice...


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Dennis Byrne
 Gesendet: Montag, 9. Januar 2006 22:11
 An: MyFaces Discussion
 Betreff: Re: Can panelTabbedPane remember the last selected index?


 I know some people who have bound the index to a session scoped
 integer.  This has some obvious trade offs.  Another way to
 approach this is to bind the index to a request scoped integer,
 and manually set the integer in an action listener that is tied
 to the command.  This becomes tedious however if there are a lot
 of entry points to the tabbed view .

 -Original Message-
 From: Matthias Kahlau [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 9, 2006 03:03 PM
 To: 'Users MyFaces'
 Subject: Can panelTabbedPane remember the last selected index?
 
 Hi!
 
 
 Does anybody know if the panelTabbedPane can provide a facility
 to remember
 the last selectedIndex. That would be fine if the user returns to the
 panelTabbedPane which he has left from a tab != default selectedIndex...
 Without any modifications, always the default tab is shown again.
 
 
 
 Regards,
 
 Matthias
 
 





jscookmenu work on IE, Firebird, but not on Opera :[

2006-01-10 Thread Dudu
I know that the official JscookMenu works fine on opera, but why when I  
put on my myfaces application, it do not works? the menu is not rendered.

The problem is me, or the problem is only the jscookmenu on myfaces?
thanks all





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



Re: Can panelTabbedPane remember the last selected index?

2006-01-10 Thread Hans Sowa
Hi MatthiasIf you use the server side driven panelTabbedPane you can use the TabChangeListener.This should solve your problem.best regardsHans2006/1/10, Matthias Kahlau 
[EMAIL PROTECTED]:Many thanks for your advice...
Regards,Matthias -Ursprüngliche Nachricht- Von: users-return-14969-mkahlau=[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]]Im Auftrag von Dennis Byrne Gesendet: Montag, 9. Januar 2006 22:11 An: MyFaces Discussion Betreff: Re: Can panelTabbedPane remember the last selected index?
 I know some people who have bound the index to a session scoped integer.This has some obvious trade offs.Another way to approach this is to bind the index to a request scoped integer,
 and manually set the integer in an action listener that is tied to the command.This becomes tedious however if there are a lot of entry points to the tabbed view . -Original Message-
 From: Matthias Kahlau [mailto:[EMAIL PROTECTED]] Sent: Monday, January 9, 2006 03:03 PM To: 'Users MyFaces' Subject: Can panelTabbedPane remember the last selected index?
  Hi!   Does anybody know if the panelTabbedPane can provide a facility to remember the last selectedIndex. That would be fine if the user returns to the
 panelTabbedPane which he has left from a tab != default selectedIndex... Without any modifications, always the default tab is shown again.Regards,
  Matthias  -- mfg Hans Sowamailto:[EMAIL PROTECTED]


How to define line breaks in a resource bundle message?

2006-01-10 Thread Matthias Kahlau
Hi!


Is it possible to define a line break in a resource bundle message used for
h:message? I already tried \n and br, but that didn't work...


Regards,

Matthias



RE: How to avoid tree2 reload ?

2006-01-10 Thread Boeckli, Dominique
Title: How to avoid tree2 reload ?



i just tried and it looks much better. the page is loaded 
much faster (tree is not reloaded anymore)
but the navigation through the treeis much slower 
because it'sgoing over the net. 
it is possible to have both advantages: fast tree 
navigation and no tree reload.


  
  
  From: Nikita Shah 
  [mailto:[EMAIL PROTECTED] Sent: Dienstag, 10. Januar 2006 
  11:23To: MyFaces DiscussionSubject: Re: How to avoid 
  tree2 reload ?
  
  Hi: What dont you use the server side 
  toggle and try to lazy load your tree. U might want to check with examples for 
  that.~Nikita"Boeckli, Dominique" 
  [EMAIL PROTECTED] wrote:
  

Hello, 
Is there a way to avoid that the tree2 is 
reloaded after a commandlink was pressed (eg. In the tree Itself or from a button). The problem is that my tree is quite big (it is a logbrowser fo r 
several systems). An improvement was that 
i cached the tree in the web container to avoid calls to the session bean 
which is building the tree. But the tree 
data itself is still retransmitted over the net. 
Many thanks for your help 
Dominique 
  
  
  Yahoo! PhotosRing in the New Year with Photo 
  Calendars. Add photos, events, holidays, 
whatever.


Sorting dataTable

2006-01-10 Thread Marco
Hi Everybody;Thanks a lot for last replies :)I need to know the steps to make a dataTable sortable ?Thanks a lot


AW: Can panelTabbedPane remember the last selected index?

2006-01-10 Thread Matthias Kahlau



Hi Hans!

many thanks, you 
seem to have some know-how about server-side panelTabbedPane switching 
:)

Do you know the 
general advantages of server-side tab-switching?

I already tried it 
by setting the related attribute of panelTabbedPaneto "true", but didn't 
get the behaviour I expected. I thought, only the active tab source code is 
rendered, but as I could see in the HTML source, the content of all tabs is 
rendered to the response, and theinactive tabs contents hidden only ... Is 
this the behaviour intended, or did I miss some additional 
configurations?
Regards,
Matthias 

  -Ursprüngliche Nachricht-Von: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]Im Auftrag von 
  Hans SowaGesendet: Dienstag, 10. Januar 2006 
  13:20An: MyFaces DiscussionBetreff: Re: Can 
  panelTabbedPane remember the last selected index?Hi 
  MatthiasIf you use the server side driven panelTabbedPane you can use 
  the TabChangeListener.This should solve your problem.best 
  regardsHans
  2006/1/10, Matthias Kahlau  [EMAIL PROTECTED]:
  Many 
thanks for your advice... Regards,Matthias 
-Ursprüngliche Nachricht- Von: users-return-14969-mkahlau=[EMAIL PROTECTED] 
[mailto: 
[EMAIL PROTECTED]]Im Auftrag 
von Dennis Byrne Gesendet: Montag, 9. Januar 2006 22:11 An: 
MyFaces Discussion Betreff: Re: Can panelTabbedPane remember the 
last selected index?  I know some people who have 
bound the index to a session scoped integer.This has 
some obvious trade offs.Another way to approach this is 
to bind the index to a request scoped integer,  and manually set the 
integer in an action listener that is tied to the 
command.This becomes tedious however if there are a lot 
of "entry points" to the tabbed view . -Original 
Message-  From: Matthias Kahlau [mailto:[EMAIL PROTECTED]] Sent: Monday, 
January 9, 2006 03:03 PM To: 'Users MyFaces' 
Subject: Can panelTabbedPane remember the last selected index?  
 Hi!   Does anybody know 
if the panelTabbedPane can provide a facility to remember 
the last "selectedIndex". That would be fine if the user returns to the 
 panelTabbedPane which he has left from a tab != default 
selectedIndex... Without any modifications, always the default 
tab is shown again.
Regards,   Matthias  
-- 
  mfg Hans Sowamailto:[EMAIL PROTECTED] 



Re: AW: Can panelTabbedPane remember the last selected index?

2006-01-10 Thread Volker Weber
Hi Matthias,

Matthias Kahlau wrote:
 Do you know the general advantages of server-side tab-switching?

one of the atvantages of server side tab-switching:
all other components are also rerendred. e.g. you can have a toolbar
above your tab panel and enable/disable the buttons depending of the
content of actually selected tab.

Regards,
  Volker

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


Re: Sorting dataTable

2006-01-10 Thread R. Müller
have a look at the examples ! but basically it depends on your 
implementation of the backing bean - in which order you return the list 
of rows ...


regards

ronald

Marco wrote:

Hi Everybody;

Thanks a lot for last replies :)

I need to know the steps to make a dataTable sortable ?

Thanks a lot




Re: How to define line breaks in a resource bundle message?

2006-01-10 Thread Dave Brondsema
Matthias Kahlau wrote:
 Hi!
 
 
 Is it possible to define a line break in a resource bundle message used for
 h:message? I already tried \n and br, but that didn't work...
 

Resource bundles use a java Properties class.  See the load method at
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html


-- 
Dave Brondsema
Software Developer
Cornerstone University


signature.asc
Description: OpenPGP digital signature


Re: Sorting dataTable

2006-01-10 Thread gramani

Marco [EMAIL PROTECTED] wrote on 01/10/2006
07:41:34 AM:

 Hi Everybody;
 
 Thanks a lot for last replies :)
 
 I need to know the steps to make a dataTable sortable ?
 
 Thanks a lot
 

As Ronald wrote, look at the examples first - they
are pretty good. Also i quote below what Simon wrote when I had trouble
seeing what was needed:

The sortColumn attribute should point
to a backing bean property that 
is of type String. That property gets set (ie its setter gets called) 
with the columnName value of whatever column the user chose to sort on.

The sortAscending attribute should point to a backing bean
property 
that is of type boolean. That property gets set to true/false when the

user clicks repeatedly on the same column header (ie sorts 
asc/desc/asc/desc).

Your worklist.assignments method (ie the one referred to by the table's

value attribute) is then required to look at the backing bean's

properties that are the target of sortColumn and sortAscending and 
return its list in the order specified by those (String, boolean) 
properties.

If you are still having trouble, search this archive.
About a week back there was a long thread involving just this problem titled
Getting sorting to work in data table -- header click does not call
sort method and Data Table Sorting still not working.
There is code as well as discussion there you may find useful.

Regards,
Geeta


reference to org.apache.myfaces.webapp.StartupServletContextListener

2006-01-10 Thread R. Müller

Hi group,

sometimes i switch between the reference implementation and myfaces to 
see, wether it behaves the same.


This time  i've got a startup error :

java.lang.ClassNotFoundException: 
org.apache.myfaces.webapp.StartupServletContextListener
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3775)

org.apache.myfaces.webapp.StartupServletContextListener

So far this message is clear : i removed the myfaces libaries and putted 
the RI-implementation there instead, so the 
StartupServletContextListener can not be found. But who is the one, who 
still references it ?
I think the only place where the StartupServletContextListener is 
referenced is the myfaces_core.tld inside the myfaces-jsf 
implementation, but this is already removed.


Are there other places where i can look for that ?

By the way : the reason for switching the implementation this time was, 
that i could not get the dateTime-converter working in following code :


h:selectManyCheckbox id=selectFilter 
f:convertDateTime type=date dateStyle=full/
f:selectItems value=#{filterAdapter.dates}  /
/h:selectManyCheckbox

Backing-Bean :

private Date[] dates;

...

public SelectItem[] getDates() {
SelectItem[] items = new SelectItem[dates.length];
for (int i = 0;i  dates.length ; i++ ) {
items[i] = new SelectItem(d);
// alternativly :
//items[i] = new SelectItem(d,
//  (new SimpleDateFormat()).format(d));


}   
return items;
}





--
*
*M-Unicomp GmbH
*
*Ronald Müller
*
*Plauener Straße 163-165, Haus 11
*13053 Berlin
*
*fon   : +49 ( 0 ) 30  / 98 69 61 54
*mobil : +49 ( 0 ) 172 / 93 95 00 4
*fax   : +49 ( 0 ) 30  / 98 69 61 55
*email : [EMAIL PROTECTED]
*web   : www.unicomp-berlin.de



Re: Sorting dataTable

2006-01-10 Thread gramani

Marco [EMAIL PROTECTED] wrote on 01/10/2006
08:52:39 AM:

 OK
 
 I tried to do like the examples said but nothing worked..maybe 
 because i did not have the source beans of the examples leaded me
to
 misunderstanding.
 
  i tired another way..
 
 This is what i thought..The header will be command link that has an

 action="" bean.sort, When i click the header I'll send the
column 
 value through the request params then read it by the method sort and
 perform the sort..but it does not work correctly :(
 
 Thanks
 

Hi Marco, why don't you have the source? You can download
it..?
Regards,
Geeta


Re: Sorting dataTable

2006-01-10 Thread Marco
Can you please give me the URL ?Thanks a lot


Re: Sorting dataTable

2006-01-10 Thread gramani

Marco [EMAIL PROTECTED] wrote on 01/10/2006
09:02:08 AM:

 Can you please give me the URL ?
 
 Thanks a lot
 

You mean for the source? http://myfaces.apache.org/source.cgi
will give you the release version.. not sure if this is what you are asking..?

Regards,
Geeta


Re: Sorting dataTable

2006-01-10 Thread Marco
No..I meant the sortable dataTable source (jsp, beans  config).Thanks


Re: Sorting dataTable

2006-01-10 Thread gramani

Marco [EMAIL PROTECTED] wrote on 01/10/2006
09:17:55 AM:

 No..I meant the sortable dataTable source (jsp, beans  config).
 
 Thanks
 

Beans: src\examples\simple\src\java\org\apache\myfaces\examples\listexample\
jsps: src\examples\simple\
config: src\examples\simple\WEB-INF\

Geeta


AW: How to define line breaks in a resource bundle message?

2006-01-10 Thread Matthias Kahlau
Hi Dave,


many thanks. If my understanding is correct, the line terminator sequence \n
should work. But I tried it using h:message, and it doesn't work. Is it
possible that h:message is not capable of rendering the line terminator
sequence appropriately?



Regards,

Matthias


 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Dave Brondsema
 Gesendet: Dienstag, 10. Januar 2006 14:27
 An: MyFaces Discussion
 Betreff: Re: How to define line breaks in a resource bundle message?


 Matthias Kahlau wrote:
  Hi!
 
 
  Is it possible to define a line break in a resource bundle
 message used for
  h:message? I already tried \n and br, but that didn't work...
 

 Resource bundles use a java Properties class.  See the load method at
 http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html


 --
 Dave Brondsema
 Software Developer
 Cornerstone University




AW: AW: Can panelTabbedPane remember the last selected index?

2006-01-10 Thread Matthias Kahlau
Hi Volker,


many thanks. Has it never been the case that only the active tab is rendered
with server-side tab switching?


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Dienstag, 10. Januar 2006 14:03
 An: MyFaces Discussion
 Betreff: Re: AW: Can panelTabbedPane remember the last selected index?


 Hi Matthias,

 Matthias Kahlau wrote:
  Do you know the general advantages of server-side tab-switching?

 one of the atvantages of server side tab-switching:
 all other components are also rerendred. e.g. you can have a toolbar
 above your tab panel and enable/disable the buttons depending of the
 content of actually selected tab.

 Regards,
   Volker

 --
 Don't answer to From: address!
 Mail to this account are droped if not recieved via mailinglist.
 To contact me direct create the mail address by
 concatenating my forename to my senders domain.



Cannot get t:saveState to work

2006-01-10 Thread Thomas A Hurley








Hi,



Im having a problem with t:saveState. I want to use it
to pass a whole bean between one view and another but when I get to the second
view the bean is empty. This appears like it should be easy and Ive
followed the previous threads on this issue and I think Im doing
everything correctly, but obviously not. 



Any help would be greatly appreciated.



Thanks in advance.



Tom.



[FIRST JSP]:



?xml version=1.0 encoding=iso-8859-1
standalone=yes ?



jsp:root xmlns:jsp=http://java.sun.com/JSP/Page
version=1.2

 xmlns:f=http://java.sun.com/jsf/core

 xmlns:h=http://java.sun.com/jsf/html

 xmlns:htm=http://jsftutorials.net/htmLib

xmlns:t=http://myfaces.apache.org/tomahawk

 jsp:directive.page contentType=text/html;
charset=iso-8859-1/



 html

 body

 f:view

 t:saveState id =fileUploadBean value=#{fileUploadBean}
/

 h:form

 id = FileUploadExampleForm

 enctype = multipart/form-data

 h:panelGrid columns = 3 border=0
cellspacing=5

 h:outputLabel for=""
value=File: /

 t:inputFileUpload

 id=myFileId

 value=#{fileUploadBean.uploadedFile}

 storage=file

 required=true/

 h:message for="">



 h:outputText value= /

 h:commandButton

 value=Upload

 action="">

 h:outputText value= /

 /h:panelGrid

 /h:form

 /f:view

 /body

 /html

/jsp:root



[SECOND JSP]:



?xml version=1.0 encoding=iso-8859-1
standalone=yes ?



jsp:root xmlns:jsp=http://java.sun.com/JSP/Page
version=1.2

 xmlns:f=http://java.sun.com/jsf/core

 xmlns:h=http://java.sun.com/jsf/html

 xmlns:htm=http://jsftutorials.net/htmLib

 xmlns:t=http://myfaces.apache.org/tomahawk

 jsp:directive.page contentType=text/html;
charset=iso-8859-1/



 html

 body

 f:view

 h:panelGrid columns=2 border=0
cellspacing=5

 h:outputText value=File Name:/

 h:outputText
value=#{fileUploadBean.uploadedFile.name}/

 htm:br/

 h:outputText value=File Size:/

 h:outputText
value=#{fileUploadBean.uploadedFile.size}/

 htm:br/

 h:outputText value=Contents:/

 h:outputText
value=#{fileUploadBean.fileContents}/

 /h:panelGrid

 /f:view

 /body

 /html

/jsp:root



[BEAN TO BE SAVED]:



package com.anabus.myfacesexamples.myfacesfileupload;



import org.apache.myfaces.custom.fileupload.UploadedFile;



import javax.faces.application.FacesMessage;

import javax.faces.context.FacesContext;



import java.io.*;

import org.apache.log4j.Logger;



import com.anabus.myfacesexamples.*;



public class FileUploadBean implements Serializable {



 protected static Logger logger = Logger.getLogger(TAH);



 private UploadedFile uploadedFile;

 private StringBuffer fileContents;



 public UploadedFile getUploadedFile() {

 return uploadedFile;

 }



 public void setUploadedFile(UploadedFile uploadedFile) {

 this.uploadedFile = uploadedFile;

 }



 public String getFileContents() {

 String returnString = No File Content.;



 if ((fileContents != null) 

 (fileContents.length()0)) {

 returnString = fileContents.toString();

 }



 return returnString;

 }



 public String gotoUploadedFileOutput() {

 String destination = ;



 destination = NAV.UPLOAD_FILE_OUTPUT;



 return destination;

 }



 public String processFile() {

 InputStream inputStream;



 logger.info(FileUploadBean.processMyFile() START);

 try {

 inputStream = new
BufferedInputStream(uploadedFile.getInputStream());

 fileContents = new StringBuffer();

 int ch=0;

 while((ch = inputStream.read())  -1) {

 fileContents.append((char)ch);

 }

 fileContents.append(inputStream.toString());

 inputStream.close();

 return gotoUploadedFileOutput();

 }

 catch (Exception x) {

 logger.info(FileUploadBean.processMyFile() Error:  +
x.getClass().getName());

 FacesMessage message = new FacesMessage(

 FacesMessage.SEVERITY_FATAL,

 x.getClass().getName(), x.getMessage());

 FacesContext.getCurrentInstance().addMessage(

 null, message);

 return null;

 }

 }

}



[FACES-CONFIG.XML]



 !-- File Upload Example --

 managed-bean

 managed-bean-namefileUploadBean/managed-bean-name


managed-bean-classcom.anabus.myfacesexamples.myfacesfileupload.FileUploadBean/managed-bean-class

 managed-bean-scoperequest/managed-bean-scope

 /managed-bean



[WEB.XML]



 context-param


param-namejavax.faces.STATE_SAVING_METHOD/param-name

 param-valueclient/param-value

 /context-param










Re: Cannot get t:saveState to work

2006-01-10 Thread Mario Ivankovits

Hi !


Hi,

I’m having a problem with t:saveState. I want to use it to pass a 
whole bean between one view and another but when I get to the second 
view the bean is empty. This appears like it should be easy and I’ve 
followed the previous threads on this issue and I think I’m doing 
everything correctly, but obviously not.


How do your navigation-rule look like? Do you use redirect? Then you 
will loose all request beens between the page transition.


Ciao,
Mario



RE: Cannot get t:saveState to work

2006-01-10 Thread Thomas A Hurley
Hi Mario,

Thank you for the very prompt reply. 

I was indeed using redirect/ and having removed it the values are now
being passed to the second page. However I am confused (new to JSF). I would
not have expected the request scoped beans to survive between requests but I
would have expected the beans/properties serialized by the t:saveState
component to survive. I thought that redirect just updated the URL.

Can you direct me to an explanation of what's going on here?

Thanks again for your help.

Tom.

-Original Message-
From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 10:21 AM
To: MyFaces Discussion
Subject: Re: Cannot get t:saveState to work

Hi !

 Hi,

 I'm having a problem with t:saveState. I want to use it to pass a 
 whole bean between one view and another but when I get to the second 
 view the bean is empty. This appears like it should be easy and I've 
 followed the previous threads on this issue and I think I'm doing 
 everything correctly, but obviously not.

How do your navigation-rule look like? Do you use redirect? Then you 
will loose all request beens between the page transition.

Ciao,
Mario



Re: Cannot get t:saveState to work

2006-01-10 Thread Mario Ivankovits

Hi Thomas!

I would
not have expected the request scoped beans to survive between requests but I
would have expected the beans/properties serialized by the t:saveState
component to survive. I thought that redirect just updated the URL.
  
The redirect directs JSF to send a real http redirect response to the 
browser.
The browser then will fetch the data from this new URL - so this is 
really a new request.


After pressing a command button (or link) the following (very 
simplified) will happen:


* browser requests url a
* jsf executes your action
* based on the result the navigation will be determined
* jsf sends redirect to url b
---
* browser REQUESTS url b
* jsf loads view b


Without redirect
* browser requests url a
* jsf executes your action
* based on the result the navigation will be determined
* jsf loads view b


Ciao,
Mario



ADF Faces component : poll and progressIndicator

2006-01-10 Thread Mikael Andersson
Hi,
help is needed for the poll and progressIndicator tags in ADF Faces,
I'm unfamiliar with this component library so I am probably doing
something wrong which is simple to spot.

My problem is that I can't get the the 'finished action' to get fired
when the polling is done. The polling works and the processEvent method
gets called, but it doesn't stop polling :(

I am not sure which elements action which is suppose to get executed (guessing af:poll) but neither of the work.
The reason I use af:panelPartialRoot is because I don't want to use the
other ADF Faces tags ( adding this component to an existing project...).


My code:

= PollBean.java
package uk.ac.ebi.es.toolweb.beans;

import javax.faces.context.ExternalContext;

public class PollBean {
 private static Logger log = Logger.getLogger( PollBean.class );
 
 private String status = Not Set;
 private JobsBean jobs;
 
 private BoundedRangeModel rangeModel = new DefaultBoundedRangeModel(-1,10);
 
 public void processPollEvent(PollEvent pe){

  log.info(=== In poll event);
  if( rangeModel.getValue() != rangeModel.getMaximum())
   rangeModel =
new DefaultBoundedRangeModel( rangeModel.getValue()+1,
rangeModel.getMaximum() );
  else{
   log.info(= rangeModel value has reached it's maximum value);
  }
 }
 [ getters and setters ]
}

= Facelet code
[cut]
form jsfc=h:form id=pollForm
 
 af:panelPartialRoot
  af:poll id=poller 
immediate=true 
action="">
interval=2000 
 
 
pollListener=#{poller.processPollEvent}/
  af:progressIndicator id=progress_widget 
 
  
  
actionListener=#{poller.pollJob}


  action=""


  


  value=#{poller.rangeModel} 


  partialTriggers=poller/ 
 /af:panelPartialRoot
[cut]
/form

Thanks,
Micke



Re: Cannot get t:saveState to work

2006-01-10 Thread Mike Kienenberger
Also see

http://issues.apache.org/jira/browse/MYFACES-516

for Mario's workaround to preserve saveState and messages across redirects.

At some point we'd like to get something into MyFaces that can handle
this, but it's not currently possible yet.


On 1/10/06, Mario Ivankovits [EMAIL PROTECTED] wrote:
 Hi Thomas!
  I would
  not have expected the request scoped beans to survive between requests but I
  would have expected the beans/properties serialized by the t:saveState
  component to survive. I thought that redirect just updated the URL.
 
 The redirect directs JSF to send a real http redirect response to the
 browser.
 The browser then will fetch the data from this new URL - so this is
 really a new request.

 After pressing a command button (or link) the following (very
 simplified) will happen:

 * browser requests url a
 * jsf executes your action
 * based on the result the navigation will be determined
 * jsf sends redirect to url b
 ---
 * browser REQUESTS url b
 * jsf loads view b


 Without redirect
 * browser requests url a
 * jsf executes your action
 * based on the result the navigation will be determined
 * jsf loads view b


 Ciao,
 Mario




Re: Sorting dataTable

2006-01-10 Thread Marco
You are right guys..the examples are more than perfect and everything is working nowThanks a lot for help and time :)


RE: Cannot get t:saveState to work

2006-01-10 Thread Thomas A Hurley
Thank you very much, Mario.

Tom.

-Original Message-
From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 10:59 AM
To: MyFaces Discussion
Subject: Re: Cannot get t:saveState to work

Hi Thomas!
 I would
 not have expected the request scoped beans to survive between requests but
I
 would have expected the beans/properties serialized by the t:saveState
 component to survive. I thought that redirect just updated the URL.
   
The redirect directs JSF to send a real http redirect response to the 
browser.
The browser then will fetch the data from this new URL - so this is 
really a new request.

After pressing a command button (or link) the following (very 
simplified) will happen:

* browser requests url a
* jsf executes your action
* based on the result the navigation will be determined
* jsf sends redirect to url b
---
* browser REQUESTS url b
* jsf loads view b


Without redirect
* browser requests url a
* jsf executes your action
* based on the result the navigation will be determined
* jsf loads view b


Ciao,
Mario



Schedule component

2006-01-10 Thread Uri Kalish








Hi,

I'm looking for a view similar to the Outlook Calendar.

I saw the Schedule component but it's currently on the
Sandbox project. 

Does anybody know when will it become an 'official'
Tomahawk component?

Who can I contact for more details about this component?







__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__






Re: Lost in Repository

2006-01-10 Thread Mike Kienenberger
Take a look at this

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

On 1/8/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Is someone going to update the Eclipse IDE Wiki Building Myfaces under the
 Eclipse IDE.? (Please?)

 -Original Message-
 From: Sean Schofield [mailto:[EMAIL PROTECTED]
 Sent: Sunday, January 08, 2006 9:10 AM
 To: MyFaces Discussion
 Subject: Re: Lost in Repository

 The reorg is largely done now.  All of the jars should build with mvn
 install.  The rest of the work is going to be getting snapshots setup,
 publishing the website, nightly builds, etc.  That shouldn't affect your
 building of the source code though.

 Sean

 On 1/8/06, Cagatay Civici [EMAIL PROTECTED] wrote:
  Hi Martin,
 
  Thanks for the reply, I think I should wait for the reorg to be completed.
  :)
 
  Checking out maven build now,
 
  Regards,
 
  Cagatay,
 
 
  On 1/8/06, Martin Marinschek [EMAIL PROTECTED] wrote:
   Hi Cagatay,
  
   yes, sorry, we are in the middle of the reorg currently, and this is
   all a major construction site ;)
  
   You should be able to build MyFaces using the instructions on this
  Wiki-Site:
  
   http://wiki.apache.org/myfaces/Building_With_Maven
  
   if that doesn't work, please get back to us.
  
   The resources should be under src/main/resources and not under
   /src/main/java/...
  
   anymore.
  
   regards,
  
   Martin
  
   On 1/8/06, Cagatay Civici [EMAIL PROTECTED] wrote:
Hi,
   
I am trying to integrate Client Validators component in myfaces,
  therefore I
downloaded the current from svn to my locale. My aim was to
integrate
  the
component, build the current and test whether the integration was
successfull or not, however I am a little bit lost so I have a
couple of questions.
   
- As I understand myFaces does not use ant anymore and changed to
maven,
  The
problem is I could not find the maven build files.
- Also, I've observed that resources are located in more than one
place, what is the reason, for example;
   
  tomahawk/src/main/java/org/apache/myfaces/custom/inputhtml/resource/my
  facesutils.js
   
  tomahawk/src/main/resources/org/apache/myfaces/custom/inputhtml/resour
  ce/myfacesutils.js
   
I'll be glad if you could help me to understand these and show me
the
  way in
order to integrate the client validators in myfaces. Where should
source files and the js file be located and the faces-config and
tld definition
  be
made.
   
regards,
   
Cagatay Civivi
   
  
  
   --
  
   http://www.irian.at
  
   Your JSF powerhouse -
   JSF Consulting, Development and
   Courses in English and German
  
   Professional Support for Apache MyFaces
  
 
 




OffTopic: New JSF Brazilian Yahoo groups. Who intererst about all JSF tecnologies

2006-01-10 Thread Dudu

Excuse me,
Who work with jsf (brazilians rather... or anyone), I invite to join in  
yahoo group about jsf to discuss tecnologies, frameworks, tools,  
components, etc.


http://br.groups.yahoo.com/group/javasf/join

Thanks

##

Pessoal, com licença, quem tiver interesse nessa tecnologia(JSF), convido  
para que entre

para o grupo de discussão.

http://br.groups.yahoo.com/group/javasf/join

[]'s






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



Tobago bugs

2006-01-10 Thread Iryna Stetska
Hi,

Our company is developing application using Tobago.
I'm sending you a list of bugs / enhancements we came across recently.
Please give some feedback.


1. t:forEach (bug)
Component does not work with Iterables.
It seems that it analyzes only one record.
For now we can only use t:sheet to iterate Collections, but it would
be better to have t:forEach functional. The disadvantages of using
t:sheet in this case are the following:
   - selecting rows and highlighing them with different color
   - impossibility to set auto height
   - vertical scrolls appearing
   - light background
   - components do not fit the whole width, leaving space on the right

2. t:sheet (enhancement)
There should be possibility to specify component auto height (analog
for 100% in html).
This functionality is necessary to avoid scrollbars(when we have many
records) and ugly dark grey background(when we have not enough records
to fit the specified height). So we need the t:sheet component to
autostretch depending on the number of records.

3. t:tabGroup (bug)
Active tab status is not saved and is lost after page refresh.

4. t:image (bug)
Alt attribute is not functional. Setting this attribute has no effect
at all.


Thanks,
Ira



Tree2: Different behaviour in 1.0.9 and 1.1.1?

2006-01-10 Thread EXTERNAL Willinger Markus (Diplomand; CC/EMT1)
Title: Tree2: Different behaviour in 1.0.9 and 1.1.1?






Hello,


We used a Tree2 componente in MyFaces 1.0.9. Now we've upgraded to MyFaces 1.1.1. After upgrading, our Tree2 componente always collapses after browsing to a new JSF and back - so after rebuilding the trees model! We do not want this behaviour. What shall we do, that the Tree2 does not collapse always doing a rebuild of ist model? In 1.0.9 this was possible

Greetings.





Using s:selectedManyPickList in Jenia4Faces popup-box jp:popupBox for dataselection

2006-01-10 Thread Matthias.Koehler








Hi;



I want to use s:selectedManyPickList in
Jenia4Faces popup-box jp:popupBox

for dataselection. How is it possible to determine the
SelectedItems in the selectedManyPickList.

in the methode assumeUserGroup,
as the set-methode
of the managed bean does not work.

I have tried to find out the SelectedItems by determine
the UIComponet (HtmlSelectManyPicklist).

But I have not found a solution.



Sourcecode:



jp:popupBox id=popupBox_document_authority_id

    f:facet name=button

 h:outputText value=#{documentAuthority_messages['document_authority_addusergroup']} /

    /f:facet

    f:facet name=content

 h:panelGrid id=panelGrid_document_authority_user_group_id
columns=1 styleClass=panelGrid_document_authority_user_group
rowClasses=panelGrid_document_authority_user_group_row

   h:panelGroup

 s:selectManyPicklist
id=selectManyPicklist_document_authority_user_group_id
styleClass=selectManyPicklist_document_authority_user_group size=12
immediate=true value=#{documentAuthorityManagedBean.listSelectedUserAndGroup}

   valueChangeListener=#{documentAuthorityManagedBean.onChangedListSelectedUserAndGroup}

   f:converter converterId=resourceConverter
/

   f:selectItems value=#{documentAuthorityManagedBean.listAvailableUserAndGroup} /

 /s:selectManyPicklist

   /h:panelGroup

   h:panelGroup

 t:commandLink value=#{button_messages['button_assume']} action=#{documentAuthorityManagedBean.assumeUserGroup} /

 f:verbatimnbsp;nbsp;/f:verbatim

 t:commandLink value=#{button_messages['button_cancel']} action=#{documentAuthorityManagedBean.cancelUserGroup} /

   /h:panelGroup

 /h:panelGrid

    /f:facet

  /jp:popupBox





Best



Regards



Matthias Köhler


empolis GmbH
part of arvato: a Bertelsmann company
An der Autobahn

Tel. +49 (0) 5241 -
80-89635
http://www.empolis.com

[EMAIL PROTECTED]














Re: Overriding error message...

2006-01-10 Thread Mike Kienenberger
 On 1/10/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
  If you use the Myfaces Tomahawk components (t:inputXYZ), then the
  label will be used instead of the id if specified.

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

 You'll need to use the extended messages (t:message/t:messages)
 components for this to work.

 You can use the standard (that means h:inputXYZ) input components, though.

Martin,  thanks for clearing that up.   That makes more sense in retrospect!
So you can use any component to generate the message so long as you
use the t:message/t:messages to display it.


Re: Free web-based project management apps?

2006-01-10 Thread Hendrik Neumann
Thanks a lot - I'll give it a try. Any other hints and links?

2006/1/10, Jesse Alexander (KBSA 21) [EMAIL PROTECTED]:
 Hi

 for some time we used XoopsForge... but it seems that development stopped...

 available are:
 - sourceforge (a slightly reduced version of what's online available)
 - GForge http://gforge.org/ based on PostGreSQL-db
 But with these I have no experience

 hth
 Alexander

 -Original Message-
 From: Hendrik Neumann [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 10, 2006 10:06 AM
 To: users@myfaces.apache.org
 Subject: Free web-based project management apps?

 Hi List,

 I'm looking for a good and free web-application which allows us to
 manage our projects. It should have features like a ticket system for
 todos/bugs/whatever, a roadmap with milestones, a wiki and other
 features which are usefull for the software-development-process.

 Currently the only good tool that I know is trac
 (http://www.edgewall.com/trac/ and http://projects.edgewall.com/trac/)
 but it seems so that there is not much more happening with this
 project.

 So does anybody of you guys know another good alternative to manage
 software-projects? In fact it is not so important whether the software
 is web-based or an Eclipse Plugin. The only thing I want to avoid is a
 standalone programm.

 Any hints/links?

 --
 Mit freundlichen Grüßen / Greetings,
 Hendrik Neumann; Ruhr-University of Bochum



--
Mit freundlichen Grüßen / Greetings,
Hendrik Neumann; Ruhr-University of Bochum


Re: Tobago bugs

2006-01-10 Thread Bernd Bohmann

Hello Iryna,

thank you for using tobago.

Which version of tobago you are using?

My comments inline

Iryna Stetska schrieb:

Hi,

Our company is developing application using Tobago.
I'm sending you a list of bugs / enhancements we came across recently.
Please give some feedback.


1. t:forEach (bug)


forEach is deprecated it will be removed before a new release.

If you have a jsp 2.0 enabled container you can look at the foreach 
example in tobago. Maybe this helps.


An other suggestion would be calculate the height of the enclosing panel 
of the sheet in the application logic. But this depends on your page layout.



Component does not work with Iterables.
It seems that it analyzes only one record.
For now we can only use t:sheet to iterate Collections, but it would
be better to have t:forEach functional. The disadvantages of using
t:sheet in this case are the following:
   - selecting rows and highlighing them with different color
   - impossibility to set auto height
   - vertical scrolls appearing
   - light background
   - components do not fit the whole width, leaving space on the right

2. t:sheet (enhancement)
There should be possibility to specify component auto height (analog
for 100% in html).
This functionality is necessary to avoid scrollbars(when we have many
records) and ugly dark grey background(when we have not enough records
to fit the specified height). So we need the t:sheet component to
autostretch depending on the number of records.


If you have enhancements for tobago please add an issue in the 
bugtracking system. We have to think about your use case and maybe 
change the component or offer a diffenent answer.


Do you are using the sheet inside a container which is layouted by a 
layout-manager? Unless maybe a layout facet can solve your problems


My experience is do not show to many records to the user. The rendering 
of the page takes to long. And the user must scroll to the last record 
of the page.

Have you consider about paging?

Can you send me a working example of your jsp?


3. t:tabGroup (bug)
Active tab status is not saved and is lost after page refresh.


Do you mean a page reload? This can't work with client-side tabGroup.
But we have detected a missing saveState and restoreState of the 
tabGroup(server-side mode). This bug is fixed since last year.


Can you verify the fix or give me a more detail description of the bug.


4. t:image (bug)
Alt attribute is not functional. Setting this attribute has no effect
at all.


What you expect from the alt attribute?




Thanks,
Ira




Regards

Bernd


Re: autoUpdateDataTable commandLink

2006-01-10 Thread Harald Müller
Hi again!

Short update:

It seems to work with IE6 but not with Firefox ... I receive a Javascript-Error 
(Error: document.forms.form_tasklist.elements.taskInstanceId has no properties).

I've tried to set the bean-scope from request to session and
to use t:saveState for homeBean.ajaxTaskInstances ... with no success! :-(

Ah ... and I set preserveDataModel=false and preserveRowStates=false.

Any suggestions?

Thanks for your help!

H

-Ursprüngliche Nachricht-
Von: Harald Müller [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 10. Jänner 2006 12:42
An: users@myfaces.apache.org
Betreff: autoUpdateDataTable  commandLink

Hi!

I've some problems getting the commandLink working correctly within an 
autoUpdateDataTable.

My code looks like:

h:form id=form_tasklist
  s:autoUpdateDataTable id=data1
rows=5
headerClass=tableheader 
columnClasses=tablecell
var=taskInstance
value=#{homeBean.ajaxTaskInstances}
preserveDataModel=true
frequency=30
  
h:column 
  f:facet name=header
h:outputText value=Link /
  /f:facet
  t:commandLink immediate=true 
action=#{homeBean.selectTaskInstance}
f:param name=taskInstanceId value=#{taskInstance.id}/
h:outputText value=#{taskInstance.name} /
  /t:commandLink
/h:column
  /s:autoUpdateDataTable
/h:form

After a new datatable-entry was added to the existing datatable the 
commandLink doesn't
seem to work on the first klick (have to klick it twice). 

Any suggestions?

Thanks,
H


How to cache a page for some days (in server side) , and allow user to knwo the page OLD

2006-01-10 Thread Legolas Woodland
HiThank you for reading my post.
I have a very heavy to create web page wich contain some chartI want users to be able to see the live report once per 2 days.
This page contain some sophisticate query , so refreshing the page data could be very heavy job.
so i want to allow users to see a cached version of the page after they refresh it until 3 days.during this 3 days i want to have a lable or something that shows user , This page is : 2 Days old .
is it possible to do such thing ?I should mention that 
1-im using jsf2-im using Creator Studio3-it is a portlet page
can this job be done with OScache , ... ?or it need some special knowledge ?
Thank you


Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-10 Thread Hansjörg Meuschel

Hi,
the problem is the surrounding t:datatable: Children of this component 
all get the same id as the component does not create new objects for 
each iteration.

- I recommend switching to the h:datatable or writing your own component!
Greets, Hans


Saurabh Rasinghaney wrote:


Hi All,

 

We are facing a problem (java.lang.IllegalStateException: Client-id : 
_id3ToggleCollapsed is duplicated in the faces tree.) with Collapsible 
Panel, when we are using Collapsible inside a data table. When we 
display one row it shows one panel but when we display multiple rows 
it gives error (attached below).


 

I am not sure if we can do this or not. The code and exception trace 
is attached below.


 


Any suggestions are welcome. Thanks in advance for your help.

 


Thanks,

Saurabh

 

 

 

 

t:dataTable id=test_dt var=prodReq 
value=#{prqViewBacking.productionRequests} preserveDataModel=false


styleClass=scrollerTable

headerClass=standardTable_Header

footerClass=standardTable_Header

rowClasses=standardTable_Row1,standardTable_Row2


columnClasses=standardTable_Column,standardTable_ColumnCentered,standardTable_Column




   

h:column   


f:facet name=header

 t:div 
style=width:500px;background-color:#CC;align=left


  h:outputText value=Production Request /

 /t:div

/f:facet

   

   t:collapsiblePanel dir=ltr 
collapsed=#{prodReq.collapsed}


  h:panelGrid

  h:inputText value=#{prodReq.firstName}/

  h:inputText value=#{prodReq.surName}/

  h:inputText value=#{prodReq.collapsed}/

  /h:panelGrid

/t:collapsiblePanel

/h:column

 

 

 

 


import java.util.ArrayList;

 


/**

 *

 */

 


public class PrqViewBacking implements java.io.Serializable {

   


//private boolean _collapsed=true;

private ArrayListProductionRequest _productionRequests;

   


public PrqViewBacking() {

ArrayListProductionRequest productionRequests  = new 
ArrayListProductionRequest();


//test data

productionRequests.add(new 
ProductionRequest(A,B,12/12/2006));  

productionRequests.add(new 
ProductionRequest(c,d,12/12/2006));


//productionRequests.add(new 
ProductionRequest(e,f,12/12/2006));


//productionRequests.add(new 
ProductionRequest(g,h,12/12/2006));


this.setProductionRequests(productionRequests);

}   

   

   

 


public ArrayList getProductionRequests() {

System.out.println(In get prod req + 
_productionRequests);  


return _productionRequests;

}

   


public ArrayList productionRequests() {


System.out.println(_productionRequests);


return _productionRequests;

}

 

public void setProductionRequests(ArrayList 
productionRequests) {


_productionRequests = productionRequests;

}

}

 

 

 


public class ProductionRequest implements java.io.Serializable {

   


private String _firstName;

private String _surName;

private String _birthDate;

   


private static Integer id=0;

   


private boolean _collapsed=true;

   


public static String getId() {

return _ + (++id).toString();

}

   

   


public ProductionRequest() {

//Do Nothing


}

   

public ProductionRequest(String firstName, String 
surName, String birthDate) {


setFirstName(firstName);

setSurName(surName);

setBirthDate(birthDate);

}

   


  public boolean collapsed() {

return _collapsed;

  }

 


public boolean isCollapsed() {

return _collapsed;

}

 


public void setCollapsed(boolean collapsed) {

_collapsed = collapsed;

}

   


public boolean getCollapsed() {

   return _collapsed;

}

 


public String getBirthDate() {

return 

Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-10 Thread Simon Kitching

Hansjörg Meuschel wrote:

Hi,
the problem is the surrounding t:datatable: Children of this component 
all get the same id as the component does not create new objects for 
each iteration.


That's just not true.

Both the h:dataTable and t:dataTable components use the flyweight 
pattern to avoid creating a component-per-row. However they ensure that 
the id effectively varies per row for the component, making this 
transparent for most purposes.


Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-10 Thread Hansjörg Meuschel

Simon Kitching wrote:


Hansjörg Meuschel wrote:


Hi,
the problem is the surrounding t:datatable: Children of this 
component all get the same id as the component does not create new 
objects for each iteration.



That's just not true.

Both the h:dataTable and t:dataTable components use the flyweight 
pattern to avoid creating a component-per-row. However they ensure 
that the id effectively varies per row for the component, making this 
transparent for most purposes.


oh ok... i don't know exactly all implementation details, however what i 
know is that the t:datatable has some serious problems:


Example:
h:form
t:datatable
t:column
h:inputText
/ ...

THIS WILL NOT WORK! (all input field get the same id)


h:form
h:datatable
h:column
h:inputText
/ ...
THIS WILL WORK! (all input field get different ids)

This is the reason why the t:datatable can't be used with submittable 
componenents! Or am I doing something very wrong here ??

Greets Hans





Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-10 Thread Simon Kitching

Hansjörg Meuschel wrote:

Simon Kitching wrote:


Hansjörg Meuschel wrote:


Hi,
the problem is the surrounding t:datatable: Children of this 
component all get the same id as the component does not create new 
objects for each iteration.



That's just not true.

Both the h:dataTable and t:dataTable components use the flyweight 
pattern to avoid creating a component-per-row. However they ensure 
that the id effectively varies per row for the component, making this 
transparent for most purposes.


oh ok... i don't know exactly all implementation details, however what i 
know is that the t:datatable has some serious problems:


Example:
h:form
t:datatable
t:column
h:inputText
/ ...

THIS WILL NOT WORK! (all input field get the same id)


h:form
h:datatable
h:column
h:inputText
/ ...
THIS WILL WORK! (all input field get different ids)

This is the reason why the t:datatable can't be used with submittable 
componenents! Or am I doing something very wrong here ??


You're doing something very wrong, though I don't know what. Input 
fields in tables work fine for me, in MyFaces 1.1.1 and SVN head (I 
haven't tried older versions).


Note that the *id* of the component stays the same, but the *clientId* 
changes. Given

 h:form id=form1
  h:dataTable id=table1
   h:column
h:inputText id=input1

During rendering, the *same* input-text component is called once per 
row. If it calls getId(), it sees input1. However if it calls 
getClientId, it sees:

  form1:table1:0:input1
  form1:table1:1:input1
  form1:table1:2:input1
which are all unique ids.

Same process occurs during decoding of submitted values, so each 
submitted value gets processed correctly.


I also had a collapsible panel within a table and had that working a few 
months ago. I've deleted that code since, though, as I've taken a 
different approach to presenting that data.


Note that there have been some problems reported recently regarding 
tomahawk on sun's JSF RI implementation which *might* be related. I've 
only tried this on the MyFaces JSF implementation.


Regards,

Simon


Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-10 Thread Hansjörg Meuschel

Simon Kitching wrote:


Hansjörg Meuschel wrote:


Simon Kitching wrote:


Hansjörg Meuschel wrote:


Hi,
the problem is the surrounding t:datatable: Children of this 
component all get the same id as the component does not create new 
objects for each iteration.




That's just not true.

Both the h:dataTable and t:dataTable components use the flyweight 
pattern to avoid creating a component-per-row. However they ensure 
that the id effectively varies per row for the component, making 
this transparent for most purposes.



oh ok... i don't know exactly all implementation details, however 
what i know is that the t:datatable has some serious problems:


Example:
h:form
t:datatable
t:column
h:inputText
/ ...

THIS WILL NOT WORK! (all input field get the same id)


h:form
h:datatable
h:column
h:inputText
/ ...
THIS WILL WORK! (all input field get different ids)

This is the reason why the t:datatable can't be used with submittable 
componenents! Or am I doing something very wrong here ??



You're doing something very wrong, though I don't know what. Input 
fields in tables work fine for me, in MyFaces 1.1.1 and SVN head (I 
haven't tried older versions).


Note that the *id* of the component stays the same, but the *clientId* 
changes. Given

 h:form id=form1
  h:dataTable id=table1
   h:column
h:inputText id=input1

During rendering, the *same* input-text component is called once per 
row. If it calls getId(), it sees input1. However if it calls 
getClientId, it sees:

  form1:table1:0:input1
  form1:table1:1:input1
  form1:table1:2:input1
which are all unique ids.

Same process occurs during decoding of submitted values, so each 
submitted value gets processed correctly.


I also had a collapsible panel within a table and had that working a 
few months ago. I've deleted that code since, though, as I've taken a 
different approach to presenting that data.


Note that there have been some problems reported recently regarding 
tomahawk on sun's JSF RI implementation which *might* be related. I've 
only tried this on the MyFaces JSF implementation.


Regards,

Simon




Hello Simon,
thanks for your explanations.

i've tried your example:

the output using

h:form id=form1
 h:dataTable id=table1 value=#{projectBenefitBean.allTargetValues} 
var=targetperiod

  h:column
   h:inputText id=input1/
  /h:column
 /h:dataTable
/h:form

form id=HJMEU:form1 name=HJMEU:form1 method=post action=/Sophi2/pdca/plan/target0.faces 
enctype=application/x-www-form-urlencodedtable id=HJMEU:form1:table1
tbody
tr
tdinput id=HJMEU:form1:table1:0:input1 name=HJMEU:form1:table1:0:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:1:input1 name=HJMEU:form1:table1:1:input1 type=text 
value= //td

/tr
tr
tdinput id=HJMEU:form1:table1:2:input1 name=HJMEU:form1:table1:2:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:3:input1 name=HJMEU:form1:table1:3:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:4:input1 name=HJMEU:form1:table1:4:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:5:input1 name=HJMEU:form1:table1:5:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:6:input1 name=HJMEU:form1:table1:6:input1 type=text 
value= //td
/tr
tr

tdinput id=HJMEU:form1:table1:7:input1 name=HJMEU:form1:table1:7:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:8:input1 name=HJMEU:form1:table1:8:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:9:input1 name=HJMEU:form1:table1:9:input1 type=text 
value= //td
/tr
tr
tdinput id=HJMEU:form1:table1:10:input1 name=HJMEU:form1:table1:10:input1 type=text 
value= //td
/tr
/tbody
/table

- just as you said: different client ids for each iteration are generated

and now the output using
h:form id=form1
 t:dataTable id=table1 value=#{projectBenefitBean.allTargetValues} 
var=targetperiod

  h:column
   h:inputText id=input1/
  /h:column
 /t:dataTable
/h:form

table id=HJMEU:form1:table1
tbody id=HJMEU:form1:table1:tbody_element
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr

trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput id=HJMEU:form1:table1:input1 name=HJMEU:form1:table1:input1 type=text 
value= //td/tr
trtdinput 

Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-10 Thread Simon Kitching

Hansjörg Meuschel wrote:


oh ok... i don't know exactly all implementation details, however 
what i know is that the t:datatable has some serious problems:


Example:
h:form
t:datatable
t:column
h:inputText
/ ...

THIS WILL NOT WORK! (all input field get the same id)


h:form
h:datatable
h:column
h:inputText
/ ...
THIS WILL WORK! (all input field get different ids)

This is the reason why the t:datatable can't be used with submittable 
componenents! Or am I doing something very wrong here ??


[snip]



Note that there have been some problems reported recently regarding 
tomahawk on sun's JSF RI implementation which *might* be related. I've 
only tried this on the MyFaces JSF implementation.





[snip output showing h:dataTable generating unique ids, and t:dataTable 
not doing so]





- same client ids for each iteration are generated - can't work!
I'm using JSF RI 1.1.01 / current myfaces version and it does not seem 
that the panelgrid is the only component having this problem (09.01.2006 
16:33: TabPane - Form = Javascript-Error)


Do you have any ideas about that?


Ok, this *is* the same issue I referred to earlier. There is an 
incompatibility between t:dataTable and the Sun reference 
implementation's UIData class.


See:
  https://issues.apache.org/jira/browse/MYFACES-1010

The current consensus seems to be that this is a problem with the Sun 
RI. A workaround might be implemented in Tomahawk, but that's not going 
to help you in the near future.


You could always move to using the MyFaces JSF implementation :-).
Otherwise it looks like you either need to use h:dataTable or create 
your own version of t:dataTable containing one of the workarounds 
described in the JIRA issue.



Note: I'm not sure if this is related to the original CollapsiblePanel 
issue. Saurabh, are you using the Sun RI?


Regards,

Simon


Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-10 Thread Simon Kitching

Saurabh Rasinghaney wrote:

Hi Hans,

Thanks for your reply,

I tried changing the tag to html library data table but still got the same error. Also I 
saw the html code generated for one panel and it looks like ids are getting incremented. 
Here id for anchor is form:ProdReqs_0:_id7ToggleCollapsed which is having 
ProdReqs_0 and should get incremented for next row. Not sure what is wrong.
Please see if u can find something incorrect.



I see this entry in the subversion logs:


r329598 | mmarinschek | 2005-10-31 07:46:25 +1300 (Mon, 31 Oct 2005)
HtmlCollapsiblePanel now works in DataTable

SO I guess if you're using a tomahawk release earlier than 2005-10-31 
then you're out of luck.


And it looks to me like 1.1.1 was created in r328420 on 2005-10-25, so I 
expect the fix didn't make it into release 1.1.1.


Unforunately, nightly builds aren't available at the moment as the 
version control/build process is being significantly reworked. They 
should be back up within a week (guess only).


Regards,

Simon


How to acess current register of a data table?

2006-01-10 Thread Vladimir Coutinho
How to acess current register of a data table? I want to know what command link 
the user has clicked. -- Vladimir M Coutinho


Re: How to acess current register of a data table?

2006-01-10 Thread Simon Kitching

Vladimir Coutinho wrote:
How to acess current register of a data table?  I want to know what 
command link the user has clicked.


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



AW: How to define line breaks in a resource bundle message?

2006-01-10 Thread Matthias Kahlau



Hi!
I 
thought the renderer of h:message does replace the line terminator sequence \n 
with HTML, but that seems not to be the case. I tested to use 
"lt;br/gt;" (without doublequotes), and this also doesn't work. 
The string is just diplayed as text.(I also tried br without 
success.)I thinkit's an important use case to display error 
messages in multiple lines. Does anybody have a solution, oris this just 
impossible at the moment?
Regards,

Matthias 

  -Ursprüngliche Nachricht-Von: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]Im Auftrag von 
  Andrew RobinsonGesendet: Dienstag, 10. Januar 2006 
  16:34An: MyFaces DiscussionBetreff: Re: How to define 
  line breaks in a resource bundle message?Are you sure \n 
  isn't working? (Remember that \n is meaningless in html (it is a 
  space))If you are using output text, and you want a new line in 
  HTML you may have to use "lt;br/gt;". I haven't tested this, but I'd 
  imagine this may work for you 
  On 1/10/06, Matthias 
  Kahlau [EMAIL PROTECTED] 
  wrote:
  Hi 
Dave,many thanks. If my understanding is correct, the line 
terminator sequence \nshould work. But I tried it using h:message, and 
it doesn't work. Is itpossible that h:message is not capable of 
rendering the line terminator sequence 
appropriately?Regards,Matthias 
-Ursprüngliche Nachricht- Von: users-return-15012-mkahlau=[EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]]Im 
Auftrag von Dave Brondsema Gesendet: Dienstag, 10. Januar 
2006 14:27  An: MyFaces Discussion Betreff: Re: How to 
define line breaks in a resource bundle message? 
Matthias Kahlau wrote:  Hi!   
 Is it possible to define a line break in a resource bundle  
message used for  h:message? I already tried \n and br, 
but that didn't work...  Resource bundles use a 
java Properties class.See the "load" method at http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html 
-- Dave Brondsema Software Developer  Cornerstone 
University


Re: How to define line breaks in a resource bundle message?

2006-01-10 Thread Konstantin Shaposhnikov
On 1/11/06, Matthias Kahlau [EMAIL PROTECTED] wrote:

 Hi!

 I thought the renderer of h:message does replace the line terminator
 sequence \n with HTML, but that seems not to be the case. I tested to use
 lt;br/gt; (without double quotes), and this also doesn't work. The
 string is just diplayed as text. (I also tried br without success.)

 I think it's an important use case to display error messages in multiple
 lines. Does anybody have a solution, or is this just impossible at the
 moment?

Currently this is impossible. But there is issue in MyFaces JIRA
(http://issues.apache.org/jira/browse/MYFACES-972) with patch to add
'escape' attribute to t:message and t:messages.

 Regards,

 Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Auftrag von Andrew Robinson
 Gesendet: Dienstag, 10. Januar 2006 16:34

 An: MyFaces Discussion
 Betreff: Re: How to define line breaks in a resource bundle message?

 Are you sure \n isn't working? (Remember that \n is meaningless in html (it
 is a space))

 If you are using  output text, and you want a new line in HTML you may have
 to use lt;br/gt;. I haven't tested this, but I'd imagine this may work
 for you


 On 1/10/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
  Hi Dave,
 
 
  many thanks. If my understanding is correct, the line terminator sequence
 \n
  should work. But I tried it using h:message, and it doesn't work. Is it
  possible that h:message is not capable of rendering the line terminator
  sequence appropriately?
 
 
 
  Regards,
 
  Matthias
 
 
   -Ursprüngliche Nachricht-
   Von: [EMAIL PROTECTED]
  
 [mailto:[EMAIL PROTECTED]
 Auftrag
   von Dave Brondsema
   Gesendet: Dienstag, 10. Januar 2006 14:27
   An: MyFaces Discussion
   Betreff: Re: How to define line breaks in a resource bundle message?
  
  
   Matthias Kahlau wrote:
Hi!
   
   
Is it possible to define a line break in a resource bundle
   message used for
h:message? I already tried \n and br, but that didn't work...
   
  
   Resource bundles use a java Properties class.  See the load method at
  
 http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html
  
  
   --
   Dave Brondsema
   Software Developer
   Cornerstone University