Re: Tree2 blank screen

2005-08-19 Thread Guilherme Gomes
It looks like your web.xml is missing some parameters.

Those lines you see are about that. See the examples
from myfaces for those configurations on the web.xml
file.

Also, one of the possible reasons you are not seeing
anything is related to the configuration of the
extensionFilter.

In order to be able to use the resources of some
myFaces componentes - Calendar, Tree, etc - which may
consist of several pictures, javascript, etc , the
extensionFilter must be configured to be mapped to
/faces/*, since these resources are mapped to a
/faces/  directory. So the config would be:


extensionsFilter
*.jsf


extensionsFilter
/faces/*


Without the /faces/* mapping, the page would not
render. 

I have only made to work with the myfaces
implementation. I am not using SUN RI. So i do use
org.apache.myfaces.webapp.StartupServletContextListener

Hope this could help.

Regards, 

Guilherme Gomes


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


JSCOOK bug ?

2005-08-20 Thread Guilherme Gomes
I have been using jscook with the normal
x:navigationMenuItem tags, and now I'm trying to use
the
x:navigationMenuItems with a bean in order to have a
dynamic menu that depends on user permissions.


The problem is that only the top level items appear.
I have used the code from another example i found in
the mailing list, and...it works, but when i change
something 
that should be unrelated, it does not work anymore.

Example:
if i have a size 2 array of NavigationMenuItems -
works fine
if i have a one sized array - doesn't work.

I even managed to get one item opening up and showing
the children, but other items also with children just
do not open.

So i tried to use that same working NavItem on two
diferent array positions.

So it works on the first position - menu[1] - but it
doesn't work on - menu[2].


Then, i changed the order of the NavItem in the menu
array - switched the one in position 0 for the one in
position 1 and...
The result was that the one in position 1 now works,
were before it didn't and the one in zero doesn't
work, were before it did.

This makes no sense to me as to why it should or not
affect how the items display or not the children.

One more detail that shows that this problem might be
on the render : the NavItems with children that should
render, but do not shown anything...well, they show
something under then.

At first i tought it was a smudge on my screen, but
then i noticed it only  appeared on mouse over and
only on those items with children. 

I am using the OfficeTheme and waht appears under the
NavItems is like a one-sized box with the shadow.
So maybe there's a bug preventing from rendering the
children of the nav items  ?

I haven't checked the source code yet.

I am using public version 1.0.9. As this been reported
before or fixed in the nightly build ?

Any help is appreciated.

Guilherme Gomes


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


help moving from public 1.0.9 to nightly build

2005-08-20 Thread Guilherme Gomes
So I'm trying to use the nightly build.
I changed the jars, now using the 3 jar files.
Everything starts fine on JBOSS 4.0, but when i try to
run the examples

This is what i get on my application:


01:56:39,943 ERROR [Engine]
ApplicationDispatcher[/alfa] Servlet.service() for
servlet jsp threw exception
java.lang.IllegalArgumentException: ContentTypeList
does not contain a supported content type: */*
at
org.apache.myfaces.renderkit.html.HtmlRenderKitImpl.createResponseWriter(HtmlRenderKitImpl.java:142)
at
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:622)
at
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
at
org.apache.jsp.test_jsp._jspx_meth_h_outputText_0(test_jsp.java:75)
at
org.apache.jsp.test_jsp._jspService(test_jsp.java:52)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
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:810)



or this trying to open blank example:

01:56:55,926 ERROR [Engine]
ApplicationDispatcher[/simple] Servlet.service() for
servlet jsp threw exception
java.lang.IllegalArgumentException: ContentTypeList
does not contain a supported content type: image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, */*
at
org.apache.myfaces.renderkit.html.HtmlRenderKitImpl.createResponseWriter(HtmlRenderKitImpl.java:142)
at
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:622)
at
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)


01:56:55,936 ERROR [Engine] StandardWrapperValve[Faces
Servlet]: Servlet.service() for servlet Faces Servlet
threw exception
javax.faces.FacesException: ContentTypeList does not
contain a supported content type: image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, */*
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:228)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:299)


and


Caused by: org.apache.jasper.JasperException:
ContentTypeList does not contain a supported content
type: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, */*
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)


if running tiles example:

java.lang.NullPointerException

org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:165)

org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:299)

javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)

org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)



When i copied the myfacs.jar from one of the examples
into the lib dir of JBOSS'es default server, some
examples ran fine - the more simple ones - but
exception appeared anyway.

Any ideas on what's going on ?





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


Re: help moving from public 1.0.9 to nightly build

2005-08-21 Thread Guilherme Gomes
Ok, forget it. My fault.

I was using a few commons*.jar on the jboss lib
directory and deploying other myfaces*.jar on the war
file.

That setup didn't work that well when i changed to the
new myfaces-api,myfaces-impl and tomahawk package.



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


Re: JSCOOK bug ?

2005-08-21 Thread Guilherme Gomes
now that i have the nightly build working
correctly...Yes this is fixed... hurrray! 

Great work !


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


Re: help moving from public 1.0.9 to nightly build

2005-08-21 Thread Guilherme Gomes
Well, after some further testing...
The only night build that works from the available set
 with dates august 15 to 20
is the august 16 night build.

All others give me that ContentTypeList exceptions.




__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 


Re: help moving from public 1.0.9 to nightly build

2005-08-21 Thread Guilherme Gomes
Yes, i first tried using the august 20 night build,
then the others.

I will try tonight's build to see if what you checked
in helps in this issue.

Thanks for your time.

Regards

Guilherme Gomes






Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


Re: help moving from public 1.0.9 to nightly build

2005-08-22 Thread Guilherme Gomes
Well, i don't know who boris is, but...

I am not using the latest nightly build due to another
problem, but i am using a build from last week and the
JSCOOK menu just works perfectly afterwards.

So there are a lot of bug fixes since the public 1.0.9
version and JSCOOK problems have been fixed as far as
i can tell.



Regards

Guilherme Gomes

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


Re: help moving from public 1.0.9 to nightly build

2005-08-22 Thread Guilherme Gomes
Martin,

I have changed to the nightly build of August 21.
The ContentTypeList still appears as an error, but not
as an exception:

11:44:18,694 ERROR [HtmlRenderKitImpl] ContentTypeList
does not contain a supported content type: */*
11:44:35,989 ERROR [HtmlRenderKitImpl] ContentTypeList
does not contain a supported content type: image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, */*

So everything renders fine as far as i'm concerned.

And the error only appeared once, as i entered my
application main page. After that, even though i tried
every page and returned to the main page, the error di
not appear.

As i see no other problem besides the error warning so
far, i am now using this build.

Anything else just let me know.

Thanks for the attention.

Regards

Guilherme Gomes

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


RE: help moving from public 1.0.9 to nightly build

2005-08-22 Thread Guilherme Gomes
If you do not want to use an image, just place null:

new NavigationMenuItem("Treatment", "Treatment", null,
false);


The split , as far as i understand it, is only for
aesthetical reasons - did i spelled this right ?


If you set split as true, the NavigationMenuItem will
be separated from the previous items by a line.


I guess this will depend on the style you choose for
the menu.

So the main reason to use split will be to separate
groups of items or to highlight a single
NavigationMenuItem.

ex. you might have a sequence of items - section1,
section2, etc - and also a "exit" item that is
separated from the others by a line, so you pay
attention because that one is different.

This only works on the top-level items - by my
experience so far, this might be otherwise. 

Hope this helps.

Regards
Guilherme Gomes

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


RE: help moving from public 1.0.9 to nightly build

2005-08-22 Thread Guilherme Gomes
You might also want to try the latest nightly build,
as my previous problem was mostly fixed.


Regards

Guilherme Gomes


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


RE: help moving from public 1.0.9 to nightly build

2005-08-22 Thread Guilherme Gomes
You might also want to try the latest nightly build,
as my previous problem was mostly fixed.


Regards

Guilherme Gomes


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


RE: help moving from public 1.0.9 to nightly build

2005-08-22 Thread Guilherme Gomes
Well, i was wrong, he split parameter also works for
NavigationMenuItems other than the top level ones.

I only saw it after restarting JBOSS.

So you can have a sun-menu with a list of items and
have a separator between them



Guilherme Gomes


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


tree2 questions

2005-08-22 Thread Guilherme Gomes
Sorry for troubling you guys, but i am having a few
dificulties dealing with tree2.

I am using it dynamically, that is, the user creates
the nodes, gives them names, and saves them.

This part works fine.

The problem is when i create a node that is a children
to another node.

After the user has selected a node, when he presses
the create button, i am adding a node to the parent
node.

The child node consists of an inputText and a button
to save the name.

The problem is that the parent node is not expanded.I
have read about the TreeState, so i added it, and i
programatically set the parent node to expanded, but
it does not work.

Only if i manually click on the + sign does the parent
node display the new children node.


Some code:

initialization:

root = new TreeNodeBase("foo-folder", "Inbox","0",
true); 
state = new TreeStateBase();
tree = new TreeModelBase (root);
tree.setTreeState(state);

Here is what i am doing in order to expand the parent
node:

temp = new TreeNodeBase("edit","Insert
Text",""+counter,true);

//selected is the parent node
selected.setLeaf(false);
selected.getChildren().add(temp);

if(!state.isNodeExpanded(selected.getIdentifier()))
state.toggleExpanded(selected.getIdentifier());


And the result is that the parent node is not expanded
at all.
So the ideia is for the parent node to expand and show
the new children with the edit controls.


Any ideias ?


Guilherme Gomes





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


RE: help moving from public 1.0.9 to nightly build

2005-08-22 Thread Guilherme Gomes
In your page that has the jscook menu , you have :

<%@ taglib uri="http://myfaces.apache.org/extensions";;
prefix="t"%>

where it should be:

<%@ taglib uri="http://myfaces.apache.org/tomahawk";
prefix="t" %>

Remember : all myfaces - specific components are now
in tomahawk, and jscook menu is one of them.

You did not specify which page had the jscook menu in
the main page, I'm going to assume it is the 

"page_header.jsp" in the header facet.

I am using tiles instead of a  , don't know that much about
jsp itself, but if it is just inserting the jsp code
before myafces picks it up, it's ok.

Otherwise...in my header i have everything inside a
  pair. Might be
another possible reason for that exception.

On the MainDynamicMenu bean, as far as i can see, it
is fine.

Also make sure you have the extensionFilter properly
configured in the web.xmlit must also be mapped to
 /faces/* , besides the *.jsf mapping. 

Let me know if anything helps.


Regards

Guilherme Gomes







Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


HELP : tree2 problem ?

2005-09-12 Thread Guilherme Gomes
Although this seems to be the ordinary
expanded/leaf/hasChildren problem that is normally due
to the tree not being setup properly, i haven't quite
figured it out yet. May be missing something. 

So what happens is this:

-I have a tree2 with some nodes.
-I also have a few checkboxes that change what is
being displayed in the tree.
-When i click on the checkbox, i discard the old tree
and create and populate a new one. its a small tree,
so it's ok.


The problem is as follows:
-in the new page i have a non-displayed root with 2
children folders, each one with some children items.
-i expand one of the folders.
-i click on the checkbox and i get an exception:
12:40:04,493 INFO  [STDOUT]
javax.servlet.ServletException: Encountered a node
[0:0] + with an illogical state.  Node is expanded but
it is also considered a leaf (a leaf cannot be
considered expanded.


I had considered that there was a problem with my tree
state when i created the new tree and added the child
nodes.

But that is not what it happens. It took me quite a
while to understand and use effectivly tree2, as i had
to develop a few custom classes for nodes and tree,
but it works fine now.

What happens, is this:

-when i click on the checkbox, i get a getTree call
BEFORE my changes are done.

-That getTree call returns the OLD tree, with the old
tree state, where i have a 0:0 expanded node.

-The new tree is created and populated.

-The 0:0 node is a leaf node, and not expanded in the
tree state.

-I receive  several new calls to getTree, but now i
have the new Tree, with the correct expanded state -
none are expanded.

-I get the exception

>From what i understand, i get this exception because 
the first call returned an expanded state that is not
correct, because it conflicts with the new tree.

Am i missing something here or is it suposed to work
like this ? If so, how can i totally change the tree
being displayed without getting this exception ?

If i don't expand any of the nodes there is no
problem, as it is to be expected.

Any help would be appreciated.

Regards

Guilherme Gomes



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


Re: Tree2 state problem

2005-09-12 Thread Guilherme Gomes
I had the same problem as you.

I "fixed" the problem by not discarding the previous
tree. 

Instead of building a new one, just "clean" the one
you have, i.e. , get rid of all children - don't
forget to set the expanded nodes as not expanded too.

It seems that if you create a new tree, myfaces will
try to use the previous tree state. If you use the
same one, no problem arises.

Hope this helps.

Guilherme Gomes


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


Re: HELP : tree2 problem ?

2005-09-12 Thread Guilherme Gomes

I "fixed" the problem by not discarding the previous
tree. 

Instead of building a new one, just "clean" the one
you have, i.e. , get rid of all children - don't
forget to set the expanded nodes as not expanded too.

It seems that if you create a new tree, myfaces will
try to use the previous tree state. If you use the
same one, no problem arises.

Is this really supposed to work like this ? 



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


Re: URGENT! HELP ME! Tree2 state problem

2005-09-15 Thread Guilherme Gomes
Well, i solved my issue by not creating a new tree. I
have my tree in a session bean, so i just clean the
root's children - with attention to collapse the nodes
if they are expanded - and then repopulate the tree
with the new data.

That solved it, as i no longer have the same exception
as you do now.



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


1.1.0 still with tree2 bug

2005-09-24 Thread Guilherme Gomes

There is a problem when i change the tree on the
server between requests.

What happens, is this:

-when i click on a buttom to reload the data, i get a
getTree call BEFORE my changes are done.

-That getTree call returns the OLD tree, with the old
tree state, where i have a 0:0 expanded node.

-The new tree is created and populated.

-The 0:0 node is a leaf node, and not expanded in the
tree state.

-I receive  several new calls to getTree, but now i
have the new Tree, with the correct expanded state -
none are expanded.

-I get the exception : 
javax.servlet.ServletException: Encountered a node
[0:0] + with an illogical state.  Node is expanded but
it is also considered a leaf (a leaf cannot be
considered expanded.


>From what i understand, i get this exception because 
the first call returned an expanded state that is not
correct, because it conflicts with the new tree.

What is the point of the first call, and why is the
old tree state being stored and used instead of the
new one ?

If i don't expand any of the nodes there is no
problem, as it is to be expected.

Am i missing something here or is it suposed to work
like this ? If so, how can i totally change the tree
being displayed without getting this exception ?


Any help would be appreciated.

Regards

Guilherme Gomes

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