ok so your take is i want to reference a HTML component to uniquely identify a 
component in lieu of idso we're on the same page the HTML spec says The id 
attribute assigns a unique 
identifier to an element (which may be verified by an SGML parser). 
For example, the following paragraphs are distinguished by their id values: 
<P id="myparagraph"> This is a uniquely named paragraph.</P>
<P id="yourparagraph"> This is also a uniquely named paragraph.</P>

The id attribute has several roles in 
HTML:

As a style sheet selector. 
As a target anchor for hypertext links. 
As a means to reference a particular element from a script. 
As the name of a declared OBJECT element. 
For general purpose processing by user agents (e.g. for identifying fields 
when extracting data from HTML pages into a database, translating HTML 
documents 
into other formats, etc.).  Unique quality of id attributehow else can the 
User-Agent Browser uniquely refer to a element in a document if you do not have 
an id...
Suitable alternatives to replace unique idHow would an optional request 
parameter (such as title) be used to uniquely reference a component (instead of 
referring to unique identifier attribute)
http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 Date: Fri, 30 Nov 2012 17:36:19 +0100
From: t.anneess...@ictjob.be
To: user@struts.apache.org
CC: mgai...@hotmail.com; w.gha...@ictjob.be
Subject: Re: Inconsistency in Struts2 s:component parameters handling


  
    
  
  
    Dear Martin,

      

      According to struts
        documentation: "id" is not required. However it
      seems that even if I do not specify a value for "id", Struts will
      assign an empty String value to it, which would prove what you are
      saying. Maybe the documentation should be adapted to indicate that
      id is required and that it has a default value which is an empty
      string.

      

      I note that if a parameter value is specified using both an
      attribute and the param tag, the attribute value will be used.
      This would explain the behavior we are observing for "id". 

      Assuming all this is right, I do not think that it should
        influence the way to use s:component. IMO, the fact that a
        default value is assigned to a parameter should not impact the
        way we can specify/override the parameter value.

      
      Given all these facts, is it reasonable to assume that this
        behavior will not change in future Struts releases?

      
      Thanks again for your time Martin.

      
      Best regards,

        Thim.

      
      On 11/30/2012 03:42 PM, Martin Gainty wrote:

    
    
      
      
        correct..

        ID is a required attribute of the component tag

        title is a parameter scoped at request level which will
        be suffixed for the call to your Action e.g.
        YourAction?title='title'

        

        since ID is already a required attribute for every component it
        would not make sense to *also add ID as the more
        generalised request parameter*

        (since ID is already specified as the required attribute for the
        component)

         

        Make cents?

        Martin 

        ______________________________________________ 

        Verzicht und Vertraulichkeitanmerkung/Note de déni et de
        confidentialité

        

        Diese Nachricht ist vertraulich. Sollten Sie nicht der
        vorgesehene Empfaenger sein, so bitten wir hoeflich um eine
        Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer
        Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
        Austausch von Informationen und entfaltet keine rechtliche
        Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
        E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

        

        Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas 
le destinataire prévu, nous te demandons avec bonté que pour satisfaire 
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de 
ceci est interdite. Ce message sert à l'information seulement et n'aura pas 
n'importe quel effet légalement obligatoire. Étant donné que les email peuvent 
facilement être sujets à la manipulation, nous ne pouvons accepter aucune 
responsabilité pour le contenu fourni.
        

        

         

        
          Date: Fri, 30 Nov 2012 14:20:42 +0100

          From: t.anneess...@ictjob.be

          To: mgai...@hotmail.com; user@struts.apache.org;
          w.gha...@ictjob.be

          Subject: Re: Inconsistency in Struts2 s:component parameters
          handling

          

          Hi Martin,

            

            Thank you for your time but I am not sure that it answers my
            question. Here is some code to illustrate:

            

            This works:

            <s:component template='HighlightPanel.jsp' 
id="newsletter-subscribe-box">
        <s:param name="title">Welcome to our site</s:param>
        ....
</s:component>

            This does not work:

            <s:component template='HighlightPanel.jsp'>
        <s:param name="title">Welcome to our site</s:param>
        <s:param name="id">newsletter-subscribe-box</s:param>
...
</s:component>

            The "id" parameter is not sent to the "HighlightPanel.jsp"
            component.

            

            In the s:component documentation, there seems
            to be no distinction between the "title" parameter and the
            "id" parameter. Why this inconsistent behavior? Could this
            behavior change in future releases?

            

            Best regard,

            Thim Anneessens.

            

            

            On 11/30/2012 01:56 PM, Martin Gainty wrote:

          
          
            
            
              
                
                  <s:url var="url" action="Welcome">
  <s:param name="request_locale">en</s:param>
</s:url>
<s:a href="%{url}">English</s:a>
                
              
              This param tag will 

              1)add the parameter
                "?request_locale=en" to the Welcome Action
                URL, and 

              2)store it under the name "url". 

              The a tag then injects the "url" reference into
              the hyperlink. This request_locale parameter will be
              picked up by the I18n Interceptor, and change your
              Locale accordingly.

              

              
                Any number of parameters can be added to the URI by
                adding more param tags.

              

              the Struts doc explanation appears to be clear on the use
              of params to build out the parameter(s)  list

              http://struts.apache.org/2.0.11.2/docs/using-tags.html

               

              so in your case title would be request scoped

              id would not be request scope since every component would
              require an id

               

              does this conform to your understanding

              Martin

              ______________________________________________ 

              Verzicht und Vertraulichkeitanmerkung/Note de déni et de
              confidentialité

              

              Diese Nachricht ist vertraulich. Sollten Sie nicht der
              vorgesehene Empfaenger sein, so bitten wir hoeflich um
              eine Mitteilung. Jede unbefugte Weiterleitung oder
              Fertigung einer Kopie ist unzulaessig. Diese Nachricht
              dient lediglich dem Austausch von Informationen und
              entfaltet keine rechtliche Bindungswirkung. Aufgrund der
              leichten Manipulierbarkeit von E-Mails koennen wir keine
              Haftung fuer den Inhalt uebernehmen.

              

              

              Ce message est confidentiel et peut être privilégié. Si vous 
n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour 
satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou 
la copie de ceci est interdite. Ce message sert à l'information seulement et 
n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les 
email peuvent facilement être sujets à la manipulation, nous ne pouvons 
accepter aucune responsabilité pour le contenu fourni.
              

              

               

              
                Date: Fri, 30 Nov 2012 10:56:47
                +0100

                From: t.anneess...@ictjob.be

                To: user@struts.apache.org

                Subject: Inconsistency in Struts2 s:component parameters
                handling

                

                Hello,

                

                We are using Struts 2.3.1.2 and have noticed a strange
                behavior in component parameter handling:

                

                We have a component that uses both an "id" parameter and
                a "title" parameter. 

                

                What is strange is that when we use s:component, the
                "title" parameter value can either be specified using
                the "title" attribute of s:component or a s:param. The
                "id" parameter value can only be specified using the
                "id" attribute of s:component. Using the s:param for
                "id" has no effect. 

                

                There seems to be no pertinent explanation for this
                behavior in the documentation and I was wondering if
                this behavior would evolve in further versions. We are
                currently using s:param to specify our numerous "title"
                parameters and hope that it will always be possible in
                the future. 

                

                Could anyone shed some light on this inconsistent
                behavior?

                

                Best regards,

                -- 

                   
                      Thim Anneessens 

                      IT Department 
                     
                    

                     

                    

                    
                      
                        
                           ictjob.be 

                            Tel: +32 2 725 73 00 

                            Terhulpsesteenweg, 6B 

                            B-1560 Hoeilaart 
                           ictjob.lu 

                            Tel: +352 621 364 792 

                            12, rue Eugène Ruppert 

                            L-2453 Luxembourg 
                           jobtic.fr 

                            Tel: +33 9 81 25 19 66 

                            19 rue Martel 

                            75010 Paris 
                           ticjob.es 

                            Tel: +34 911 25 43 11 

                            Calle Santo Tomé 4, 5B 

                            28004 Madrid 
                           ictjob.de 

                            Tel: +49 711 91 41 07 32 

                            Humboldtstr. 32 

                            70771 Leinfelden-Echterdingen 
                        
                      
                    
                  
                
              
            
          
          

          

          -- 

              Thim
                Anneessens 

                IT Department 
               
              

               

              

              
                
                  
                     ictjob.be
                      

                      Tel: +32 2 725 73 00 

                      Terhulpsesteenweg, 6B 

                      B-1560 Hoeilaart 
                     ictjob.lu 

                      Tel: +352 621 364 792 

                      12, rue Eugène Ruppert 

                      L-2453 Luxembourg 
                     jobtic.fr 

                      Tel: +33 9 81 25 19 66 

                      19 rue Martel 

                      75010 Paris 
                     ticjob.es 

                      Tel: +34 911 25 43 11 

                      Calle Santo Tomé 4, 5B 

                      28004 Madrid 
                     ictjob.de 

                      Tel: +49 711 91 41 07 32 

                      Humboldtstr. 32 

                      70771 Leinfelden-Echterdingen 
                  
                
              
            
          
        
      
    
    

    

    -- 

      
         Thim Anneessens 

          IT Department
        
        
        
        

        
        

        

        
          
            
               ictjob.be 

                Tel: +32 2 725 73 00 

                Terhulpsesteenweg, 6B 

                B-1560 Hoeilaart
              
               ictjob.lu
                

                Tel: +352 621 364 792 

                12, rue Eugène Ruppert 

                L-2453 Luxembourg
              
               jobtic.fr
                

                Tel: +33 9 81 25 19 66 

                19 rue Martel 

                75010 Paris
              
               ticjob.es
                

                Tel: +34 911 25 43 11 

                Calle Santo Tomé 4, 5B 

                28004 Madrid
              
               ictjob.de
                

                Tel: +49 711 91 41 07 32 

                Humboldtstr. 32 

                70771 Leinfelden-Echterdingen
              
            
          
        
      
                                          

Reply via email to