Re: Big problem - Form elements inside custom component

2007-06-19 Thread Tomić Mirko
I'm sorry :(
I must say I'm thrilled you answered my question.
here is more details about my component:

Layout.jwc:









































Layout.html:












 


























 













RowSpacer is just component which makes one blank row in a table.





Layout.java:

public abstract class Layout extends BaseComponent {

public IRender[] getFieldComponents() {
IRender[] components = getBody();

List fieldComponents = new ArrayList();

for (IRender component : components) {
if (component != null && !(component instanceof 
TextToken)) {
fieldComponents.add(component);
}
}

return (IRender[]) fieldComponents.toArray(new 
IRender[fieldComponents
.size()]);
}

public abstract String getShowBorder();

public String getLayoutTableStyle() {
if (getShowBorder().equals("false")) {
return "border: 0px;";
} else {
return "border: 1px solid #77;";
}
}
}





This component takes all components inside her and creates a table
with Title, and actual component in columns(it have number of columns,
actually number of column pairs as parameter). It works great with Insert
component, but what I need is to have the same functionality for editing,
with FormField components. I need to use Form component outside my component,
and to have FormFiled and other Form coponents inside my Layout component.

When I insert my component and FormField inside it, I get following error:

Exception:  Could not find a strategy instance for class $TextField_24.
java.lang.IllegalArgumentException


Stack Trace:

*
org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor
(StrategyRegistryImpl.java:176)
*
org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy
(StrategyRegistryImpl.java:74)
*
org.apache.tapestry.util.io.DataSqueezerImpl.squeeze
(DataSqueezerImpl.java:125)
* $DataSqueezer_11344885bfd.squeeze
($DataSqueezer_11344885bfd.java)
* $DataSqueezer_11344885bfc.squeeze
($DataSqueezer_11344885bfc.java)
*
org.apache.tapestry.data.NullDataSqueezerFilter.squeeze
(NullDataSqueezerFilter.java:32)
* $DataSqueezer_11344885bfe.squeeze
($DataSqueezer_11344885bfe.java)
* $DataSqueezer_11344885aa8.squeeze
($DataSqueezer_11344885aa8.java)
* $DataSqueezer_11344885aa7.squeeze
($DataSqueezer_11344885aa7.java)
* org.apache.tapestry.components.ForBean.getStringRepFromValue
(ForBean.java:477)
*
org.apache.tapestry.components.ForBean$StoreSourceDataIterator.next
(ForBean.java:440)
* org.apache.tapestry.components.ForBean.renderComponent
(ForBean.java:157)
* org.apache.tapestry.AbstractComponent.render
(AbstractComponent.java:710)
*
org.apache.tapestry.services.impl.DefaultResponseBuilder.render
(DefaultResponseBuilder.java:174)
* org.apache.tapestry.AbstractComponent.renderBody
(AbstractComponent.java:523)
* org.apache.tapestry.components.Any.renderComponent
(Any.java:53)
* org.apache.tapestry.AbstractComponent.render
(AbstractComponent.java:710)
*
org.apache.tapestry.services.impl.DefaultResponseBuilder.render
(DefaultResponseBuilder.java:174)
* org.apache.tapestry.BaseComponent.renderCompo

Re: Big problem - Form elements inside custom component

2007-06-19 Thread Howard Lewis Ship

http://www.catb.org/~esr/faqs/smart-questions.html

I'm also perplexed that people with questions don't take even a moment
to try and see their problem from an outsider's perspective, given
that an outsider is needed to help them. This is a reasonable
description of what they're trying to do, but they've omitted all the
useful details, including the stack trace that would help identify
what is failing. Including templates and code would help.

When you don't include sufficient information initially, you are
flagging your question as being a pain in the ass to answer, as the
expert is going to have to plead for information. It's one thing if
you are paying for support, but in the open source world you are
asking us to take time away from what we love (coding) to do something
we merely feel responsible for (support). Don't make it hard on us.

On 6/19/07, Tomić Mirko <[EMAIL PROTECTED]> wrote:

I forgot to mention, it is written in Tapestry 4.1.


Mirko


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


Re: Big problem - Form elements inside custom component

2007-06-19 Thread Tomić Mirko
I forgot to mention, it is written in Tapestry 4.1.


Mirko


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]