Re: Container managed authentication in Myfaces/JSF

2006-02-28 Thread Craig McClanahan
On 2/27/06, Ming Hu [EMAIL PROTECTED] wrote:
Redirect works but it's not what I wanted. The functionality I'd like to have is to put security constraints on the action values of JSF/Myfaces command links or buttons.Container managed security is *only* invoked on an initial request, not on a 
RequestDispatcher.forward() call, so you are not going to be able to accomplish what you are after. The container always assumes that, the application will do a forward only if it is appropriate to do so.Best solution is to just do the redirect. If that means you have to save some state information in session scope, just do it.
Regards,MingCraig

On 2/27/06, Grigoras Cristinel [EMAIL PROTECTED] wrote:

Hi, Is working ifyou use redirect.CristiMing Hu wrote: I have the following navigation case: navigation-casefrom-outcomenav_page_domain_op_list/from-outcome
to-view-id/page_domain_op_list/to-view-id /navigation-case and the following security constraint: ... url-pattern/page_domain_op_list.jsf/url-pattern
 ... If I point my browser to localhost:8080/myapp/page_domain_op_list.jsf, the web app works fine and the sign-in page is popup up by the container automatically. However I run into issues when I want to add same control on a
 JSF/Myfaces command link or command button. I tried to use page_domain_op_list.jsf or nav_page_domain_op_list.jsf as the action value, but neither worked. How should I handle this kind of situation? Has anyone put any
 thoughts into this? I'd really appreciate your inputs. Regards, Ming




Re: Annoying INFO Message: Unable to find component

2006-02-28 Thread Martin Marinschek
That's due to the interaction of JSP and JSF.

On the first pass (=first access of a page, on subsequent ones this is
not a problem), the component-tree get's created while going through
the JSP-page. Now if a component doesn't render it's children, the
first children (=your label) doesn't know that the next children
(=your input) will be created.

regards,

Martin

On 2/28/06, Mike Duffy [EMAIL PROTECTED] wrote:
 I've Googled on this for about two hours, hoping to find a solution.

 It seems that this is a very old issue that once started out as an error, but 
 was changed to an
 info message.

 Martin Marinschek closed MYFACES-261:
 http://www.archivum.info/dev@myfaces.apache.org/2005-06/msg00047.html

 Basic question:  If the component id is clearly referenced in the 
 h:outputLabel
 for=componentID..., why can't the component be found?  This seems like it 
 is a bug.

 Mike



 --- Volker Weber [EMAIL PROTECTED] wrote:

  Hi Mike,
 
  Mike Duffy wrote:
   I am seeing an annoying INFO message for every JSP that contains a JSF 
   component:
  
   INFO  [RendererUtils] Unable to find component 'projectTypeValue' 
   (calling findComponent on
   component 'selectProjectTypeIssueType:_idJsp74'). We'll try to return a 
   guessed client-id
  anyways
   - this will be a problem if you put the referenced component into a 
   different
  naming-container. If
   this is the case, you can always use the full client-id.
  
   The component name seems to be based on the backing bean parameter, not 
   the id.
  
   I've tried using variations of the full client-id, using 
   formname:componentParameter, etc.
   Nothing seems to work.
 
  not sure, but try an 'absolute' clientId starting with a colon
  e.g. :formname:componentParameter
 
  Regards,
Volker
 
  
   Any suggestions?
  
   Also, can someone please send an example of exactly what a full 
   client-id is?  Does the
   component id need to be related to the component paramaeter value?
  
   Thx.
  
   Mike
  
   __
   Do You Yahoo!?
   Tired of spam?  Yahoo! Mail has the best spam protection around
   http://mail.yahoo.com
  
 
  --
  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.
 


 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com



--

http://www.irian.at

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

Professional Support for Apache MyFaces


Re: Annoying INFO Message: Unable to find component

2006-02-28 Thread Craig McClanahan
On 2/28/06, Martin Marinschek [EMAIL PROTECTED] wrote:
That's due to the interaction of JSP and JSF.On the first pass (=first access of a page, on subsequent ones this isnot a problem), the component-tree get's created while going throughthe JSP-page. Now if a component doesn't render it's children, the
first children (=your label) doesn't know that the next children(=your input) will be created.BTW, this is one of the many things that works *much* better in a JSF 1.2 world. Craig
regards,MartinOn 2/28/06, Mike Duffy 
[EMAIL PROTECTED] wrote: I've Googled on this for about two hours, hoping to find a solution. It seems that this is a very old issue that once started out as an error, but was changed to an
 info message. Martin Marinschek closed MYFACES-261: http://www.archivum.info/dev@myfaces.apache.org/2005-06/msg00047.html
 Basic question:If the component id is clearly referenced in the h:outputLabel for="" why can't the component be found?This seems like it is a bug. Mike
 --- Volker Weber [EMAIL PROTECTED] wrote:  Hi Mike,   Mike Duffy wrote:
   I am seeing an annoying INFO message for every JSP that contains a JSF component: INFO[RendererUtils] Unable to find component 'projectTypeValue' (calling findComponent on
   component 'selectProjectTypeIssueType:_idJsp74'). We'll try to return a guessed client-id  anyways   - this will be a problem if you put the referenced component into a different
  naming-container. If   this is the case, you can always use the full client-id. The component name seems to be based on the backing bean parameter, not the id.
 I've tried using variations of the full client-id, using formname:componentParameter, etc.   Nothing seems to work.   not sure, but try an 'absolute' clientId starting with a colon
  e.g. :formname:componentParameter   Regards,  Volker  Any suggestions? Also, can someone please send an example of exactly what a full client-id is?Does the
   component id need to be related to the component paramaeter value? Thx. Mike __
   Do You Yahoo!?   Tired of spam?Yahoo! Mail has the best spam protection around   http://mail.yahoo.com   
  --  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.
  __ Do You Yahoo!? Tired of spam?Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com--http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces



Re: Container managed authentication in Myfaces/JSF

2006-02-28 Thread Grigoras Cristinel
Hi,

You have tried to use redirect inside navigation case like this?
navigation-case
from-outcomenav_page_domain_op_list/from-outcome
to-view-id/page_domain_op_list/to-view-id
redirect/
/navigation-case
in this case you loose validation messages.

other solution is to write your own navigation handler.

Cristi

Ming Hu wrote:
 Redirect works but it's not what I wanted. The functionality I'd like
 to have is to put security constraints on the action values of
 JSF/Myfaces command links or buttons.

 Regards,

 Ming

 On 2/27/06, *Grigoras Cristinel* [EMAIL PROTECTED] mailto:[EMAIL 
 PROTECTED]
 wrote:

 Hi,
  Is working if  you use redirect.

 Cristi


 Ming Hu wrote:
  I have the following navigation case:
 
navigation-case
 from-outcomenav_page_domain_op_list/from-outcome
 to-view-id/page_domain_op_list/to-view-id
/navigation-case
 
  and the following security constraint:
  ...
url-pattern/page_domain_op_list.jsf/url-pattern
  ...
 
  If I point my browser to
 localhost:8080/myapp/page_domain_op_list.jsf,
  the web app works fine and the sign-in page is popup up by the
  container automatically.
 
  However I run into issues when I want to add same control on a
  JSF/Myfaces command link or command button. I tried to use
  page_domain_op_list.jsf or nav_page_domain_op_list.jsf as the
  action value, but neither worked.
 
  How should I handle this kind of situation? Has anyone put any
  thoughts into this? I'd really appreciate your inputs.
 
  Regards,
 
  Ming
 





MyFaces dataTable column sorting

2006-02-28 Thread Malone, Daniel
Hi,

I'm trying to get the MyFaces dataTable to sort my columns. Getting 
to show up my data was no problem so I think I'm on the right way.

I'm not sure what the two attributes sortColumn and sortAscending
mean. 
I know that a String and a boolean is expected but that's about it.
Maybe 
someone can help me out.

I had a look at the examples on Irian.com but they don't help very much.

Is more for looking at.

I'm thankful for any hint.

JSP Page Code

t:dataTable
id=tbUsers
var=user
value=#{Results.list}
sortColumn=#{Results.sort}
sortAscending=#{Results.ascending}
 
t:column
f:facet name=header
t:commandSortHeader columnName=nr
outputText value=nr /
/t:commandSortHeader
/f:facet
h:outputText value=#{user.nr}/
/t:column
t:column
f:facet name=header
t:commandSortHeader columnName=status
h:outputText value=Status /
/t:commandSortHeader
/f:facet
h:outputText value=#{user.status} /
/t:column
 
...
 
/t:dataTable

Best regards,

Daniel Malone


How to make complex layout using datatable?

2006-02-28 Thread wang kai
Hi all,

I got a demand that need to show comlexdata in a datatable like the following table.



































































Could anyone direct me how to implement it using datatable?

Thanks



RE: Forms inside Forms - is it possible?

2006-02-28 Thread Jeffrey Porter


Hi Mike,

Whereabouts is the s:subform tag located?

Is it in Sandbox? I can only see s:form

Can u define enctype=multipart/form-data in s:subform ?

Thanks
Jeff

-Original Message-
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: 27 February 2006 19:05
To: MyFaces Discussion
Subject: Re: Forms inside Forms - is it possible?

May I suggest the s:subForm tag?

regards,

Martin

On 2/27/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 Is there more to the stack trace?

 I don't know offhand what would generate a

 javax.faces.FacesException: expr

 error.


 On 2/27/06, Jeffrey Porter [EMAIL PROTECTED] wrote:
 
 
  You're correct Mike,
 
  I seem to be having a slow brain moment.   :-)
 
  I now going to try changing
 
  h:form id=theForm
 
  To
 
  h:form id=formNCMAttach name=formNCMAttach
  enctype=multipart/form-data 
 
 
  I now get an exception...
 
  17:46:04,926 ERROR [[FacesServlet]] Servlet.service() for servlet
  FacesServlet threw exception javax.faces.FacesException: expr
  at
 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
  ervletExternalContextImpl.java:421)
 
  Any ideas?
 
  JP
 
 
  -Original Message-
  From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
  Sent: 27 February 2006 17:22
  To: MyFaces Discussion
  Subject: Re: Forms inside Forms - is it possible?
 
  It's unclear to me why you need a second form.
 
  Maybe you just need to put immediate=true on your
  file-upload-related controls?
  Or maybe look at the sandbox subform component if you need different
  validation on each submit
 
 
  On 2/27/06, Jeffrey Porter [EMAIL PROTECTED]
wrote:
  
   Thanks Dennis.
  
   I found your post on 2006-02-01 18:17 (HtmlCollapsiblePanel get's
a
   javascript error when inside two form tags), after I'd made my
post.
  
   :-)
  
   So I'm now looking at t:aliasBean, but that doesn't seem to
support
   setting the enctype=multipart/form-data.
  
   I guess I'm gonna have to redesign the whole page. :-(
  
   Unless you have any ideas?
  
   JP
  
  
   -Original Message-
   From: Dennis Byrne [mailto:[EMAIL PROTECTED]
   Sent: 27 February 2006 17:09
   To: MyFaces Discussion
   Subject: Re: Forms inside Forms - is it possible?
  
   Nested forms are not supported by HTML.  This is not a limitation
of
  the
   server side ( JSF, ASP.net , etc. ).
  
   Dennis Byrne
  
   -Original Message-
   From: Jeffrey Porter [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 27, 2006 11:48 AM
   To: 'MyFaces Discussion'
   Subject: Forms inside Forms - is it possible?
   
   
   
   Hello all again...
   
   
   
   I have the situation where I have a myfaces page, but inside it I
  want
   to have a second form for file upload.
   
   
   
   The outer object doesn't contain the files, hence it not part of
that
   object.
   
   
   
   Anyway, when the user clicks on the button to upload the file my
  method
   gets called but the
org.apache.myfaces.custom.fileupload.UploadedFile
   does not have its SET method called.
   
   Hence it's still null.
   
   
   
   Anyone any ideas on how solve this issue?
   
   
   
   Using the VaribleResolvers results in the UploadedFile remaining
  null.
   
   
   
   Thanks
   
   Jeff
   
   
  
  
  
 



--

http://www.irian.at

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

Professional Support for Apache MyFaces


Re: How to make complex layout using datatable?

2006-02-28 Thread Amit Jain



As far as i know dataTable dont support colspan and 
rowspan. If you need such thing, you have to make your own renderer for 
dataTable(extend HtmlTableRenderer) to support colspan and rowspan. 


  - Original Message - 
  From: 
  wang 
  kai 
  To: users@myfaces.apache.org 
  Sent: Tuesday, February 28, 2006 2:12 
  PM
  Subject: How to make complex layout using 
  datatable?
  
  Hi all,
  
  I got a demand that need to show comlexdata in a datatable like the 
  following table.
  
  
  


  

  


  

  


  

  

  


  

  


  

  

  


  

  

  


  

  

  

  
  Could anyone direct me how to implement it using datatable?
  
  Thanks
  
  
  

  No virus found in this incoming message.Checked by AVG Free 
  Edition.Version: 7.1.375 / Virus Database: 268.1.1/270 - Release Date: 
  2/27/2006


Re: How to make complex layout using datatable?

2006-02-28 Thread wang kai
Thanks for your reply.
2006/2/28, Amit Jain [EMAIL PROTECTED]:

As far as i know dataTable dont support colspan and rowspan. If you need such thing, you have to make your own renderer for dataTable(extend HtmlTableRenderer) to support colspan and rowspan. 



- Original Message - 
From: wang kai 

To: users@myfaces.apache.org 

Sent: Tuesday, February 28, 2006 2:12 PM
Subject: How to make complex layout using datatable?

Hi all,

I got a demand that need to show comlexdata in a datatable like the following table.



































































Could anyone direct me how to implement it using datatable?

Thanks




No virus found in this incoming message.Checked by AVG Free Edition.Version: 7.1.375 / Virus Database: 268.1.1/270 - Release Date: 2/27/2006



RE: How to make complex layout using datatable?

2006-02-28 Thread Frank Felix Debatin
The table component of ADF faces supports column groups (by nesting
af:column), and, maybe you also need the column attribute separateRows
that forces childs to be rendered as separate cells. Have a look at:

http://tinyurl.com/p98e8 

HTH 
Frank Felix


From: wang kai [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 10:04 AM
To: MyFaces Discussion
Subject: Re: How to make complex layout using datatable?


Thanks for your reply.


2006/2/28, Amit Jain [EMAIL PROTECTED]: 

As far as i know dataTable dont support colspan and rowspan. If you
need such thing, you have to make your own renderer for dataTable(extend
HtmlTableRenderer) to support colspan and rowspan. 

- Original Message - 
From: wang kai mailto:[EMAIL PROTECTED]  
To: users@myfaces.apache.org 
Sent: Tuesday, February 28, 2006 2:12 PM
Subject: How to make complex layout using datatable?

 
Hi all,
 
I got a demand that need to show comlex data in a datatable
like the following table.
 
 

 


 

 


 

 

 


 

 


 

 

 


 

 

 


 

 

 



 

Could anyone direct me how to implement it using datatable?
 
Thanks

 



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.1/270 - Release
Date: 2/27/2006






headerLink

2006-02-28 Thread Hasnain Badami
HiI am trying to modify the myfaces collapsiblepanel example such that an actionlistener is fired when the headerLink is created.The code is 
h:form id=form

t:dataTable id=test_dt 
var=person value=
#{thirdCollapsiblePanelBean.persons} preserveDataModel=
false
h:column
t:collapsiblePanel id=test4 
var=test4collapsed value=
#{person.collapsed}
f:facet name=header

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

h:outputText value=Person
/
t:headerLink immediate=true 
actionListener=#{thirdCollapsiblePanelBean.callFunction}

h:outputText value= Details 
rendered=#{test4collapsed}
/
h:outputText value=v Overview 
rendered=#{!test4collapsed}
/
/t:headerLink
h:commandLink value= test 
action=#{person.test}
/
/t:div
/f:facet
h:inputText id=firstname_input 
value=#{person.firstName}
/
h:commandLink value=test 
action=#{person.test} 
actionListener=#{thirdCollapsiblePanelBean.callFunction}
/
/t:collapsiblePanel
/h:column
/t:dataTable
/h:form
But the actionListener doesnt work in headerLink. has anybody else experienced the same problem. Any solutions to it? 

Hassnain


String concatenation in EL

2006-02-28 Thread Frank Felix Debatin



Hi all, 

sorry if this question is slightly off-topic ... but maybe 
you have a quick answer.

How to concat strings in EL?

My goalis towrite something like 


h:outputText value="#{ bundle[prefix+key] }" 
/

where prefix and key are string parameters.Neither 
plus sign nor spaces work.

TIA
Frank Felix


Re: Session Expiration Default Target?

2006-02-28 Thread Jonathan Harley

Mike Kienenberger wrote:

On 2/27/06, Elam Daly [EMAIL PROTECTED] wrote:


Oh, and how do I determine if a session has expired?  I don't see any
enlightening methods in the HttpSession class.


Your mistake here is thinking that the servlet api was intended to be useful :)

You have to do something like this:

boolean expired = false;
try
{
 session.getAttribute(anything):
 expired = false;
}
catch (IllegalStateException e)
{
expired = true;
}


No, in a filter you can just call session.isNew()

You can do a redirect in a filter like this:

((HttpServletResponse) response).sendRedirect(newUrl);
return;

instead of calling chain.doFilter() to pass control on to
later filters or the JSP.

Elam wrote:
 So it seems to me that in order to use my filter, that I need
 to use the doChain() method in the myfaces filter class

All filters do this by default, to pass control on. Trust me,
you don't have to alter the MyFaces filter.

I love filters. Who needs an MVC framework when you've got filters
to be the controllers? :-)

Jon
--
.
  Dr Jonathan Harley   .
   .   Email: [EMAIL PROTECTED]
   Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
   www.parkplatz.net   .   Mobile: 079 4116 0423


AW: String concatenation in EL

2006-02-28 Thread andreas.mitter



I'm 
sure it would work like this:
h:outputText value="#{ bundle[prefix] }" 
/ h:outputText value="#{ bundle[key] }" 
/

But I don't know, if you would like to do it like that 
(because it's not a really nice 
solution)

Regards,
Andy

  -Ursprüngliche Nachricht-Von: Frank Felix Debatin 
  [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 28. Februar 2006 
  14:15An: 'MyFaces Discussion'Betreff: String 
  concatenation in EL
  Hi all, 
  
  sorry if this question is slightly off-topic ... but 
  maybe you have a quick answer.
  
  How to concat strings in EL?
  
  My goalis towrite something like 
  
  
  h:outputText value="#{ bundle[prefix+key] }" 
  /
  
  where prefix and key are string parameters.Neither 
  plus sign nor spaces work.
  
  TIA
  Frank Felix
__

Diese Nachricht ist fuer die MAGNA STEYR Fahrzeugtechnik AG & Co KG rechtsunverbindlich!
- This message is not legally binding upon MAGNA STEYR Fahrzeugtechnik AG & Co KG!

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__



RE: String concatenation in EL

2006-02-28 Thread Frank Felix Debatin



This would have a different effect. I organized the 
ressources with keys such as "myPage.title". So I would like to 
have

#{bundle[ page.name + '.title' ] } !-- doesn't work 
--

to be resolved to 


#{bundle[ 'myPage.title' ] }

Thanks
Frank Felix




From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] Sent: Tuesday, February 28, 
2006 2:17 PMTo: users@myfaces.apache.orgSubject: AW: 
String concatenation in EL

I'm 
sure it would work like this:
h:outputText value="#{ bundle[prefix] }" 
/ h:outputText value="#{ bundle[key] }" 
/

But I don't know, if you 
would like to do it like that (because it's not a really nice 
solution)

Regards,
Andy

  -Ursprüngliche Nachricht-Von: Frank Felix Debatin 
  [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 28. Februar 2006 
  14:15An: 'MyFaces Discussion'Betreff: String 
  concatenation in EL
  Hi all, 
  
  sorry if this question is slightly off-topic ... but 
  maybe you have a quick answer.
  
  How to concat strings in EL?
  
  My goalis towrite something like 
  
  
  h:outputText value="#{ bundle[prefix+key] }" 
  /
  
  where prefix and key are string parameters.Neither 
  plus sign nor spaces work.
  
  TIA
  Frank 
Felix__ 
Diese Nachricht ist fuer die MAGNA STEYR Fahrzeugtechnik AG  Co KG 
rechtsunverbindlich! - This message is not legally binding upon MAGNA STEYR 
Fahrzeugtechnik AG  Co KG! This email and any files transmitted with it are 
confidential and intended solely for the use of the individual or entity to whom 
they are addressed. If you have received this email in error please notify your 
system manager. This footnote also confirms that this email message has been 
swept for the presence of computer viruses. 
__ 



Re: MyFaces dataTable column sorting

2006-02-28 Thread Dave Brondsema
See the tomahawk examples, there's a good example of t:dataTable

sortColumn, and sortAscending should bind to getters/setters for a
String and boolean.

Malone, Daniel wrote:
 Hi,
 
 I'm trying to get the MyFaces dataTable to sort my columns. Getting 
 to show up my data was no problem so I think I'm on the right way.
 
 I'm not sure what the two attributes sortColumn and sortAscending
 mean. 
 I know that a String and a boolean is expected but that's about it.
 Maybe 
 someone can help me out.
 
 I had a look at the examples on Irian.com but they don't help very much.
 
 Is more for looking at.
 
 I'm thankful for any hint.
 
 JSP Page Code
 
 t:dataTable
   id=tbUsers
   var=user
   value=#{Results.list}
   sortColumn=#{Results.sort}
   sortAscending=#{Results.ascending}
  
   t:column
   f:facet name=header
   t:commandSortHeader columnName=nr
   outputText value=nr /
   /t:commandSortHeader
   /f:facet
   h:outputText value=#{user.nr}/
   /t:column
   t:column
   f:facet name=header
   t:commandSortHeader columnName=status
   h:outputText value=Status /
   /t:commandSortHeader
   /f:facet
   h:outputText value=#{user.status} /
   /t:column
  
   ...
  
 /t:dataTable
 
 Best regards,
 
 Daniel Malone
 


-- 
Dave Brondsema
Software Developer
Cornerstone University



signature.asc
Description: OpenPGP digital signature


Re: String concatenation in EL

2006-02-28 Thread R. Müller

Hi,

the lack of this feature is really annoying to me too --
and this issue was discussed here serveral times without real success.
For me the following JSTL-approach works (but also no nice solution) :

c:set var=key value=${page.name}'.title' scope=request/
h:outputText value=#{treeBundle[requestScope['key']]}/

so long :-(

ronald


Frank Felix Debatin wrote:
This would have a different effect. I organized the ressources with keys 
such as myPage.title.  So I would like to have
 
#{bundle[ page.name + '.title' ] } !-- doesn't work --
 
to be resolved to
 
#{bundle[ 'myPage.title' ] }
 
Thanks

Frank Felix
 
 


--
*
*M-Unicomp GmbH
*
*Dipl.-Ing. Ronald Müller
*Softwareentwicklung
*
*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



AW: String concatenation in EL

2006-02-28 Thread andreas.mitter



Oh 
sorry, I thought prefix and key are just two entries in your 
bundle...
I just 
should have read the mail more exactly ;)

Regards,
Andy

  -Ursprüngliche Nachricht-Von: Frank Felix Debatin 
  [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 28. Februar 2006 
  14:24An: 'MyFaces Discussion'Betreff: RE: String 
  concatenation in EL
  This would have a different effect. I organized the 
  ressources with keys such as "myPage.title". So I would like to 
  have
  
  #{bundle[ page.name + '.title' ] } !-- doesn't work 
  --
  
  to be resolved to 
  
  
  #{bundle[ 'myPage.title' ] }
  
  Thanks
  Frank 
Felix
  
  
  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 28, 
  2006 2:17 PMTo: users@myfaces.apache.orgSubject: AW: 
  String concatenation in EL
  
  I'm 
  sure it would work like this:
  h:outputText value="#{ bundle[prefix] }" 
  / h:outputText value="#{ bundle[key] }" 
  /
  
  But I don't know, if 
  you would like to do it like that (because it's not a really nice 
  solution)
  
  Regards,
  Andy
  
-Ursprüngliche Nachricht-Von: Frank Felix Debatin 
[mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 28. Februar 2006 
14:15An: 'MyFaces Discussion'Betreff: String 
concatenation in EL
Hi all, 

sorry if this question is slightly off-topic ... but 
maybe you have a quick answer.

How to concat strings in EL?

My goalis towrite something like 


h:outputText value="#{ bundle[prefix+key] }" 
/

where prefix and key are string 
parameters.Neither plus sign nor spaces work.

TIA
Frank 
  Felix__ 
  Diese Nachricht ist fuer die MAGNA STEYR Fahrzeugtechnik AG  Co KG 
  rechtsunverbindlich! - This message is not legally binding upon MAGNA STEYR 
  Fahrzeugtechnik AG  Co KG! This email and any files transmitted with it 
  are confidential and intended solely for the use of the individual or entity 
  to whom they are addressed. If you have received this email in error please 
  notify your system manager. This footnote also confirms that this email 
  message has been swept for the presence of computer viruses. 
  __ 

__

Diese Nachricht ist fuer die MAGNA STEYR Fahrzeugtechnik AG & Co KG rechtsunverbindlich!
- This message is not legally binding upon MAGNA STEYR Fahrzeugtechnik AG & Co KG!

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
__



RE: String concatenation in EL

2006-02-28 Thread Frank Felix Debatin
God, is this ugly!!! 

However, thanks for the info.

@Andy, thanks no problem 

-Original Message-
From: R. Müller [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 2:54 PM
To: MyFaces Discussion
Subject: Re: String concatenation in EL

Hi,

the lack of this feature is really annoying to me too -- and this issue was
discussed here serveral times without real success.
For me the following JSTL-approach works (but also no nice solution) :

c:set var=key value=${page.name}'.title' scope=request/
h:outputText value=#{treeBundle[requestScope['key']]}/

so long :-(

ronald


Frank Felix Debatin wrote:
 This would have a different effect. I organized the ressources with 
 keys such as myPage.title.  So I would like to have
  
 #{bundle[ page.name + '.title' ] } !-- doesn't work --
  
 to be resolved to
  
 #{bundle[ 'myPage.title' ] }
  
 Thanks
 Frank Felix
  
  
 
--
*
*M-Unicomp GmbH
*
*Dipl.-Ing. Ronald Müller
*Softwareentwicklung
*
*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





URL IllegalArgumentException problem when mixing JSF and portlet

2006-02-28 Thread Alexandre Combe
Hi,

I m not sure this is the right place to post this message but
i try anyway. I’v got the following problem when mixing a JSF
Web Application based on Myfaces into a pluto container :

java.lang.IllegalArgumentException: only absolute URLs or full
path URIs are
allowed
at
org.apache.pluto.core.impl.PortletResponseImpl.encodeURL(PortletResponseImpl.java:120)
at
org.apache.myfaces.context.portlet.PortletExternalContextImpl.encodeActionURL(PortletExternalContex
tImpl.java:182)
at
org.apache.myfaces.renderkit.html.HtmlFormRendererBase.encodeBegin(HtmlFormRendererBase.java:66)
at
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)
at
javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
at
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:224)
at
org.apache.jsp.index_jsp._jspx_meth_h_form_0(index_jsp.java:152)
at
org.apache.jsp.index_jsp._jspx_meth_f_view_0(index_jsp.java:110)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Here is my portlet.xml :

?xml version=1.0 encoding=UTF-8?
portlet-app
xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd;

version=1.0
portlet
portlet-nameIPPortletJSF/portlet-name

portlet-classorg.apache.myfaces.portlet.MyFacesGenericPortlet/portlet-class
init-param
namedefault-view/name
value/index.jsp/value
/init-param

expiration-cache0/expiration-cache
supports
mime-typetext/html/mime-type
portlet-modeVIEW/portlet-mode
/supports
supported-localefr/supported-locale
portlet-info
titleIP Portlet JSF/title
keywordsip, service/keywords
/portlet-info

/portlet
/portlet-app

My web.xml :

servlet
servlet-nameFaces Servlet/servlet-name

servlet-classjavax.faces.webapp.FacesServlet/servlet-class
load-on-startup1/load-on-startup
/servlet

servlet
servlet-nameIPPortletJSF/servlet-name
display-nameIPPortletJSF Wrapper/display-name
descriptionAutomated generated Portlet
Wrapper/description

servlet-classorg.apache.pluto.core.PortletServlet/servlet-class
init-param
param-nameportlet-class/param-name

param-valueorg.apache.myfaces.portlet.MyFacesGenericPortlet/param-value
/init-param
init-param
param-nameportlet-guid/param-name
param-valueip-webappJSF.IPPortletJSF/param-value
/init-param
/servlet

servlet-mapping
servlet-nameIPPortletJSF/servlet-name
url-pattern/IPPortletJSF/*/url-pattern
/servlet-mapping

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

(without welcome file list)

and my very simple index.jsp (under root context) :
f:view
html
head
titleTest/title
/head
body

h:outputText value=Test 1 /

h:form
h:commandButton value=Test
action=#{IndividuBean.traiterAdresse} /
/h:form
/f:view

The h:outputText tag is ok and well rendered when alone. But
when adding the h:commandButton with the action, the problem
appears...
I can't find out why the error rised. Does it comes from a bad
configuration (welcome file that is not processed by the JSF
servlet...) ?

Any ideas ?

Thanks in advance.
Alexandre

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)





RE: A bunch of belated answers about ADF

2006-02-28 Thread James Moores
Adam,

Thanks for getting around answering so many of our questions.  I gave up
on the use of processScope in the end (and switched back to session
scopes), but I've kept access to all my properties abstracted so I can
easily switch back to processScopes if/when I can get one of the
suggested solutions to work.  I started on the phaseListener idea but
quickly realized it would be a bit of a nightmare because each
initialization is page specific (and phaseListeners aren't), so I might
now give one of the other ideas a go.

Thanks again to you (and all those others who gave advice on this
topic),

Cheers,

Jim
--
Jim Moores, SmartSpread Ltd, UK.

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2006 21:21
To: users@myfaces.apache.org
Subject: A bunch of belated answers about ADF

snip
- I use the ADF Faces 'Process scope' facility a great deal

This was a problem with values disappearing from the process scope. 
The code was relying on a dummy get method being triggered during
Render Response to do initialization.  It does hit a limitation of our
processScope - it's not thrilled with being mutated during Render
Response..  Laurie Harper's suggestion of using Shale is a good one;
with JSF 1.2, a beforePhaseListener on the f:view would work well too.
 You could hack around the processScope limitation by forcibly putting
something, anything, in the processScope before Render Response, so
we'll at least generate an ID correctly.

snip
Regards,
Adam Winer


AW: MyFaces dataTable column sorting

2006-02-28 Thread Matthias Kahlau
  I'm trying to get the MyFaces dataTable to sort my columns. Getting
  to show up my data was no problem so I think I'm on the right way.

I think you have to provide your own sort method, which sorts the data list
according to the sortAscending and sortColumn attribute values before the
data list is returned by its getter method.


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Dave Brondsema
 Gesendet: Dienstag, 28. Februar 2006 14:48
 An: MyFaces Discussion
 Betreff: Re: MyFaces dataTable column sorting


 See the tomahawk examples, there's a good example of t:dataTable

 sortColumn, and sortAscending should bind to getters/setters for a
 String and boolean.

 Malone, Daniel wrote:
  Hi,
 
  I'm trying to get the MyFaces dataTable to sort my columns. Getting
  to show up my data was no problem so I think I'm on the right way.
 
  I'm not sure what the two attributes sortColumn and sortAscending
  mean.
  I know that a String and a boolean is expected but that's about it.
  Maybe
  someone can help me out.
 
  I had a look at the examples on Irian.com but they don't help very much.
 
  Is more for looking at.
 
  I'm thankful for any hint.
 
  JSP Page Code
 
  t:dataTable
  id=tbUsers
  var=user
  value=#{Results.list}
  sortColumn=#{Results.sort}
  sortAscending=#{Results.ascending}
 
  t:column
  f:facet name=header
  t:commandSortHeader columnName=nr
  outputText value=nr /
  /t:commandSortHeader
  /f:facet
  h:outputText value=#{user.nr}/
  /t:column
  t:column
  f:facet name=header
  t:commandSortHeader columnName=status
  h:outputText value=Status /
  /t:commandSortHeader
  /f:facet
  h:outputText value=#{user.status} /
  /t:column
 
  ...
 
  /t:dataTable
 
  Best regards,
 
  Daniel Malone
 


 --
 Dave Brondsema
 Software Developer
 Cornerstone University





RE: facelets compilation

2006-02-28 Thread Garner, Shawn
Which xml are you referring to?
I should have been more specific. 
I was referring to serving xhtml pages.
Hopefully that is what you were referring to as well.

Shawn
-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 12:44 AM
To: MyFaces Discussion
Subject: Re: facelets  compilation

In my tests, Facelets shows pages faster than JSPs, pre-compiled
or not.  The XML parse is extremely fast, and only happens
once;  thereafter regular execution is much faster than JSPs,
as there is no need to recreate Tag objects or constantly
set properties, etc.

The only significant advantage JSPs have over Facelets is
better tool support.

-- Adam Winer
   JSF EG



On 2/27/06, Garner, Shawn [EMAIL PROTECTED] wrote:



 If you go with the facelets approach don't you loose your advantage of
 having a pre-compiled JSPs?

 As far as initial load time and just regular overhead of serving the page?



 Shawn






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


***


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



RE: Forms inside Forms - is it possible?

2006-02-28 Thread Jeffrey Porter


1: I've solved the problem by just using one form tag.

2: FacesException: expr was due to a h:outputLabel with no
for='problemCause' section. 

3: Thanks for the help Mike.

:-)



-Original Message-
From: Jeffrey Porter [mailto:[EMAIL PROTECTED] 
Sent: 28 February 2006 08:44
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: RE: Forms inside Forms - is it possible?



Hi Mike,

Whereabouts is the s:subform tag located?

Is it in Sandbox? I can only see s:form

Can u define enctype=multipart/form-data in s:subform ?

Thanks
Jeff

-Original Message-
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: 27 February 2006 19:05
To: MyFaces Discussion
Subject: Re: Forms inside Forms - is it possible?

May I suggest the s:subForm tag?

regards,

Martin

On 2/27/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 Is there more to the stack trace?

 I don't know offhand what would generate a

 javax.faces.FacesException: expr

 error.


 On 2/27/06, Jeffrey Porter [EMAIL PROTECTED] wrote:
 
 
  You're correct Mike,
 
  I seem to be having a slow brain moment.   :-)
 
  I now going to try changing
 
  h:form id=theForm
 
  To
 
  h:form id=formNCMAttach name=formNCMAttach
  enctype=multipart/form-data 
 
 
  I now get an exception...
 
  17:46:04,926 ERROR [[FacesServlet]] Servlet.service() for servlet
  FacesServlet threw exception javax.faces.FacesException: expr
  at
 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
  ervletExternalContextImpl.java:421)
 
  Any ideas?
 
  JP
 
 
  -Original Message-
  From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
  Sent: 27 February 2006 17:22
  To: MyFaces Discussion
  Subject: Re: Forms inside Forms - is it possible?
 
  It's unclear to me why you need a second form.
 
  Maybe you just need to put immediate=true on your
  file-upload-related controls?
  Or maybe look at the sandbox subform component if you need different
  validation on each submit
 
 
  On 2/27/06, Jeffrey Porter [EMAIL PROTECTED]
wrote:
  
   Thanks Dennis.
  
   I found your post on 2006-02-01 18:17 (HtmlCollapsiblePanel get's
a
   javascript error when inside two form tags), after I'd made my
post.
  
   :-)
  
   So I'm now looking at t:aliasBean, but that doesn't seem to
support
   setting the enctype=multipart/form-data.
  
   I guess I'm gonna have to redesign the whole page. :-(
  
   Unless you have any ideas?
  
   JP
  
  
   -Original Message-
   From: Dennis Byrne [mailto:[EMAIL PROTECTED]
   Sent: 27 February 2006 17:09
   To: MyFaces Discussion
   Subject: Re: Forms inside Forms - is it possible?
  
   Nested forms are not supported by HTML.  This is not a limitation
of
  the
   server side ( JSF, ASP.net , etc. ).
  
   Dennis Byrne
  
   -Original Message-
   From: Jeffrey Porter [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 27, 2006 11:48 AM
   To: 'MyFaces Discussion'
   Subject: Forms inside Forms - is it possible?
   
   
   
   Hello all again...
   
   
   
   I have the situation where I have a myfaces page, but inside it I
  want
   to have a second form for file upload.
   
   
   
   The outer object doesn't contain the files, hence it not part of
that
   object.
   
   
   
   Anyway, when the user clicks on the button to upload the file my
  method
   gets called but the
org.apache.myfaces.custom.fileupload.UploadedFile
   does not have its SET method called.
   
   Hence it's still null.
   
   
   
   Anyone any ideas on how solve this issue?
   
   
   
   Using the VaribleResolvers results in the UploadedFile remaining
  null.
   
   
   
   Thanks
   
   Jeff
   
   
  
  
  
 



--

http://www.irian.at

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

Professional Support for Apache MyFaces


Re: A bunch of belated answers about ADF

2006-02-28 Thread Adam Winer
The simplest possible PhaseListener I can imagine is one
that just does:
  processScope.put(a, b);

... that is, chucks some nonsense data on, and makes sure that
the system always generates a new token for every request.  That'd
be enough to bypass the issue you're encountering.

-- Adam



On 2/28/06, James Moores [EMAIL PROTECTED] wrote:
 Adam,

 Thanks for getting around answering so many of our questions.  I gave up
 on the use of processScope in the end (and switched back to session
 scopes), but I've kept access to all my properties abstracted so I can
 easily switch back to processScopes if/when I can get one of the
 suggested solutions to work.  I started on the phaseListener idea but
 quickly realized it would be a bit of a nightmare because each
 initialization is page specific (and phaseListeners aren't), so I might
 now give one of the other ideas a go.

 Thanks again to you (and all those others who gave advice on this
 topic),

 Cheers,

 Jim
 --
 Jim Moores, SmartSpread Ltd, UK.

 -Original Message-
 From: Adam Winer [mailto:[EMAIL PROTECTED]
 Sent: 26 February 2006 21:21
 To: users@myfaces.apache.org
 Subject: A bunch of belated answers about ADF

 snip
 - I use the ADF Faces 'Process scope' facility a great deal

 This was a problem with values disappearing from the process scope.
 The code was relying on a dummy get method being triggered during
 Render Response to do initialization.  It does hit a limitation of our
 processScope - it's not thrilled with being mutated during Render
 Response..  Laurie Harper's suggestion of using Shale is a good one;
 with JSF 1.2, a beforePhaseListener on the f:view would work well too.
  You could hack around the processScope limitation by forcibly putting
 something, anything, in the processScope before Render Response, so
 we'll at least generate an ID correctly.

 snip
 Regards,
 Adam Winer



RE: String concatenation in EL

2006-02-28 Thread Garner, Shawn








Try this maybe.  Not sure on this one.



c:set var="myPageTitle"
scope="request"

  c:out value="${page.name}"/c:out
value=".title"/

/c:set



then later do



h:outputText value="#{bundle[myPageTitle]}"/

    





Shawn













From: Frank Felix
Debatin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006
7:24 AM
To: 'MyFaces Discussion'
Subject: RE: String concatenation
in EL





This would have a different effect. I
organized the ressources with keys such as myPage.title. So I
would like to have



#{bundle[ page.name + '.title' ] }
!-- doesn't work --



to be resolved to 



#{bundle[ 'myPage.title' ] }



Thanks

Frank Felix













From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006
2:17 PM
To: users@myfaces.apache.org
Subject: AW: String concatenation
in EL



I'm sure it would work like this:





h:outputText value=#{
bundle[prefix] } / h:outputText value=#{ bundle[key]
} /











But I don't know, if you would like to
do it like that (because it's not a really nice solution)











Regards,





Andy





-Ursprüngliche Nachricht-
Von: Frank Felix Debatin
[mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 28. Februar
2006 14:15
An: 'MyFaces Discussion'
Betreff: String concatenation in
EL

Hi all, 



sorry if this question is slightly
off-topic ... but maybe you have a quick answer.



How to concat strings in EL?



My goalis towrite something
like 



h:outputText value=#{
bundle[prefix+key] } /



where prefix and key are string
parameters.Neither plus sign nor spaces work.



TIA

Frank Felix




__ Diese
Nachricht ist fuer die MAGNA STEYR Fahrzeugtechnik AG  Co KG
rechtsunverbindlich! - This message is not legally binding upon MAGNA STEYR
Fahrzeugtechnik AG  Co KG! This email and any files transmitted with it
are confidential and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email in error please notify
your system manager. This footnote also confirms that this email message has
been swept for the presence of computer viruses.
__ 




 

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







RE: A bunch of belated answers about ADF

2006-02-28 Thread James Moores
Ok, I'll give that a go, thanks.

Jim 

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED] 
Sent: 28 February 2006 15:27
To: MyFaces Discussion
Subject: Re: A bunch of belated answers about ADF

The simplest possible PhaseListener I can imagine is one that just does:
  processScope.put(a, b);

... that is, chucks some nonsense data on, and makes sure that the
system always generates a new token for every request.  That'd be enough
to bypass the issue you're encountering.

-- Adam



On 2/28/06, James Moores [EMAIL PROTECTED] wrote:
 Adam,

 Thanks for getting around answering so many of our questions.  I gave 
 up on the use of processScope in the end (and switched back to session

 scopes), but I've kept access to all my properties abstracted so I can

 easily switch back to processScopes if/when I can get one of the 
 suggested solutions to work.  I started on the phaseListener idea but 
 quickly realized it would be a bit of a nightmare because each 
 initialization is page specific (and phaseListeners aren't), so I 
 might now give one of the other ideas a go.

 Thanks again to you (and all those others who gave advice on this 
 topic),

 Cheers,

 Jim
 --
 Jim Moores, SmartSpread Ltd, UK.

 -Original Message-
 From: Adam Winer [mailto:[EMAIL PROTECTED]
 Sent: 26 February 2006 21:21
 To: users@myfaces.apache.org
 Subject: A bunch of belated answers about ADF

 snip
 - I use the ADF Faces 'Process scope' facility a great deal

 This was a problem with values disappearing from the process scope.
 The code was relying on a dummy get method being triggered during 
 Render Response to do initialization.  It does hit a limitation of our

 processScope - it's not thrilled with being mutated during Render 
 Response..  Laurie Harper's suggestion of using Shale is a good one; 
 with JSF 1.2, a beforePhaseListener on the f:view would work well too.
  You could hack around the processScope limitation by forcibly putting

 something, anything, in the processScope before Render Response, so 
 we'll at least generate an ID correctly.

 snip
 Regards,
 Adam Winer



RE: URL IllegalArgumentException problem when mixing JSF and portlet

2006-02-28 Thread Stan Silvert
It looks like your Pluto configuration is messed up.  According to the stack 
trace, the request never hits MyFacesGenericPortlet.

Stan Silvert
JBoss, Inc.
[EMAIL PROTECTED]
callto://stansilvert

 -Original Message-
 From: Alexandre Combe [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 28, 2006 9:39 AM
 To: users
 Subject: URL IllegalArgumentException problem when mixing JSF and portlet
 
 Hi,
 
 I m not sure this is the right place to post this message but
 i try anyway. IâEUR(tm)v got the following problem when mixing a JSF
 Web Application based on Myfaces into a pluto container :
 
 java.lang.IllegalArgumentException: only absolute URLs or full
 path URIs are
 allowed
 at
 org.apache.pluto.core.impl.PortletResponseImpl.encodeURL(PortletResponseIm
 pl.java:120)
 at
 org.apache.myfaces.context.portlet.PortletExternalContextImpl.encodeAction
 URL(PortletExternalContex
 tImpl.java:182)
 at
 org.apache.myfaces.renderkit.html.HtmlFormRendererBase.encodeBegin(HtmlFor
 mRendererBase.java:66)
 at
 javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307
 )
 at
 javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
 at
 javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:224)
 at
 org.apache.jsp.index_jsp._jspx_meth_h_form_0(index_jsp.java:152)
 at
 org.apache.jsp.index_jsp._jspx_meth_f_view_0(index_jsp.java:110)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
 :324)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 Here is my portlet.xml :
 
 ?xml version=1.0 encoding=UTF-8?
 portlet-app
 xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd;
 
 version=1.0
 portlet
 portlet-nameIPPortletJSF/portlet-name
 
 portlet-classorg.apache.myfaces.portlet.MyFacesGenericPortlet/portlet-
 class
 init-param
 namedefault-view/name
 value/index.jsp/value
 /init-param
 
 expiration-cache0/expiration-cache
 supports
 mime-typetext/html/mime-type
 portlet-modeVIEW/portlet-mode
 /supports
 supported-localefr/supported-locale
 portlet-info
 titleIP Portlet JSF/title
 keywordsip, service/keywords
 /portlet-info
 
 /portlet
 /portlet-app
 
 My web.xml :
 
 servlet
 servlet-nameFaces Servlet/servlet-name
 
 servlet-classjavax.faces.webapp.FacesServlet/servlet-class
 load-on-startup1/load-on-startup
 /servlet
 
 servlet
 servlet-nameIPPortletJSF/servlet-name
 display-nameIPPortletJSF Wrapper/display-name
 descriptionAutomated generated Portlet
 Wrapper/description
 
 servlet-classorg.apache.pluto.core.PortletServlet/servlet-class
 init-param
 param-nameportlet-class/param-name
 
 param-valueorg.apache.myfaces.portlet.MyFacesGenericPortlet/param-
 value
 /init-param
 init-param
 param-nameportlet-guid/param-name
 param-valueip-webappJSF.IPPortletJSF/param-value
 /init-param
 /servlet
 
 servlet-mapping
 servlet-nameIPPortletJSF/servlet-name
 url-pattern/IPPortletJSF/*/url-pattern
 /servlet-mapping
 
 servlet-mapping
 servlet-nameFaces Servlet/servlet-name
 url-pattern*.jsf/url-pattern
 /servlet-mapping
 
 (without welcome file list)
 
 and my very simple index.jsp (under root context) :
 f:view
 html
 head
 titleTest/title
 /head
 body
 
 h:outputText value=Test 1 /
 
 h:form
 h:commandButton value=Test
 action=#{IndividuBean.traiterAdresse} /
 /h:form
 /f:view
 
 The h:outputText tag is ok and well rendered when alone. But
 when adding the h:commandButton with the action, the problem
 appears...
 I can't find out why the error rised. Does it comes from a bad
 configuration (welcome file that is not processed by the JSF
 servlet...) ?
 
 Any ideas ?
 
 Thanks in advance.
 Alexandre
 
 Accédez au courrier électronique de La Poste : www.laposte.net ;
 3615 LAPOSTENET (0,34 EUR/mn) ; tél : 08 92 68 13 50 (0,34EUR/mn)
 
 



Re: facelets compilation

2006-02-28 Thread Adam Winer
Yep, the XHTML is what I'm referring to.

What takes so much time in a JSP engine is actually compiling
the generated .java code into a .class file.  So the benefit
of pre-compiling is an artifact of the fact that you're bothering
to generate a .java file in the first place.  Facelets doesn't
have to do that - xhtml file - tag hierarchy, one step, instead
of jsp file - .java file - .class file - loaded class - tag
hierarchy.

-- Adam


On 2/28/06, Garner, Shawn [EMAIL PROTECTED] wrote:
 Which xml are you referring to?
 I should have been more specific.
 I was referring to serving xhtml pages.
 Hopefully that is what you were referring to as well.

 Shawn
 -Original Message-
 From: Adam Winer [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 28, 2006 12:44 AM
 To: MyFaces Discussion
 Subject: Re: facelets  compilation

 In my tests, Facelets shows pages faster than JSPs, pre-compiled
 or not.  The XML parse is extremely fast, and only happens
 once;  thereafter regular execution is much faster than JSPs,
 as there is no need to recreate Tag objects or constantly
 set properties, etc.

 The only significant advantage JSPs have over Facelets is
 better tool support.

 -- Adam Winer
JSF EG



 On 2/27/06, Garner, Shawn [EMAIL PROTECTED] wrote:
 
 
 
  If you go with the facelets approach don't you loose your advantage of
  having a pre-compiled JSPs?
 
  As far as initial load time and just regular overhead of serving the page?
 
 
 
  Shawn
 
 
 
 
 
 
  This email may contain confidential
  material. If you were not an intended recipient,
  Please notify the sender and delete all copies.
  We may monitor email to and from our network.
 
 
 ***
 

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



[OT] Facelets JSP Scriptlets

2006-02-28 Thread Garner, Shawn








Is there any chance that facelets supports JSP Scriptlets?

I know it supports jstl and el but sometimes I still like to
use scriptlets even though I know it should be converted to a tag. 

I just don't want to take the time to convert
everything to tag libraries.

Mostly for function calls that take in parameters.



Shawn






 

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







Re: MyFaces dataTable column sorting

2006-02-28 Thread devosc
under what conditions might 'getAscending' be called ? From the
definitions of Boolean.valueOf(String) it is only true when the
sortAscending attr value is 'true', yet I cant see in any of the
examples a 'getAscending' method ?


Re: Container managed authentication in Myfaces/JSF

2006-02-28 Thread Ming Hu
redirect/ inside of a navigation-case works fine. And I like it for the following reasons:1. I can use container managed authentication, hence container managed authorization on the EJB/middle tier.
2. My browser's address bar displays the corresponding link when a command link/button is clicked, hence I can bookmark the URL.However I'd like to know more about the ramifications of using redirect.Cristi mentioned the lost of validation messages. Is this caused by the faces servlet renders a different view for redirected URL? Are there any other potential issues?
I really appreciate your time spent looking into this.Regards,MingOn 2/28/06, Grigoras Cristinel 
[EMAIL PROTECTED] wrote:Hi,You have tried to use redirect inside navigation case like this?
navigation-casefrom-outcomenav_page_domain_op_list/from-outcometo-view-id/page_domain_op_list/to-view-idredirect//navigation-case
in this case you loose validation messages.other solution is to write your own navigation handler.CristiMing Hu wrote: Redirect works but it's not what I wanted. The functionality I'd like
 to have is to put security constraints on the action values of JSF/Myfaces command links or buttons. Regards, Ming On 2/27/06, *Grigoras Cristinel* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi,Is working ifyou use redirect. Cristi Ming Hu wrote:
  I have the following navigation case:   navigation-case from-outcomenav_page_domain_op_list/from-outcome to-view-id/page_domain_op_list/to-view-id
  /navigation-case   and the following security constraint:  ...  url-pattern/page_domain_op_list.jsf/url-pattern
  ...   If I point my browser to localhost:8080/myapp/page_domain_op_list.jsf,  the web app works fine and the sign-in page is popup up by the
  container automatically.   However I run into issues when I want to add same control on a  JSF/Myfaces command link or command button. I tried to use  page_domain_op_list.jsf or nav_page_domain_op_list.jsf as the
  action value, but neither worked.   How should I handle this kind of situation? Has anyone put any  thoughts into this? I'd really appreciate your inputs.
   Regards,   Ming 


popup calendar Jenia

2006-02-28 Thread sjarlier








Hi!



I am using Jenia4Faces http://www.jenia.org/jsp/home.jsf;jsessionid=6E9178050A036EC207C849D3EFC905DC
for displaying a popup calendar. However, while having a listbox (selectOneMenu)
the listbox appears on the top of the calendar, how can I choose that the popup
should be rendered over the listbox?



I also get the date from
the calendar and want to convert the result into date however, each time I am
getting a strange date janvier 1970 although I chose a date in 2006. Here is my
code in the jsp page, what do I do wrong?



tr


 tdh:outputText
value=#{Fmsg.birthday}/:/td

 td


 h:inputText value=#{MyNewUserWizard.birthday}
id=birthday required=true 


 f:convertDateTime pattern=dd/MM//

 
/h:inputText

 
jp:popupCalendar for="" format=dd/MM/
/

 /td

/tr



Thanks in advance

Best,

Sophie








RE: popup calendar Jenia

2006-02-28 Thread Lewie Gass








Sophie,



As far as the select/list box is
concerned, unless something has changed recently in browsers, the zOrder by
default is to be on

top of everything else. The last time I
looked, it was impossible to change the z-Order, even with CSS styles or
_javascript_ The only

way we got around it was creating our own
code to hide the select box when someone was not selecting an item from it, and
in the

mean time displaying a div with
the current value of the select box in its place. but that requires a
lot of _javascript_ and onmouseover

and onmouseout stuff



Ponder











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006
10:26 AM
To: 'MyFaces
 Discussion'
Subject: popup calendar Jenia





Hi!



I am using Jenia4Faces http://www.jenia.org/jsp/home.jsf;jsessionid=6E9178050A036EC207C849D3EFC905DC
for displaying a popup calendar. However, while having a listbox
(selectOneMenu) the listbox appears on the top of the calendar, how can I
choose that the popup should be rendered over the listbox?



I also get the date from
the calendar and want to convert the result into date however, each time I am
getting a strange date janvier 1970 although I chose a date in 2006. Here is my
code in the jsp page, what do I do wrong?



tr


 tdh:outputText
value=#{Fmsg.birthday}/:/td


td


 h:inputText
value=#{MyNewUserWizard.birthday} id=birthday
required=true 


 f:convertDateTime pattern=dd/MM//


 /h:inputText


 jp:popupCalendar for=""
format=dd/MM/ /


/td

/tr



Thanks in advance

Best,

Sophie








RE: String concatenation in EL

2006-02-28 Thread CONNER, BRENDAN \(SBCSI\)
Another thing to look at might be to have a managed bean retrieve the value 
from the message bundle in its getter.  That makes the JSP simpler, at the 
expense of writing some extra Java code.

- Brendan

-Original Message-
From: Frank Felix Debatin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 8:07 AM
To: 'MyFaces Discussion'
Subject: RE: String concatenation in EL


God, is this ugly!!! 

However, thanks for the info.

@Andy, thanks no problem 

-Original Message-
From: R. Müller [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 2:54 PM
To: MyFaces Discussion
Subject: Re: String concatenation in EL

Hi,

the lack of this feature is really annoying to me too -- and this issue was
discussed here serveral times without real success.
For me the following JSTL-approach works (but also no nice solution) :

c:set var=key value=${page.name}'.title' scope=request/
h:outputText value=#{treeBundle[requestScope['key']]}/

so long :-(

ronald


Frank Felix Debatin wrote:
 This would have a different effect. I organized the ressources with 
 keys such as myPage.title.  So I would like to have
  
 #{bundle[ page.name + '.title' ] } !-- doesn't work --
  
 to be resolved to
  
 #{bundle[ 'myPage.title' ] }
  
 Thanks
 Frank Felix
  
  
 
--
*
*M-Unicomp GmbH
*
*Dipl.-Ing. Ronald Müller
*Softwareentwicklung
*
*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: How to make complex layout using datatable?

2006-02-28 Thread Andrew Robinson
The other alternative, although not as nice perhaps, is to use
dataTable with one column and then build div tags with your own
width/height settings for each row. The CSS will be more complex, but
you have complete control, and since you are using dataTable, the data
will post back correctly during the update models phase of JSF.

On 2/28/06, Frank Felix Debatin [EMAIL PROTECTED] wrote:
 The table component of ADF faces supports column groups (by nesting
 af:column), and, maybe you also need the column attribute separateRows
 that forces childs to be rendered as separate cells. Have a look at:

 http://tinyurl.com/p98e8

 HTH
 Frank Felix
 

 From: wang kai [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 28, 2006 10:04 AM
 To: MyFaces Discussion
 Subject: Re: How to make complex layout using datatable?


 Thanks for your reply.


 2006/2/28, Amit Jain [EMAIL PROTECTED]:

 As far as i know dataTable dont support colspan and rowspan. If you
 need such thing, you have to make your own renderer for dataTable(extend
 HtmlTableRenderer) to support colspan and rowspan.

 - Original Message -
 From: wang kai mailto:[EMAIL PROTECTED]
 To: users@myfaces.apache.org
 Sent: Tuesday, February 28, 2006 2:12 PM
 Subject: How to make complex layout using datatable?


 Hi all,

 I got a demand that need to show comlex data in a datatable
 like the following table.















































 Could anyone direct me how to implement it using datatable?

 Thanks



 

 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.375 / Virus Database: 268.1.1/270 - Release
 Date: 2/27/2006







Re: Container managed authentication in Myfaces/JSF

2006-02-28 Thread Joey Geiger
I've run into issues with Spring and the OpenSessionInViewFilter, or 
anything in general that needs to be displayed and is in a request scope.
That is one of the most frustrating things for me coming from a PHP/Perl 
programming background.


Ming Hu wrote:
redirect/ inside of a navigation-case works fine. And I like it 
for the following reasons:
1. I can use container managed authentication, hence container managed 
authorization on the EJB/middle tier.
2. My browser's address bar displays the corresponding link when a 
command link/button is clicked, hence I can bookmark the URL.


However I'd like to know more about the ramifications of using redirect.

Cristi mentioned the lost of validation messages. Is this caused by 
the faces servlet renders a different view for redirected URL? Are 
there any other potential issues?


I really appreciate your time spent looking into this.

Regards,

Ming


On 2/28/06, *Grigoras Cristinel*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:


Hi,

You have tried to use redirect inside navigation case like this?
navigation-case
from-outcomenav_page_domain_op_list/from-outcome
to-view-id/page_domain_op_list/to-view-id
redirect/
/navigation-case
in this case you loose validation messages.

other solution is to write your own navigation handler.

Cristi

Ming Hu wrote:
 Redirect works but it's not what I wanted. The functionality I'd
like
 to have is to put security constraints on the action values of
 JSF/Myfaces command links or buttons.

 Regards,

 Ming

 On 2/27/06, *Grigoras Cristinel*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL 
PROTECTED]
 wrote:

 Hi,
  Is working if  you use redirect.

 Cristi


 Ming Hu wrote:
  I have the following navigation case:
 
navigation-case
 from-outcomenav_page_domain_op_list/from-outcome
 to-view-id/page_domain_op_list/to-view-id
/navigation-case
 
  and the following security constraint:
  ...
url-pattern/page_domain_op_list.jsf/url-pattern
  ...
 
  If I point my browser to
 localhost:8080/myapp/page_domain_op_list.jsf,
  the web app works fine and the sign-in page is popup up by the
  container automatically.
 
  However I run into issues when I want to add same control on a
  JSF/Myfaces command link or command button. I tried to use
  page_domain_op_list.jsf or nav_page_domain_op_list.jsf
as the
  action value, but neither worked.
 
  How should I handle this kind of situation? Has anyone put any
  thoughts into this? I'd really appreciate your inputs.
 
  Regards,
 
  Ming
 









Re: String concatenation in EL

2006-02-28 Thread Andrew Robinson
EL functions should work as well. Using facelets you could write a
concat function (if there isn't already one provided by JSTL). I
haven't tried it in a map syntax, but it should theoretically work:

t:outputText value=#{messages[fn:concat(page.name, '.title')]}/

On 2/28/06, CONNER, BRENDAN (SBCSI) [EMAIL PROTECTED] wrote:
 Another thing to look at might be to have a managed bean retrieve the value 
 from the message bundle in its getter.  That makes the JSP simpler, at the 
 expense of writing some extra Java code.

 - Brendan

 -Original Message-
 From: Frank Felix Debatin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 28, 2006 8:07 AM
 To: 'MyFaces Discussion'
 Subject: RE: String concatenation in EL


 God, is this ugly!!!

 However, thanks for the info.

 @Andy, thanks no problem

 -Original Message-
 From: R. Müller [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 28, 2006 2:54 PM
 To: MyFaces Discussion
 Subject: Re: String concatenation in EL

 Hi,

 the lack of this feature is really annoying to me too -- and this issue was
 discussed here serveral times without real success.
 For me the following JSTL-approach works (but also no nice solution) :

 c:set var=key value=${page.name}'.title' scope=request/
 h:outputText value=#{treeBundle[requestScope['key']]}/

 so long :-(

 ronald


 Frank Felix Debatin wrote:
  This would have a different effect. I organized the ressources with
  keys such as myPage.title.  So I would like to have
 
  #{bundle[ page.name + '.title' ] } !-- doesn't work --
 
  to be resolved to
 
  #{bundle[ 'myPage.title' ] }
 
  Thanks
  Frank Felix
 
 
 
 --
 *
 *M-Unicomp GmbH
 *
 *Dipl.-Ing. Ronald Müller
 *Softwareentwicklung
 *
 *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: Container managed authentication in Myfaces/JSF

2006-02-28 Thread Andrew Robinson
I am depading the same issue. Servlet filters allow you to apply them
on REQUEST and FORWARD, but I don't think you can change the settings
for the built-in authentication that I know of (I'm not even sure it
is required by the spec to be a filter for security). You could
therefore write your own filter to listen for FORWARD requests, but it
begs the question of how to interact with the authentication model of
the Servlet host (IMO, Sun REALLY dropped the ball with servlet
authentication. It is really hard to work with. It would be MUCH
better if there was a server side API that you could hook into from
filters, JSF beans, servlets, etc.)

-Andrew

On 2/28/06, Joey Geiger [EMAIL PROTECTED] wrote:
 I've run into issues with Spring and the OpenSessionInViewFilter, or
 anything in general that needs to be displayed and is in a request scope.
 That is one of the most frustrating things for me coming from a PHP/Perl
 programming background.

 Ming Hu wrote:
  redirect/ inside of a navigation-case works fine. And I like it
  for the following reasons:
  1. I can use container managed authentication, hence container managed
  authorization on the EJB/middle tier.
  2. My browser's address bar displays the corresponding link when a
  command link/button is clicked, hence I can bookmark the URL.
 
  However I'd like to know more about the ramifications of using redirect.
 
  Cristi mentioned the lost of validation messages. Is this caused by
  the faces servlet renders a different view for redirected URL? Are
  there any other potential issues?
 
  I really appreciate your time spent looking into this.
 
  Regards,
 
  Ming
 
 
  On 2/28/06, *Grigoras Cristinel*  [EMAIL PROTECTED] mailto:[EMAIL 
  PROTECTED]
  wrote:
 
  Hi,
 
  You have tried to use redirect inside navigation case like this?
  navigation-case
  from-outcomenav_page_domain_op_list/from-outcome
  to-view-id/page_domain_op_list/to-view-id
  redirect/
  /navigation-case
  in this case you loose validation messages.
 
  other solution is to write your own navigation handler.
 
  Cristi
 
  Ming Hu wrote:
   Redirect works but it's not what I wanted. The functionality I'd
  like
   to have is to put security constraints on the action values of
   JSF/Myfaces command links or buttons.
  
   Regards,
  
   Ming
  
   On 2/27/06, *Grigoras Cristinel*  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL 
  PROTECTED]
   wrote:
  
   Hi,
Is working if  you use redirect.
  
   Cristi
  
  
   Ming Hu wrote:
I have the following navigation case:
   
  navigation-case
   from-outcomenav_page_domain_op_list/from-outcome
   to-view-id/page_domain_op_list/to-view-id
  /navigation-case
   
and the following security constraint:
...
  url-pattern/page_domain_op_list.jsf/url-pattern
...
   
If I point my browser to
   localhost:8080/myapp/page_domain_op_list.jsf,
the web app works fine and the sign-in page is popup up by the
container automatically.
   
However I run into issues when I want to add same control on a
JSF/Myfaces command link or command button. I tried to use
page_domain_op_list.jsf or nav_page_domain_op_list.jsf
  as the
action value, but neither worked.
   
How should I handle this kind of situation? Has anyone put any
thoughts into this? I'd really appreciate your inputs.
   
Regards,
   
Ming
   
  
  
 
 





JSP 2.1 and JSF 1.2

2006-02-28 Thread Mike Duffy
In a previous post Craig stated that the rendering of children, is one of the 
many things that
works *much* better in a JSF 1.2 world.

I see on the sun site that the Proposed Final Draft 2 for JSP 2.1 was posted on 
17 Feb, 2006, and
the Proposed Final Draft 2 for JSF 2.1 was posted on 15 Feb, 2006 .

Does anyone have an inside word on the final release dates or when the MyFaces 
implementation of
JSF 1.2 will be available in Beta? I do not see any info at 
http://myfaces.apache.org

My guess is that JSF 1.2 will only work with JSP 2.1, is that correct?

Also, I googled around for some references, but didn't see anything great.  If 
you have a good
link that explains the key features of JSP 2.1 or JSF 1.2, please reply. 

Thx.

Mike

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


RE: popup calendar Jenia

2006-02-28 Thread sjarlier









Thanks for answering. So
you mean that it will be not possible without lot of codes 

And whats about my
conversion, why the date I obtain is not correct?



Sophie











De: Lewie Gass
[mailto:[EMAIL PROTECTED] 
Envoy: mardi 28
fvrier 2006 17:32
: MyFaces
Discussion; [EMAIL PROTECTED]
Objet: RE: popup calendar
Jenia





Sophie,



As far as the select/list
box is concerned, unless something has changed recently in browsers, the zOrder
by default is to be on

top of everything else.
The last time I looked, it was impossible to change the z-Order, even with CSS
styles or _javascript_ The only

way we got around it was
creating our own code to hide the select box when someone was not selecting an
item from it, and in the

mean time displaying a
div with the current value of the select box in its place. but
that requires a lot of _javascript_ and onmouseover

and onmouseout
stuff



Ponder











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006
10:26 AM
To: 'MyFaces
 Discussion'
Subject: popup calendar Jenia





Hi!



I am using Jenia4Faces http://www.jenia.org/jsp/home.jsf;jsessionid=6E9178050A036EC207C849D3EFC905DC
for displaying a popup calendar. However, while having a listbox
(selectOneMenu) the listbox appears on the top of the calendar, how can I
choose that the popup should be rendered over the listbox?



I also get the date from
the calendar and want to convert the result into date however, each time I am
getting a strange date janvier 1970 although I chose a date in 2006. Here is my
code in the jsp page, what do I do wrong?



tr


 tdh:outputText
value=#{Fmsg.birthday}/:/td


td


 h:inputText
value=#{MyNewUserWizard.birthday} id=birthday required=true



 f:convertDateTime pattern=dd/MM//


 /h:inputText


 jp:popupCalendar for=""
format=dd/MM/ /


/td

/tr



Thanks in advance

Best,

Sophie



__ NOD32 1.1420 (20060227) Information __

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








Migrating ADF Faces app to use Facelets

2006-02-28 Thread Frank Felix Debatin
Hi, 

finally I managed to migrate our ADF Faces app to use facelets. Ton of work,
but it went smoothly and really pays off, making the page writing much more
clean and powerful. 

What a wonderful combination!!!

Here is a small migration guide for those who intend to do the same (note:
I'm a Facelets beginner so there might be alternatives or better solutions):

1. Get the ADF Facelets contribution on the Facelets website and precisely
follow the instructions provided there. I ended with the following entries
in web.xml:

  context-param
 param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER
/param-name
 param-valuecom.sun.facelets.FaceletViewHandler
/param-value
  /context-param

  context-param
param-namefacelets.DEVELOPMENT/param-name
param-valuetrue/param-value
  /context-param

  context-param
param-namefacelets.VIEW_MAPPINGS/param-name
param-value*.xhtml/param-value
  /context-param

  ...

  servlet-mapping
servlet-namefaces/servlet-name
url-pattern/faces/*/url-pattern
  /servlet-mapping 

2. Include the XML name spaces in your pages as follows (and don't forget to
change the extension .xhtml if you have the recommended web.xml
configuration)

af:document
   xmlns:h=http://java.sun.com/jsf/html;
   xmlns:f=http://java.sun.com/jsf/core;
xmlns:ui=http://java.sun.com/jsf/facelets;
xmlns:f=http://java.sun.com/jsf/core;
xmlns:af=http://xmlns.oracle.com/adf/faces;
title=Hello World
   af:form
 Hello World!
  /af:form
/af:document

3. Directly replace af:forEach tags with c:forEach. The af:forEach
tags are not provided in the contributed tag library, but the c:forEach
worked fine wherever I substituted them. 

4. Replace af:region with ui:include, providing a src attribute pointing
to the page instead of the old region attributes. (Consider ui:decorate as
an alternative if you like.) This requires some manual rewriting. The region
af:attributes need to be replaces by include ui:params. Get rid of the
var. in the former region definition files. Consider surrounding the
region definition files with ui:composition. 

5. (Optionally - cleaner). Get rid of f:verbatim by writing straight
inline HTML.

6. (Optionally - cleaner). Replace af:outputFormatted with af:outputText
and HTML markup for user supplied values, so user-supplied markup is
filtered out.

7. Take care not to include any non-ADF stuff such as inline text or markup
in ADF tables, including the details. This will cause an ugly stack trace
that completely messes up the involved session. I didn't encounter this
problem with any other of the ADF tags.

8. Entities: It seems that inline HTML entities need to escaped such as:
amp;nbsp; (for the non-breakable backspace).

HTH someone.
Frank Felix



Re: Session Expiration Default Target?

2006-02-28 Thread Mike Kienenberger
  On 2/27/06, Elam Daly [EMAIL PROTECTED] wrote:
 how do I determine if a session has expired?

 Mike Kienenberger wrote:
  You have to do something like this:
 
  boolean expired = false;
  try
  {
   session.getAttribute(anything):
   expired = false;
  }
  catch (IllegalStateException e)
  {
  expired = true;
  }

On 2/28/06, Jonathan Harley [EMAIL PROTECTED] wrote:
 No, in a filter you can just call session.isNew()

That would be incorrect, although you could possibly replace
getAttribute() with isNew() in the code above.


 public abstract boolean isNew()

A session is considered to be new if it has been created by the
server, but the client has not yet acknowledged joining the session.
For example, if the server supported only cookie-based sessions and
the client had completely disabled the use of cookies, then calls to
HttpServletRequest.getSession() would always return new sessions.

Returns:
true if the session has been created by the server but the
client has not yet acknowledged joining the session; false otherwise
Throws: IllegalStateException
if an attempt is made to access session data after the session
has been invalidated


RE: popup calendar Jenia

2006-02-28 Thread Lewie Gass








Sophie,



Yeah, I am not sure why your getting a bad
date, would have to see more of the code and stuff,

but it could also originate with the
Jenia4Faces component, you may try to contact the designer

if you have not already thought of that



Ponder











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006
11:53 AM
To: 'MyFaces
 Discussion'
Subject: RE: popup calendar Jenia





Thanks for answering. So
you mean that it will be not possible without lot of codes 

And whats about my
conversion, why the date I obtain is not correct?



Sophie











De:
Lewie Gass [mailto:[EMAIL PROTECTED] 
Envoyé: mardi 28 février
2006 17:32
À: MyFaces
 Discussion; [EMAIL PROTECTED]
Objet: RE: popup calendar
Jenia





Sophie,



As far as the select/list box is
concerned, unless something has changed recently in browsers, the zOrder by
default is to be on

top of everything else. The last time I
looked, it was impossible to change the z-Order, even with CSS styles or
_javascript_ The only

way we got around it was creating our own
code to hide the select box when someone was not selecting an item from it, and
in the

mean time displaying a div with
the current value of the select box in its place. but that requires a
lot of _javascript_ and onmouseover

and onmouseout stuff



Ponder











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006
10:26 AM
To: 'MyFaces
 Discussion'
Subject: popup calendar Jenia





Hi!



I am using Jenia4Faces http://www.jenia.org/jsp/home.jsf;jsessionid=6E9178050A036EC207C849D3EFC905DC
for displaying a popup calendar. However, while having a listbox
(selectOneMenu) the listbox appears on the top of the calendar, how can I
choose that the popup should be rendered over the listbox?



I also get the date from
the calendar and want to convert the result into date however, each time I am
getting a strange date janvier 1970 although I chose a date in 2006. Here is my
code in the jsp page, what do I do wrong?



tr


 tdh:outputText
value=#{Fmsg.birthday}/:/td


td


 h:inputText
value=#{MyNewUserWizard.birthday} id=birthday
required=true 


 f:convertDateTime pattern=dd/MM//


 /h:inputText


 jp:popupCalendar for=""
format=dd/MM/ /


/td

/tr



Thanks in advance

Best,

Sophie



__ NOD32 1.1420 (20060227) Information __

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








RE: can someone post a small working example of using my faces with the Struts Shale s:token?

2006-02-28 Thread Santiago, Ray








Hi Craig,



It would be such a useful thing if you could
get this into Creator.



What would it take for me to get access to
the nightly builds?



Thanks

rjs













From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006
2:41 AM
To: MyFaces
 Discussion
Subject: Re: can someone post a
small working example of using my faces with the Struts Shale s:token?









On 2/27/06, Santiago, Ray [EMAIL PROTECTED]
wrote:



Cool, can you also show me the correct way to add it to a
JSC2 created page?






face color=red
I guess this is something I should really be supporting, given my role on both
Shale and Creator :-).
/face

Look for an enhancement in a future nightly build of Creator that adds a
component import library for the fundamental Shale tags (including
s:token). There's no technical hurdles to this all working easily
... just needs a little bit of packaging. 

Craig









I just don't see anything like the following in the created
page; I know I have to add this somehow.



%@ taglib prefix=s uri=http://struts.apache.org/shale/core
%





Thanks

rjs













From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] 
Sent: Friday, February 24, 2006
8:21 PM
To: MyFaces
 Discussion
Subject: Re: can someone post a
small working example of using my faces with the Struts Shale s:token?











On
2/24/06, Santiago, Ray 
[EMAIL PROTECTED] wrote:



Thanks






The Use Cases example application uses this feature on quite a few
screens -- for example, on profile/logon.jsp. If you try to
submit twice, you will get a validation error on the second post. So, all
you need to do is provide an h:messages or equivalent component to
display the error message.

Source code for this app is in the Shale source bundles. There is also a
separate WAR for this (and all the other apps) in the nightly builds directory:

 http://cvs.apache.org/builds/struts/nightly/struts-shale/

Craig 









rjs



This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged.

The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be

aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received

this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field.













This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have received
this electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field.












This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity named above.  If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of this information is prohibited.  If you have received
this electronic transmission in error, please notify the sender immediately by replying to the address listed in the "From:" field.








Fwd: MYFaces BUG-669

2006-02-28 Thread Bruno Aranda
Sorry I cannot help now, I am relocating to the UK. Sending the mails
to the list directly is more useful :)

Best regards,

Bruno

-- Forwarded message --
From: Bende Bryan [EMAIL PROTECTED]
Date: Feb 28, 2006 6:06 PM
Subject: MYFaces BUG-669
To: [EMAIL PROTECTED]


I've been struggling with this bug in a current application I am
working on. I read the bug report on JIRA and this morning I
downloaded the latest nightly build of my faces (1.1.2) and I am still
getting the error message Value is not a valid option when
submitting a page with a selectOneMenu and a custom converter.

I am developing using the Eclipse IDE and I've spent a good deal of
time tracing through code with the debugger. Not once do I see the
getAsString method of my converter getting called with a String, it
gets called everytime with my custom object type. Then on submit it
calls getAsObject type and gets the correct String and correctly
returns the custom object type.

Is there a chance this bug still exists in the newest build, or am I
missing something ?

Any help would be appreciated.

Thanks,

Bryan Bende


Re: Migrating ADF Faces app to use Facelets

2006-02-28 Thread Adam Winer

Frank Felix Debatin wrote:
Hi, 


finally I managed to migrate our ADF Faces app to use facelets. Ton of work,
but it went smoothly and really pays off, making the page writing much more
clean and powerful. 


What a wonderful combination!!!


Glad you liked it!


Here is a small migration guide for those who intend to do the same (note:
I'm a Facelets beginner so there might be alternatives or better solutions):

1. Get the ADF Facelets contribution on the Facelets website and precisely
follow the instructions provided there. I ended with the following entries
in web.xml:

  context-param
 param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER
/param-name
 param-valuecom.sun.facelets.FaceletViewHandler
/param-value
  /context-param

  context-param
param-namefacelets.DEVELOPMENT/param-name
param-valuetrue/param-value
  /context-param

  context-param
param-namefacelets.VIEW_MAPPINGS/param-name
param-value*.xhtml/param-value
  /context-param

  ...

  servlet-mapping
servlet-namefaces/servlet-name
url-pattern/faces/*/url-pattern
  /servlet-mapping 


2. Include the XML name spaces in your pages as follows (and don't forget to
change the extension .xhtml if you have the recommended web.xml
configuration)

af:document
   xmlns:h=http://java.sun.com/jsf/html;
   xmlns:f=http://java.sun.com/jsf/core;
xmlns:ui=http://java.sun.com/jsf/facelets;
xmlns:f=http://java.sun.com/jsf/core;
xmlns:af=http://xmlns.oracle.com/adf/faces;
title=Hello World
   af:form
 Hello World!
  /af:form
/af:document

3. Directly replace af:forEach tags with c:forEach. The af:forEach
tags are not provided in the contributed tag library, but the c:forEach
worked fine wherever I substituted them. 


4. Replace af:region with ui:include, providing a src attribute pointing
to the page instead of the old region attributes. (Consider ui:decorate as
an alternative if you like.) This requires some manual rewriting. The region
af:attributes need to be replaces by include ui:params. Get rid of the
var. in the former region definition files. Consider surrounding the
region definition files with ui:composition. 


Yep, ui:include is a much cleaner way of handling this;
af:region was partly a workaround for the failure of jsp:include
to really work well with


5. (Optionally - cleaner). Get rid of f:verbatim by writing straight
inline HTML.

6. (Optionally - cleaner). Replace af:outputFormatted with af:outputText
and HTML markup for user supplied values, so user-supplied markup is
filtered out.


Did you mean this the opposite way?  My suggestion is to replace
af:outputText escape=false with af:outputFormatted where
user-supplied markup is present, so it gets filtered down to a
legit set without worrying about cross-site scripting.


7. Take care not to include any non-ADF stuff such as inline text or markup
in ADF tables, including the details. This will cause an ugly stack trace
that completely messes up the involved session. I didn't encounter this
problem with any other of the ADF tags.


Could you e-mail me that stack trace?  This is supposed to work.


8. Entities: It seems that inline HTML entities need to escaped such as:
amp;nbsp; (for the non-breakable backspace).


You could just use #160;

-- Adam



Re: Migrating ADF Faces app to use Facelets

2006-02-28 Thread Rogers Reilly
I actually just finished doing the same thing, so I sympathize w/you, 
Frank.  :-)   Totally worth it, though- the ADF components are 
fantastic, and Facelets is great to work with.


Couple other tips I thought I'd chime in with, in the hopes of sparing 
others some time/web hunting:


1) It's crucial to put the context-param about the alternate view 
handler in web.xml, as Frank notes.  Declaring it in faces-config 
under application will blow up.


2) the latest drop I got hold of (the MyFaces drop, not the last 
Oracle version) had two facelet-taglib files, af.taglib.xml and 
afh.taglib.xml, which had incorrect XML syntax and blew up Tomcat on 
startup--specifically, the docTypes were 'taglib' but the root element 
was 'facelet-taglib'.  I unzipped adf-faces-implxxx and changed them, 
then zipped it back up; then was fine for a while.  I learned later, 
however, that these files (while seeming to provide facelets support out 
of the gate) were actually interfering with adf-facelets.jar, which 
provides real Facelets support.  (the other files worked for many 
things, but couldn't handle String[] attributes for whatever reason)  So 
I went back and removed af.taglib.xml and afh.taglib.xml from 
adf-faces-implxxx, letting adf-facelets.jar handle all the facelets 
stuff, and everything worked.


3) a tangent, but related- if you find yourself trying to get Tomahawk  
ADF components working together, you may find this example helpful.  The 
Tomahawk EqualsValidator won't work if you're comparing the component to 
an ADF component, and here's why:

UIInput foreignComp = (UIInput) uiComponent.getParent().findComponent(_for);
in EqualsValidator (line 72) is casting the compare to component to 
UIInput, but ADF input components don't extend UInput.  You can create a 
custom ADFEqualsValidator by replacing the above with:
UIXEditableValue foreignComp = (UIXEditableValue) 
uiComponent.getParent().findComponent(_for);

or, of course, create an overarching EqualsValidator that tries both casts.

In general, if a Tomahawk component isn't playing nice with ADF, that 
might be a good first place to look- the ADF components' hierarchy jumps 
straight from UIComponent to UIXComponent, so any casts from 
UIComponentBase down are going to fail.  Perhaps this will change as ADF 
code moves into the fold, but for now, this is something you'll need to 
work around.


also HingTH-
Rogers

Frank Felix Debatin wrote:

Hi, 


finally I managed to migrate our ADF Faces app to use facelets. Ton of work,
but it went smoothly and really pays off, making the page writing much more
clean and powerful. 


What a wonderful combination!!!

Here is a small migration guide for those who intend to do the same (note:
I'm a Facelets beginner so there might be alternatives or better solutions):

1. Get the ADF Facelets contribution on the Facelets website and precisely
follow the instructions provided there. I ended with the following entries
in web.xml:

 context-param
param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER
/param-name
param-valuecom.sun.facelets.FaceletViewHandler
/param-value
 /context-param

 context-param
   param-namefacelets.DEVELOPMENT/param-name
   param-valuetrue/param-value
 /context-param

 context-param
   param-namefacelets.VIEW_MAPPINGS/param-name
   param-value*.xhtml/param-value
 /context-param

 ...

 servlet-mapping
servlet-namefaces/servlet-name
url-pattern/faces/*/url-pattern
 /servlet-mapping 


2. Include the XML name spaces in your pages as follows (and don't forget to
change the extension .xhtml if you have the recommended web.xml
configuration)

af:document
  xmlns:h=http://java.sun.com/jsf/html;
  xmlns:f=http://java.sun.com/jsf/core;
   xmlns:ui=http://java.sun.com/jsf/facelets;
   xmlns:f=http://java.sun.com/jsf/core;
   xmlns:af=http://xmlns.oracle.com/adf/faces;
   title=Hello World
  af:form
Hello World!
 /af:form
/af:document

3. Directly replace af:forEach tags with c:forEach. The af:forEach
tags are not provided in the contributed tag library, but the c:forEach
worked fine wherever I substituted them. 


4. Replace af:region with ui:include, providing a src attribute pointing
to the page instead of the old region attributes. (Consider ui:decorate as
an alternative if you like.) This requires some manual rewriting. The region
af:attributes need to be replaces by include ui:params. Get rid of the
var. in the former region definition files. Consider surrounding the
region definition files with ui:composition. 


5. (Optionally - cleaner). Get rid of f:verbatim by writing straight
inline HTML.

6. (Optionally - cleaner). Replace af:outputFormatted with af:outputText
and HTML markup for user supplied values, so user-supplied markup is
filtered out.

7. Take care not to include any non-ADF stuff such as inline text or markup
in ADF tables, including the details. This will cause an ugly stack trace
that completely messes up the involved session. I didn't encounter 

Re: How to make complex layout using datatable?

2006-02-28 Thread Mike Kienenberger
Or you could use t:dataList.   You're responsible for generating the
tags, but the component will handle the iteration for you.

On 2/28/06, Andrew Robinson [EMAIL PROTECTED] wrote:
 The other alternative, although not as nice perhaps, is to use
 dataTable with one column and then build div tags with your own
 width/height settings for each row. The CSS will be more complex, but
 you have complete control, and since you are using dataTable, the data
 will post back correctly during the update models phase of JSF.

 On 2/28/06, Frank Felix Debatin [EMAIL PROTECTED] wrote:
  The table component of ADF faces supports column groups (by nesting
  af:column), and, maybe you also need the column attribute separateRows
  that forces childs to be rendered as separate cells. Have a look at:
 
  http://tinyurl.com/p98e8
 
  HTH
  Frank Felix
  
 
  From: wang kai [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 28, 2006 10:04 AM
  To: MyFaces Discussion
  Subject: Re: How to make complex layout using datatable?
 
 
  Thanks for your reply.
 
 
  2006/2/28, Amit Jain [EMAIL PROTECTED]:
 
  As far as i know dataTable dont support colspan and rowspan. If you
  need such thing, you have to make your own renderer for dataTable(extend
  HtmlTableRenderer) to support colspan and rowspan.
 
  - Original Message -
  From: wang kai mailto:[EMAIL PROTECTED]
  To: users@myfaces.apache.org
  Sent: Tuesday, February 28, 2006 2:12 PM
  Subject: How to make complex layout using datatable?
 
 
  Hi all,
 
  I got a demand that need to show comlex data in a datatable
  like the following table.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  Could anyone direct me how to implement it using datatable?
 
  Thanks
 
 
 
  
 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.1.375 / Virus Database: 268.1.1/270 - Release
  Date: 2/27/2006
 
 
 
 
 



RE: String concatenation in EL

2006-02-28 Thread Frank Felix Debatin
Hi Andrew, 

thanks for the note. I think this is by far the best
solution. 

Here is what worked for me (the JSP 2.5 and Facelets docs
are not very good on this). I added
META-INF/bamboo.taglib.xml with the following contents:

?xml version=1.0?
!DOCTYPE facelet-taglib PUBLIC
  -//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN
  http://java.sun.com/dtd/facelet-taglib_1_0.dtd;
facelet-taglib xmlns=http://java.sun.com/JSF/Facelet;
namespacehttp://bamboo-ag.com/helpers/namespace
function
function-nameconcat/function-name

function-classbamboo.util.LittleHelpers/function-class
function-signature
java.lang.String concat(java.lang.String,
java.lang.String)
/function-signature
/function
/facelet-taglib

then

html xmlns:bb=http://bamboo-ag.com/helpers; ...
...
#{bb:concat(it , works)}

worked as expected.

Frank Felix

 

 -Original Message-
 From: Andrew Robinson
[mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 28, 2006 6:17 PM
 To: MyFaces Discussion
 Subject: Re: String concatenation in EL
 
 EL functions should work as well. Using facelets you could

 write a concat function (if there isn't already one
provided 
 by JSTL). I haven't tried it in a map syntax, but it
should 
 theoretically work:
 
 t:outputText value=#{messages[fn:concat(page.name,
'.title')]}/
 
 On 2/28/06, CONNER, BRENDAN (SBCSI) [EMAIL PROTECTED]
wrote:
  Another thing to look at might be to have a managed bean

 retrieve the value from the message bundle in its getter.

 That makes the JSP simpler, at the expense of writing some

 extra Java code.
 
  - Brendan
 
  -Original Message-
  From: Frank Felix Debatin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 28, 2006 8:07 AM
  To: 'MyFaces Discussion'
  Subject: RE: String concatenation in EL
 
 
  God, is this ugly!!!
 
  However, thanks for the info.
 
  @Andy, thanks no problem
 
  -Original Message-
  From: R. Müller [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 28, 2006 2:54 PM
  To: MyFaces Discussion
  Subject: Re: String concatenation in EL
 
  Hi,
 
  the lack of this feature is really annoying to me too --
and this 
  issue was discussed here serveral times without real
success.
  For me the following JSTL-approach works (but also no
nice 
 solution) :
 
  c:set var=key value=${page.name}'.title'
scope=request/ 
  h:outputText
value=#{treeBundle[requestScope['key']]}/
 
  so long :-(
 
  ronald
 
 
  Frank Felix Debatin wrote:
   This would have a different effect. I organized the 
 ressources with 
   keys such as myPage.title.  So I would like to have
  
   #{bundle[ page.name + '.title' ] } !-- doesn't work
--
  
   to be resolved to
  
   #{bundle[ 'myPage.title' ] }
  
   Thanks
   Frank Felix
  
  
  
  --
 
*
  *M-Unicomp GmbH
  *
  *Dipl.-Ing. Ronald Müller
  *Softwareentwicklung
  *
  *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: Migrating ADF Faces app to use Facelets

2006-02-28 Thread Mike Kienenberger
On 2/28/06, Rogers Reilly [EMAIL PROTECTED] wrote:
 3) a tangent, but related- if you find yourself trying to get Tomahawk 
 ADF components working together, you may find this example helpful.  The
 Tomahawk EqualsValidator won't work if you're comparing the component to
 an ADF component, and here's why:
 UIInput foreignComp = (UIInput) uiComponent.getParent().findComponent(_for);
  in EqualsValidator (line 72) is casting the compare to component to
 UIInput, but ADF input components don't extend UInput.  You can create a
 custom ADFEqualsValidator by replacing the above with:
 UIXEditableValue foreignComp = (UIXEditableValue)
 uiComponent.getParent().findComponent(_for);
 or, of course, create an overarching EqualsValidator that tries both casts.

Ok.  I'm probably not going to try to fix EqualsValidator as
CompareToValidator in the sandbox supercedes it.

Do ADF input components implement EditableValueHolder?   I have gotten
CompareToValidator to a compilable state by replacing UIInput and
UIOutput typecasts to EditableValueHolder.

I still need to do some testing, though.


RE: Migrating ADF Faces app to use Facelets

2006-02-28 Thread Frank Felix Debatin
Hi Adam, 

 Did you mean this the opposite way?  My suggestion is to 
 replace af:outputText escape=false with
af:outputFormatted 
 where user-supplied markup is present, so it gets filtered

 down to a legit set without worrying about cross-site
scripting.

Agreed - depends on what effect you want to achieve. 
 
 I didn't 
  encounter this problem with any other of the ADF tags.
 
 Could you e-mail me that stack trace?  This is supposed to
work.

See attachment (with ADF 10.1.3).

Frank Felix

Level
ERROR
Logger
com.sun.faces.lifecycle.ApplyRequestValuesPhase
Time
2006-02-28 20:38:36,296
Thread
http-0.0.0.0-8080-1
Message
Index: 1, Size: 1
NDC
null
Class
?
Method
?
Line
?
File
?
Properties
{{log4j.remoteSourceInfo,localhost:3204}{hostname,localhost}{log4jid,836}}
Throwable
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at 
oracle.adf.view.faces.component.StampState.restoreChildStampState(StampState.java:119)
at 
oracle.adf.view.faces.component.UIXTable.restoreStampState(UIXTable.java:425)
at 
oracle.adf.view.faces.component.UIXCollection._restoreStampState(UIXCollection.java:1051)
at 
oracle.adf.view.faces.component.UIXCollection.postRowDataChange(UIXCollection.java:677)
at 
oracle.adf.view.faces.component.UIXCollection.setRowIndex(UIXCollection.java:379)
at 
oracle.adf.view.faces.component.UIXTable._processStamps(UIXTable.java:496)
at 
oracle.adf.view.faces.component.UIXTable.processFacetsAndChildren(UIXTable.java:376)
at 
oracle.adf.view.faces.component.UIXCollection.decodeChildrenImpl(UIXCollection.java:141)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at 
oracle.adf.view.faces.component.UIXCollection.processDecodes(UIXCollection.java:136)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at 
oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at 
oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at 
oracle.adf.view.faces.component.UIXForm.processDecodes(UIXForm.java:53)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at 
oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at 
oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at 
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:306)
at 
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
bamboo.web.servlet.TransactionTracker.doFilter(TransactionTracker.java:67)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at bamboo.web.servlet.SessionTracker.doFilter(SessionTracker.java:102)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
at 
oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
at 
oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
at 
oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   

Re: Migrating ADF Faces app to use Facelets

2006-02-28 Thread Mike Kienenberger
I've created https://issues.apache.org/jira/browse/TOMAHAWK-164 to
track this issue.  I may take a look at EqualsValidator after I'm done
if it isn't too difficult.

On 2/28/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 On 2/28/06, Rogers Reilly [EMAIL PROTECTED] wrote:
  3) a tangent, but related- if you find yourself trying to get Tomahawk 
  ADF components working together, you may find this example helpful.  The
  Tomahawk EqualsValidator won't work if you're comparing the component to
  an ADF component, and here's why:
  UIInput foreignComp = (UIInput) uiComponent.getParent().findComponent(_for);
   in EqualsValidator (line 72) is casting the compare to component to
  UIInput, but ADF input components don't extend UInput.  You can create a
  custom ADFEqualsValidator by replacing the above with:
  UIXEditableValue foreignComp = (UIXEditableValue)
  uiComponent.getParent().findComponent(_for);
  or, of course, create an overarching EqualsValidator that tries both casts.

 Ok.  I'm probably not going to try to fix EqualsValidator as
 CompareToValidator in the sandbox supercedes it.

 Do ADF input components implement EditableValueHolder?   I have gotten
 CompareToValidator to a compilable state by replacing UIInput and
 UIOutput typecasts to EditableValueHolder.

 I still need to do some testing, though.



Re: Do Portlet Modes and JSF navigation work together?

2006-02-28 Thread Todd Papaioannou

Stan

Thanks for the reply. I took that section out, but that wasn't it.
I'm wondering if perhaps I'm missing some jar file(s) and something is
just silently failing in the background. Is there a list of jars I need
to include with my portlet for MyFaces to work correctly?

Thanks

Todd


Stan Silvert wrote:

Todd,

I'm wondering about this in your faces-config.xml

factory
 
faces-context-factoryorg.apache.myfaces.context.MyFacesContextFactoryI

mpl/faces-context-factory
 /factory

You shouldn't need to set a faces-context-factory.

Stan Silvert
JBoss, Inc.
[EMAIL PROTECTED]
callto://stansilvert
  




Re: JSP 2.1 and JSF 1.2

2006-02-28 Thread Craig McClanahan
On 2/28/06, Mike Duffy [EMAIL PROTECTED] wrote:
In a previous post Craig stated that the rendering of children, is one of the many things thatworks *much* better in a JSF 1.2 world.I see on the sun site that the Proposed Final Draft 2 for JSP 2.1
 was posted on 17 Feb, 2006, andthe Proposed Final Draft 2 for JSF 2.1 was posted on 15 Feb, 2006 .Does anyone have an inside word on the final release dates or when the MyFaces implementation ofJSF 1.2 will be available in Beta? I do not see any info at 
http://myfaces.apache.orgAFAICT no formal work on this has even started yet. You can use the RI version (CDDL licensed) in the mean time, though.
My guess is that JSF 1.2 will only work with JSP 2.1, is that correct?
That is correct. (It also requires JavaSE 5).Also, I googled around for some references, but didn't see anything great.If you have a good
link that explains the key features of JSP 2.1 or JSF 1.2, please reply.One source of useful information is the What's Changed Since The Last Release section of the JSF spec itself (in the Preface), which gives a very thorough description of what is different between 
1.1 and 1.2. I would also pay attention to Ed Burns's blog (he's co-spec lead for JSF 1.2) ... for example, he's posted[2] a list of what changed from PFD to PFD2, and several of his earlier entries reference the new 1.2
 features.Craig[1] http://jcp.org/en/jsr/detail?id=252[2] http://weblogs.java.net/blog/edburns/archive/2006/02/new_drafts_of_j_1.html
Thx.Mike__
Do You Yahoo!?Tired of spam?Yahoo! Mail has the best spam protection aroundhttp://mail.yahoo.com


Re: can someone post a small working example of using my faces with the Struts Shale s:token?

2006-02-28 Thread Craig McClanahan
On 2/28/06, Santiago, Ray [EMAIL PROTECTED] wrote:



















Hi Craig,



It would be such a useful thing if you could
get this into Creator.



What would it take for me to get access to
the nightly builds?I should have reviewed what I was typing more carefully before sending :-). I meant a future nightly build of Shale[1]. It is straightforward to create a component import library for this stuff that will work with Java Studio Creator 2 (the current version), and that's what I plan to do.

Thanks

rjsCraig[1] 
http://cvs.apache.org/builds/struts/nightly/struts-shale/ 


RE: Do Portlet Modes and JSF navigation work together?

2006-02-28 Thread Stan Silvert
You don't need any more than you would for a normal JSF app.  The
MyFaces web page says you need portlet.jar, but you should be getting
that from your portal vendor.

Another suggestion: Do a view source on the web page and see if the
form action looks funny.

Stan Silvert
JBoss, Inc.
[EMAIL PROTECTED]
callto://stansilvert

 -Original Message-
 From: Todd Papaioannou [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 28, 2006 3:31 PM
 To: MyFaces Discussion
 Subject: Re: Do Portlet Modes and JSF navigation work together?
 
 Stan
 
 Thanks for the reply. I took that section out, but that wasn't it.
 I'm wondering if perhaps I'm missing some jar file(s) and something is
 just silently failing in the background. Is there a list of jars I
need
 to include with my portlet for MyFaces to work correctly?
 
 Thanks
 
 Todd
 
 
 Stan Silvert wrote:
  Todd,
 
  I'm wondering about this in your faces-config.xml
 
  factory
 
 
faces-context-factoryorg.apache.myfaces.context.MyFacesContextFactoryI
  mpl/faces-context-factory
   /factory
 
  You shouldn't need to set a faces-context-factory.
 
  Stan Silvert
  JBoss, Inc.
  [EMAIL PROTECTED]
  callto://stansilvert
 



Some simple questions about JSF frameworks ....?

2006-02-28 Thread Legolas Woodland

Hi
Thank you for reading my post.
I want to know what additional features SEAM from jboss ,Clay , Shale 
from Apache and Facelets

bring to jsf.
I will be happy if some one give me a simple answer.



Thank you


Re: Some simple questions about JSF frameworks ....?

2006-02-28 Thread Mike Kienenberger
SEAM gives you database integration (EJB3?), Shale provides a variety
of things (dialogs, lifecycle hooks, testing framework, commons
validator to name a few), Clay and Facelets provide you with
alternatives to using jsp both as an end-user as well as a component
developer.   Facelets also provides some JSF 1.2 functionality when
using it with MyFaces.Note that I have only used Facelets, so some
of the details may be wrong for other systems.

I recommend that you go to the web pages for each of the above
projects and read the overview of the project.

On 2/28/06, Legolas Woodland [EMAIL PROTECTED] wrote:
 Hi
 Thank you for reading my post.
 I want to know what additional features SEAM from jboss ,Clay , Shale
 from Apache and Facelets
 bring to jsf.
 I will be happy if some one give me a simple answer.



 Thank you



Using VariableResolver or ValueBinding in NonFacesRequestServlet

2006-02-28 Thread Hubert Rabago
I'm working on a servlet based on the code in NonFacesRequestServlet. 
I read the example in
http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls.  At
the point where it says put your initialization stuff here it shows
using either a VariableResolver (VR) or a ValueBinding (VB) to
retrieve a backing bean.  I tried both approaches in the
invokeApplication() method of NonFacesRequestServlet.

What I found is that using MyFaces, neither of these approaches work.
Using RI, the VR approach works, but the VB approach doesn't.

I don't have the resulting stack trace right now, but I do remember
that MyFaces ends in a NoSuchMethodError.

My question is, is it supposed to work?

Because if you say yes, that means I'm doing something wrong.  If so,
I'll share the entire WAR (or just the service() method I wrote) later
today and ask for further help finding the problem.

If you say it's not supposed to work, then is there another way to get
to a managed bean in this situation?

thanks,
Hubert

ps.
Add'l info:

* The call to NonFacesRequestServlet is the first request in the
application, made directly after server startup.
* I used the Tobago NonFacesRequestServlet as starting point.
* In the invokeAppication() method, I tried using both VB and VR to
retrieve a properly configured backing bean.
* Switching jars from MyFaces to RI allows the VR approach to work.
* The VB approach fails in both implementations.


Re: Migrating ADF Faces app to use Facelets

2006-02-28 Thread Adam Winer
On 2/28/06, Rogers Reilly [EMAIL PROTECTED] wrote:
 I actually just finished doing the same thing, so I sympathize w/you,
 Frank.  :-)   Totally worth it, though- the ADF components are
 fantastic, and Facelets is great to work with.

 Couple other tips I thought I'd chime in with, in the hopes of sparing
 others some time/web hunting:

 2) the latest drop I got hold of (the MyFaces drop, not the last
 Oracle version) had two facelet-taglib files, af.taglib.xml and
 afh.taglib.xml, which had incorrect XML syntax and blew up Tomcat on
 startup--specifically, the docTypes were 'taglib' but the root element
 was 'facelet-taglib'.  I unzipped adf-faces-implxxx and changed them,
 then zipped it back up; then was fine for a while.  I learned later,
 however, that these files (while seeming to provide facelets support out
 of the gate) were actually interfering with adf-facelets.jar, which
 provides real Facelets support.  (the other files worked for many
 things, but couldn't handle String[] attributes for whatever reason)  So
 I went back and removed af.taglib.xml and afh.taglib.xml from
 adf-faces-implxxx, letting adf-facelets.jar handle all the facelets
 stuff, and everything worked.

Ugh, yeah.  I'll try to improve this in the next MyFaces drop
(the real one headed to incubator) so that the generated taglib.xml's
are completely right.  You'll still need adf-facelets.jar, at least
until Facelets is in a public Maven repos.

 3) a tangent, but related- if you find yourself trying to get Tomahawk 
 ADF components working together, you may find this example helpful.  The
 Tomahawk EqualsValidator won't work if you're comparing the component to
 an ADF component, and here's why:
 UIInput foreignComp = (UIInput) uiComponent.getParent().findComponent(_for);
  in EqualsValidator (line 72) is casting the compare to component to
 UIInput, but ADF input components don't extend UInput.  You can create a
 custom ADFEqualsValidator by replacing the above with:
 UIXEditableValue foreignComp = (UIXEditableValue)
 uiComponent.getParent().findComponent(_for);
 or, of course, create an overarching EqualsValidator that tries both casts.

 In general, if a Tomahawk component isn't playing nice with ADF, that
 might be a good first place to look- the ADF components' hierarchy jumps
 straight from UIComponent to UIXComponent, so any casts from
 UIComponentBase down are going to fail.  Perhaps this will change as ADF
 code moves into the fold, but for now, this is something you'll need to
 work around.

The really common scenarios are going to be about failures
to use EditableValueHolder/ValueHolder/ActionSource
where appropriate.  UIForm is going to cause more pain;  I tried
to persuade  Craig and Ed back in JSF 1.0 that we should
have a generic interface for forms, but they balked.

-- Adam


Re: [OT] Facelets JSP Scriptlets

2006-02-28 Thread Adam Winer
Shawn,

This should be directed to the Facelets list;  but I'll answer
it here:  no, Facelets doesn't support JSP scriptlets, and
is extremely unlikely to ever do so.

-- Adam


On 2/28/06, Garner, Shawn [EMAIL PROTECTED] wrote:



 Is there any chance that facelets supports JSP Scriptlets?

 I know it supports jstl and el but sometimes I still like to use scriptlets
 even though I know it should be converted to a tag.

 I just don't want to take the time to convert everything to tag libraries.

 Mostly for function calls that take in parameters.



 Shawn



 

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

 ***



Re: [OT] Facelets JSP Scriptlets

2006-02-28 Thread Mike Kienenberger
But someone did implement bashlets for it.
I don't remember the details, but it was a scripting language for simple tasks.

On 2/28/06, Adam Winer [EMAIL PROTECTED] wrote:
 Shawn,

 This should be directed to the Facelets list;  but I'll answer
 it here:  no, Facelets doesn't support JSP scriptlets, and
 is extremely unlikely to ever do so.

 -- Adam


 On 2/28/06, Garner, Shawn [EMAIL PROTECTED] wrote:
 
 
 
  Is there any chance that facelets supports JSP Scriptlets?
 
  I know it supports jstl and el but sometimes I still like to use scriptlets
  even though I know it should be converted to a tag.
 
  I just don't want to take the time to convert everything to tag libraries.
 
  Mostly for function calls that take in parameters.
 
 
 
  Shawn
 
 
 
  
 
  This email may contain confidential
  material. If you were not an intended recipient,
  Please notify the sender and delete all copies.
  We may monitor email to and from our network.
 
  ***
 



immediate action for non commands

2006-02-28 Thread Lance Frohman
What is the best practice if I need a drop down list -
h:selectOneListbox - change
to go to the server, as if there was an immediate=true on a command
button.
Depending on what is selected in the h:selectOneListbox, the page will be
displayed differently.
I was using a kludge with onclick= submitting a h:commandButton
style=visibility:hidden; ...

Thanks,
Lance



inputSuggestAjax + HTTPS + IE

2006-02-28 Thread Jun Guo
Hi - We're using the inputSuggestAjax sandbox control (version 1.1.1), and came across an interesting issue. It works with FireFox (both HTTP and HTTPS), and also works in IE for HTTP (which is what the sandbox example uses). However, our site uses HTTPS and this control is not working properly in IE 
6.0. Just wonder if anyone else has come across this issue. Are there any fixes? Thanks. Jun


[ANNOUNCE] New Article: Dynamic JSF Development

2006-02-28 Thread Kito D. Mann
I'm pleased to announce a new article at JSF Central entitled Dynamic JSF
Development by Peter Kasson. Here's an excerpt:

JSF is a very powerful, component-based technology for developing web
applications. Not surprisingly, several software vendors have updated their
toolkits to support JSF, promising rapid development and ease of use through
drag-and-drop support when creating JSF-based web applications. However,
developing applications with JSF does have its drawbacks. One less-obvious
one is drag-and-drop support. 

For years, Microsoft has evangelized the benefits of drag-and-drop support
when advertising their Visual Basic product; however, what the company's
sales reps have failed to share with their customers are the pitfalls when
using drag-and-drop functionality for creating applications-although it is
quick and easy to build applications using this functionality, the results
are not very flexible or extensible. 

For example, when you need to implement a technique that executes outside of
a component's event cycle, then the quick-and-easy approach to building an
application is not the way to go. Take the JSF-based database browser shown
in Figure 1. It has a simple interface that enables you to view data within
a database. All of the components that present data are hard-wired to a
backing bean. If maintenance and update cycles are a non-issue, then this
works quite well. Most applications, however, require life-long maintenance
changes with ever-increasing demand for faster deployment. For the sample
application in Figure 1, after a database query has been executed the
results need to be bound to visual components for display purposes.

Read more here: http://www.jsfcentral.com/articles/dynamic_jsf.html.

If you're interested in writing for JSF Central, drop us a line at
[EMAIL PROTECTED]

NOTE: This message is cross-posted, so please send replies directly to me or
the appropriate list.

~~~
Kito D. Mann ([EMAIL PROTECTED])
Principal Consultant, Virtua, Inc. (http://www.virtua.com)
Author, JavaServer Faces in Action
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
phone: 203-323-1244 fax: 203-323-2363 



Re: immediate action for non commands

2006-02-28 Thread Dennis Byrne
The kludge you speak of is the most popular way to do this.

One warning.  Let's say you have two controls, selectOneMenu and inputText.  
Your requirement is that the inputText is to be rendered *only* when a certain 
item (let's call it 'ITEM X') in the selectOneMenu is selected.  You accomplish 
this by hooking a js event hander into @onclick or @onchange of the 
selectOneMenu.  The js clicks a hidden commandButton and the form is submitted. 
 In the action or actionListener of the commandButton, you dynamically render 
the inputText element and the form is then rerendered.

If the user clicks then back button, on both IE and FireFox at least, the 
browser will not go back to the server.  It will simple display the first page 
in the state it was in just *before* the form was submitted.  There are two 
important parts to keep in mind.  First, the selected item of the selectOneMenu 
was 'ITEM X'.  Second, the inputText field was *not* rendered when the form was 
submitted.  The user will have then effectivly placed the form into a state 
that is against the initial requirement.

Dennis Byrne

-Original Message-
From: Lance Frohman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 08:57 PM
To: ''MyFaces Discussion''
Subject: immediate action for non commands

What is the best practice if I need a drop down list -
h:selectOneListbox - change
to go to the server, as if there was an immediate=true on a command
button.
Depending on what is selected in the h:selectOneListbox, the page will be
displayed differently.
I was using a kludge with onclick= submitting a h:commandButton
style=visibility:hidden; ...

Thanks,
Lance






Re: immediate action for non commands

2006-02-28 Thread Rogers Reilly
Best way to do this now is with Cherokee (or whatever it's called).  
af:selectOneListbox takes an autoSubmit attribute, which does 
exactly what you want.


I was thinking you could also set partialSubmit=true and do your 
refresh with PPR, which would be slick, but I'm not seeing that 
attribute in the docs.  Looks like autoSubmit mandates a full refresh. 
:-(  


Dennis Byrne wrote:


The kludge you speak of is the most popular way to do this.

One warning.  Let's say you have two controls, selectOneMenu and inputText.  Your requirement is that the inputText is to be rendered *only* when a certain item (let's call it 'ITEM X') in the selectOneMenu is selected.  You accomplish this by hooking a js event hander into @onclick or @onchange of the selectOneMenu.  The js clicks a hidden commandButton and the form is submitted.  In the action or actionListener of the commandButton, you dynamically render the inputText element and the form is then rerendered.  


If the user clicks then back button, on both IE and FireFox at least, the 
browser will not go back to the server.  It will simple display the first page 
in the state it was in just *before* the form was submitted.  There are two 
important parts to keep in mind.  First, the selected item of the selectOneMenu 
was 'ITEM X'.  Second, the inputText field was *not* rendered when the form was 
submitted.  The user will have then effectivly placed the form into a state 
that is against the initial requirement.

Dennis Byrne

 


-Original Message-
From: Lance Frohman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 08:57 PM
To: ''MyFaces Discussion''
Subject: immediate action for non commands

What is the best practice if I need a drop down list -
h:selectOneListbox - change
to go to the server, as if there was an immediate=true on a command
button.
Depending on what is selected in the h:selectOneListbox, the page will be
displayed differently.
I was using a kludge with onclick= submitting a h:commandButton
style=visibility:hidden; ...

Thanks,
Lance


   







 





Re: How to make complex layout using datatable?

2006-02-28 Thread Andrew Robinson
dataList is deprecated. The Tomahawk developers recommend that you do
not use it. It doesn't not correctly process the update components
phase

On 2/28/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 Or you could use t:dataList.   You're responsible for generating the
 tags, but the component will handle the iteration for you.

 On 2/28/06, Andrew Robinson [EMAIL PROTECTED] wrote:
  The other alternative, although not as nice perhaps, is to use
  dataTable with one column and then build div tags with your own
  width/height settings for each row. The CSS will be more complex, but
  you have complete control, and since you are using dataTable, the data
  will post back correctly during the update models phase of JSF.
 
  On 2/28/06, Frank Felix Debatin [EMAIL PROTECTED] wrote:
   The table component of ADF faces supports column groups (by nesting
   af:column), and, maybe you also need the column attribute separateRows
   that forces childs to be rendered as separate cells. Have a look at:
  
   http://tinyurl.com/p98e8
  
   HTH
   Frank Felix
   
  
   From: wang kai [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 28, 2006 10:04 AM
   To: MyFaces Discussion
   Subject: Re: How to make complex layout using datatable?
  
  
   Thanks for your reply.
  
  
   2006/2/28, Amit Jain [EMAIL PROTECTED]:
  
   As far as i know dataTable dont support colspan and rowspan. If 
   you
   need such thing, you have to make your own renderer for dataTable(extend
   HtmlTableRenderer) to support colspan and rowspan.
  
   - Original Message -
   From: wang kai mailto:[EMAIL PROTECTED]
   To: users@myfaces.apache.org
   Sent: Tuesday, February 28, 2006 2:12 PM
   Subject: How to make complex layout using datatable?
  
  
   Hi all,
  
   I got a demand that need to show comlex data in a 
   datatable
   like the following table.
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
   Could anyone direct me how to implement it using 
   datatable?
  
   Thanks
  
  
  
   
  
   No virus found in this incoming message.
   Checked by AVG Free Edition.
   Version: 7.1.375 / Virus Database: 268.1.1/270 - Release
   Date: 2/27/2006
  
  
  
  
  
 



Re: Some simple questions about JSF frameworks ....?

2006-02-28 Thread Andrew Robinson
Seam:
Extended entity management persistence (EJB3 or hibernate)
Conversation context (multiple windows supported with server side
state. Basically a long running transaction)
Annotation demarcation of maneged beans
Annotate injection and outjection of context variables
Interception of action method (helpful for things like making sure the
user has authenticated)
Validation via JSF or by backing bean w/ the hibernate validator
(write the validation on your entity/data beans instead of in the UI)

Shale I haven't used, from the research I have done, it is a subset of
Seam's functionality. What seems nice is the smaller footprint and
lesser learning curve than Seam. I debated it but wanted the
functionality of Seam.

Clay, looked briefly at it, but the majority of people side with
facelets. Clay is bound to Shale, so you can't use Clay by itself.

Facelets:
Practically an absolute must. You may as well use JSPs and servlets if
you don't have facelets IMO. JSF is practically useless without it.
Multi-layered Templating
Custom tag definitions
JSTL support
High degree of extensibility
Easier to write components (no tags or TLD files needed)
EL-Anywhere support (JSF 1.2)

My recommendation:
MyFaces+JBoss-Seam+Facelets for your heavy functionality site
MyFaces+Shale+Facelets for your small-medium site without EJB3 Entity
managers or hibernate persistence.

On 2/28/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 SEAM gives you database integration (EJB3?), Shale provides a variety
 of things (dialogs, lifecycle hooks, testing framework, commons
 validator to name a few), Clay and Facelets provide you with
 alternatives to using jsp both as an end-user as well as a component
 developer.   Facelets also provides some JSF 1.2 functionality when
 using it with MyFaces.Note that I have only used Facelets, so some
 of the details may be wrong for other systems.

 I recommend that you go to the web pages for each of the above
 projects and read the overview of the project.

 On 2/28/06, Legolas Woodland [EMAIL PROTECTED] wrote:
  Hi
  Thank you for reading my post.
  I want to know what additional features SEAM from jboss ,Clay , Shale
  from Apache and Facelets
  bring to jsf.
  I will be happy if some one give me a simple answer.
 
 
 
  Thank you
 



Re: Some simple questions about JSF frameworks ....?

2006-02-28 Thread Craig McClanahan
On 2/28/06, Andrew Robinson [EMAIL PROTECTED] wrote:
Seam:Extended entity management persistence (EJB3 or hibernate)Conversation context (multiple windows supported with server sidestate. Basically a long running transaction)Annotation demarcation of maneged beans
Annotate injection and outjection of context variablesInterception of action method (helpful for things like making sure theuser has authenticated)Validation via JSF or by backing bean w/ the hibernate validator
(write the validation on your entity/data beans instead of in the UI)Shale I haven't used, from the research I have done, it is a subset ofSeam's functionality. What seems nice is the smaller footprint and
lesser learning curve than Seam. I debated it but wanted thefunctionality of Seam.Clay, looked briefly at it, but the majority of people side withfacelets. Clay is bound to Shale, so you can't use Clay by itself.
This statement is a bit too simplistic so that it actually distorts reality a bit :-). The dependence of Clay on the rest of Shale is that you need to include shale-core.jar in your webapp. You do not have to care about anything else Shale provides, if you do not care about it -- just pay attention to the specific configuration details related to Clay.
Facelets:Practically an absolute must. You may as well use JSPs and servlets if
you don't have facelets IMO. JSF is practically useless without it.Multi-layered TemplatingCustom tag definitionsJSTL supportHigh degree of extensibilityEasier to write components (no tags or TLD files needed)
EL-Anywhere support (JSF 1.2)Clay and Facelets overlap in functionality, but each have their own strengths. And, to the consternation of myopic readers who believe that anyone claiming A is good automatically assumes B is bad :-), I will hereby go on record as saying that both of these technologies are great! They both deserve your attention to see if one or the other matches your needs more closely.
Of course, I'll say the same thing if you find that standard JSF support for JSP works out for you :-). There is more than one right answer in this space.Craig
My recommendation:MyFaces+JBoss-Seam+Facelets for your heavy functionality siteMyFaces+Shale+Facelets for your small-medium site without EJB3 Entitymanagers or hibernate persistence.On 2/28/06, Mike Kienenberger 
[EMAIL PROTECTED] wrote: SEAM gives you database integration (EJB3?), Shale provides a variety of things (dialogs, lifecycle hooks, testing framework, commons
 validator to name a few), Clay and Facelets provide you with alternatives to using jsp both as an end-user as well as a component developer. Facelets also provides some JSF 1.2 functionality when
 using it with MyFaces.Note that I have only used Facelets, so some of the details may be wrong for other systems. I recommend that you go to the web pages for each of the above projects and read the overview of the project.
 On 2/28/06, Legolas Woodland [EMAIL PROTECTED] wrote:  Hi  Thank you for reading my post.  I want to know what additional features SEAM from jboss ,Clay , Shale
  from Apache and Facelets  bring to jsf.  I will be happy if some one give me a simple answer. Thank you 



immediateSort, dataTable, dataScroller, WorkingWithLargeTables

2006-02-28 Thread devosc
Hi,

I'm trying to get the sort action to act immediately, while using the
dataScroller and WorkingWithLargeTables
(http://wiki.apache.org/myfaces/WorkingWithLargeTables).

It behaves (immediately) as expected when the bean is in the request
scope and preserveSort = false, but then upon pagination the sort
value is lost.

The other scenario I've seen is that the sort is not invoked untill
the next pagination request, i.e. it doesnt sort immediately (not with
the same above mentioned scope and preserveSort settings).

Atm:

scope: request
preserveDataModel: true
preserveSort: false

Without the above I dont see the getDataPage being called (immediately).

Is the DataScrollerActionListener supposed to come into play somewhere here ?

Does someone knows which settings, and possibly what aspects of the
code (from the LargeTables example) need to be set or worked on ?

G.


Re: immediate action for non commands

2006-02-28 Thread Dennis Byrne
Lately I've just turned to the client side because of things like this.  For 
example, to get around the aforementioned warning, one might always keep 
@rendered set to true for the inputText element, but set it's style to 
display:none .  Then, use js to programmitcally change this and avoid the 
round trip altogether.

Dennis Byrne

-Original Message-
From: Rogers Reilly [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 11:01 PM
To: 'MyFaces Discussion'
Subject: Re: immediate action for non commands

Best way to do this now is with Cherokee (or whatever it's called).
af:selectOneListbox takes an autoSubmit attribute, which does
exactly what you want.

I was thinking you could also set partialSubmit=true and do your
refresh with PPR, which would be slick, but I'm not seeing that
attribute in the docs.  Looks like autoSubmit mandates a full refresh.
:-(

Dennis Byrne wrote:

The kludge you speak of is the most popular way to do this.

One warning.  Let's say you have two controls, selectOneMenu and inputText.  
Your requirement is that the inputText is to be rendered *only* when a 
certain item (let's call it 'ITEM X') in the selectOneMenu is selected.  You 
accomplish this by hooking a js event hander into @onclick or @onchange of 
the selectOneMenu.  The js clicks a hidden commandButton and the form is 
submitted.  In the action or actionListener of the commandButton, you 
dynamically render the inputText element and the form is then rerendered.

If the user clicks then back button, on both IE and FireFox at least, the 
browser will not go back to the server.  It will simple display the first 
page in the state it was in just *before* the form was submitted.  There are 
two important parts to keep in mind.  First, the selected item of the 
selectOneMenu was 'ITEM X'.  Second, the inputText field was *not* rendered 
when the form was submitted.  The user will have then effectivly placed the 
form into a state that is against the initial requirement.

Dennis Byrne



-Original Message-
From: Lance Frohman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 08:57 PM
To: ''MyFaces Discussion''
Subject: immediate action for non commands

What is the best practice if I need a drop down list -
h:selectOneListbox - change
to go to the server, as if there was an immediate=true on a command
button.
Depending on what is selected in the h:selectOneListbox, the page will be
displayed differently.
I was using a kludge with onclick= submitting a h:commandButton
style=visibility:hidden; ...

Thanks,
Lance