RE: browser back button in JSF?

2006-02-05 Thread Yee CN
There was a benchmark posted around a month ago - the finding was that state
saving in client runs a lot slower than state saving in server.

Is there any update this?

Regards,
Yee 

-Original Message-
From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
Sent: Monday, 6 February 2006 12:12 PM
To: MyFaces Discussion
Subject: Re: browser back button in JSF?

Try changing state saving to 'client'.


javax.faces.STATE_SAVING_METHOD
client


... or start using a nightly build, as MyFaces has fixed this.

Dennis Byrne

>-Original Message-
>From: Tom Butler [mailto:[EMAIL PROTECTED]
>Sent: Sunday, February 5, 2006 11:06 PM
>To: users@myfaces.apache.org
>Subject: browser back button in JSF?
>
>Can anyone point me to a wiki or other to help me understand  how to handle
>the user pressing  the browser back button in a JSF application?
>
> 
>
>I've read this is a weakness of JSF, and from the testing I've done it does
>appear to be a problem.  Looking for any ways to gracefully handle this
>situation.
>
> 
>
>Thanks!
>
>




RE: migrating to Facelets

2006-02-05 Thread David G. Friedman



You 
will probably have to change any jsp taglib entries to html namespace entries so 
instead of:
 
<%@ 
taglib uri="http://java.sun.com/jsf/html" prefix="h" 
%><%@ taglib uri="http://java.sun.com/jsf/core" 
prefix="f"%>
... 
etc 

 
You 
would need:
 
http://www.w3.org/1999/xhtml"    
xmlns:f="http://java.sun.com/jsf/core"    
xmlns:h="http://java.sun.com/jsf/html"    
xmlns:t="http://myfaces.apache.org/tomahawk"    
xmlns:ui="http://java.sun.com/jsf/facelets">
 
Or 
something like that.
 
Regards,
David

  -Original Message-From: Yee CN 
  [mailto:[EMAIL PROTECTED]Sent: Sunday, February 05, 2006 11:03 
  PMTo: 'MyFaces Discussion'Subject: Q: migrating to 
  Facelets
  
  Hi,
   
  I am thinking of migrating to 
  Facelets and I need to gauge the efforts required. Assuming that my jsf pages 
  are relatively pure (i.e. no jstl etc), would my pages compile and run as it 
  is without modifications? I got the impression that this is so – can someone 
  please confirm?
   
  Is there any gotcha to watch out 
  for?
   
  Many 
  thanks.
   
  Best 
  regards,
  Yee


Q: migrating to Facelets

2006-02-05 Thread Yee CN








Hi,

 

I am thinking of migrating to Facelets and I need to gauge
the efforts required. Assuming that my jsf pages are relatively pure (i.e. no
jstl etc), would my pages compile and run as it is without modifications? I got
the impression that this is so – can someone please confirm?

 

Is there any gotcha to watch out for?

 

Many thanks.

 

Best regards,

Yee








RE: browser back button in JSF?

2006-02-05 Thread Balaji Kalyansundaram



There
have been many posts on this at http://www.mail-archive.com/users%40myfaces.apache.org/
 
I set the STATE_SAVING_METHOD to client and it fixed the
problems
 
   
   
javax.faces.STATE_SAVING_METHOD   
client   

 
Balaji

  [Balaji
  Kalyansundaram]  -Original
  Message-From: Tom Butler
  [mailto:[EMAIL PROTECTED]Sent: Monday, 6 February 2006 2:06
  PMTo: users@myfaces.apache.orgSubject: browser back
  button in JSF?
  
  Can anyone point me to a wiki or
  other to help me understand  how to handle the user pressing  the
  browser back button in a JSF application?
   
  I’ve read this is a weakness of
  JSF, and from the testing I’ve done it does appear to be a problem.
   Looking for any ways to gracefully handle this
  situation.
   
  Thanks!

This correspondence is for the named persons only. 
It may contain confidential or privileged information or both. 
No confidentiality or privilege is waived or lost by any mis transmission. 
If you receive this correspondence in error please delete it from your system immediately and notify the sender. 
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient. 
Any opinions expressed in this message are those of the individual sender except where the sender expressly, 
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.


RE: browser back button in JSF?

2006-02-05 Thread Tom Butler
Thanks Dennis - I'll give this a try tomorrow.. caffeine has run out..zzz

-Original Message-
From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 05, 2006 11:12 PM
To: MyFaces Discussion
Subject: Re: browser back button in JSF?

Try changing state saving to 'client'.


javax.faces.STATE_SAVING_METHOD
client


... or start using a nightly build, as MyFaces has fixed this.

Dennis Byrne

>-Original Message-
>From: Tom Butler [mailto:[EMAIL PROTECTED]
>Sent: Sunday, February 5, 2006 11:06 PM
>To: users@myfaces.apache.org
>Subject: browser back button in JSF?
>
>Can anyone point me to a wiki or other to help me understand  how to handle
>the user pressing  the browser back button in a JSF application?
>
> 
>
>I've read this is a weakness of JSF, and from the testing I've done it does
>appear to be a problem.  Looking for any ways to gracefully handle this
>situation.
>
> 
>
>Thanks!
>
>




Re: browser back button in JSF?

2006-02-05 Thread Dennis Byrne
Try changing state saving to 'client'.


javax.faces.STATE_SAVING_METHOD
client


... or start using a nightly build, as MyFaces has fixed this.

Dennis Byrne

>-Original Message-
>From: Tom Butler [mailto:[EMAIL PROTECTED]
>Sent: Sunday, February 5, 2006 11:06 PM
>To: users@myfaces.apache.org
>Subject: browser back button in JSF?
>
>Can anyone point me to a wiki or other to help me understand  how to handle
>the user pressing  the browser back button in a JSF application?
>
> 
>
>I've read this is a weakness of JSF, and from the testing I've done it does
>appear to be a problem.  Looking for any ways to gracefully handle this
>situation.
>
> 
>
>Thanks!
>
>




browser back button in JSF?

2006-02-05 Thread Tom Butler








Can anyone point me to a wiki or other to help me understand
 how to handle the user pressing  the browser back button in a JSF
application?

 

I’ve read this is a weakness of JSF, and from the
testing I’ve done it does appear to be a problem.  Looking for any
ways to gracefully handle this situation.

 

Thanks!








RE: savestate question

2006-02-05 Thread Tom Butler








Found the problem here.  On the second
page, I also included  a t:saveState tag for the backing bean from the
previous page (page that linked to second page):



 

I must of missed this somewhere, but also this did
not seem obvious.  It seemed logical that if I used  on
the first page with the backing bean, that when I linked to the second page,
and then came back to the first page, then the object would be read from wherever
it was serialized to.  Having to place a  on the second
page (to save the state for the same backing bean from the first page) does not
seem to make sense?  Why would I need to re-serialize the bean again on
the second page?  Anyways, if this works I’ll leave it as is –
I’d just like to understand the ‘why?’.

 









From: Tom Butler
[mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 05, 2006
10:09 PM
To: users@myfaces.apache.org
Subject: t:savestate question



 

Within .jsp page I use t:saveState to save the
backing bean.



 

t:saveState works to some degree, because when I
remove it, t:datascroller can not display the datamodel (property on backing
bean) when I scroll from the first page to the second page - with t:saveState
enabled, this works.

 

However, when I leave the page with the t:saveState
to another page, and then come back, the backing bean data has not been saved.
 

 

The backing bean does implement the Serializable
interface (the only addition I have made to the class is adding the
“implements Serializable” on the class definition – I did not
add a serialVersionUID variable or anything else?):

public class SearchIspBean extends SortableList implements
Serializable  {….}

 

Any suggestions?








t:savestate question

2006-02-05 Thread Tom Butler








Within .jsp page I use t:saveState to save the
backing bean.



 

t:saveState works to some degree, because when I
remove it, t:datascroller can not display the datamodel (property on backing
bean) when I scroll from the first page to the second page - with t:saveState
enabled, this works.

 

However, when I leave the page with the t:saveState
to another page, and then come back, the backing bean data has not been saved.  

 

The backing bean does implement the Serializable
interface (the only addition I have made to the class is adding the “implements
Serializable” on the class definition – I did not add a
serialVersionUID variable or anything else?):

public class SearchIspBean extends SortableList implements
Serializable  {….}

 

Any suggestions?








AW: Programmatically created UI does not contain important HTML elements

2006-02-05 Thread Matthias Kahlau
> AFAIK most browsers do wrap content with HTML tags in case content does
> not self set html...body. Guess you can inspect that by looking in the
> DOM inspector in Mozilla/Firefox after browsing to such "special"
> html-pages.

In my special case, the rendered code has to go to the JTidy filter of
UPortal, which transforms the HTML code to XHTML (AFAIK). I don't know if
JTidy is capable to transform incomplete HTML pages...


Regards,

Matthias

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Jörg Liegler
> Gesendet: Montag, 6. Februar 2006 01:05
> An: 'MyFaces Discussion'
> Betreff: AW: Programmatically created UI does not contain important HTML
> elements
>
>
> AFAIK most browsers do wrap content with HTML tags in case content does
> not self set html...body. Guess you can inspect that by looking in the
> DOM inspector in Mozilla/Firefox after browsing to such "special"
> html-pages.
>
> Jörg
>
> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Gesendet: Sonntag, 5. Februar 2006 16:48
> An: Users MyFaces
> Betreff: Programmatically created UI does not contain important HTML
> elements
>
> Hi!
>
>
> I examined the HTML source code of my programmatically build view and
> noticed, that no HTML elements like  or  are rendered, but I
> wonder because the page is rendered correctly in MS IE.
>
> Do I have to manually add the missing elements, e. g. with the
> ResponseWriter? (I need valid HTML...)
>
>
> Regards,
>
> Matthias
>



AW: Programmatically created UI does not contain important HTML elements

2006-02-05 Thread Jörg Liegler
AFAIK most browsers do wrap content with HTML tags in case content does
not self set html...body. Guess you can inspect that by looking in the
DOM inspector in Mozilla/Firefox after browsing to such "special"
html-pages.

Jörg

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Sonntag, 5. Februar 2006 16:48
An: Users MyFaces
Betreff: Programmatically created UI does not contain important HTML
elements

Hi!


I examined the HTML source code of my programmatically build view and
noticed, that no HTML elements like  or  are rendered, but I
wonder because the page is rendered correctly in MS IE.

Do I have to manually add the missing elements, e. g. with the
ResponseWriter? (I need valid HTML...)


Regards,

Matthias



Re: myfaces & Oracle ADF (or other component libraries)

2006-02-05 Thread Laurie Harper

Tom Butler wrote:

Can I use Oracle ADF components together within a MyFaces application?  Same
question for other component libraries?  Or, are these mutually exclusive
(use a different front controller)? 


You can use ADF Faces together with MyFaces and/or the Tomahawk 
components. Component libraries can generally be used together without 
problems, although I understand Tobago is an exception.


L.


Also, anyone know when Tobago first release will be?  I was looking at their
website - some pretty cool stuff in the works.  Re-usable components in my
opinion are really the strength of JSF.






AW: Column/row number bug in HtmlInputTextArea?

2006-02-05 Thread Matthias Kahlau
> Is this a browser problem or a JSF problem?

Ok, stupid question - it must be a browser problem ;)


Do you know, how to handle this?



Regards,

Matthias

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Matthias Kahlau
> Gesendet: Montag, 6. Februar 2006 00:45
> An: Users MyFaces
> Betreff: Column/row number bug in HtmlInputTextArea?
>
>
> Hi!
>
>
> When I set the column number of a HtmlInputTextArea, e. g. to
> "10", only "6"
> columns are displayed. Entering more than six characters causes a line
> break.
> I experience this behavior in IE 6.
>
> In Firefox 1.5, there are rendered "10" columns as expected, but "2" rows,
> although I set it to "1" row?
>
>
> In the source code, the textarea looks like this:
>
>  rows="1">
>
>
> Is this a browser problem or a JSF problem?
>
>
>
>
> Regards,
>
> Matthias
>



Column/row number bug in HtmlInputTextArea?

2006-02-05 Thread Matthias Kahlau
Hi!


When I set the column number of a HtmlInputTextArea, e. g. to "10", only "6"
columns are displayed. Entering more than six characters causes a line
break.
I experience this behavior in IE 6.

In Firefox 1.5, there are rendered "10" columns as expected, but "2" rows,
although I set it to "1" row?


In the source code, the textarea looks like this:




Is this a browser problem or a JSF problem?




Regards,

Matthias



myfaces & Oracle ADF (or other component libraries)

2006-02-05 Thread Tom Butler








Can I use Oracle ADF components together within a MyFaces application?
 Same question for other component libraries?  Or, are these mutually exclusive
(use a different front controller)? 

 

Also, anyone know when Tobago first release will be?  I was
looking at their website – some pretty cool stuff in the works.  Re-usable
components in my opinion are really the strength of JSF.








AW: Changing the text format of radio/checkbox button labels

2006-02-05 Thread Matthias Kahlau
> Do you know how the text format of radio button/checkbox labels can be
> changed. I already applied a CSS class to the component, but the settings
> aren't reflected in the labels...

BTW: Accessibility guidelines require that the font size can be changed by
the user, e. g. by changing it in the browser, but this is not possible in
my case (in MS IE), regarding the font used in the labels. I really need to
overwrite this behaviour with a CSS class...


Regards,

Matthias

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Matthias Kahlau
> Gesendet: Sonntag, 5. Februar 2006 18:47
> An: Users MyFaces
> Betreff: Changing the text format of radio/checkbox button labels
>
>
> Hi!
>
>
> Do you know how the text format of radio button/checkbox labels can be
> changed. I already applied a CSS class to the component, but the settings
> aren't reflected in the labels...
>
>
>
> Regards,
>
> Matthias
>



Re: JSF+Hibernate

2006-02-05 Thread Werner Punz

Dave schrieb:
session.merge is not very smart. Hibernate will update all properties 
and association table. For association, delete all related rows, and 
then add, even if the association(such as colllection) is not changed. 
Is there a better way other than merge?  Thanks.


Not really that is one of the downsides of using an orm mapper, you will 
get some overhead regarding queries and data, you however can limit the 
data written by adjusting the hibernate parameters (probably pushing 
some of the association stuff into the lazily loaded domain might help, 
adjusting the fetch, depth as well)


If you want finer granularisation than that, you have to go the manual 
route and merge manually property by property (the beanutils can help in 
this case)




RE: returning to same position within a datascroller?

2006-02-05 Thread Tom Butler








I figured out a way to do this, so I’ll post it in
case anyone else needs to accomplish this same task:

 

1. Page displaying DataTable with DataScroller to scroll
through large result set:

 



 
rowIndexVar="rowindex" 

 
rows=”#{backingbean.displayrows}” 

 
first=”#{backingbean.pageindex}”

 
rendered="#{backingbean.datamodel.rowCount > 0}"

 
…… (snippet only)

 

//  command link to link to details page for selected
row






 
//  update pageindex property on backing bean with rowindex var from the
datatable when commandlink is clicked






 



paginatorMaxPages="9"
paginator="true" 

rendered="#{backingbean.datamodel.rowCount
> backingbean.displayrows}">

 

 

2.  Backing Bean
for Page displaying the DataTable (session scope)

 

private int pageindex;  // keep track of page index
within datascroller

private int displayrows;  // number of rows displayed
in datascroller

 // constructor

 public BackingBean() {

    pageindex = 0;   // set initial
page index to zero or first row in backingbean.datamodel

   displayrows=10;    }

 

// getters & setters – setter for pageindex is one
of interest

//  setPageindex example:  displayrows=25; current
rowindex =6;  ((62/25)*25) = 2*25 = 50 (first row of datascroller)

public void setPageindex(int rowindex) { 
this.pageindex = ((rowindex/displayrows)* displayrows);  } 

public int getPageindex() { return pageindex;  }

public int getDisplayrows() {  return displayrows; }

 

 

3.  Detail page
(linked to from page containing datatable)

//  when return to datatable page, will be placed at
same position within the datascroller

  // navigation specified in faces-config.xml

 









From: Tom Butler
[mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 05, 2006
12:24 AM
To: users@myfaces.apache.org
Subject: returning to same
position within a datascroller?



 

Is it possible to return to the same position within a
datascroller after leaving the page and returning (i.e., datatable displays a
large result set; user has scrolled through the data and is on the 3rd
page of data; user selects a record which links them to a detail page; now want
to return the user to the original .jsf page at the same 3rd page of
data within the datascroller)?  If so, how?

 

thanks








Files upload inside a jsf portlet

2006-02-05 Thread Legolas Woodland

Hi
thank you for reading my post.
I need file upload facility inside a jsf portlet , now i do not know how 
to implement this feature because

i use JSC and its file upload does not works inside a portlet.
can some one tell e whether Myfaces file upload works inside portlet or 
not ?


Thank you.


Changing the text format of radio/checkbox button labels

2006-02-05 Thread Matthias Kahlau
Hi!


Do you know how the text format of radio button/checkbox labels can be
changed. I already applied a CSS class to the component, but the settings
aren't reflected in the labels...



Regards,

Matthias



Re: How I can read managed property value from faces-config file in class constructor?

2006-02-05 Thread Yogesh Chaudhari
Hi Dennis, Laurie thanks for the prompt reply.

I found following code on jsffaq.com, I will try it work for me.

FacesContext fc = FacesContext.getCurrentInstance();
String userName =
(String)fc.getApplication().createValueBinding("#{Person.userName}").getValue(fc);


 
Person
demo.PersonBean
request

userName
java.lang.String


 


Thanks again, Yogesh

On 2/4/06, Laurie Harper <[EMAIL PROTECTED]> wrote:
> Yogesh Chaudhari wrote:
> > Hi,
> >
> > I would like to read "show" managed property value in InvoiceBean
> > class constructor so I can populate different resultset in "invoices"
> > arraylist to display on page.
> >
> > Thanks, Yogesh
> >
> > public class InvoiceBean {
> >   private String show;
> >ArrayList invoices;
> >
> >   public InvoiceBean () {
> >   System.out.println("show invoices " + show);
> >   invoices = getInvoices();
> >   }
> >
> > 
> >   
> > invoiceALLBean
> > 
> > org.adr.faces.backing.InvoiceBean
> > request
> > 
> >   show
> >   java.lang.String
> >   ALL
> > 
> >   
> >
> >   
> > invoicePENDINGBean
> > 
> > org.adr.faces.backing.InvoiceBean
> > request
> > 
> >   show
> >   java.lang.String
> >   PENDING
> > 
> >   
> > ..
> > ..
> > ..
> > 
> >
>
> The short answer is you can't. Properties are set on a bean after it's
> constructed (since before it's constructed there's nothing to set a
> property on...).
>
> You have a couple of options:
>
> - call getInvoices() from setShow()
>
> - call getInvoices() lazily when needed, after the show property has
> been set.
>
> I'd recommend the latter but either would work.
>
> L.
>
>


Programmatically created UI does not contain important HTML elements

2006-02-05 Thread Matthias Kahlau
Hi!


I examined the HTML source code of my programmatically build view and
noticed, that no HTML elements like  or  are rendered, but I
wonder because the page is rendered correctly in MS IE.

Do I have to manually add the missing elements, e. g. with the
ResponseWriter? (I need valid HTML...)


Regards,

Matthias



AW: Error when using "spread" layout in programmatically created HtmlSelectOneRadio

2006-02-05 Thread Matthias Kahlau
Many thanks Volker, that was the missing part...


Regards,

Matthias

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Volker Weber
> Gesendet: Sonntag, 5. Februar 2006 13:25
> An: MyFaces Discussion
> Betreff: Re: Error when using "spread" layout in programmatically
> created HtmlSelectOneRadio
>
>
> Hi Mathias,
>
> set the renderType to "org.apache.myfaces.Radio";
>
> otherwise you won't get the tomahawk renderer.
>
> Regards,
>   Volker
>
> Matthias Kahlau wrote:
> > Hi!
> >
> >
> > I used "spread" layout successfully with HtmlSelectOneRadio and
> > HtmlSelectManyCheckbox in JSP. Now I programmatically created a
> > HtmlSelectOneRadio and set the layout attribute to "spread":
> >
> > HtmlSelectOneRadio radios = new HtmlSelectOneRadio(); // Tomahawk
>
> radios.setRendererType("org.apache.myfaces.Radio");
>
> >   selectOne = radios;
> >   this.form.getChildren().add(selectOne);
> >   selectOne.setId(id);
> >   radios.setLayout("spread");
> >
> >
> > When the view is rendered, I receive the following error:
> >
> > 2006-02-05 12:43:56,921 ERROR
> > [org.apache.myfaces.renderkit.html.HtmlRadioRendererBase] Wrong layout
> > attribute for component _id0:Frage_2: spread
> >
> >
> > Why do I get this error? (I need spread layout...)
> >
> > (MyFaces in use: 20051130)
> >
> >
> >
> > Regards,
> >
> > Matthias
> >
>
> --
> 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: Sandbox Schedule Component to Tomahawk?

2006-02-05 Thread Martin Marinschek
Sandbox doesn't mean we think this component is just for playing 'round.

Actually, some of them, e.g .the schedule is production stable.

Caveat: we're allowed to change the API at any time here, without
warning, and this is what we leave open by letting it in the sandbox
for now ;)

regards,

Martin


On 2/5/06, Werner Punz <[EMAIL PROTECTED]> wrote:
> Uri Kalish schrieb:
> > - When will the Sandbox Schedule component become a part of Tomahawk?
> >
> >
> Once it has stabilized enough ;-)
>
>


--

http://www.irian.at

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

Professional Support for Apache MyFaces


Re: Sandbox Schedule Component to Tomahawk?

2006-02-05 Thread Werner Punz

Uri Kalish schrieb:

- When will the Sandbox Schedule component become a part of Tomahawk?

 

Once it has stabilized enough ;-)



behaviour change upgrading to nightly build

2006-02-05 Thread Thomas Gaudin




Hi,

I have just upgraded a maven build from about 10 days ago to the
nightly build available on myfaces website.
I am using a custom authentication method in a request scope bean.
The code for the logout() method is performing the following :

    getRequest().getSession().invalidate();
    Cookie terminate = new Cookie(
   
TokenBasedRememberMeServices.ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY,
null);
    terminate.setMaxAge(0);
    getResponse().addCookie(terminate);
    return "welcome";

The "welcome" refers to a navigation rule in my faces-config.xml :

    
        /*
        
            welcome
            /home.xhtml
            
        
    

Before upgrading it was working fine but now I get this exception (I
translated in english the message):

java.lang.IllegalStateException: Not possible to create a session
after the response has been sent
    at
org.apache.catalina.connector.Request.doGetSession(Request.java:2206)
    at
org.apache.catalina.connector.Request.getSession(Request.java:2024)
    at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
    at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)
    at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:223)
    at
org.apache.myfaces.component.html.util.ExtensionsFilter.getFacesContext(ExtensionsFilter.java:185)
    at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:142)
    ...

If I add a "getRequest().getSession(true);" before returning this
solves the problem but I am worried about this change.
Would anybody have some hint about what is the matter please?

Thanks,

Thomas





Sandbox Schedule Component to Tomahawk?

2006-02-05 Thread Uri Kalish








- When will the Sandbox Schedule component
become a part of Tomahawk?

 





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






Re: Panel Grid custom component

2006-02-05 Thread Ali Raza
That works with only HtmlPanelGrid as the base class and not with UIInput or UIPanel.On 2/5/06, Ali Raza <[EMAIL PROTECTED]
> wrote:But i was wondering whether i could exten my component from UIInput or something and add an HTmlPanelGrid to it as a child ??
ThanxAliOn 2/5/06, 
Ali Raza <[EMAIL PROTECTED]> wrote:

Holas Volker,Thanx a lot for your help. I saw the way u had done it and realized my error. i was extending the component from UIPanel and then adding an Html Panel Grid to it as a child which doesnt make sense to begin with. Although even though what i was doing was wrong design wise  it still shouldve worked ... coz i hadnt overwritten either encodeChildren or encodeEnd. Anyway thanx a lot dude ...
Regards,AliOn 2/5/06, Volker Weber <

[EMAIL PROTECTED]> wrote:
Hi Ali,UIPanel for base class should work, did you overwrite encodeChildren()or encodeEnd() to do nothing?
BTW: don't expect these components between your rendered start and endcomments, they are just created here, the rendering is done inencodeChildren() method of the superclass.Just for make sure that my suggestions are correct i had implemented
this myself, extending HtmlPanelGrid.See attached sources and working example at:

http://weber-oldenburg.dyndns.org/myfaces-example-simple/myPanelGrid.jsf
Regards,  VolkerAli Raza wrote:> Hey Volker,>> I tried to add the components as you have instructed but nothing at all> gets rendered that way. i wonder if im inheriting my component from the
> right base class  UIPanel in my case > any how the code im trying now is:>> public void encodeBegin( FacesContext context )> {> try> {


> ResponseWriter writer = context.getResponseWriter();> writer.writeComment("* THIS> IS THE START OF COMPONENT> **");
>> HtmlPanelGrid panelGrid = new HtmlPanelGrid();> List children = panelGrid.getChildren();> panelGrid.setColumns(2);>> UIOutput labelName = new UIOutput();
> labelName.setValue("Enter name: ");> panelGrid.getChildren().add(labelName);>> UIInput inputName = new UIInput();> children.add


(inputName);>> UIOutput labelAge = new UIOutput();> labelAge.setValue("Enter age: ");> children.add(labelAge);>> UIInput inputAge = new UIInput();
> children.add(inputAge);>> this.getChildren().add(panelGrid);> super.encodeBegin(context);>> writer.writeComment("* THIS
> IS THE END OF COMPONENT> **");> }> catch( IOException e )> {>> }> }>
> Thanx a lot for your help though ...>> Ali--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.-- "A sixteenth century inventor called Wan Hu designed a rocket-propelled chair on which he planned to ascend into heaven. He built an open cabin, to which he fitted 47 rockets underneath and above, and two kites to keep him aloft. Wan Hu disappeared in flame and smoke and was never seen again. A crater on the moon is now named after him, so in one sense he made it to the heavens after all. This is the first recorded design of something approximating to a manned space rocket."
The Chinese Space Programme.From Conception to Future Capabilities.Brian Harvey

-- "A sixteenth century inventor called Wan Hu designed a rocket-propelled chair on which he planned to ascend into heaven. He built an open cabin, to which he fitted 47 rockets underneath and above, and two kites to keep him aloft. Wan Hu disappeared in flame and smoke and was never seen again. A crater on the moon is now named after him, so in one sense he made it to the heavens after all. This is the first recorded design of something approximating to a manned space rocket."
The Chinese Space Programme.From Conception to Future Capabilities.Brian Harvey

-- "A sixteenth century inventor called Wan Hu designed a rocket-propelled chair on which he planned to ascend into heaven. He built an open cabin, to which he fitted 47 rockets underneath and above, and two kites to keep him aloft. Wan Hu disappeared in flame and smoke and was never seen again. A crater on the moon is now named after him, so in one sense he made it to the heavens after all. This is the first recorded design of something approximating to a manned space rocket."
The Chinese Space Programme.From Conception to Future Capabilities.Brian Harvey


Re: Panel Grid custom component

2006-02-05 Thread Ali Raza
But i was wondering whether i could exten my component from UIInput or something and add an HTmlPanelGrid to it as a child ??ThanxAliOn 2/5/06, 
Ali Raza <[EMAIL PROTECTED]> wrote:
Holas Volker,Thanx a lot for your help. I saw the way u had done it and realized my error. i was extending the component from UIPanel and then adding an Html Panel Grid to it as a child which doesnt make sense to begin with. Although even though what i was doing was wrong design wise  it still shouldve worked ... coz i hadnt overwritten either encodeChildren or encodeEnd. Anyway thanx a lot dude ...
Regards,AliOn 2/5/06, Volker Weber <
[EMAIL PROTECTED]> wrote:
Hi Ali,UIPanel for base class should work, did you overwrite encodeChildren()or encodeEnd() to do nothing?
BTW: don't expect these components between your rendered start and endcomments, they are just created here, the rendering is done inencodeChildren() method of the superclass.Just for make sure that my suggestions are correct i had implemented
this myself, extending HtmlPanelGrid.See attached sources and working example at:
http://weber-oldenburg.dyndns.org/myfaces-example-simple/myPanelGrid.jsf
Regards,  VolkerAli Raza wrote:> Hey Volker,>> I tried to add the components as you have instructed but nothing at all> gets rendered that way. i wonder if im inheriting my component from the
> right base class  UIPanel in my case > any how the code im trying now is:>> public void encodeBegin( FacesContext context )> {> try> {

> ResponseWriter writer = context.getResponseWriter();> writer.writeComment("* THIS> IS THE START OF COMPONENT> **");
>> HtmlPanelGrid panelGrid = new HtmlPanelGrid();> List children = panelGrid.getChildren();> panelGrid.setColumns(2);>> UIOutput labelName = new UIOutput();
> labelName.setValue("Enter name: ");> panelGrid.getChildren().add(labelName);>> UIInput inputName = new UIInput();> children.add

(inputName);>> UIOutput labelAge = new UIOutput();> labelAge.setValue("Enter age: ");> children.add(labelAge);>> UIInput inputAge = new UIInput();
> children.add(inputAge);>> this.getChildren().add(panelGrid);> super.encodeBegin(context);>> writer.writeComment("* THIS
> IS THE END OF COMPONENT> **");> }> catch( IOException e )> {>> }> }>
> Thanx a lot for your help though ...>> Ali--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.-- "A sixteenth century inventor called Wan Hu designed a rocket-propelled chair on which he planned to ascend into heaven. He built an open cabin, to which he fitted 47 rockets underneath and above, and two kites to keep him aloft. Wan Hu disappeared in flame and smoke and was never seen again. A crater on the moon is now named after him, so in one sense he made it to the heavens after all. This is the first recorded design of something approximating to a manned space rocket."
The Chinese Space Programme.From Conception to Future Capabilities.Brian Harvey

-- "A sixteenth century inventor called Wan Hu designed a rocket-propelled chair on which he planned to ascend into heaven. He built an open cabin, to which he fitted 47 rockets underneath and above, and two kites to keep him aloft. Wan Hu disappeared in flame and smoke and was never seen again. A crater on the moon is now named after him, so in one sense he made it to the heavens after all. This is the first recorded design of something approximating to a manned space rocket."
The Chinese Space Programme.From Conception to Future Capabilities.Brian Harvey


Re: Panel Grid custom component

2006-02-05 Thread Ali Raza
Holas Volker,Thanx a lot for your help. I saw the way u had done it and realized my error. i was extending the component from UIPanel and then adding an Html Panel Grid to it as a child which doesnt make sense to begin with. Although even though what i was doing was wrong design wise  it still shouldve worked ... coz i hadnt overwritten either encodeChildren or encodeEnd. Anyway thanx a lot dude ...
Regards,AliOn 2/5/06, Volker Weber <[EMAIL PROTECTED]> wrote:
Hi Ali,UIPanel for base class should work, did you overwrite encodeChildren()or encodeEnd() to do nothing?
BTW: don't expect these components between your rendered start and endcomments, they are just created here, the rendering is done inencodeChildren() method of the superclass.Just for make sure that my suggestions are correct i had implemented
this myself, extending HtmlPanelGrid.See attached sources and working example at:http://weber-oldenburg.dyndns.org/myfaces-example-simple/myPanelGrid.jsf
Regards,  VolkerAli Raza wrote:> Hey Volker,>> I tried to add the components as you have instructed but nothing at all> gets rendered that way. i wonder if im inheriting my component from the
> right base class  UIPanel in my case > any how the code im trying now is:>> public void encodeBegin( FacesContext context )> {> try> {
> ResponseWriter writer = context.getResponseWriter();> writer.writeComment("* THIS> IS THE START OF COMPONENT> **");
>> HtmlPanelGrid panelGrid = new HtmlPanelGrid();> List children = panelGrid.getChildren();> panelGrid.setColumns(2);>> UIOutput labelName = new UIOutput();
> labelName.setValue("Enter name: ");> panelGrid.getChildren().add(labelName);>> UIInput inputName = new UIInput();> children.add
(inputName);>> UIOutput labelAge = new UIOutput();> labelAge.setValue("Enter age: ");> children.add(labelAge);>> UIInput inputAge = new UIInput();
> children.add(inputAge);>> this.getChildren().add(panelGrid);> super.encodeBegin(context);>> writer.writeComment("* THIS
> IS THE END OF COMPONENT> **");> }> catch( IOException e )> {>> }> }>
> Thanx a lot for your help though ...>> Ali--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.-- "A sixteenth century inventor called Wan Hu designed a rocket-propelled chair on which he planned to ascend into heaven. He built an open cabin, to which he fitted 47 rockets underneath and above, and two kites to keep him aloft. Wan Hu disappeared in flame and smoke and was never seen again. A crater on the moon is now named after him, so in one sense he made it to the heavens after all. This is the first recorded design of something approximating to a manned space rocket."
The Chinese Space Programme.From Conception to Future Capabilities.Brian Harvey


Re: Redisplay Problem

2006-02-05 Thread Francesco Persico

tnx this is exactly what i need :)
- Original Message - 
From: "Volker Weber" <[EMAIL PROTECTED]>

To: "MyFaces Discussion" 
Sent: Sunday, February 05, 2006 12:16 PM
Subject: Re: Redisplay Problem



Hi Francesco,


... the AccountBean is in request-scope


thats the reason for recreating this bean every request ;-).

You can hold a request-scope bean over multiple requests using the
t:saveState tag: 

See: http://myfaces.apache.org/tlddoc/tomahawk/t/saveState.html

Regards,
 Volker

Francesco Persico wrote:

*viewAccount.jsp
*









Account Roles:
















after the AccountBean.removeRoleAction is finished the method return
"success" and the page is redisplayed but the outputText fields are all
blank in exception of id(i have the inputHidden field) because ,from a
debug, it seem that a new AccountBean is created :( how can i redisplay
the same account of the old request? the AccountBean is in request-scope
because i am the admin of the web application and i am managing the
roles of other registered user

i hope someone will help me, tnx




Email.it, the professional e-mail, gratis per te:clicca qui


Sponsor:
Logos Finanziaria SPA. Società di credito ad erogazione diretta. Fino a
30.000 euro in 24 ore! Clicca e scopri come

Clicca qui 



--
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.

__ NOD32 1.1393 (20060203) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com






--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Telefonare all'estero risparmiando fino all'80%? Con Email.it Phone Card puoi, 
clicca e scopri tutti i vantaggi
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2683&d=5-2


Re: Collision of session object and h:dataTable "internal variable"

2006-02-05 Thread Mathias Brökelmann
The var attribute is only available when the table renderer renders
the rows with the data. the rendered attribute is evaluated before the
rows are rendered. The table renderer requests the rendered value of
each column for the header and footer cells which are rendered without
the var attribute is set.

It will not work when you rename the var attribute. Each attribute of
h:datatable and h:column (including their facets header and footer)
can not be made dependent on the var attribute. Only the additional
defined row-specific attributes of t:column can depend on the var
attribute.

2006/2/4, Michel Goldstein <[EMAIL PROTECTED]>:
> Hi there,
>
> I'm having a problem of the wrong bean being resolved on an h:dataTable...
> I'm building a JSF application to augment a legacy JSP application (in other
> words, there are still a lot of plain-jsp pages still left). In the
> h:dataTable I have the following statement:
>
>  value="#{productTypeBrowse.selectedProductType.attributes}">
> 
> ...
>
> I tested it all separately and it worked fine. However, when I integrated
> with the previous system ( i.e., put it into QA and the QA navigated through
> the legacy pages), I got an error message saying that it could not find the
> method "hasProperties" in the bean. When I paid more attention to the error
> message, it was looking for the bean in a legacy data type.
>
> I then went through the legacy code and found the following call:
>
> pageContext.setAttribute( "attribute", oldObject,
> PageContext.SESSION_SCOPE);
>
> And what it looks like is that when it is running, instead of resolving to
> the dataTable-set "local" variable it is resolving to the session object. Is
> this an expected behavior? Is the only way of going around this to rename my
> dataTable variables to something that does not collide with any set session
> variables?
>
> Thank you,
>
> Michel
>


--
Mathias


Re: Error when using "spread" layout in programmatically created HtmlSelectOneRadio

2006-02-05 Thread Volker Weber
Hi Mathias,

set the renderType to "org.apache.myfaces.Radio";

otherwise you won't get the tomahawk renderer.

Regards,
  Volker

Matthias Kahlau wrote:
> Hi!
> 
> 
> I used "spread" layout successfully with HtmlSelectOneRadio and
> HtmlSelectManyCheckbox in JSP. Now I programmatically created a
> HtmlSelectOneRadio and set the layout attribute to "spread":
> 
> HtmlSelectOneRadio radios = new HtmlSelectOneRadio(); // Tomahawk

radios.setRendererType("org.apache.myfaces.Radio");

>   selectOne = radios;
>   this.form.getChildren().add(selectOne);
>   selectOne.setId(id);
>   radios.setLayout("spread");
> 
> 
> When the view is rendered, I receive the following error:
> 
> 2006-02-05 12:43:56,921 ERROR
> [org.apache.myfaces.renderkit.html.HtmlRadioRendererBase] Wrong layout
> attribute for component _id0:Frage_2: spread
> 
> 
> Why do I get this error? (I need spread layout...)
> 
> (MyFaces in use: 20051130)
> 
> 
> 
> Regards,
> 
> Matthias
> 

-- 
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.


WG: Error when using "spread" layout in programmatically created HtmlSelectOneRadio

2006-02-05 Thread Matthias Kahlau
BTW:

In the console, I get the following stacktrace:

12:43:56,937 ERROR [Engine] StandardWrapperValve[Faces Servlet]:
Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalArgumentException: Value is no String and component
_id0:Frage_2with path: {Component-Path : [Class: javax.faces.component.
UIViewRoot,ViewId: /ParticipationView_2][Class:
javax.faces.component.UIForm,Id: _id0][Class:
org.apache.myfaces.component.html.ext.HtmlSele
ctOneRadio,Id: Frage_2]} does not have a Converter
at
org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(RendererU
tils.java:538)
at
org.apache.myfaces.renderkit.html.HtmlRadioRendererBase.encodeEnd(HtmlRadioR
endererBase.java:92)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:521)
at
de.fhzw.portal.umfragesystem.view.custom.CustomViewHandler.renderResponse(Cu
stomViewHandler.java:230)
at
de.fhzw.portal.umfragesystem.view.custom.CustomViewHandler.renderResponse(Cu
stomViewHandler.java:227)
at
de.fhzw.portal.umfragesystem.view.custom.CustomViewHandler.renderResponse(Cu
stomViewHandler.java:227)
at
de.fhzw.portal.umfragesystem.view.custom.CustomViewHandler.renderView(Custom
ViewHandler.java:177)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:123)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
ve.java:66)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.java:150)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
54)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Thread.java:534)



Regards,

Matthias

> -Ursprüngliche Nachricht-
> Von: Matthias Kahlau [mailto:[EMAIL PROTECTED]
> Gesendet: Sonnt

Error when using "spread" layout in programmatically created HtmlSelectOneRadio

2006-02-05 Thread Matthias Kahlau
Hi!


I used "spread" layout successfully with HtmlSelectOneRadio and
HtmlSelectManyCheckbox in JSP. Now I programmatically created a
HtmlSelectOneRadio and set the layout attribute to "spread":

HtmlSelectOneRadio radios = new HtmlSelectOneRadio(); // Tomahawk
  selectOne = radios;
  this.form.getChildren().add(selectOne);
  selectOne.setId(id);
  radios.setLayout("spread");


When the view is rendered, I receive the following error:

2006-02-05 12:43:56,921 ERROR
[org.apache.myfaces.renderkit.html.HtmlRadioRendererBase] Wrong layout
attribute for component _id0:Frage_2: spread


Why do I get this error? (I need spread layout...)

(MyFaces in use: 20051130)



Regards,

Matthias



Re: AW: document.getElementById("jsf_tree_64") has no properties

2006-02-05 Thread Volker Weber
Hi Haihua,

the state saving method is defined as context-param in the web.xml:



  State saving method: "client" or "server" (= default) See
  JSF Specification 2.5.2

javax.faces.STATE_SAVING_METHOD
server


Seems i was wrong saying client is the default :-(.

Regards,
  Volker


Haihua Luo wrote:
> Hi Volker,
> 
> thank you for your reply! You are right. The hidden input field "jsf_tree_*"
> cannot be found in the generated html page. But how can I switch to
> server-side state saving?
> 
> Thanks!
> 
> Haihua
> 
> -Ursprüngliche Nachricht-
> Von: Volker Weber [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 3. Februar 2006 18:47
> An: MyFaces Discussion
> Betreff: Re: document.getElementById("jsf_tree_64") has no properties
> 
> Hi,
> 
> this may be a portlet problem? I don't know mutch about portlets, but
> afaik the portlet rewrites the ids to ensure they are unique.
> 
> When using client-side state saving (which is the default) there are two
> hidden input fields "jsf_tree_64" and "jsf_state_64" in which the state
> is stored.
> 
> Try server-side state saving if you can.
> 
> Regards,
>   Volker
> 
> Haihua Luo wrote:
> 
>>Hi Lists,
>>
>>I want to test the simple sandbox example for inputSuggestAjax. But when
>>I input sth. in the input field, an error occurs in the web page in
>>firefox: document.getElementById("jsf_tree_64") has no properties. Any
>>ideas or comment why it happens?
>>
>>I am using myfaces 1.1.1, Jboss 3.2.6 and Pluto for portlet
>>
>>my view.jsp is used to call the inputSuggestAjax:
>>
>><%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
>><%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
>><%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="t"%>
>><%@ taglib uri="http://myfaces.apache.org/sandbox"; prefix="s"%>
>>
>>
>>   
>>   
>>.ajaxListItem {}
>>.ajaxList {}
>>   
>> 
>>   
>>   >suggestedItemsMethod="#{myInputSuggestAjax.getItems}" styleLocation="" />
>>  
>>   
>>
>>
>>
>>and my bean is written in MyInputSuggestAjaxBean.java:
>>
>>package com.seeburger.portlet.processoverview;
>>
>>import java.util.List;
>>import java.util.ArrayList;
>>
>>/**
>> *  @jsf.bean  name = "myInputSuggestAjax"
>> *scope = "request"
>> *
>> */
>>public class MyInputSuggestAjaxBean
>>{
>>public List getItems(String prefix)
>>{
>>List li = new ArrayList();
>>li.add(prefix+1);
>>li.add(prefix+2);   
>>li.add(prefix+3);
>>li.add(prefix+4);
>>li.add(prefix+5);
>>li.add(prefix+6);
>>return li;
>>}
>>   
>>   
>>public List getItems(String prefix, Integer maxSize) {
>> 
>> List li = new ArrayList();
>> 
>> for(int i = 0; i < maxSize.intValue(); i++) {
>>  li.add(prefix+ " " +(i+1));
>> }
>> 
>> return li;
>>}
>>}
>>
>>Thank you so much!
>>
>>Haihua
>>
> 
> 

-- 
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.


AW: document.getElementById("jsf_tree_64") has no properties

2006-02-05 Thread Haihua Luo
Hi Volker,

thank you for your reply! You are right. The hidden input field "jsf_tree_*"
cannot be found in the generated html page. But how can I switch to
server-side state saving?

Thanks!

Haihua

-Ursprüngliche Nachricht-
Von: Volker Weber [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 3. Februar 2006 18:47
An: MyFaces Discussion
Betreff: Re: document.getElementById("jsf_tree_64") has no properties

Hi,

this may be a portlet problem? I don't know mutch about portlets, but
afaik the portlet rewrites the ids to ensure they are unique.

When using client-side state saving (which is the default) there are two
hidden input fields "jsf_tree_64" and "jsf_state_64" in which the state
is stored.

Try server-side state saving if you can.

Regards,
  Volker

Haihua Luo wrote:
> 
> Hi Lists,
> 
> I want to test the simple sandbox example for inputSuggestAjax. But when
> I input sth. in the input field, an error occurs in the web page in
> firefox: document.getElementById("jsf_tree_64") has no properties. Any
> ideas or comment why it happens?
> 
> I am using myfaces 1.1.1, Jboss 3.2.6 and Pluto for portlet
> 
> my view.jsp is used to call the inputSuggestAjax:
> 
> <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
> <%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="t"%>
> <%@ taglib uri="http://myfaces.apache.org/sandbox"; prefix="s"%>
> 
> 
>
>
> .ajaxListItem {}
> .ajaxList {}
>
>  
>
> suggestedItemsMethod="#{myInputSuggestAjax.getItems}" styleLocation="" />
>   
>
> 
> 
> 
> and my bean is written in MyInputSuggestAjaxBean.java:
> 
> package com.seeburger.portlet.processoverview;
> 
> import java.util.List;
> import java.util.ArrayList;
> 
> /**
>  *  @jsf.bean  name = "myInputSuggestAjax"
>  *scope = "request"
>  *
>  */
> public class MyInputSuggestAjaxBean
> {
> public List getItems(String prefix)
> {
> List li = new ArrayList();
> li.add(prefix+1);
> li.add(prefix+2);   
> li.add(prefix+3);
> li.add(prefix+4);
> li.add(prefix+5);
> li.add(prefix+6);
> return li;
> }
>
>
> public List getItems(String prefix, Integer maxSize) {
>  
>  List li = new ArrayList();
>  
>  for(int i = 0; i < maxSize.intValue(); i++) {
>   li.add(prefix+ " " +(i+1));
>  }
>  
>  return li;
> }
> }
> 
> Thank you so much!
> 
> Haihua
> 

-- 
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: Redisplay Problem

2006-02-05 Thread Volker Weber
Hi Francesco,

> ... the AccountBean is in request-scope

thats the reason for recreating this bean every request ;-).

You can hold a request-scope bean over multiple requests using the
t:saveState tag: 

See: http://myfaces.apache.org/tlddoc/tomahawk/t/saveState.html

Regards,
  Volker

Francesco Persico wrote:
> *viewAccount.jsp
> *
> 
> 
>   
>value="#{AccountBean.id}">
>value="#{AccountBean.id}">
>value="#{AccountBean.username}">
>value="#{AccountBean.email}">
>value="#{AccountBean.firstName}">
>value="#{AccountBean.lastName}">
>   Account Roles:
>   
>   
>value="#{role.description}">
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> 
> after the AccountBean.removeRoleAction is finished the method return
> "success" and the page is redisplayed but the outputText fields are all
> blank in exception of id(i have the inputHidden field) because ,from a
> debug, it seem that a new AccountBean is created :( how can i redisplay
> the same account of the old request? the AccountBean is in request-scope
> because i am the admin of the web application and i am managing the
> roles of other registered user
> 
> i hope someone will help me, tnx
> 
> 
> 
> 
> Email.it, the professional e-mail, gratis per te:clicca qui
> 
> 
> Sponsor:
> Logos Finanziaria SPA. Società di credito ad erogazione diretta. Fino a
> 30.000 euro in 24 ore! Clicca e scopri come
> 
> Clicca qui 
> 

-- 
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: Panel Grid custom component

2006-02-05 Thread Volker Weber
Hi Ali,

UIPanel for base class should work, did you overwrite encodeChildren()
or encodeEnd() to do nothing?

BTW: don't expect these components between your rendered start and end
comments, they are just created here, the rendering is done in
encodeChildren() method of the superclass.

Just for make sure that my suggestions are correct i had implemented
this myself, extending HtmlPanelGrid.

See attached sources and working example at:

http://weber-oldenburg.dyndns.org/myfaces-example-simple/myPanelGrid.jsf

Regards,
  Volker

Ali Raza wrote:
> Hey Volker,
> 
> I tried to add the components as you have instructed but nothing at all
> gets rendered that way. i wonder if im inheriting my component from the
> right base class  UIPanel in my case 
> any how the code im trying now is:
> 
> public void encodeBegin( FacesContext context )
> {
> try
> {
> ResponseWriter writer = context.getResponseWriter();
> writer.writeComment("* THIS
> IS THE START OF COMPONENT
> **");
>
> HtmlPanelGrid panelGrid = new HtmlPanelGrid();
> List children = panelGrid.getChildren();   
> panelGrid.setColumns(2);
>
> UIOutput labelName = new UIOutput();
> labelName.setValue("Enter name: ");
> panelGrid.getChildren().add(labelName);
>
> UIInput inputName = new UIInput();
> children.add(inputName);
>
> UIOutput labelAge = new UIOutput();
> labelAge.setValue("Enter age: ");
> children.add(labelAge);
>
> UIInput inputAge = new UIInput();
> children.add(inputAge);
>
> this.getChildren().add(panelGrid);
> super.encodeBegin(context);
>
> writer.writeComment("* THIS
> IS THE END OF COMPONENT
> **");
> }
> catch( IOException e )
> {
> 
> }
> } 
> 
> Thanx a lot for your help though ...
> 
> Ali

-- 
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.
package org.apache.myfaces.examples.test;

import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
import javax.faces.context.FacesContext;
import java.io.IOException;
import java.util.List;


public class MyPanelGrid  extends HtmlPanelGrid {

  public static final java.lang.String COMPONENT_TYPE = "javax.faces.MyPanelGrid";

  boolean created;

  public void encodeBegin(FacesContext context) throws IOException {

if (! created) {
  List children = getChildren();
  setColumns(2);

  UIOutput labelName = new UIOutput();
  labelName.setValue("Enter name: ");
  children.add(labelName);

  UIInput inputName = new UIInput();
  children.add(inputName);

  UIOutput labelAge = new UIOutput();
  labelAge.setValue("Enter age: ");
  children.add(labelAge);

  UIInput inputAge = new UIInput();
  children.add(inputAge);

  created = true;
}

super.encodeBegin(context);
  }

  public Object saveState(FacesContext facesContext) {
Object[] state = new Object[2];
state[0] = super.saveState(facesContext);
state[1] = new Boolean(created);
return state;
  }

  public void restoreState(FacesContext facesContext, Object object) {
Object[] state = (Object[]) object;
super.restoreState(facesContext, state[0]);
created = ((Boolean)state[1]).booleanValue();
  }

}
package org.apache.myfaces.examples.test;

import org.apache.myfaces.taglib.html.HtmlPanelGridTag;

public class MyPanelGridTag extends HtmlPanelGridTag {
  public String getComponentType() {
return MyPanelGrid.COMPONENT_TYPE;
  }
}


Redisplay Problem

2006-02-05 Thread Francesco Persico



viewAccount.jsp
			
			"id" value="#{AccountBean.id}">
			"#{AccountBean.id}">
			"#{AccountBean.username}">
			"#{AccountBean.email}">
			"#{AccountBean.firstName}">
			"#{AccountBean.lastName}">
			Account Roles:
			"#{AccountBean.roles}" var="role">
			
			"#{role.description}">
			
			
			"#{AccountBean.removeRoleAction}">
			"Remove" >
			"roleName" value="#{role.name}">
			
			
			
			
		
after the AccountBean.removeRoleAction is finished the method 
return "success" and the page is redisplayed but the outputText fields are all 
blank in exception of id(i have the inputHidden field) because ,from a debug, it 
seem that a new AccountBean is created :( how can i redisplay the same account 
of the old request? the AccountBean is in request-scope because i am the admin 
of the web application and i am managing the roles of other registered 
useri hope someone will help me, tnx


Email.it, the professional e-mail, gratis per te:clicca qui

Sponsor:
Logos Finanziaria SPA. Società di credito ad erogazione diretta. Fino a 30.000 euro in 24 ore! Clicca e scopri come
Clicca qui