0

JSF and Macro components Error

asked 2009-03-08 12:30:11 +0800

mahdiiran gravatar image mahdiiran
40 3

updated 2009-03-09 06:02:41 +0800

Hi dear friends
i have a problem in using the zkoss in jsf
i download the latest files from the site.
when i try to use macro components by <z:component tag in jsf pages i get the following error

java.lang.IllegalArgumentException: Not a AbstractComponent
at org.zkoss.jsf.zul.tag.impl.AbstractTag.setProperties(AbstractTag.java:96)
at org.zkoss.jsf.zul.tag.ComponentDefinitionTag.setProperties(ComponentDefinitionTag.java:100)
at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:594)
at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1097)
at jsp_servlet._jsf._bi.__frm_tvp_bi_01._jsp__tag0(__frm_tvp_bi_01.java:152)
Truncated. see log file for complete stacktrace
>

did any body see the above error??? please help me to solve the problem.
thanks

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-03-13 06:24:27 +0800

windperson gravatar image windperson
415 1

Hi mahdiiran,
Can your provide your code to let us help you to see what's wrong? Thx.

link publish delete flag offensive edit

answered 2009-04-19 10:08:40 +0800

mahdiiran gravatar image mahdiiran
40 3

updated 2009-04-19 10:09:41 +0800

Hi dear windperson
thanks for you'r attention.

my zul page named cmp_name.zul and store in ./component folder is as follow

<window>
<label value="Name : "/>
<textbox id="name"/>
</window>

and my jsf page is like this

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/code" prefix="f" %>
<%@ taglib uri="http://www.zkoss.org/jsf/zul" prefix="z" %>

<z:component name="myName" inline="true" macroURI="./components/cmp_name.zul"/>

<HTML>
<body>
<f:view>
<h:form id="helloForm">
<z:page>
<z:window>
<z:ui tag="myName"/>
</z:window>
</z:page>
</h:form>
</f:view>
</body>
</HTML>

link publish delete flag offensive edit

answered 2009-04-20 01:26:53 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

I didn't run the code, but I think you should put <z:component inside <f:view

link publish delete flag offensive edit

answered 2009-04-20 11:48:02 +0800

mahdiiran gravatar image mahdiiran
40 3

It is work !!!!!
I am grateful. thanx :-*

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-03-08 12:30:11 +0800

Seen: 350 times

Last updated: Apr 20 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More