Am 16.07.2006 um 10:28 schrieb Blackwings:
Thanks, but do I have to create a HTML template for both CustomTr and
CustomTd separetely?
Yes and No, at least: each component may have a html template (matched
by its name). You can copy your template to each html file and put
different
tapestry tags into each, but that is no solution for maintainance.
In fact, the web designer, who is not a java developper, should
have to
create herself the templates, shouldn't she?
That depends upon how your office is organized. In my case there is a
design
department, a content management system (cms) and the java
developers. The
developers receive the html templates from the designers. The developers
slice these designs into components, which are then moved over to
the cms. The cms allows the retrieval of these slices as well as the
preview of the
the whole page and the designer or the product manager can preview their
page and do little changes to the html in the cms.
If yes, each time she will want to change a page, she will have to
modify
also the component template, won't she?
What is the "normal" procedure between the web-designer and the java
developper regarding component?
I don't think that there is a "standard procedure" for this task. It
depends upon
the workflow in your office and you should try to find a solution
that should come
pretty close to how you are already organized.
Christian
BW
2006/7/16, Christian Mittendorf <[EMAIL PROTECTED]>:
Hello!
Go and check out the paramter element:
http://tapestry.apache.org/tapestry4/UsersGuide/
spec.html#spec.parameter
You create your components by creating jwc and html files. And you
add a
parameter information to your CustomTd.jwc file:
<parameter name="value" required="yes" />
Now you can access this parameter as a property using the same
name in
your CustomTd component:
<td><span jwcid="@Insert" value="ognl:value.foo">foo</span></td>
And in your CustomTr you add your td like this:
<tr jwcid="[EMAIL PROTECTED]">
<td jwcid="[EMAIL PROTECTED]" value="ognl:foo.bar">...</td>
</tr>
Christian
Am 15.07.2006 um 20:55 schrieb Blackwings:
> Hello everybody,
>
> I'm new in Tapestry and, in fact, my boss asked me to try Tapestry
> to be
> able to compare with Struts in term of development time,
> efficiency, etc
> etc... yes, we are going to replace our old GUI web layer ;-)
>
> Anyway, I have a question maybe you will be able to answer :
>
> I would like to know how I could render a component, for example a
> list of
> custom <td ...></td> inside a custom <tr...></tr> component.
>
> <table>
> <tr jwcid="[EMAIL PROTECTED]" ...>
> <td class="myTdClass">Something here</td>
> <td class="mySecondTdClass" >Something else here</td>
> <td jwcid="[EMAIL PROTECTED]" ...>Placeholder #1</td>
> <td jwcid="%remove%" ...>Placeholder #2</td>
> <td jwcid="%remove%" ...>Placeholder #3</td>
> </tr>
> </table>
>
> So I want to be able to render something like that. CustomTr is
> aware it
> needs CustomTd and should pass some parameters to CustomTd.
> CustomTd is a component which need some parameters to be render.
> And I can imagine I could have another component CustomTr2 capable
> to nest
> the same CustomTd.
> My problem is the way to defined and declare them. Is it possible
> to create
> only one template, a page template to define this sort of "nested
> component"
>
> or do I have to ask the web-designer to create another template for
> the
> CustomTd component as well?
>
> I found how to create one component but not how to create a nested
> component
> and to pass parameters from the "parent" to the "child".
>
> The main question is in fact, how to create nested component
that need
> parameter from the parent?
>
> Thanks a lot
>
> BW
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]