Re: [newbie] embedding HTML links

2006-05-22 Thread Joey Geiger



Matthias Klein wrote:

I should have added some more info:

The code that creates the string with the link looks like:
this.link = "" + param + "";

It is embedded in the JSP page with



(I tried with verbatim, doesn't change a thing)

When I then call that page I get

10.html

So the JSF renderer seems to insist to always translate the special
characters of HTML (like < into < and so on)

How do I switch that off?

Or is there a better way to embed links like that into JSF pages?



Am Mo, 22.05.2006, 20:33, schrieb Matthias Klein:
  

I need to somehow embed a link such as ggg in a JSF
page. I tried outputText with and without verbatim and I tried the
tomahawk html tag component. Nothing works. How does one do such thing?


Btw. the link itself is contructed in a backing bean as string so I can't
 hard-code the link in the page.

thanks









  





Re: java.lang.NoSuchMethodError: .DummyFormUtils.isWriteDummyForm...

2006-05-22 Thread Joey Geiger
Is the state saving issue going to be back ported to 1.1.3 and released 
as some kind of patch?


I'd like to have that fix, but I still need to maintain the 
linkDummyForm functionality since my pages
currently make heavy use of it. The application is in "release" and I 
can't re-write all pages right now.


Mike Kienenberger wrote:

On 5/19/06, octoberdan <[EMAIL PROTECTED]> wrote:
When will it officialy be removed? and how does a developer get 
involved with

this project?


It's being worked on now.   We'd like to do a MyFaces core and a
tomahawk release fixing this bug and the server-side state saving
issue as soon as it's fixed.

You're already involved :)   If you're not already subscribed to
myfaces-dev, you can do that.   The example code you posted below
provides a great test case.

You can do a search for DummyForm on the MyFaces users and dev mailing
list over the past couple of weeks to catch up on the topic.

Also, postings about commandLinks and commandButtons for the last four
weeks are probably also appropriate.

TOMAHAWK-416 is where the issue is officially being tracked.

The best thing you can do (short of providing patches yourself) is to
keep testing the latest svn code against JSF RI 1.1 + Tomhawk, Myfaces
Core by itself, and MyFaces Core + Tomahawk, and telling us when all
three combintations are working without error.   At that point, we can
do a release.

On 5/22/06, octoberdan <[EMAIL PROTECTED]> wrote:


I have the newest build and it's still failing. Here's the pages code:

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>









  

  




--
View this message in context: 
http://www.nabble.com/java.lang.NoSuchMethodError%3A+.DummyFormUtils.isWriteDummyForm...-t1651961.html#a4506131 


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










Re: Startup logging question for MyfacesConfig

2006-05-12 Thread Joey Geiger
Thanks. I just wanted to make sure the messages weren't a hint of a much 
larger problem.


Mike Kienenberger wrote:

On 5/12/06, Joey Geiger <[EMAIL PROTECTED]> wrote:

Thanks for the response.

I'm aware of the doubling of the faces-config.xml file and it is only
being used once.

The error messages I'm seeing only started after I upgraded to myfaces
1.1.3 and tomahawk 1.1.2 releases.
I was using the 1.1.3-1.1.2 snapshots from 3/27/06, which didn't give me
the same warnings.


Myfaces core parses the config file once as normal.

Then Tomahawk parses it a second time (although it's only looking for
some fairly simple config options).







Re: Startup logging question for MyfacesConfig

2006-05-12 Thread Joey Geiger

Thanks for the response.

I'm aware of the doubling of the faces-config.xml file and it is only 
being used once.


The error messages I'm seeing only started after I upgraded to myfaces 
1.1.3 and tomahawk 1.1.2 releases.
I was using the 1.1.3-1.1.2 snapshots from 3/27/06, which didn't give me 
the same warnings.


I will look into the logging as well, but again, I didn't change 
anything there after upgrading.


Jesse Alexander (KSFD 121) wrote:

one possible reason:

Your app-config is in faces-config.xml and is placed in /WEB-INF/
AND
you have configured the config-file-parm in web.xml to look for
/WEB-INF/faces-config.xml


The spec says to look for
- /META-INF/faces-config.xml in all jar-files in /WEB-INF/lib
- /WEB-INF/faces-config.xml
- the configured files in web.xml
=> /WEB-IND/faces-config.xml is processed twice...



another possible reason:

misconfiguration of you logging...


hth
Alexander

  

-Original Message-
From: Joey Geiger [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 11, 2006 5:22 PM

To: MyFaces Discussion
Subject: Startup logging question for MyfacesConfig

I'm wondering why I'm seeing the following things *twice* in my logs 
when the application starts up.


INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value 
org.apache.myfaces.renderkit.html.util.DefaultAddResource
INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using 
default value true
INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value 
org.apache.myfaces.renderkit.html.util.DefaultAddResource
INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using 
default value true








  





Startup logging question for MyfacesConfig

2006-05-11 Thread Joey Geiger
I'm wondering why I'm seeing the following things *twice* in my logs 
when the application starts up.


INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value 
org.apache.myfaces.renderkit.html.util.DefaultAddResource
INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true
INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value 
org.apache.myfaces.renderkit.html.util.DefaultAddResource
INFO MyfacesConfig - No context init parameter 
'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true





Error while displaying an image inside of facelets .xhtml

2006-05-09 Thread Joey Geiger
I've had this error thrown on a couple of pages, but not consistently 
every time. I believe it is
happening because I am using PNG images in certain places, but list 
isn't supporting that mime type and
the browser that is looking at the page cannot render PNGs, and thus 
this error is being thrown.
Am I correct in that assumption, or is there something deeper I need to 
start looking for?
Also, is there a way I can get log4j to ignore this error specifically 
so my logs don't start to fill up?


Thank you.

ERROR [FacesServlet] - Servlet.service() for servlet FacesServlet threw 
exception
java.lang.IllegalArgumentException: ContentTypeList does not contain a 
supported content type: image

/gif, image/x-xbitmap, image/jpeg, image/pjpeg
at 
org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:1043)





JSF/Spring/Hibernate Thread Safety questions

2006-05-04 Thread Joey Geiger
Sorry if this is a bit too general for this list, but as I'm using 
myFaces as my JSF implementation I thought it would apply.


I've recently written an e-commerce application using 
Facelets/JSF/Spring/Hibernate/Tomcat/MySQL with a shopping cart, 
customer sign-in, etc.


As this is my first "real" application, I was wondering if there are any 
specific places within my application that I should be concerned about
thread safety. I think I've been going under the possible mistaken 
belief that since most of my processing is done in Tomcat's sessions, 
and objects are
stored in those sessions, I'm pretty safe. Are there any specific 
sections I need to be more aware of than others? (Customer sign-in, 
saving an order?)

Also, I'm using a connection pool setup as a JNDI resource in Tomcat.

Any help would be appreciated. Thank you.



Re: What to do when form depends on querystring params?

2006-05-01 Thread Joey Geiger

My solution was to use javascript redirecting on the page.

The backingbean had a value Valid, and if isValid was false, the 
javascript redirect rendered at the top of the page.


Messy? Maybe, but it does what I need it to do.



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

2006-04-14 Thread Joey Geiger
You can pass get requests, but you lose the current state of the 
application.

I have a setup that uses a URL like /product/product.jsf?prodid=1234

product.xhtml (partial)
...snip...


rendered="#{not productPageBean.found}" />

...snip...
#{entity['title']}
...snip...

ProductPageBean.java (partial)
protected void init() {
this.productid = FacesUtils.getRequestParameter("prodid");
this.product = dao.getProduct(this.productid);  
}


FacesUtils.java (partial)
public static String getRequestParameter(String name) {
return 
(String)FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(name);

}




Re: inputdate popup problem

2006-04-07 Thread Joey Geiger

make sure the tomahawk extensions filter is active as well.





Re: jsf view init

2006-04-06 Thread Joey Geiger
Check to see if the linkDummyForm is being created the first time the 
page is rendered (remove your refresh)



Jan Zach wrote:

Hi everybody!

Whener I access a view for the first time it is strangely initialized and the 
first click on a link that should invoke an action does not work. The second 
one and all next works.

In my index.jsp file I solved this by putting 




which redirects users to the right (and working) view. 


Now I need to open a dialog window; it is done from javascript by 
window.open("/somepage.jsf") and I've ecountered the same problem. I'd like to 
avoid redirection of the page. Any idea?

Thanks

jan






  





Re: Clientside statesaving and linkDummyForm

2006-04-05 Thread Joey Geiger
I was running into the same issue. I switched to server side state 
saving, since I think the

issues with the back button have been fixed(?).

Another option would be to have one large form surround every page, but 
I don't know how

correct that is. It would also make validation an issue.


Mads Henderson wrote:

Hi,

We are using client side state saving and are having some problems
with the amount of data sent to the client.

It appears that all forms on the page contains a hidden input field
containing the (same) object representing the state. One form
linkDummyForm is always present, and then of course also the forms we
declare in the jsp pages.

It seems unnecessary to have the same information in all forms, is
there a way to avoid that?

Is there a way for me, in the cases where I need to declare a form for
some input fields, to make use of the linkDummyForm that is generated,
in order to avoid duplicating the state object all over the generated
html?

Thanks
Mads


  





field order

2006-03-29 Thread Joey Geiger
Is it possible to set a parameter to have the rendering order of the 
fields for the

 component?

Instead of  Day Month Year, I'd like to have it render as Month Day Year.

Thanks.



Re: inputCalendar image display

2006-03-29 Thread Joey Geiger
I found my issue. I'm using tomcat behind apache, and I'm using apache 
to serve all the image files.
After I changed the JKUnmount to let tomcat serve images in /faces/, 
they appear again.


Thank you for your help.


Murray Brandon wrote:

Do you get a calendar icon next to the date text field (to click on)?
If not, you need to define the resources servlet for MyFaces:

The following defines how the MyFaces resources (such as .js files and
images) are provided in web.xml


MyFacesExtensionsFilter
 
org.apache.myfaces.webapp.filter.ExtensionsFilter
class>

maxFileSize
20m
Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB






MyFacesExtensionsFilter
FacesServlet




MyFacesExtensionsFilter
/faces/myFacesExtensionResource/*


-Original Message-----
From: Joey Geiger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 29, 2006 4:35 AM

To: MyFaces Discussion
Subject: t:inputCalendar image display


I'm running into an issue where the t:inputCalendar is working properly,

but the images are not being shown.
The renderPopupButtonAsImage="true" doesn't show an image, and the 
left/right and dropdown arrows do not appear.
The buttons function properly, as does the rest of the calendar. I 
believe this works fine with 1.1.1 release, but as I need a few of the

recent bug fixes, I'm using the currently nightly build.

Anyone have a suggestion/fix?






  





t:inputCalendar image display

2006-03-28 Thread Joey Geiger
I'm running into an issue where the t:inputCalendar is working properly, 
but the images are not being shown.
The renderPopupButtonAsImage="true" doesn't show an image, and the 
left/right and dropdown arrows do not appear.
The buttons function properly, as does the rest of the calendar. I 
believe this works fine with 1.1.1 release, but as I need a few

of the recent bug fixes, I'm using the currently nightly build.

Anyone have a suggestion/fix?





Re: newbee question about navigation.

2006-03-20 Thread Joey Geiger

commandButton and commandLink need to be surrounded by a form.

There are cases where commandLink will work without a form, but I've run 
into issues with that.


Legolas Woodland wrote:

Thank you for reading my post

I have a button in one of my page which i want the application to 
navigate to another page when user

pressed that button .
i made the button like the folwoing
value="Logout">  



and my navigation rule and case is like :
   
   
   Logout
   /Logout.jsp
   
   


but it never navigate to logout page when i press the button
can you tell me what is wrong ?


Thanks







Re: No Javascript again???

2006-03-10 Thread Joey Geiger

When I used 1.1.1 release everything worked fine for me, redirects and all.
When I switched to 1.1.2-snapshot (2 weeks ago?) that's when the 
functionality broke for me.


Mario Ivankovits wrote:

Hi Joey!
  

I tried it on my system and it worked in both cases.


Are you using the very latest version snapshot (or test release) of myfaces?

There is a bug in myfaces core which prevents the dummyForm to work. I
already posted this fact within this thread.

Ciao,
Mario



  





Re: No Javascript again???

2006-03-10 Thread Joey Geiger

I tried it on my system and it worked in both cases.
If I use your exact code, the form renders properly, and the enclosed 
link uses that generated form as expected.
If I remove your form tags, myfaces properly creates the dummyLinkForm 
for the link.


Are you calling the page directly? (http://server/test.jsf) or do you 
have an index page that redirects to the page (http://server/) which 
calls an index.jsp which forwards to test.jsf,
leaving the location as (http://server/) even though test.jsp is 
displayed. My problems happen in the second case.


Boris Kovalenko wrote:

Joey Geiger wrote:
Hello!

   It's very simple

<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t" %>

   
   
   
   
   
   
   
   
   


In this form there are no problems, but try to remove  around 
 and You're in troubles.

Could you post the code for test.jsf?

I'd like to test your simple version in my configuration, especially 
with the /test.jsf at the end.


Thanks.

Boris Kovalenko wrote:

Hello!

    http://localhost:8080/test.jsf  No, this isn't redirect 
problem,  this is bug (imho) somewhere in core.


Joey Geiger wrote:

What is the URL of the page you are trying to use this on?

I ran into the same issue when the page ended in / (no .jsf page to 
reference)

With respect,   Boris







With respect,
   Boris








Re: No Javascript again???

2006-03-09 Thread Joey Geiger

Could you post the code for test.jsf?

I'd like to test your simple version in my configuration, especially 
with the /test.jsf at the end.


Thanks.

Boris Kovalenko wrote:

Hello!

http://localhost:8080/test.jsf  No, this isn't redirect problem,  
this is bug (imho) somewhere in core.


Joey Geiger wrote:

What is the URL of the page you are trying to use this on?

I ran into the same issue when the page ended in / (no .jsf page to 
reference)
With respect,   
Boris








Re: No Javascript again???

2006-03-09 Thread Joey Geiger

What is the URL of the page you are trying to use this on?

I ran into the same issue when the page ended in / (no .jsf page to 
reference)
I got around it as a temporary solution by javascript redirecting 
(document='/somepage.jsf'), as the same thing will happen if you use the 
jsp tag to do a redirect.


Boris Kovalenko wrote:

Mario Ivankovits wrote:
Hello!

   I created MYFACES-1167. Short descripton - the bug is reproducable 
when h:commandLink is used without h:form. Is it impossible now use 
command links outside the form???

Hi Dennis!
 

Please put this in the issue tracker if it is not already there.
  

And please post a minimal jsp to reproduce it.

Thanks!
Mario


  

With respect,
   Boris








Re: How to make complex layout using datatable?

2006-03-01 Thread Joey Geiger

What is then the suggested method to obtain the same functionality?


Andrew Robinson wrote:

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
), 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 
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:
 inside of a  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] > 
wrote:


Hi,

You have tried to use redirect inside navigation case like this?

nav_page_domain_op_list
/page_domain_op_list


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]
 >>
> wrote:
>
> Hi,
>  Is working if  you use redirect.
>
> Cristi
>
>
> Ming Hu wrote:
> > I have the following navigation case:
> >
> >   
> >nav_page_domain_op_list
> >/page_domain_op_list
> >   
> >
> > and the following security constraint:
> > ...
> >   /page_domain_op_list.jsf
> > ...
> >
> > 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: No javascript output with nightly 1.1.2?

2006-02-27 Thread Joey Geiger
I had/have this issue as well. The link dummy form was not being created 
by the javascript, so my links were not working on my pages.


I changed my index.jsp to be a javascript redirect instead of a 
jsp:forward to get around the problem for now.

(window.location = '/pages/home.jsf') for your example.


Carsten Burghardt wrote:

Am Monday 13 February 2006 06:37 schrieb Boris Kovalenko:
  

Hello!

Wow! What I discovered! My start page (index.jsp) looks like

<%@ page session="false" contentType="text/html; charset=utf-8"%>


and when I use it for startup I have no javascript in resulting html.
When I type /pages/home.jsf in browser I get html with JavaScript and
even detailStamp begin to work (Claudio, it looks like detailStamp can
not work without JavaScript). When I change index.jsp to index.html all
is ok too. So, may be this discovery will help us?

P.S. I'm happy for now as index.jsp is not a problem for me.

With respect,
Boris



Any progress here? If I'm not mistaken I have the same problem..


Carsten


  





Re: linkDummyForm not rendering on every page

2006-02-24 Thread Joey Geiger
I've found it has something to do with the need for an actual page to be 
part of the url.


If the browser is showing www.site.com/ or www.site.com/admin/ it fails.
With www.site.com/page.jsf, the link dummy form will render and the 
links on the page

work fine.


Joey Geiger wrote:
I recently upgraded to a 1.1.2 nightly build, and I've run into an 
issue where the linkdummyform
listed below is not being created on every page. This wasn't an issue 
with the 1.1.1 release.
I know that I can surround all of my h:commandLink tag sections with 
forms to make them work,
but I was wondering specifically what triggers the code below to 
render. I'd rather not have
7-8 different forms on a page just for common links that can be 
processed by one form.


Thank you.




method="post" action="/main/display.jsf">
<tt>type="text/javascript"><!--
</tt><pre style="margin: 0em;">
function clear_linkDummyForm() {
 var f = document.forms['linkDummyForm'];
 f.elements['linkDummyForm:_link_hidden_'].value='';
 f.target='';
}
clear_linkDummyForm();
//-->










linkDummyForm not rendering on every page

2006-02-24 Thread Joey Geiger

I recently upgraded to a 1.1.2 nightly build, and I've run into an issue where 
the linkdummyform
listed below is not being created on every page. This wasn't an issue with the 
1.1.1 release.
I know that I can surround all of my h:commandLink tag sections with forms to 
make them work,
but I was wondering specifically what triggers the code below to render. I'd 
rather not have
7-8 different forms on a page just for common links that can be processed by 
one form.

Thank you.