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 17:00:42 GMT
I actually prefer to have <html:xhtml /> instead of the html attribute
because html:html is restrictive.  It doesn't allow me to add an xml
namespace to the html tag (xmlns="http://www.w3.org/1999/xhtml).

My solution is to have the following:

<html xmlns="http://www.w3.org/1999/xhtml">
  <html:xhtml/>
  ...
</html>

Aladin




> Is it a common practice to have a static include at the top of every JSP
> which contians <html:xhtml/> ?
>
> -----Original Message-----
> From: Frank W. Zammetti [mailto:fzlists@omnytex.com]
> Sent: Tuesday, May 24, 2005 12:48 PM
> To: Struts Users Mailing List
> Cc: Struts Users Mailing List
> Subject: RE: Struts, xhtml & bad tag syntax ... maybe nice in 1.7
>
>
> Also note that adding the attribite:
>
> xhtml="true"
>
> ...to the usual <html:html/> tag has the same effect.  I don't know if one
> is preferred over the other though... I'd personally go with the attribute
> because to me it seems slightly more obvious, but I don't know if it
> matters either way.
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Tue, May 24, 2005 11:34 am, Aladin Alaily said:
>> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
> ------------------------------------------------------------------------------
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
> Jersey, USA 08889), and/or its affiliates (which may be known outside the
> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
> Banyu) that may be confidential, proprietary copyrighted and/or legally
> privileged. It is intended solely for the use of the individual or entity
> named on this message.  If you are not the intended recipient, and have
> received this message in error, please notify us immediately by reply
> e-mail and then delete it from your system.
> ------------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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