NavigationMenuItem external links

2006-04-13 Thread Vecchio Fabrizio
Hi to all,
i'm using panelNavigation2 to make the left navigation menu for a
portal. I'm using managed bean to populate links. My question is
it's possible to enable external link instead of action ?
Example create a link http://www.blablabla.com ?
Thank to all



Re: Validation in valueChangeListener

2006-04-13 Thread Joerg Bredlau

Hello,



On Wed, 12 Apr 2006, Mike Kienenberger wrote:

[...]


As of JSF 1.1, there is not another way to do this.   JSF 1.2 will
support a requiredMessage attribute on UIComponents.

If you'd like to submit a patch to allow Tomahawk components to
support a requiredMessage value, we're interested in one.   Tomahawk
validators already support a message attribute, but this won't help
for the required attribute on components.



Ok, I'll will try to take some time for this and check the sources ...



You should be able to make the OptionalValidationFramework work for
this situation, but there are probably better ways to do it.




I've tried out the example on your Wiki-Page:

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

Here is my Code:

[...]
h:form id=updateAddressForm
 jsfcomp:submittedValueCollectorWalker/
[...]
h:inputText value=#{addressListBean.activeAddress.lastname}
  id=lastname
  jsfcomp:optionalValidator 
delegateValidatorId=net.sf.jsfcomp.validator.RequiredValidator/
  jsfcomp:optionalValidator id=lastnameValidator
  AddressValidator/
  /jsfcomp:optionalValidator
/h:inputText
[...]
h:commandLink action=#{addressListBean.updateAddress}
 h:outputText value= Daten speichern /
 f:param name=NET_SF_JSFC_OPT_VDTR_MODE value=soft/
/h:commandLink
[...]
jsfcomp:optionalValidatorWrappingRequiredValidatorChecker/
/h:form
[...]


AddressValidator is the Id of my validatorclass.

When I execute this, following Exception was thrown:

[...]
javax.servlet.ServletException: 
/personaldata/pd_update_address.jsp(317,13) 
Attribute delegateValidatorId invalid for tag optionalValidator according 
to TLD

javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
[...]

I tried this under Myfaces 1.1.1 and 1.1.2 with the same result.

Can you give me an working example?


Thanks
Joerg




Re: enctype=multipart/form-data not persisting text fields back into my model.

2006-04-13 Thread Sébastien Marin
http://issues.apache.org/jira/browse/TOMAHAWK-63
http://issues.apache.org/jira/browse/TOMAHAWK-168

Selon Mike Kienenberger [EMAIL PROTECTED]:

- On 4/11/06, Murray Brandon [EMAIL PROTECTED] wrote:
-  However, if I change ONLY the form encoding type to be
-  multipart/form-data, the bean.property never gets set.
-  What gives?  Do I have to do something special for multipart form submits?
-
- I don't know the answer to this, but do you have the Tomahawk
- Extensions filter installed?  I know that it does some kind of
- processing on multipart/form-data encoding types to support file
- uploads.
-


|Cordialement, Sébastien MARIN.|
|--|
|-  http://www.marin-s.com  -|
|--|


Re: Validation in valueChangeListener

2006-04-13 Thread Joerg Bredlau

Hi,


On Wed, 12 Apr 2006, Volker Weber wrote:

[...]


Now I want to make the validation by hand in valueChangeListeners, added
to the components. My Problem is: The ValueChangeListener is executed
before model_update,thats right? How can I get back to
ValidationPhase(?) when the field is empty, to display the input-page
again and not update my model?


Here is the codefragment I'm working on:

public void lastnameChange(ValueChangeEvent event) {
String lastname = ((String) event.getNewValue()).trim();
String compId = event.getComponent().getId();

if (( lastname== null) || (lastname.length() == 0)) {
FacesUtils.addInfoMessage(compId, Please enter your name.);
// TODO go back to input page with old value


here you need: FacesContext.getCurrentInstance().renderResponse();




I've tried out this hint, but the model always updated when the field is 
empty. The message displayed in the global messages-tag

instead the associated message-tag.

Is it possible to save the state of the diplayed page with saveState() and 
when validation fails to restore it? Or is this approach oversized for this task?




Thanks
Joerg





Re: t:inputDate: how to trigger script when date selected from popup?

2006-04-13 Thread Alin Dosoniu

I had the same problem in IE with t:inputCalendar.
You can search for t:inputCalendar onchange not working in IE in january.
This is what I said in last mail:

Thank you for page suggestion. I tried what is explained there, but it still
cannot work on IE. I found an explanation of the problem here:
http://ewbi.blogs.com/develops/2004/12/ie_changing_a_t.html
It looks that IE calls the onchange only when the control looses the focus.
In this case, the input control (type = text) used to store the date does
not loose the focus, so the onchange is not called.
I ended up displaying the Submit button and will click on it to have the
page refresh.

Alin.



trying to trigger a form submit when a date is entered.
tried onchange and that triggered script if i changed any
of the input fields (day, month, year) directly,
*but* if i select a date using the popup calendar, nuthin :(

any guidance appreciated... ;)
--
View this message in context: 
http://www.nabble.com/%3Ct%3AinputDate%3E%3A-how-to-trigger-script-when-date-selected-from-popup--t1441845.html#a3893571

Sent from the MyFaces - Users forum at Nabble.com.


[OT] Glassfish JPA is now standalone

2006-04-13 Thread Werner Punz
A blog entry in jroller pointed me towards it, as it seems the JPA
implementation of glassfish now has its own standalone jars and project:

http://www.jroller.com/page/guruwons?entry=glassfish_java_persistence_module_is

https://glassfish.dev.java.net/downloads/persistence/JavaPersistence.html

this is good news indeed.

Werner



Re: File upload problem - setFile( ) never called, please help!

2006-04-13 Thread Matthias Wessendorf
Murray,

can you check agains the nightly version of ExtensionsFilter?

(see also TOMAHAWK-249)

On 4/13/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 On 4/12/06, Murray Brandon [EMAIL PROTECTED] wrote:
  I've attached my web.xml and faces.config.xml which I think are right.
  Would be nice to get a second opinion tho.

 Ok.  The first problem is that web.xml elements are not in the correct order.
 You're probably getting warnings about this, and this is probably a
 large part of the problem as most of your configuration file is
 probably being ignored.

 This is the required ordering:

 !ELEMENT web-app (icon?, display-name?, description?, distributable?,
 context-param*, filter*, filter-mapping*, listener*, servlet*,
 servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
 error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
 login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)

 That is, context-params followed by filters followed by
 filter-mappings followed by listeners followed by servlets followed by
 servlet-mappings followed by security-constraints.

 Your filter mappings will be executed in the order you list them.   My
 recommendation would be to have the following myfaces extension filter
 listed last, and during post-processing (after the Servlet runs), it
 will run first, so you'll have a valid page at this point.

 !-- extension mapping for adding script/, link/, and other
 resource tags to JSF-pages  --
 filter-mapping
 filter-nameMyFacesExtensionsFilter/filter-name
 servlet-nameFacesServlet/servlet-name
 /filter-mapping


 I would delete the following url-pattern mapping as it doesn't add anything.

 filter-mapping
 filter-nameMyFacesExtensionsFilter/filter-name
 url-pattern*.jsf/url-pattern
 /filter-mapping

 The order of the following extensions filter mapping probably doesn't
 matter, but you might get slightly better performance by listing it
 first:

 !-- extension mapping for serving page-independent resources
 (javascript, stylesheets, images, etc.)  --
 filter-mapping
 filter-nameMyFacesExtensionsFilter/filter-name
 url-pattern/faces/myFacesExtensionResource/*/url-pattern
 /filter-mapping



--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com


RE: tag to truncate outputText?

2006-04-13 Thread Michael Heinen
I found out what the problem was in my case.
The converter was created only once in the datatable and before the
datatable has been processed.

That means there is only one converter for all cells.
So I have to move the creation of the ValueBinding from the
TruncateConverterTag into the getAsString() method of the
TruncateConverter because I have column specific truncationAt
attributes.
There is of course an overhead because the ValueBinding has to be
resolved for every cell and not only once per column.

Is this assumption correct?

The truncation in a datatable and inside t:columns tag is more complex
than I thought. Is a converter still the best approach to achieve column
specific text truncation in a dynamic datatable?

Are there any alternatives? 
I tried to use a custom renderer but this was not working in my case.

tia
Michael

-Original Message-
From: Michael Heinen [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 13. April 2006 11:07
To: MyFaces Discussion
Subject: RE: tag to truncate outputText?

Hi again,

I tested the value binding also from a bundle and this is working fine.

The problem seems to be that the truncate attribute of the converter tag
is populated before or after the outer table tag is processed.
The expression #{columnHeader.truncateAtPosition} returns the correct
value (not null) when it is placed in a h:outputtext tag.

But the same expression returns always null inside the converter tag.
rm:truncateOutput truncateAt=#{columnHeader.truncateAtPosition}
continuationMark=.../

Any ideas?
Is this caused due to different phases?

Michael

-Original Message-
From: Lindholm, Greg [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 12. April 2006 18:36
To: MyFaces Discussion
Subject: RE: tag to truncate outputText?

The value binding logic is taken right out of a book.
I tested it getting the truncateAt position from a bundle 
and it worked fine.

(Are you sure your #{columnHeader.truncateAtPosition} is 
returning a non-null?)

Need to add a check for null coming back from the getValue().

I haven't done anything else with evaluating value bindings 
so can't really help.
Would need to research and debug.


-Original Message-
From: Michael Heinen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 12, 2006 7:23 AM
To: MyFaces Discussion
Subject: RE: tag to truncate outputText?

Does the truncateOutput tag work with JSF EL? 

The following snippet causes a NullPointerException in the
TruncateConverterTag at line 62, which is marked below because
the Object o is always null.

t:columns id=columns
   value=#{MyControllerBean.columnHeaders}
   var=columnHeader

h:outputText value=#{DynaAnnoControllerBean.cellValue}
 rm:truncateOutput truncateAt=#{columnHeader.truncateAtPosition}
continuationMark=.../
/h:outputText
  

ValueBinding vb =
facesContext.getApplication().createValueBinding(value);
Object o = vb.getValue(facesContext);

if (o == null) // Add error check
{
// do some error processing
}

if (o instanceof Number) {
converter.setTruncateAt(((Number) o).intValue());
} else {
converter.setTruncateAt(Integer.parseInt(o.toString()));
}   








How to pass bean from JSP to another JSP?

2006-04-13 Thread leechuanlim

How to pass bean from JSP to another JSP? Or if JSF have funtion to open a
pop-up window?
--
View this message in context: 
http://www.nabble.com/How-to-pass-bean-from-JSP-to-another-JSP--t1443483.html#a3898066
Sent from the MyFaces - Users forum at Nabble.com.



MyFaces Portlet does not work. please help

2006-04-13 Thread Amgad Mosleh
Dear all

I am trying to run myfaces portlet in liferay portal using the following
:

- Jboss-Tomcat  4.0.3SP1
- Liferay 4.0.0
- MyFaces portlet examlpe which has the following lib:

   commons-codec.jar -- 1.2
   myfaces.jar --  1.0.9rc3 (April 12 2005)
   myfaces-extensions.jar  --  1.0.9rc3 (April 12 2005)
   myfaces-impl.jar  --  1.0.9rc3 (April 12 2005)
   myfaces-jsf-api.jar --  1.0.9rc3 (April 12 2005)
   myfaces-wap.jar  --   1.0.9rc3 (April 12 2005)
   myfaces-xdoclet.jar  --  1.0.9rc3 (April 12 2005)
   util-java.jar  --  Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
   util-jsf.jar  --   Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
   util-taglib.jar  --  Created-By: 1.4.2_08-b03 (Sun Microsystems
Inc.)
   commons-el.jar --  1.0
   jsp-2.0.jar  --  2.0.public_draft

The portlet is a form that has one text field (name). When the user add
his name a welcom page must appear and the  added name will be shown.

The portlet was successfully added be liferay with no exceptions . But
when I add a name and click on submit I got the following Exception: see
the attached file

The portlet files are attached also with this email

I red that there is a problem when using MyFaces with Tomcat5.5.x so I
followed the steps in (http://myfaces.apache.org/tomcat.html) :
- Removed the     commons-el.jar and  jsp-2.0.jar from lib and started
the portal again but no change

Please any help will be appreciated


Best Regards;
Amgad Mosleh



RE: tag to truncate outputText?

2006-04-13 Thread Jesse Alexander \(KSFD 121\)
And if they do not accept it check out http://jsf-comp.sf.net/ as
harbour 

 -Original Message-
 From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 12, 2006 6:41 PM
 To: MyFaces Discussion
 Subject: Re: tag to truncate outputText?
 
 I think having a truncating converter in tomahawk would be worthwhile.
  You can open a JIRA issue and submit patches to make this happen, if
 you want.
 


difference between createValueBinding and resolveVariable

2006-04-13 Thread Dean Hiller
What is the different between the below snippets of code?  Is is true 
that they are exactly the same if projectBean is a managed bean?  If it 
is not a managed bean, then the first snippet would be creating a 
runtime managed bean(one that was not declared in faces-config.xml).


   ValueBinding bind = 
FacesContext.getCurrentInstance().getApplication().createValueBinding(#{projectBean});

   ProjectBean projBean = (ProjectBean)bind.getValue(ctx);

   Object obj = 
FacesContext.getCurrentInstance().getApplication().getVariableResolver()
   .resolveVariable(FacesContext.getCurrentInstance(), 
projectBean);

   ProjectBean projBean = (ProjectBean)obj;

thanks,
dean




RE: tag to truncate outputText?

2006-04-13 Thread Lindholm, Greg
I would like to contribute this to Tomahawk I just don't have a clue 
how to go about creating a patch.
Where do you start? 

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 

I think having a truncating converter in tomahawk would be worthwhile.
 You can open a JIRA issue and submit patches to make this happen, if
you want.


RE: tag to truncate outputText?

2006-04-13 Thread Lindholm, Greg
 

-Original Message-
From: Michael Heinen [mailto:[EMAIL PROTECTED] 

 The converter was created only once in the datatable and before the
 datatable has been processed.

This sounds correct.

 That means there is only one converter for all cells.

If you have your converter tag inside a column then you get
one converter for each column. (Not sure what happens if your
dataTable is nested inside a column of another dataTable.)

 So I have to move the creation of the ValueBinding from the
 TruncateConverterTag into the getAsString() method of the
 TruncateConverter because I have column specific truncationAt
 attributes.
 There is of course an overhead because the ValueBinding has to be
 resolved for every cell and not only once per column.

I guess you could save the tag's attibute string in the 
converter and do the value binding everytime getAsString()
is called. Give it a try. It sounds slow but computers are fast
and dynamic stuff is always more expensive.
(Maybe create a new DynamicTruncateConverter  :)



JavaScript set values and model update

2006-04-13 Thread Alexander Panzhin

I have a problem with JavaScript set values.
t:selectOneMenu id=moduleSelect forceId=true value=#{search.module}
f:selectItems value=#{search.modules} /
/t:selectOneMenu

Than I add options to this select menu via js.
   var a = document.getElementById(moduleSelect).options;
   a[0] = new Option(,, false);
and so on...

My #{search.modules} also returns a SelectItem list(when appropriate).
But the problem is unless #{search.modules} is not empty, whatever i
choose update my model with that data.

Is there anything that I'm missing here?

I use Facelets/MyFaces.


smime.p7s
Description: S/MIME Cryptographic Signature


AccordionPanel in sandbox examples doesn't works

2006-04-13 Thread Rogerio Pereira
Hi,I'm using FF 1.5 and when i try to load the accordionpanel example in sandbox examples war i get this error:Error: {expandedBg:#63699c, hoverBg:#63699c, collapsedBg:#6b79a5, expandedTextColor:#ff, expandedFontWeight:bold, hoverTextColor:#ff, collapsedTextColor:#ced7ef, collapsedFontWeight:normal, hoverTextColor:#ff, borderColor:#1f669b, panelHeight:200, onHideTab:null, onShowTab:null}.extend is not a function
source file: 
http://localhost:8080/myfaces-example-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11449359/accordion.HtmlAccordionPanelRenderer/customRico.jsLine: 50
Error: {expandedBg:#63699c, hoverBg:#63699c, collapsedBg:#6b79a5, expandedTextColor:#ff, expandedFontWeight:bold, hoverTextColor:#ff, collapsedTextColor:#ced7ef, collapsedFontWeight:normal, hoverTextColor:#ff, borderColor:#1f669b, panelHeight:200, closedPanelHeight:50, useRealHeight:true, onHideTab:null, onShowTab:null}.extend is not a function
source file: 
http://localhost:8080/myfaces-example-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11449359/accordion.HtmlAccordionPanelRenderer/customRico.jsLine: 276
-- Yours truly (Atenciosamente),Rogério


Re: tag to truncate outputText?

2006-04-13 Thread Mike Kienenberger
On 4/13/06, Lindholm, Greg [EMAIL PROTECTED] wrote:
 I would like to contribute this to Tomahawk I just don't have a clue
 how to go about creating a patch.
 Where do you start?

Open a tomahawk jira issue describing your component.
Attach files to the issue.

Brand new files can be attached as-is.

Changed files need to be submitted in unified diff format.   On unix,
you can use diff -u to create them.   Eclipse's SVN module and
TortoiseSVN have Create patch menu options.   I'm sure other SVN
tools have similar functionality.

Things you should provide.  I've been told that some of these are
optional for a sandbox component, but they are all required to get
your component out of the sandbox and into Tomahawk, so I'd recommend
providing all of them up front.

Class files implementing your component.  Diff file adding your
component to faces-config.   Diff file adding your component to the
sandbox.tld file.   An xdocs xml documentation file based on the
component template xml file.   A sandbox example jsp page
demonstrating your component.

Here's an example of someone contributing the focus component,
although it isn't a perfect example.  Maybe yours will be :)

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


Re: JavaScript set values and model update

2006-04-13 Thread Alexander Panzhin

I found what's the problem.

I have a problem with JavaScript set values.
t:selectOneMenu id=moduleSelect forceId=true 
value=#{search.module}

f:selectItems value=#{search.modules} /
/t:selectOneMenu

Than I add options to this select menu via js.
   var a = document.getElementById(moduleSelect).options;
   a[0] = new Option(,, false);
and so on...

My #{search.modules} also returns a SelectItem list(when appropriate).
But the problem is unless #{search.modules} is not empty, whatever i
choose update my model with that data.

Is there anything that I'm missing here?

I use Facelets/MyFaces.



--
  Su pagarba,
 Aleksandr Panzin
 IT sistemu architektas.

  With best regards,
 Alexander Panzhin
 IT systems architect 



smime.p7s
Description: S/MIME Cryptographic Signature


Re: File upload no longer a problem - setFile( ) called! Updated web.xml attached.

2006-04-13 Thread Mike Kienenberger
On 4/12/06, Murray Brandon [EMAIL PROTECTED] wrote:
 Having uploaded a file, can I then serve that up as an image in the app
 or does af:objectImage only serve up images from inside the war file
 system?

There's a sandbox graphicImageDynamic component in progress, but when
I last used it it didn't work in all cases (fails when client-side
state saving data gets too large).   There's a facelets tag handler
for graphicImageDynamic on the facelets wiki (probably also the
myfaces wiki) if you want to give it a try.   I'll be interested in
hearing what you end up doing to generate images from byte data.


Re: Validation in valueChangeListener

2006-04-13 Thread Mike Kienenberger
On Wed, 12 Apr 2006, Mike Kienenberger wrote:
  You should be able to make the OptionalValidationFramework work for
  this situation, but there are probably better ways to do it.

On 4/12/06, Joerg Bredlau [EMAIL PROTECTED] wrote:
 I've tried out the example on your Wiki-Page:
 http://wiki.apache.org/myfaces/OptionalValidationFramework

 Here is my Code:

jsfcomp:optionalValidator
   f:param name=NET_SF_JSFC_OPT_VDTR_MODE value=soft/
 jsfcomp:optionalValidatorWrappingRequiredValidatorChecker/
 Can you give me an working example?


You want to dump all of the optionalValidator-prefixed stuff.   It's
not necessary for the problem you're trying to solve, and it only
works if you're using facelets or JSF 1.2.   Even then, it hasn't been
well tested up to this point.

If all you want is the required validator, do something like this:

h:form
  jsfcomp:submittedValueCollectorWalker/

  uiinput
  jsfcomp:requiredValidator/
  uiinput/

  uiinput
  jsfcomp:requiredValidator/
  uiinput/

  jsfcomp:requiredValidatorChecker/
/h:form

This requiredValidator code has been far better tested, and is far
simpler than the optional validation stuff.   However, you'll want to
add an attribute to requiredValidator to support a message
parameter.   You can copy the ValidatorBase and ValidatorBaseTag
classes from MyFaces Tomahawk -- that's what these classes currently
add.   I'll give you commit access to jsf-comp if you're interested in
doing this.

Again, I think your time would be better spent figuring out how to add
the requiredMessage attribute to the Tomahawk component base, though.


Re: tag to truncate outputText?

2006-04-13 Thread Bruno Aranda
In unix/windows you can also use the command svn diff that generates
the diff with all your changes, even for new files providing they have
been marked to be added in the svn repo before with svn add command.
So you get only one file with all the changes in all the files, which
is very handy IMO.
So, you only have to put your files in your sandbox copy, add them to
svn and create the patch. And as Mike says, you have to provide an
example (in the sandbox examples) as well as clear documentation for
the sandbox pages if you want the community to understand and use the
new component.

Cheers!

Bruno

On 4/13/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 On 4/13/06, Lindholm, Greg [EMAIL PROTECTED] wrote:
  I would like to contribute this to Tomahawk I just don't have a clue
  how to go about creating a patch.
  Where do you start?

 Open a tomahawk jira issue describing your component.
 Attach files to the issue.

 Brand new files can be attached as-is.

 Changed files need to be submitted in unified diff format.   On unix,
 you can use diff -u to create them.   Eclipse's SVN module and
 TortoiseSVN have Create patch menu options.   I'm sure other SVN
 tools have similar functionality.

 Things you should provide.  I've been told that some of these are
 optional for a sandbox component, but they are all required to get
 your component out of the sandbox and into Tomahawk, so I'd recommend
 providing all of them up front.

 Class files implementing your component.  Diff file adding your
 component to faces-config.   Diff file adding your component to the
 sandbox.tld file.   An xdocs xml documentation file based on the
 component template xml file.   A sandbox example jsp page
 demonstrating your component.

 Here's an example of someone contributing the focus component,
 although it isn't a perfect example.  Maybe yours will be :)

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



Re: AccordionPanel in sandbox examples doesn't works

2006-04-13 Thread Werner Punz
Yes the panel is broken currently.


Rogerio Pereira schrieb:
 Hi,
 
 I'm using FF 1.5 and when i try to load the accordionpanel example in
 sandbox examples war i get this error:
 
 Error: {expandedBg:#63699c, hoverBg:#63699c, collapsedBg:#6b79a5,
 expandedTextColor:#ff, expandedFontWeight:bold,
 hoverTextColor:#ff, collapsedTextColor:#ced7ef,
 collapsedFontWeight:normal, hoverTextColor:#ff,
 borderColor:#1f669b, panelHeight:200, onHideTab:null,
 onShowTab:null}.extend is not a function
 source file:
 http://localhost:8080/myfaces-example-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11449359/accordion.HtmlAccordionPanelRenderer/customRico.js
 Line: 50
 
 Error: {expandedBg:#63699c, hoverBg:#63699c, collapsedBg:#6b79a5,
 expandedTextColor:#ff, expandedFontWeight:bold,
 hoverTextColor:#ff, collapsedTextColor:#ced7ef,
 collapsedFontWeight:normal, hoverTextColor:#ff,
 borderColor:#1f669b, panelHeight:200, closedPanelHeight:50,
 useRealHeight:true, onHideTab:null, onShowTab:null}.extend is not a
 function
 source file:
 http://localhost:8080/myfaces-example-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11449359/accordion.HtmlAccordionPanelRenderer/customRico.js
 Line: 276
 
 -- 
 Yours truly (Atenciosamente),
 
 Rogério



Re: difference between createValueBinding and resolveVariable

2006-04-13 Thread Pierpaolo Follia
There is no difference between the two snippets of code: when you create 
a ValueBinding you evaluate a whole EL. If you use the variable 
resolver, you are resolving the left part of an EL. In your example the 
EL #{projectBean} is exactly the left part of the EL.

There's difference only if you put a more complex EL in the first snippet.

Regards,
Pierpaolo

Dean Hiller wrote:
What is the different between the below snippets of code?  Is is true 
that they are exactly the same if projectBean is a managed bean?  If 
it is not a managed bean, then the first snippet would be creating a 
runtime managed bean(one that was not declared in faces-config.xml).


   ValueBinding bind = 
FacesContext.getCurrentInstance().getApplication().createValueBinding(#{projectBean}); 


   ProjectBean projBean = (ProjectBean)bind.getValue(ctx);

   Object obj = 
FacesContext.getCurrentInstance().getApplication().getVariableResolver()
   .resolveVariable(FacesContext.getCurrentInstance(), 
projectBean);

   ProjectBean projBean = (ProjectBean)obj;

thanks,
dean




--
Pierpaolo Follia
Wave S.r.l. - Vai Benaco 24/B, Bedizzole (BS)
Telefono: +39 030 687561
Fax: +39 030 6875690



Re: How to pass bean from JSP to another JSP?

2006-04-13 Thread Werner Punz
leechuanlim schrieb:
 How to pass bean from JSP to another JSP? Or if JSF have funtion to open a
 pop-up window?

Actually if you stay in a jsf context, it is rather easy.
You can use the managed bean facility and savestate or the session
or session beans to pass them along.

As for popups, I would not recommend to use them due to not being able
to have them modal on other browsers than ie and due to the fact that
you run into popup blockers, it is better to use an inframe popup like
jenia4faces has one.




t:inputCalendar: how to set action method?

2006-04-13 Thread tony k

at the risk of appearing foolish, i pose the following question:

since t:inputCalendar when specifed as form will update the backing bean
property specified with the value attribute when a date is selected, i'm
assuming
that it posts back to the server using some kind of hidden form.

is it possible to specifying a particular action method to get called as a
result of this post back?

i think the fact that i'm asking this question illustrates a blind spot i
have about the underpinnings of the mechanism by which faces communicates
between the browser and the server.

view source shows that there is actually a form (linkDummyForm?)
submitting back to the original jsp, but i'm still in the dark about the
details. as an aside, links to any good material attempting to explain this
mechanism would be appreciated.

thanks...
--
View this message in context: 
http://www.nabble.com/%3Ct%3AinputCalendar%3E%3A-how-to-set-action-method--t1445005.html#a3902529
Sent from the MyFaces - Users forum at Nabble.com.



Can a dataTable work in request scope?

2006-04-13 Thread Hubert Rabago
If my page uses a data table, and that data table has command links or
other input controls in it, does that limit it to the request scope? 
A teammate of mine says we can't switch certain beans to request scope
because it uses data tables and those will stop working if we do.

thanks,
Hubert


Re: AccordionPanel in sandbox examples doesn't works

2006-04-13 Thread Rogerio Pereira
Fixed, i'll create a patch...


JSF can handle GET requests *just as easily* as other frameworks

2006-04-13 Thread Hubert Rabago
Jacob Hookom, in discussing JSF myths [1], claims that:

Also, JSF can handle GET requests just as easily as other frameworks.
Because of JSF's
managed bean (IoC container), you can do the same kinds of things as
you can with
WebWork -- from parameter assignment to backing beans. An example is
linking from page
to page where id's are passed -- you can go the same route as Struts
or WebWork and just
render employee.jsf?id=#{emp.id} -- you don't have to use stateful component
communication between pages.

Is there any truth to this?  I thought the reason we had extensions
like NonFacesRequestServlet [2] was because this wasn't supported by
the core functionality?

thanks,
Hubert

[1] http://virtuas.com/articles/webframework-sweetspots.html
[2] http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls


Re: Can a dataTable work in request scope?

2006-04-13 Thread Hubert Rabago
Sorry, typo.
I meant to ask: If my page uses a data table, and that data table has
command links or other input controls in it, does that limit it to the
*session* scope?

thanks,
Hubert

On 4/13/06, Hubert Rabago [EMAIL PROTECTED] wrote:
 If my page uses a data table, and that data table has command links or
 other input controls in it, does that limit it to the request scope?
 A teammate of mine says we can't switch certain beans to request scope
 because it uses data tables and those will stop working if we do.

 thanks,
 Hubert



t:popup problems

2006-04-13 Thread vace117

Hi. 

I tried to use t:popup in every cell of a dataTable rendered into a
t:buffer. The result is that when I navigate to the page for the first time,
everything is fine. However, when I do something on the page that causes the
page to go through a full JSF cycle, the dataTable is shown twice on the
page! I checked that the table is rendered only once, which tells me that
the buffered content is being displayed twice. This only happens if I use
t:popup in my table.

Also, some actions (like using a table scroller to go to the last page)
causes this error:
org.apache.jasper.JasperException: cannot add component with id '_id119' and
path : {Component-Path : [Class:
javax.faces.component.html.HtmlCommandButton,Id: _id119]} to its parent
component. This might be a problem due to duplicate ids.

This also happens only if I use t:popup.  

Does anyone have an idea about what could be causing this? Any suggestions
would be greatly appreciated.

Val
--
View this message in context: 
http://www.nabble.com/t%3Apopup-problems-t1445543.html#a3904320
Sent from the MyFaces - Users forum at Nabble.com.



Shale ViewController and MyFaces

2006-04-13 Thread David Miller
Greetings,

I'm trying to use Shale's ViewController in a managed bean to execute
some code when the bean first loads. I'm using a nightly build of
shale-core and shale-tiger from 20060221.

It all seems really simple but I can't get it to work. None of my
ViewController methods are ever called (init(), prerender(), etc...).
I've added  mapped the shale filter in my web.xml, added the chain
listener to my web.xml, added all the dependant jars, and added a
dummy chain-config and dialog-config to META-INF.
My managed bean has the same name as my jsp (the jsp begins with a
lower case letter and the bean an upper case letter but changing that
had no effect).

What else can I do? I don't know if my problem is related to MyFaces
or to Shale.

Thanks,
David


RE: Shale ViewController and MyFaces

2006-04-13 Thread James Reynolds

From your message I can see that you understand the naming convention
for Managed-bean-name file, but are you including the entire path to the
file?  If you have  webroot/myFolder/myFile.jsp, then the name is
myFolder$myFile.

Just checking. 

-Original Message-
From: David Miller [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 11:08 AM
To: users@myfaces.apache.org
Subject: Shale ViewController and MyFaces

Greetings,

I'm trying to use Shale's ViewController in a managed bean to execute
some code when the bean first loads. I'm using a nightly build of
shale-core and shale-tiger from 20060221.

It all seems really simple but I can't get it to work. None of my
ViewController methods are ever called (init(), prerender(), etc...).
I've added  mapped the shale filter in my web.xml, added the chain
listener to my web.xml, added all the dependant jars, and added a dummy
chain-config and dialog-config to META-INF.
My managed bean has the same name as my jsp (the jsp begins with a lower
case letter and the bean an upper case letter but changing that had no
effect).

What else can I do? I don't know if my problem is related to MyFaces or
to Shale.

Thanks,
David



Re: t:popup problems

2006-04-13 Thread vace117

ok, it looks like the problem is not with t:popup, but rather with how I use
it. I didn't mention that I am not using the t:popup tag directly. I was
actually adding an HtmlPopup component programmatically from my own custom
component:


HtmlPopup popup = (HtmlPopup)
application.createComponent(HtmlPopup.COMPONENT_TYPE);
HtmlOutputText valueText = (HtmlOutputText)
application.createComponent(HtmlOutputText.COMPONENT_TYPE);
valueText.setValue(text);
HtmlPanelGroup popupGroup = (HtmlPanelGroup)
application.createComponent(HtmlPanelGroup.COMPONENT_TYPE);
popup.setPopup(popupGroup);
this.getChildren().clear(); // we only want one popup
this.getChildren().add(popup);


Adding the popup like shown above causes the wierd behavior I described in
the previous post. 

I just tried to put the t:popup tag into my JSP where it would be added by
the code, and that works fine. This tells me that I am not adding the popup
properly in my code. Can anyone see what I am doing wrong?

Thanks.
--
View this message in context: 
http://www.nabble.com/t%3Apopup-problems-t1445543.html#a3905251
Sent from the MyFaces - Users forum at Nabble.com.



Re: [OT] Glassfish JPA is now standalone

2006-04-13 Thread Wayne Fay
This is really good news. Thanks for the info, Werner.

Wayne

On 4/13/06, Werner Punz [EMAIL PROTECTED] wrote:
 A blog entry in jroller pointed me towards it, as it seems the JPA
 implementation of glassfish now has its own standalone jars and project:

 http://www.jroller.com/page/guruwons?entry=glassfish_java_persistence_module_is

 https://glassfish.dev.java.net/downloads/persistence/JavaPersistence.html

 this is good news indeed.

 Werner




RE: MyFaces Portlet does not work. please help

2006-04-13 Thread Stan Silvert
I don't see any attachment with your email, so I can't tell what your problem 
is.  However, do note that JBoss ships with MyFaces already installed so you 
don't need to include most of those jars in your war.

See http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossFaces

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

 -Original Message-
 From: Amgad Mosleh [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 13, 2006 6:42 AM
 To: users@myfaces.apache.org
 Subject: MyFaces Portlet does not work. please help
 
 Dear all
 
 I am trying to run myfaces portlet in liferay portal using the following
 :
 
 - Jboss-Tomcat  4.0.3SP1
 - Liferay 4.0.0
 - MyFaces portlet examlpe which has the following lib:
 
    commons-codec.jar -- 1.2
    myfaces.jar --  1.0.9rc3 (April 12 2005)
    myfaces-extensions.jar  --  1.0.9rc3 (April 12 2005)
    myfaces-impl.jar  --  1.0.9rc3 (April 12 2005)
    myfaces-jsf-api.jar --  1.0.9rc3 (April 12 2005)
    myfaces-wap.jar  --   1.0.9rc3 (April 12 2005)
    myfaces-xdoclet.jar  --  1.0.9rc3 (April 12 2005)
    util-java.jar  --  Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
    util-jsf.jar  --   Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
    util-taglib.jar  --  Created-By: 1.4.2_08-b03 (Sun Microsystems
 Inc.)
    commons-el.jar --  1.0
    jsp-2.0.jar  --  2.0.public_draft
 
 The portlet is a form that has one text field (name). When the user add
 his name a welcom page must appear and the  added name will be shown.
 
 The portlet was successfully added be liferay with no exceptions . But
 when I add a name and click on submit I got the following Exception: see
 the attached file
 
 The portlet files are attached also with this email
 
 I red that there is a problem when using MyFaces with Tomcat5.5.x so I
 followed the steps in (http://myfaces.apache.org/tomcat.html) :
 - Removed the     commons-el.jar and  jsp-2.0.jar from lib and started
 the portal again but no change
 
 Please any help will be appreciated
 
 
 Best Regards;
 Amgad Mosleh



Re: How to link inside the current page

2006-04-13 Thread vace117

I have nver tried this myself, but h:outputLink/ tag may be what you want.
Hope this helps.
--
View this message in context: 
http://www.nabble.com/How-to-link-inside-the-current-page-t1446353.html#a3907154
Sent from the MyFaces - Users forum at Nabble.com.



Re: Shale ViewController and MyFaces

2006-04-13 Thread Matthias Wessendorf
It also possible to change that... for instance, when *bound* to a
specific tool ([1])

[1] http://tinyurl.com/ghr79



On 4/13/06, David Miller [EMAIL PROTECTED] wrote:
 HOT DOG!
 Thanks James :)

 On 4/13/06, James Reynolds [EMAIL PROTECTED] wrote:
 
  From your message I can see that you understand the naming convention
  for Managed-bean-name file, but are you including the entire path to the
  file?  If you have  webroot/myFolder/myFile.jsp, then the name is
  myFolder$myFile.
 
  Just checking.
 
  -Original Message-
  From: David Miller [mailto:[EMAIL PROTECTED]
  Sent: Thursday, April 13, 2006 11:08 AM
  To: users@myfaces.apache.org
  Subject: Shale ViewController and MyFaces
 
  Greetings,
 
  I'm trying to use Shale's ViewController in a managed bean to execute
  some code when the bean first loads. I'm using a nightly build of
  shale-core and shale-tiger from 20060221.
 
  It all seems really simple but I can't get it to work. None of my
  ViewController methods are ever called (init(), prerender(), etc...).
  I've added  mapped the shale filter in my web.xml, added the chain
  listener to my web.xml, added all the dependant jars, and added a dummy
  chain-config and dialog-config to META-INF.
  My managed bean has the same name as my jsp (the jsp begins with a lower
  case letter and the bean an upper case letter but changing that had no
  effect).
 
  What else can I do? I don't know if my problem is related to MyFaces or
  to Shale.
 
  Thanks,
  David
 
 



--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com


Re: How to link inside the current page

2006-04-13 Thread Alexandre Poitras
Thank for the info but I prefer to try to use the href approach first.
I have strict restrictions on the outputted xhtml.

On 4/13/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 On 4/13/06, Alexandre Poitras [EMAIL PROTECTED] wrote:
  I have a little problem that I can't solve and it's really bugging me
  so I hope someone here know the answer. I am trying to send the user
  back to the current page but to a given position. Using a pure html
  approach I would usually do something like href=#id but he doesn't
  seems to work with the action attribute. So anyone knows how I might
  be able to do this?

 The myfaces autoscroll setting should be able to do this for you.
 However, being a javascript-novice, I was never able to figure out how
 to do it myself.

 For some browsers, setting the focus will also scroll to the active
 control on a given page.   Sandbox focus shows how.   Not sure if
 that's helpful for your browser target, though.



--
Alexandre Poitras
Québec, Canada


Re: How to link inside the current page

2006-04-13 Thread Alexandre Poitras
Yeah unfortunately I am trying to do this using a custom component
which extend UICommand. I guess I should take a look at outputLink
source code to see how they handle this case.

On 4/13/06, vace117 [EMAIL PROTECTED] wrote:

 I have nver tried this myself, but h:outputLink/ tag may be what you want.
 Hope this helps.
 --
 View this message in context: 
 http://www.nabble.com/How-to-link-inside-the-current-page-t1446353.html#a3907154
 Sent from the MyFaces - Users forum at Nabble.com.




--
Alexandre Poitras
Québec, Canada


Re: Can a dataTable work in request scope?

2006-04-13 Thread Adam Brod

Yes, you can use request-scoped backing
beans with dataTable. I would recommend that you use the t:saveState
component to simplify your life.

See Action
listeners and actions for my commands on dataTables do not fire
from the FAQ. 
http://wiki.apache.org/myfaces/FAQ

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

Adam Brod
Product Development Team


Re: Can a dataTable work in request scope?

2006-04-13 Thread Hubert Rabago
Thanks, Adam, we'll try this out.

Hubert

On 4/13/06, Adam Brod [EMAIL PROTECTED] wrote:

 Yes, you can use request-scoped backing beans with dataTable.  I would
 recommend that you use the t:saveState component to simplify your life.

 See Action listeners and actions for my commands on dataTables do not fire
 from the FAQ.
 http://wiki.apache.org/myfaces/FAQ

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

  Adam Brod
  Product Development Team



Re: t:popup problems

2006-04-13 Thread vace117

I just got my code to work.

I still can't explain the spectacular errors and visual effects like
duplication of my dataTable, but I managed to avoid the problem.

The key was not to discard the old instance of HtmlPopup and create a new
one on every render. i.e. these lines:
this.getChildren().clear(); // we only want one popup
this.getChildren().add(popup); 

I changed my code to check if my component already has children and if it
does, resuse them. This made my page work properly.

Anyone understand why it wasn't working when a new instance of HtmlPopup was
created every time?

Val
--
View this message in context: 
http://www.nabble.com/t%3Apopup-problems-t1445543.html#a3907962
Sent from the MyFaces - Users forum at Nabble.com.



indeciperable Errors

2006-04-13 Thread John



How to make sense of 
this
Line 4 is 
simply the inclusion of a tag file ( layout:main ), which has been working 
fine for quite a while.

An error occurred in the bean. 
Error Message is: javax.faces.FacesException: Exception in JSP: 
/pageparts/quarantinelist.jsp:4 1: <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="t" %>2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>3: <%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>4: 
5: 
6: 7: Stacktrace:Stack Trace is : javax.faces.FacesException: javax.faces.FacesException: Exception in JSP: /pageparts/quarantinelist.jsp:4

1: <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="t" %>
2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
3: <%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
4: 
5:   
6: 
7:   


Stacktrace:
	at org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter.doFilter(TobagoMultipartFormdataFilter.java:81)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Unknown Source)
Caused by: javax.faces.FacesException: Exception in JSP: /pageparts/quarantinelist.jsp:4

1: <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="t" %>
2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
3: <%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
4: 
5:   
6: 
7:   


Stacktrace:
	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:422)
	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
	at org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:120)
	... 19 more
Caused by: org.apache.jasper.JasperException: Exception in JSP: /pageparts/quarantinelist.jsp:4

1: <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="t" %>
2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
3: <%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
4: 
5:   
6: 
7:   


Stacktrace:
	at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
	... 21 more





Re: JSF can handle GET requests *just as easily* as other frameworks

2006-04-13 Thread Mike Kienenberger
On 4/13/06, Hubert Rabago [EMAIL PROTECTED] wrote:
 Jacob Hookom, in discussing JSF myths [1], claims that:

 Also, JSF can handle GET requests just as easily as other frameworks.

 Is there any truth to this?  I thought the reason we had extensions
 like NonFacesRequestServlet [2] was because this wasn't supported by
 the core functionality?

 [1] http://virtuas.com/articles/webframework-sweetspots.html
 [2] http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls

Depends on your definition of just as easily.   It's not supported
by default in core.   Probably you should read it as just as easily
in theory.


Maximizing a portlet implementing MyFacesGenericPortlet causes Liferay to crash.

2006-04-13 Thread Marcio E Miranda








Hi,



This may or may not be specific to the portlet
implementation of My Faces, but when a portlet implementing MyFacesGenericPortlet
is maximized in Liferay, the following exception is thrown:



00:35:32,497 INFO [STDOUT]
javax.portlet.PortletException

00:35:32,497 INFO [STDOUT]  at
org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:257)

00:35:32,497 INFO [STDOUT]  at
org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFacesGenericPortlet.java:233)

00:35:32,497 INFO [STDOUT]  at
com.liferay.portal.servlet.PortletServlet.service(PortletServlet.java:72)

00:35:32,497 INFO [STDOUT]  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)



Caused by: java.lang.IllegalArgumentException

00:35:32,517 INFO [STDOUT]  at
com.liferay.portlet.ActionResponseImpl.setRenderParameter(ActionResponseImpl.java:166)

00:35:32,517 INFO [STDOUT]  at
org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFacesGenericPortlet.java:225)

00:35:32,517 INFO [STDOUT]  ... 50 more



Nested Exception is java.lang.IllegalArgumentException

00:35:32,517 INFO [STDOUT]  at
com.liferay.portlet.ActionResponseImpl.setRenderParameter(ActionResponseImpl.java:166)

00:35:32,517 INFO [STDOUT]  at
org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFacesGenericPortlet.java:225)

00:35:32,517 INFO [STDOUT]  at
com.liferay.portal.servlet.PortletServlet.service(PortletServlet.java:72)

00:35:32,517 INFO [STDOUT]  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)



Do you think this is a My Faces issue? The others portlets
which are bundled with Liferay doesnt show this behavior.



Marcio.








RE: MyFaces Portlet does not work. please help

2006-04-13 Thread Marcio E Miranda
I had an issue with Liferay 4.0 (with jboss and tomcat) and My Faces too, but a 
different one.

My war package, which works fine in Liferay 3.6.2 (with jboss and tomcat), 
throws the following exception when I deploy it on Liferay 4.0:

Caused by: java.lang.ClassNotFoundException: 
org.apache.myfaces.context.MyFacesContextFactoryImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)

I've included the following jar files in my war package:

Commons-beansutils 
Commons-codec
Commons-collections
Commons-digester
Commons-el
Commons-fileupload
Commons-logging
Commons-validator
Jakarta-oro
Myfaces-api
Myfaces-impl
Sandbox
Struts
Tomahawk
Commons-lang
Jstl
Portlet-api

I've looked into myfaces-impl.jar and in fact there is no 
MyFacesContextFactoryImpl, but a FacesContextFactoryImpl.

I don't know if this is a My Faces issue, since the same WAR package works fine 
on Liferay 3.6.2. Maybe you can help me figure out this problem. Am I missing 
any jar file?

Marcio.


-Original Message-
From: Stan Silvert [mailto:[EMAIL PROTECTED] 
Sent: quinta-feira, 13 de abril de 2006 16:14
To: MyFaces Discussion
Subject: RE: MyFaces Portlet does not work. please help

I don't see any attachment with your email, so I can't tell what your problem 
is.  However, do note that JBoss ships with MyFaces already installed so you 
don't need to include most of those jars in your war.

See http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossFaces

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

 -Original Message-
 From: Amgad Mosleh [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 13, 2006 6:42 AM
 To: users@myfaces.apache.org
 Subject: MyFaces Portlet does not work. please help
 
 Dear all
 
 I am trying to run myfaces portlet in liferay portal using the following
 :
 
 - Jboss-Tomcat  4.0.3SP1
 - Liferay 4.0.0
 - MyFaces portlet examlpe which has the following lib:
 
    commons-codec.jar -- 1.2
    myfaces.jar --  1.0.9rc3 (April 12 2005)
    myfaces-extensions.jar  --  1.0.9rc3 (April 12 2005)
    myfaces-impl.jar  --  1.0.9rc3 (April 12 2005)
    myfaces-jsf-api.jar --  1.0.9rc3 (April 12 2005)
    myfaces-wap.jar  --   1.0.9rc3 (April 12 2005)
    myfaces-xdoclet.jar  --  1.0.9rc3 (April 12 2005)
    util-java.jar  --  Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
    util-jsf.jar  --   Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
    util-taglib.jar  --  Created-By: 1.4.2_08-b03 (Sun Microsystems
 Inc.)
    commons-el.jar --  1.0
    jsp-2.0.jar  --  2.0.public_draft
 
 The portlet is a form that has one text field (name). When the user add
 his name a welcom page must appear and the  added name will be shown.
 
 The portlet was successfully added be liferay with no exceptions . But
 when I add a name and click on submit I got the following Exception: see
 the attached file
 
 The portlet files are attached also with this email
 
 I red that there is a problem when using MyFaces with Tomcat5.5.x so I
 followed the steps in (http://myfaces.apache.org/tomcat.html) :
 - Removed the     commons-el.jar and  jsp-2.0.jar from lib and started
 the portal again but no change
 
 Please any help will be appreciated
 
 
 Best Regards;
 Amgad Mosleh



Re: ADF + myfaces + Facelets completely compatible?

2006-04-13 Thread Murray Brandon

I've gone through to explain the ones I've resolved (2,4,5,6):
1) h:commandButton tags  render an input button that refers to 
non-existent javascript named after the form I am in scope of.  eg. 
clear_userEditForm( );  Why?  Is this a known bug?  Surely other 
people out there know why this is happening?  The javascript reference 
is rendered by MyFaces.
Still a problem even with the latest nightly myfaces.  Would like to 
know where the clear_formname( ) method is supposed to come from, so I 
can track down this one.
I get some log warnings from myfaces which might have something to do 
with it:
Apr 13, 2006 6:55:37 AM 
org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser readFilterMapping

*WARNING: Ignored element 'servlet-name' as child of 'filter-mapping'.*
Apr 13, 2006 6:55:37 AM 
org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser readFilterMapping

WARNING: Ignored element 'servlet-name' as child of 'filter-mapping'.

   filter-mapping
   filter-nameAdfFacesFilter/filter-name
   servlet-nameFacesServlet/servlet-name
   /filter-mapping
   filter-mapping
   filter-nameMyFacesExtensionsFilter/filter-name
   servlet-nameFacesServlet/servlet-name
   /filter-mapping

Perhaps because my filter-mappings are defined before my servlets?

2) The following ADF table example does not create a 'row' entity and 
hence I see only headers and no rows of content.  The drop-down knows 
there are 150 records in the results list, so it is resolving 
mob.userList.results perfectly ok, I just get no data.  Surely this 
should work out of the box?


 af:table id=t1 summary=My Summary 
value=#{mob.userList.results} var=row rows=10

   af:column id=c1 sortProperty=surname
 f:facet name=header
   af:outputText value=Surname/
 /f:facet
 af:outputText id=c2 value=#{row.surname}/
   /af:column
 /af:table
This was due to us using JSF 1.1 EL resolution.  It turns out we were 
intercepting the resolve for the iterated table entry, and the 
ELContext.isPropertyResolved( ) was still set from the previous (totally 
unrelated call).  I turned off our custom resolvers and hey presto, 
suspect module identified.  I have the ADF table working fine now.
3) Unless I define unique id tags on every component, I cannot avoid 
duplicate IDs when I use facelet ui:include commands.  This is a show 
stopper for our project.

Have not checked for this with the latest myfaces nightly.

4) status.index does not resolve in the following code.

  c:forEach items=${ui.tableInfo.properties} var=foo 
varStatus=status  h:outputText value=${foo} and count is 
${status.index}/

   /c:forEach

Fixed by the fix to 2) as well.
5) Multipart file upload doesn't work - the setFile( ) method never 
gets called on the bean, either using a MyFaces implementation or ADF 
faces impl.
6) Any input fields inside a multipart file upload form don't persist 
to their backing beans.  If I remove the multipart tag from the form, 
they work fine.


Thanks to Mike's help - my web.xml was invalid and fixed both 5) and 6) 
- I had filters mixed in with filter-mapping and had the ADF filter 
after the myfaces one.
I didn't know web.xml sections were order dependent - I guess you learn 
something new every day ;-)  I posted a copy of the web.xml in a 
previous post.


Regards, Murray



Re: JSF can handle GET requests *just as easily* as other frameworks

2006-04-13 Thread Adam Winer
Mike,

What do you mean by not supported in the core?

A GET request turns into an initial render request - no
phases other than Render Response - but Jacob's entirely
correct that JSF *does* support GET, and you can funnel
request parameters directly into your managed beans.
This is definitely supported by the core, required by the
spec, etc.  No theory here.

I guess my question is - what else do you want out of a GET
request?  What specifically is supported in theory, but not
in practice?  I can imagine things, but I'm curious what you're
after.

-- Adam


On 4/13/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 On 4/13/06, Hubert Rabago [EMAIL PROTECTED] wrote:
  Jacob Hookom, in discussing JSF myths [1], claims that:
 
  Also, JSF can handle GET requests just as easily as other frameworks.
 
  Is there any truth to this?  I thought the reason we had extensions
  like NonFacesRequestServlet [2] was because this wasn't supported by
  the core functionality?
 
  [1] http://virtuas.com/articles/webframework-sweetspots.html
  [2] http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls

 Depends on your definition of just as easily.   It's not supported
 by default in core.   Probably you should read it as just as easily
 in theory.



Re: ADF + myfaces + Facelets completely compatible?

2006-04-13 Thread Adam Winer
On 4/13/06, Murray Brandon [EMAIL PROTECTED] wrote:
 I've gone through to explain the ones I've resolved (2,4,5,6):
  1) h:commandButton tags  render an input button that refers to
  non-existent javascript named after the form I am in scope of.  eg.
  clear_userEditForm( );  Why?  Is this a known bug?  Surely other
  people out there know why this is happening?  The javascript reference
  is rendered by MyFaces.
 Still a problem even with the latest nightly myfaces.  Would like to
 know where the clear_formname( ) method is supposed to come from, so I
 can track down this one.
 I get some log warnings from myfaces which might have something to do
 with it:
 Apr 13, 2006 6:55:37 AM
 org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser readFilterMapping
 *WARNING: Ignored element 'servlet-name' as child of 'filter-mapping'.*
 Apr 13, 2006 6:55:37 AM
 org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser readFilterMapping
 WARNING: Ignored element 'servlet-name' as child of 'filter-mapping'.

 filter-mapping
 filter-nameAdfFacesFilter/filter-name
 servlet-nameFacesServlet/servlet-name
 /filter-mapping
 filter-mapping
 filter-nameMyFacesExtensionsFilter/filter-name
 servlet-nameFacesServlet/servlet-name
 /filter-mapping

 Perhaps because my filter-mappings are defined before my servlets?

Filter mappings must come before servlets.  You're seeing a bug
in the MyFaces's WebXmlParser code  - it only understands
url-pattern.  I suspect that this means you need to change
the ExtensionsFilter mapping from servlet-name to url-pattern,
which will probably fix up #1, but you should also file a bug against
MyFaces to support servlet-name mappings for ExtensionsFilter.

  2) The following ADF table example does not create a 'row' entity and
  hence I see only headers and no rows of content.  The drop-down knows
  there are 150 records in the results list, so it is resolving
  mob.userList.results perfectly ok, I just get no data.  Surely this
  should work out of the box?
 
   af:table id=t1 summary=My Summary
  value=#{mob.userList.results} var=row rows=10
 af:column id=c1 sortProperty=surname
   f:facet name=header
 af:outputText value=Surname/
   /f:facet
   af:outputText id=c2 value=#{row.surname}/
 /af:column
   /af:table
 This was due to us using JSF 1.1 EL resolution.  It turns out we were
 intercepting the resolve for the iterated table entry, and the
 ELContext.isPropertyResolved( ) was still set from the previous (totally
 unrelated call).  I turned off our custom resolvers and hey presto,
 suspect module identified.  I have the ADF table working fine now.

Hrm - why is ELContext.isPropertyResolved() true?  What previous,
unrelated call set it, and why is it still unset?  Something seems
fishy here - it's possible there's bugs in Facelets' support for JSF
1.1 resolvers.
But I'm certainly glad it's not an ADF table bug. ;)

  3) Unless I define unique id tags on every component, I cannot avoid
  duplicate IDs when I use facelet ui:include commands.  This is a show
  stopper for our project.
 Have not checked for this with the latest myfaces nightly.

Hopefully, that'll fix it.

-- Adam