You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Kare Nuorteva <ka...@satama.com> on 2001/01/12 12:02:29 UTC

Re: Struts 1.0 feature freeze && possible WML taglib

Craig R. McClanahan wrote:

> 

I started design of a WML taglib on my christmas holiday (when I 
actually had some spare time), however it actually is still pretty much 
a simple class diagram.

Has someone already done something like this?

Anyway, few things that I would like to discuss here before implementation:

- I used Together/J white board edition for UML. I reckon it was a good 
idea, because it's free so every one can use it.

- locale negotiation
I suggested earlier to create a separate LocaleUtils class.
This might be usefull now, because the locale negotiation logic is 
implemented, but I can't re-use it (unless I do a copy+paste and double 
the amount of code to maintain). Locale stuff is required by <wml 
xml:lang> attribute and it actually is a common attribute of every one 
and each WML -tag, but it is basically inherited from WML -tag unless 
explicitely defined.


WML taglib in use:
------------------
<wml:wml>
   <card id="input" title="Input" newcontext="true">
     <p>
       foo: <wml:text name="foo"/><br/>
       bar: <wml:text name="bar"/><br/>

       <wml:form href="print-request.jsp" method="post">Submit</wml:form>
     </p>
   </card>
</wml:wml>
================================================================================

WML taglib output:
------------------
<wml>
   <card id="input" title="Input" newcontext="true">
     <p>

       foo: <input type="text" name="foo" value="foofoofoo"/><br/>
       bar: <input type="text" name="bar" value="barbarbar"/><br/>

       <anchor>
         <go href="print-request.jsp" method="post">
           <postfield name="foo" value="$foo"/>
           <postfield name="bar" value="$bar"/>
         </go>
       Submit
       </anchor>
     </p>
   </card>
</wml>
==============================================================================

This proposed functionality has one major problem; if the <anchor> -tag 
is (for some reason) positioned before input fields, it actually can't 
know what to print for <postfield> -tags or can it?

Possibly by reflecting ActionForm fields, but I don't know if this is a 
viable option, unless cached?
(Struts ActionForm attributes are missing form the example)

Better ideas anyone?

> wait".  The only remaining tasks are documentation updates and bug fixes.

Yes, I can see it from the amount of doc commits, nice one Ted & co!

Cheers,
Kare 8^)

-- 
Kare Nuorteva, Software Engineer
Satama UK Ltd
mobile +44 7989 852 865
http://www.satama.com/