Skip to main content

Greg

10 replies [Last post]
moralbarometer
Offline
Joined: 2009-05-24
Points: 0

Hi Greg,
I am sorry in expression but these are words of a desperate person. Initially i was really excited for haven chosen jmaki as a framework for front end development combined with jsf. But this excitement is fast diminishing because of lack of support as well passiveness in this forum. Whenever I try to google, in most cases i always see but your name in relation to jmaki. I understand you play a key role in the architecture and integration with jsf. As such there are such simply questions one will expect a fast response if not from one with experience but from you.In my last posting this is an integration issue between jmaki and jsf. If that simple process is not working how dare you said jsf is integrated with jmaki.

This is my issue again:
I have two jsf pages p1 and p2 with p1 as entry point to application. in p1 i have a widget that includes p2. if no jsf component like button is used in the p2, p1 will successfully include p2. On the other side if p2 has jsf component in it p1 will fail to include p2. In my case p2 MUST have these jsf html components.

I am sure this is a common problem and was addressed during integration. So what should i do to resolve it? Might be you provide me references that would be helpful.

thanks in advance

Ivo

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

I've sent this in an individual email but thought for the benefit of future users to note the solution:

The faces context is not being invoked with the call to the included page:

To fix :

1) Add a *.faces mapping to the faces serlvlet in your web.xml


Faces Servlet
/faces/*

2) Rename your test1.jsp to test1-jsf.jsp

This is the naming pattern for JSF pages that are based on JSP

3) When you access the page from welcomeJSF.jsp use :

include : 'test1-jsf.faces',

This will cause the page to be loaded as a JSF page.

Let me know if you still have problems.

-G

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Can you be more specific with how you are declaring the variables in your pages?

moralbarometer
Offline
Joined: 2009-05-24
Points: 0

Hi Greg,
The issue is not about slashes. However i tried your approach but still failed. Again the issue here is rendering. If test.jsp has no jsf components there is no problem. If it does then the error message. I use netbeans. Might be you test it yourself and see. Just use two jsf pages. index contains jmaki widget that includes a jsf page with first case containing no jsf component and second case containing jsf component like output tex message or simply use the pages i posted.

Have a great weekend

Ivo

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Any chance you could send a war file? If it can't be broken out I understand but I think it might make this quicker.

-G

moralbarometer
Offline
Joined: 2009-05-24
Points: 0

For sure i can send a war file but how? there is no file upload component on the posting form.

Ivo

gmurray71
Offline
Joined: 2003-07-31
Points: 0

can you email it to greg_murray71 (a) yahoo.com

-G

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Ivo,

Just a disclaimer here: I can only volunteer limited support on the forums with my free time and I do it as I can. My hope was others would jump in.

That said I suspect that what you are running into is what I consider a flaw in the JSF architecture that I did bring up to the JSF architects regarding the generation of unique identifiers in components. In a single page you will always get unique identifiers for components but the counter for the components resets after a page load meaning if one page contains another (especially dynamically) you will get the same identifiers for two components which in jMaki will cause the component to only load once.

If this is your problem there is a simple solution : use a different id for the different components.

The id is provided using an id property on the tag.

To help diagnose this look at the rendered source for both pages p1 and p2 and see if the components being included have the same uuid property. You can find these by looking for the

blocks.

If this is not the case I'll need to look more closely at the source and know more about how you are doing your page inclusion.

-Greg

moralbarometer
Offline
Joined: 2009-05-24
Points: 0

Hi Greg,
I will keep appreciated your wonderfull effort from conception of this gerat framework to divine support. The issue here is one becomes helpless and frustrated when issues related to some design concept start surfaces and there is no where to turn for help. Your first assistance helped move many more miles but to able to reach the final destination though so closed to it.

The issue here is one want to make use of some good features of jsf like internalization. For instance i am able to use resource bundles in the entry page p1 of the application. If this same variable is used in page2 with no jmaki compnent p1 can't load p2. I presume this is not an issue of ids. As long as p2 is a pure jsp page containing only jmaki components the p2 will successfully be loaded. If this is not still clear then i will send source code of both p1 and p2.

thanks

Ivo

moralbarometer
Offline
Joined: 2009-05-24
Points: 0

Hi Greg,
See information below.
in both versions of Tests.jsp included the error message is "Unable to load URL Tests.jsp"

###################################################################
indext.jsp starts below (page includes Tests.jsp
###################################################################
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsf" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Testing



value="{items :
[

{id : 'bar', label : 'Magazines', include : 'Tests.jsp'}
]}" />


###################################################################
Test.jsp version 1.0 starts below (page included in index.jsp)
###################################################################
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsf" %>

"http://www.w3.org/TR/html4/loose.dtd">




###################################################################
Test.jsp version 2.0 starts below (page included in index.jsp)
###################################################################
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsf" %>

"http://www.w3.org/TR/html4/loose.dtd">




thanks

Ivo

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Ivo,

Can you try putting a slash in front of the resource name.

value="{items :
[

{id : 'bar', label : 'Magazines', include : '/Tests.jsp'}
]}" />

If you are working under a directory such as /jsf/ the lookup will be for the resource in the directory.

-Greg