You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Hays <ja...@mac.com> on 2003/08/18 17:07:22 UTC

Tapestry Community

If I can toss in my two cents.  Dump this wiki stuff.  Let's implement a 
set of Jive forums which should be free to the tapestry group.  
JiveSoftware.com puts out a great product, especially if you are an open 
source project.

Another would be Jira, an issue tracking/work flow application.  Since 
you are open source, you may be able to get this for free as well.  
Don't quote me on that, but I think it is accurate.  So, the only thing 
that should be of cost to handle this great boost in community access 
would be a server, J2EE environment and some bandwidth.  You already 
have this so we are good to go :)

--Two Cents--
James

Howard M. Lewis Ship wrote:

>I'm beginning to have a smidgen of time to update the docs which will help.
>
>I'm beginning to look into options to host a permanent Tapestry home page that could include, for
>example, a more powerful, searchable, useful Wiki and other collaboration software.
>
>It does pain me that answers to common questions come up so often; I don't want anyone to think this
>is falling on deaf ears, it simply comes down to being only human, only having so much time to spend
>on all this.  I remain totally committed to my earlier goals, that Tapestry should be the easiest
>and most powerful framework, regardless of you background (JSP, ASP, PHP, etc.). The power is there,
>but a little doc, a little tutorial is definately needed, planned and going to happen.
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>
>
>
>  
>
>>-----Original Message-----
>>From: dvw3@email.byu.edu [mailto:dvw3@email.byu.edu] On 
>>Behalf Of Dan Wells
>>Sent: Monday, August 18, 2003 10:21 AM
>>To: Tapestry users
>>Subject: RE: Major Problem with Tapestry - Please Correct me
>>
>>
>>Thank you Mr. Ship for your help with my questions.  I'm glad 
>>you liked my subject line. If you were being sarcastic then 
>>let me apologize for having offended you somehow - it has not 
>>been my intention.  I'll try to do better in the future.
>>
>>I now see how to do this, and I agree with your view.  Also, 
>>I agree with Mr. Marco that the logic should go in the java 
>>code.  You were right, I need to think in the right paradigm 
>>(objects, etc.).  I'm coming from an ASP paradigm, so I still 
>>have some bad habits I'm trying to fix.
>>
>>In response to the thread with subject title "Tapestry Rant 
>>and suggestions, I do believe we should certainly search more 
>>ourselves for our own answers, as I have tried to do - not 
>>always with success.  I apologize for having mentioned my 
>>inexperience, but I'm pretty new to web development 
>>alltogether.  I have done a couple of ASP apps, and this last 
>>year I have been learning Java  (the language) and the 
>>various J2EE technologies (JSP, Servlets, EJB, etc.).  Let me 
>>say I like it a lot better than ASP, VB, COBOL, and other 
>>technologies I've had to mess with.
>>
>>I admit some of my questions, after finding the solution 
>>myself, have been unworthy of posting.  So I don't mind that 
>>they were ignored.
>>
>>Thanks for all,
>>
>>Dan Wells
>>
>>
>>
>>On Fri, 2003-08-15 at 18:23, Howard M. Lewis Ship wrote:
>>    
>>
>>>Ooh yeah baby, great subject line, that's the way to get some help.
>>>
>>>
>>>      
>>>
>>>>Tapestry does not render the tags in which you embed your
>>>>jwcid attribute.  Tapestry also requires the template be 
>>>>syntactically correct as far as XML/HTML tags go, BEFORE it 
>>>>parses and renders. 
>>>>        
>>>>
>>>Tapestry HTML templates must be reasonably valid HTML 
>>>      
>>>
>>documents.  Its 
>>    
>>
>>>very, very loose, but requires that tags nest validly.
>>>
>>>
>>>      
>>>
>>>>I have some HTML with parts being dynamically altered based
>>>>on certain conditions.  To achieve it in JSP, it was super 
>>>>easy.  To achieve it in Tapestry, it was kind of a pain.  
>>>>Please correct me if I error.
>>>>
>>>>I have a component with an HTML table.  In the table, there
>>>>is a ValidField, which becomes part of a form on a containing 
>>>>page.  I want the table, with color and other formatting, to 
>>>>not be rendered if a parameter of this component is set to 
>>>>false.  If the parameter is true, the table will be rendered. 
>>>> There is a good reason for this, but that is a long story.
>>>>
>>>>Here is the simplified code in JSP:
>>>>
>>>><%
>>>>   if (...) {
>>>>%>
>>>>
>>>>       <table ...>
>>>>         <tr ...>
>>>>           <th><b>Enter a Title</b></th>
>>>>         </tr>
>>>>         <tr ...>
>>>>           <td ...>
>>>><% } %>
>>>>                <input type="text" jwcid="title" />
>>>><%
>>>>    if (...){
>>>>%>
>>>>                (Example: Math 110 Sections 2 &amp; 3 Fall 2002)
>>>>
>>>>             </td>
>>>>           </tr>
>>>>       </table>
>>>><% } %>
>>>>
>>>>
>>>>        
>>>>
>>>My eyes!  My eyes!
>>>
>>>
>>>      
>>>
>>>>Here is the code in Tapestry:
>>>>
>>>><span jwcid="@Conditional" condition="ognl:format">
>>>>
>>>>       <table ...>
>>>>         <tr...>
>>>>           <th><b>Enter a Title</b></th>
>>>>           </tr>
>>>>           <tr...>
>>>>             <td ...>
>>>>
>>>>                <input type="text" jwcid="titleInBody" />
>>>>
>>>>                (Example: Math 110 Sections 2 &amp; 3 Fall 2002)
>>>>
>>>>             </td>
>>>>           </tr>
>>>>       </table>
>>>>       
>>>></span>
>>>>
>>>><span jwcid="@Conditional" condition="ognl: ! format">
>>>>
>>>>   <input type="text" jwcid="title" />
>>>>
>>>></span>
>>>>
>>>>
>>>>This doesn't seem a BIG deal in this example, but it becomes
>>>>a big deal in some of the more advanced presentation logic 
>>>>I've done.  Especially since I had to create another 
>>>>component element int the .jwc file because you can't 
>>>>duplicate your component ids.  I also have another file where 
>>>>I just want to place bold tags around a phrase based on a 
>>>>condition.  It seems a little painful to have to write the 
>>>>phrase twice surrounded with opposing conditions, especially 
>>>>when that phrase is large, and there are many of them.
>>>>        
>>>>
>>>You are thinking too much in terms of text processing, not 
>>>      
>>>
>>of objects.
>>    
>>
>>>In terms of wrapping some content in bold .... well, let's rethink 
>>>that.  How about chosing between:
>>>
>>><span class="important"> some content </span>
>>>
>>>and
>>>
>>><span> some content </span>
>>>
>>>That's easy enough:
>>>
>>><span jwcid="@Any" class="ognl: important ? 'important' : 
>>>      
>>>
>>null"> some 
>>    
>>
>>>content </span>
>>>
>>>In other words, render a <span> tag and set the class based on the 
>>>important property of the page.
>>>
>>>If the <span> itself bothers you, you can write a custom 
>>>      
>>>
>>component in 
>>    
>>
>>>a few lines.
>>>
>>>Your other problem, where you want to conditionally wrap 
>>>      
>>>
>>you TextField 
>>    
>>
>>>inside a table or not is a problem with Tapestry.
>>>
>>>In the page specification, you can use the copy-of attribute on 
>>><component> to copy the type and bindings of another 
>>>      
>>>
>>component (also 
>>    
>>
>>>defined in the spec).  That makes it pretty easy to duplicate the 
>>>TextField for your purposes.
>>>
>>>
>>>      
>>>
>>>>I have so far really enjoyed learning Tapestry, but this
>>>>seems a problem.  I hope I have just missed something... I 
>>>>hope there is a better way.  If anyone knows it, please, 
>>>>please tell me.
>>>>        
>>>>
>>>Every framework will have its own set of choices; in Tapestry, the 
>>>desire to validate HTML templates for consistency outwieghed any 
>>>desire to support mangled HTML like your JSP example.
>>>
>>>
>>>
>>>      
>>>
>>>>--
>>>>Dan Wells <da...@byu.edu>
>>>>
>>>>
>>>>--
>>>>To unsubscribe, e-mail: 
>>>>        
>>>>
>>tapestry-user-unsubscribe@jakarta.apache.org
>>    
>>
>>>>For additional commands, e-mail: 
>>>>tapestry-user-help@jakarta.apache.org
>>>>
>>>>        
>>>>
>>>--
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: 
>>>      
>>>
>>tapestry-user-help@jakarta.apache.org
>>-- 
>>Dan Wells <da...@byu.edu>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>  
>


RE: Tapestry Community

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Actually, I don't have a server; apache.org does not ever host live web applications.  That would
mean I need:

1) A physical server (not a big deal, it's an excuse to build out my old box as linux)
2) A fixed IP and hostname

#2 is the hard part for me right now, especially with me moving house shortly.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: James Hays [mailto:james_hays@mac.com] 
> Sent: Monday, August 18, 2003 11:07 AM
> To: Tapestry users
> Subject: Tapestry Community
> 
> 
> If I can toss in my two cents.  Dump this wiki stuff.  Let's 
> implement a 
> set of Jive forums which should be free to the tapestry group.  
> JiveSoftware.com puts out a great product, especially if you 
> are an open 
> source project.
> 
> Another would be Jira, an issue tracking/work flow 
> application.  Since 
> you are open source, you may be able to get this for free as well.  
> Don't quote me on that, but I think it is accurate.  So, the 
> only thing 
> that should be of cost to handle this great boost in community access 
> would be a server, J2EE environment and some bandwidth.  You already 
> have this so we are good to go :)
> 
> --Two Cents--
> James
> 
> Howard M. Lewis Ship wrote:
> 
> >I'm beginning to have a smidgen of time to update the docs 
> which will 
> >help.
> >
> >I'm beginning to look into options to host a permanent Tapestry home 
> >page that could include, for example, a more powerful, searchable, 
> >useful Wiki and other collaboration software.
> >
> >It does pain me that answers to common questions come up so often; I 
> >don't want anyone to think this is falling on deaf ears, it simply 
> >comes down to being only human, only having so much time to spend on 
> >all this.  I remain totally committed to my earlier goals, that 
> >Tapestry should be the easiest and most powerful framework, 
> regardless 
> >of you background (JSP, ASP, PHP, etc.). The power is there, but a 
> >little doc, a little tutorial is definately needed, planned 
> and going 
> >to happen.
> >
> >--
> >Howard M. Lewis Ship
> >Creator, Tapestry: Java Web Components 
> >http://jakarta.apache.org/tapestry
> >
> >
> >
> >  
> >
> >>-----Original Message-----
> >>From: dvw3@email.byu.edu [mailto:dvw3@email.byu.edu] On
> >>Behalf Of Dan Wells
> >>Sent: Monday, August 18, 2003 10:21 AM
> >>To: Tapestry users
> >>Subject: RE: Major Problem with Tapestry - Please Correct me
> >>
> >>
> >>Thank you Mr. Ship for your help with my questions.  I'm glad
> >>you liked my subject line. If you were being sarcastic then 
> >>let me apologize for having offended you somehow - it has not 
> >>been my intention.  I'll try to do better in the future.
> >>
> >>I now see how to do this, and I agree with your view.  Also,
> >>I agree with Mr. Marco that the logic should go in the java 
> >>code.  You were right, I need to think in the right paradigm 
> >>(objects, etc.).  I'm coming from an ASP paradigm, so I still 
> >>have some bad habits I'm trying to fix.
> >>
> >>In response to the thread with subject title "Tapestry Rant
> >>and suggestions, I do believe we should certainly search more 
> >>ourselves for our own answers, as I have tried to do - not 
> >>always with success.  I apologize for having mentioned my 
> >>inexperience, but I'm pretty new to web development 
> >>alltogether.  I have done a couple of ASP apps, and this last 
> >>year I have been learning Java  (the language) and the 
> >>various J2EE technologies (JSP, Servlets, EJB, etc.).  Let me 
> >>say I like it a lot better than ASP, VB, COBOL, and other 
> >>technologies I've had to mess with.
> >>
> >>I admit some of my questions, after finding the solution
> >>myself, have been unworthy of posting.  So I don't mind that 
> >>they were ignored.
> >>
> >>Thanks for all,
> >>
> >>Dan Wells
> >>
> >>
> >>
> >>On Fri, 2003-08-15 at 18:23, Howard M. Lewis Ship wrote:
> >>    
> >>
> >>>Ooh yeah baby, great subject line, that's the way to get some help.
> >>>
> >>>
> >>>      
> >>>
> >>>>Tapestry does not render the tags in which you embed your jwcid 
> >>>>attribute.  Tapestry also requires the template be syntactically 
> >>>>correct as far as XML/HTML tags go, BEFORE it parses and renders.
> >>>>        
> >>>>
> >>>Tapestry HTML templates must be reasonably valid HTML 
> >>>      
> >>>
> >>documents.  Its 
> >>    
> >>
> >>>very, very loose, but requires that tags nest validly.
> >>>
> >>>
> >>>      
> >>>
> >>>>I have some HTML with parts being dynamically altered based
> >>>>on certain conditions.  To achieve it in JSP, it was super 
> >>>>easy.  To achieve it in Tapestry, it was kind of a pain.  
> >>>>Please correct me if I error.
> >>>>
> >>>>I have a component with an HTML table.  In the table, there
> >>>>is a ValidField, which becomes part of a form on a containing 
> >>>>page.  I want the table, with color and other formatting, to 
> >>>>not be rendered if a parameter of this component is set to 
> >>>>false.  If the parameter is true, the table will be rendered. 
> >>>> There is a good reason for this, but that is a long story.
> >>>>
> >>>>Here is the simplified code in JSP:
> >>>>
> >>>><%
> >>>>   if (...) {
> >>>>%>
> >>>>
> >>>>       <table ...>
> >>>>         <tr ...>
> >>>>           <th><b>Enter a Title</b></th>
> >>>>         </tr>
> >>>>         <tr ...>
> >>>>           <td ...>
> >>>><% } %>
> >>>>                <input type="text" jwcid="title" />
> >>>><%
> >>>>    if (...){
> >>>>%>
> >>>>                (Example: Math 110 Sections 2 &amp; 3 Fall 2002)
> >>>>
> >>>>             </td>
> >>>>           </tr>
> >>>>       </table>
> >>>><% } %>
> >>>>
> >>>>
> >>>>        
> >>>>
> >>>My eyes!  My eyes!
> >>>
> >>>
> >>>      
> >>>
> >>>>Here is the code in Tapestry:
> >>>>
> >>>><span jwcid="@Conditional" condition="ognl:format">
> >>>>
> >>>>       <table ...>
> >>>>         <tr...>
> >>>>           <th><b>Enter a Title</b></th>
> >>>>           </tr>
> >>>>           <tr...>
> >>>>             <td ...>
> >>>>
> >>>>                <input type="text" jwcid="titleInBody" />
> >>>>
> >>>>                (Example: Math 110 Sections 2 &amp; 3 Fall 2002)
> >>>>
> >>>>             </td>
> >>>>           </tr>
> >>>>       </table>
> >>>>       
> >>>></span>
> >>>>
> >>>><span jwcid="@Conditional" condition="ognl: ! format">
> >>>>
> >>>>   <input type="text" jwcid="title" />
> >>>>
> >>>></span>
> >>>>
> >>>>
> >>>>This doesn't seem a BIG deal in this example, but it becomes
> >>>>a big deal in some of the more advanced presentation logic 
> >>>>I've done.  Especially since I had to create another 
> >>>>component element int the .jwc file because you can't 
> >>>>duplicate your component ids.  I also have another file where 
> >>>>I just want to place bold tags around a phrase based on a 
> >>>>condition.  It seems a little painful to have to write the 
> >>>>phrase twice surrounded with opposing conditions, especially 
> >>>>when that phrase is large, and there are many of them.
> >>>>        
> >>>>
> >>>You are thinking too much in terms of text processing, not 
> >>>      
> >>>
> >>of objects.
> >>    
> >>
> >>>In terms of wrapping some content in bold .... well, let's rethink 
> >>>that.  How about chosing between:
> >>>
> >>><span class="important"> some content </span>
> >>>
> >>>and
> >>>
> >>><span> some content </span>
> >>>
> >>>That's easy enough:
> >>>
> >>><span jwcid="@Any" class="ognl: important ? 'important' : 
> >>>      
> >>>
> >>null"> some 
> >>    
> >>
> >>>content </span>
> >>>
> >>>In other words, render a <span> tag and set the class based on the 
> >>>important property of the page.
> >>>
> >>>If the <span> itself bothers you, you can write a custom 
> >>>      
> >>>
> >>component in 
> >>    
> >>
> >>>a few lines.
> >>>
> >>>Your other problem, where you want to conditionally wrap 
> >>>      
> >>>
> >>you TextField 
> >>    
> >>
> >>>inside a table or not is a problem with Tapestry.
> >>>
> >>>In the page specification, you can use the copy-of attribute on 
> >>><component> to copy the type and bindings of another 
> >>>      
> >>>
> >>component (also 
> >>    
> >>
> >>>defined in the spec).  That makes it pretty easy to duplicate the 
> >>>TextField for your purposes.
> >>>
> >>>
> >>>      
> >>>
> >>>>I have so far really enjoyed learning Tapestry, but this
> >>>>seems a problem.  I hope I have just missed something... I 
> >>>>hope there is a better way.  If anyone knows it, please, 
> >>>>please tell me.
> >>>>        
> >>>>
> >>>Every framework will have its own set of choices; in Tapestry, the 
> >>>desire to validate HTML templates for consistency outwieghed any 
> >>>desire to support mangled HTML like your JSP example.
> >>>
> >>>
> >>>
> >>>      
> >>>
> >>>>--
> >>>>Dan Wells <da...@byu.edu>
> >>>>
> >>>>
> >>>>--
> >>>>To unsubscribe, e-mail: 
> >>>>        
> >>>>
> >>tapestry-user-unsubscribe@jakarta.apache.org
> >>    
> >>
> >>>>For additional commands, e-mail: 
> >>>>tapestry-user-help@jakarta.apache.org
> >>>>
> >>>>        
> >>>>
> >>>--
> >>>To unsubscribe, e-mail: 
> tapestry-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: 
> >>>      
> >>>
> >>tapestry-user-help@jakarta.apache.org
> >>-- 
> >>Dan Wells <da...@byu.edu>
> >>
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> >>
> >>    
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


RE: Tapestry Community

Posted by Stefano Bagnara <ba...@ngi.it>.
> If I can toss in my two cents.  Dump this wiki stuff.  Let's 
> implement a 
> set of Jive forums which should be free to the tapestry group.  
> JiveSoftware.com puts out a great product, especially if you 
> are an open 
> source project.

I think that the mailing lists and gmane are the best for discussions.
"Phorums" are only surrogates.

> Another would be Jira, an issue tracking/work flow 
> application.  Since 
> you are open source, you may be able to get this for free as well.  
> Don't quote me on that, but I think it is accurate.  So, the 
> only thing 
> that should be of cost to handle this great boost in community access 
> would be a server, J2EE environment and some bandwidth.  You already 
> have this so we are good to go :)

I think the "free" Jira for OSS is hosted directly by Atlassian and is
not a licensed software to be used in your own server as the commercial
license.

I think that tapestry should use the jakarta website and be mostly
static or nighly generated from dynamic source.

-b-


Re: Tapestry Community

Posted by Erik Hatcher <li...@ehatchersolutions.com>.
yes, we can use JIRA for free, and its much nicer than using Bugzilla.

But, keep the wiki!  Web forums - I don't see the point when we have 
e-mail lists.  We don't want to have too many channels of 
communication.  I, for one, hate web-based forums.  I much prefer to 
have e-mails pushed to me, rather than me having to visit a web page to 
follow a thread.

The wiki is nice to allow us to all self-document Tapestry.

	Erik


On Monday, August 18, 2003, at 11:07  AM, James Hays wrote:

> If I can toss in my two cents.  Dump this wiki stuff.  Let's implement 
> a set of Jive forums which should be free to the tapestry group.  
> JiveSoftware.com puts out a great product, especially if you are an 
> open source project.
>
> Another would be Jira, an issue tracking/work flow application.  Since 
> you are open source, you may be able to get this for free as well.  
> Don't quote me on that, but I think it is accurate.  So, the only 
> thing that should be of cost to handle this great boost in community 
> access would be a server, J2EE environment and some bandwidth.  You 
> already have this so we are good to go :)
>
> --Two Cents--
> James
>
> Howard M. Lewis Ship wrote:
>
>> I'm beginning to have a smidgen of time to update the docs which will 
>> help.
>>
>> I'm beginning to look into options to host a permanent Tapestry home 
>> page that could include, for
>> example, a more powerful, searchable, useful Wiki and other 
>> collaboration software.
>>
>> It does pain me that answers to common questions come up so often; I 
>> don't want anyone to think this
>> is falling on deaf ears, it simply comes down to being only human, 
>> only having so much time to spend
>> on all this.  I remain totally committed to my earlier goals, that 
>> Tapestry should be the easiest
>> and most powerful framework, regardless of you background (JSP, ASP, 
>> PHP, etc.). The power is there,
>> but a little doc, a little tutorial is definately needed, planned and 
>> going to happen.
>>
>> --
>> Howard M. Lewis Ship
>> Creator, Tapestry: Java Web Components
>> http://jakarta.apache.org/tapestry
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: dvw3@email.byu.edu [mailto:dvw3@email.byu.edu] On Behalf Of 
>>> Dan Wells
>>> Sent: Monday, August 18, 2003 10:21 AM
>>> To: Tapestry users
>>> Subject: RE: Major Problem with Tapestry - Please Correct me
>>>
>>>
>>> Thank you Mr. Ship for your help with my questions.  I'm glad you 
>>> liked my subject line. If you were being sarcastic then let me 
>>> apologize for having offended you somehow - it has not been my 
>>> intention.  I'll try to do better in the future.
>>>
>>> I now see how to do this, and I agree with your view.  Also, I agree 
>>> with Mr. Marco that the logic should go in the java code.  You were 
>>> right, I need to think in the right paradigm (objects, etc.).  I'm 
>>> coming from an ASP paradigm, so I still have some bad habits I'm 
>>> trying to fix.
>>>
>>> In response to the thread with subject title "Tapestry Rant and 
>>> suggestions, I do believe we should certainly search more ourselves 
>>> for our own answers, as I have tried to do - not always with 
>>> success.  I apologize for having mentioned my inexperience, but I'm 
>>> pretty new to web development alltogether.  I have done a couple of 
>>> ASP apps, and this last year I have been learning Java  (the 
>>> language) and the various J2EE technologies (JSP, Servlets, EJB, 
>>> etc.).  Let me say I like it a lot better than ASP, VB, COBOL, and 
>>> other technologies I've had to mess with.
>>>
>>> I admit some of my questions, after finding the solution myself, 
>>> have been unworthy of posting.  So I don't mind that they were 
>>> ignored.
>>>
>>> Thanks for all,
>>>
>>> Dan Wells
>>>
>>>
>>>
>>> On Fri, 2003-08-15 at 18:23, Howard M. Lewis Ship wrote:
>>>
>>>> Ooh yeah baby, great subject line, that's the way to get some help.
>>>>
>>>>
>>>>
>>>>> Tapestry does not render the tags in which you embed your
>>>>> jwcid attribute.  Tapestry also requires the template be 
>>>>> syntactically correct as far as XML/HTML tags go, BEFORE it parses 
>>>>> and renders.
>>>> Tapestry HTML templates must be reasonably valid HTML
>>> documents.  Its
>>>> very, very loose, but requires that tags nest validly.
>>>>
>>>>
>>>>
>>>>> I have some HTML with parts being dynamically altered based
>>>>> on certain conditions.  To achieve it in JSP, it was super easy.  
>>>>> To achieve it in Tapestry, it was kind of a pain.  Please correct 
>>>>> me if I error.
>>>>>
>>>>> I have a component with an HTML table.  In the table, there
>>>>> is a ValidField, which becomes part of a form on a containing 
>>>>> page.  I want the table, with color and other formatting, to not 
>>>>> be rendered if a parameter of this component is set to false.  If 
>>>>> the parameter is true, the table will be rendered. There is a good 
>>>>> reason for this, but that is a long story.
>>>>>
>>>>> Here is the simplified code in JSP:
>>>>>
>>>>> <%
>>>>>   if (...) {
>>>>> %>
>>>>>
>>>>>       <table ...>
>>>>>         <tr ...>
>>>>>           <th><b>Enter a Title</b></th>
>>>>>         </tr>
>>>>>         <tr ...>
>>>>>           <td ...>
>>>>> <% } %>
>>>>>                <input type="text" jwcid="title" />
>>>>> <%
>>>>>    if (...){
>>>>> %>
>>>>>                (Example: Math 110 Sections 2 &amp; 3 Fall 2002)
>>>>>
>>>>>             </td>
>>>>>           </tr>
>>>>>       </table>
>>>>> <% } %>
>>>>>
>>>>>
>>>>>
>>>> My eyes!  My eyes!
>>>>
>>>>
>>>>
>>>>> Here is the code in Tapestry:
>>>>>
>>>>> <span jwcid="@Conditional" condition="ognl:format">
>>>>>
>>>>>       <table ...>
>>>>>         <tr...>
>>>>>           <th><b>Enter a Title</b></th>
>>>>>           </tr>
>>>>>           <tr...>
>>>>>             <td ...>
>>>>>
>>>>>                <input type="text" jwcid="titleInBody" />
>>>>>
>>>>>                (Example: Math 110 Sections 2 &amp; 3 Fall 2002)
>>>>>
>>>>>             </td>
>>>>>           </tr>
>>>>>       </table>
>>>>>       </span>
>>>>>
>>>>> <span jwcid="@Conditional" condition="ognl: ! format">
>>>>>
>>>>>   <input type="text" jwcid="title" />
>>>>>
>>>>> </span>
>>>>>
>>>>>
>>>>> This doesn't seem a BIG deal in this example, but it becomes
>>>>> a big deal in some of the more advanced presentation logic I've 
>>>>> done.  Especially since I had to create another component element 
>>>>> int the .jwc file because you can't duplicate your component ids.  
>>>>> I also have another file where I just want to place bold tags 
>>>>> around a phrase based on a condition.  It seems a little painful 
>>>>> to have to write the phrase twice surrounded with opposing 
>>>>> conditions, especially when that phrase is large, and there are 
>>>>> many of them.
>>>>>
>>>> You are thinking too much in terms of text processing, not
>>> of objects.
>>>
>>>> In terms of wrapping some content in bold .... well, let's rethink 
>>>> that.  How about chosing between:
>>>>
>>>> <span class="important"> some content </span>
>>>>
>>>> and
>>>>
>>>> <span> some content </span>
>>>>
>>>> That's easy enough:
>>>>
>>>> <span jwcid="@Any" class="ognl: important ? 'important' :
>>> null"> some
>>>> content </span>
>>>>
>>>> In other words, render a <span> tag and set the class based on the 
>>>> important property of the page.
>>>>
>>>> If the <span> itself bothers you, you can write a custom
>>> component in
>>>> a few lines.
>>>>
>>>> Your other problem, where you want to conditionally wrap
>>> you TextField
>>>> inside a table or not is a problem with Tapestry.
>>>>
>>>> In the page specification, you can use the copy-of attribute on 
>>>> <component> to copy the type and bindings of another
>>> component (also
>>>> defined in the spec).  That makes it pretty easy to duplicate the 
>>>> TextField for your purposes.
>>>>
>>>>
>>>>
>>>>> I have so far really enjoyed learning Tapestry, but this
>>>>> seems a problem.  I hope I have just missed something... I hope 
>>>>> there is a better way.  If anyone knows it, please, please tell >>>>> me.
>>>>>
>>>> Every framework will have its own set of choices; in Tapestry, the 
>>>> desire to validate HTML templates for consistency outwieghed any 
>>>> desire to support mangled HTML like your JSP example.
>>>>
>>>>
>>>>
>>>>
>>>>> --
>>>>> Dan Wells <da...@byu.edu>
>>>>>
>>>>>
>>>>> --
>>>>> To unsubscribe, e-mail:
>>> tapestry-user-unsubscribe@jakarta.apache.org
>>>
>>>>> For additional commands, e-mail: 
>>>>> tapestry-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>> --
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>> tapestry-user-help@jakarta.apache.org
>>> -- 
>>> Dan Wells <da...@byu.edu>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: 
>>> tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>