struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aladin Alaily" <str...@aladin.ca>
Subject RE: Struts, xhtml & bad tag syntax ... maybe nice in 1.7
Date Tue, 24 May 2005 15:34:01 GMT
Hello All,

Found my answer... (posting here for the benefit of others)

To make the tags xhtml compliant, you have to add <html:xhtml/> to your
pages.

Aladin




> Hi Christopher,
>
>> This is surely down to your IDE and not Struts.
>
> I don't think you understand the problem, because it is not related to an
> IDE.
>
> When you write:
> <html:text property="whatever"/>
>
> The HTML code generated  (when viewing the page in Explorer, Netscape,
> Opera, or whatever) is:
> <input type="text" name="whatever" value="">
>
> Try it and see (do a view source in your browser).
>
> Aladin
>
>
>>
>> Cheers
>>
>> Christopher Marsh-Bourdon
>> www.marsh-bourdon.com
>>
>>
>>
>> -----Original Message-----
>> From: Aladin Alaily [mailto:struts@aladin.ca]
>> Sent: 24 May 2005 16:13
>> To: Struts Users Mailing List
>> Cc: user@struts.apache.org
>> Subject: Struts, xhtml & bad tag syntax ... maybe nice in 1.7
>>
>> Hello,
>>
>> Has anyone tried to make the struts tags xhtml compliant?  Here is what
>> I
>> mean.
>>
>> I have noticed that whenever an html component is generated using the
>> html
>> tags (or any other tag from the libraries), they are usually not closed.
>>
>> For example, when generating a form input field using:
>> <html:text property="whatever">
>>
>> the html code generated looks like:
>> <input type="text" name="whatever" value="">
>>
>> when it should really look like this:
>> <input type="text" name="whatever" value="" /> (Notice the / to close
>> the
>> tag)
>>
>> This is a problem when you want to enforce a specific DOCTYPE to your
>> web-application. The problem can easily be fixed... are struts
>> developers
>> thinking about this problem?  It would be nice to have this addition to
>> Struts 1.7
>>
>> Aladin
>>
>>
>>
>>
>>> The way I have done this is I have the following on all my pages:
>>>
>>> <body onLoad="hidePleaseWait();">
>>> <%@ include file="/inc/pleaseWait.inc" %> <span id="lyrMain"
>>> style="display:none;">
>>>
>>> pleaseWait.inc is the HTML for my Please Wait display.  For me, it's a
>>> little clock with spinning hands and a message artistically offset
>>> saying "Please wait, the system is busy processing your request..."
>>> centered on the page.  The important point is that the first and last
>>> lines of that include file are:
>>>
>>> <span id="lyrPleaseWait" style="display:block;"> ...
>>> </span>
>>>
>>> Just before I submit any form, I call showPleaseWait(), which is a
>>> Javascript function in pleaseWait.inc, and it is basically just:
>>>
>>> lyrMain.style.display = "none";
>>> lyrPleaseWait.style.display = "block";
>>>
>>> One last piece of the puzzle... that hidePleaseWait() function called
>>> onLoad is:
>>>
>>> lyrMain.style.display = "block";
>>> lyrPleaseWait.style.display = "hide";
>>>
>>> So, every page that loads starts out showing that Please Wait layer,
>>> and when it's done loading it hides that and shows the main content.
>>> When a form is submitted, the main content is hidden and the Please
>>> Wait layer is shown.  It works quite well.
>>>
>>> I actually do something a bit more complex in one of my apps because
>>> it is frames-based and I actually target all submissions to a hidden
>>> frame, but the overall concept is the same.  So, if you don't have a
>>> problem with the requirement of scripting, this works well.
>>>
>>> --
>>> Frank W. Zammetti
>>> Founder and Chief Software Architect
>>> Omnytex Technologies
>>> http://www.omnytex.com
>>>
>>> On Tue, May 24, 2005 9:26 am, Marc Demlenne said:
>>>> Hi all,
>>>>
>>>> Using Struts, I'm looking for a good practice to have a "Please wait
>>>> box" displayed to the user when the action he has requested takes a
>>>> long time.
>>>>
>>>> My requirements are not to display another page to keep the browsing
>>>> "smooth". I use a JSP tree which can be expanded/collapsed, but the
>>>> page must stay the same between the calls. So I'd like a small box
>>>> added in front of the actual window.
>>>>
>>>> What I could do is to use a javascript to show or hide a small box in
>>>> a corner of the window for instance. The problem is that i want this
>>>> box to be displayed immediately when the ActionClass is called, and
>>>> hided only when the result page is fully displayed. This is very easy
>>>> when it is the displaying of the page which is slow (when the logic
>>>> is inside JSP), but doesn't seem so easy with struts, where it's the
>>>> action that can take time.
>>>>
>>>> Can anyone help me with this ?
>>>>
>>>> --
>>>> Marc Demlenne
>>>> GPG : 768FA483 (http://pgp.mit.edu)
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> --------------------------------------------------------------------------------
>> The information contained herein is confidential and is intended solely
>> for the
>> addressee. Access by any other party is unauthorised without the express
>> written permission of the sender. If you are not the intended recipient,
>> please
>> contact the sender either via the company switchboard on +44 (0)20 7623
>> 8000, or
>> via e-mail return. If you have received this e-mail in error or wish to
>> read our
>> e-mail disclaimer statement and monitoring policy, please refer to
>> http://www.drkw.com/disc/email/ or contact the sender. 3166
>> --------------------------------------------------------------------------------
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message