<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
        {mso-style-priority:99;
        mso-style-link:"Corps de texte Car";
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoSalutation, li.MsoSalutation, div.MsoSalutation
        {mso-style-priority:99;
        mso-style-link:"Salutations Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.SalutationsCar
        {mso-style-name:"Salutations Car";
        mso-style-priority:99;
        mso-style-link:Salutations;
        font-family:"Times New Roman","serif";}
span.CorpsdetexteCar
        {mso-style-name:"Corps de texte Car";
        mso-style-priority:99;
        mso-style-link:"Corps de texte";
        font-family:"Times New Roman","serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-CA link=blue vlink=purple><div class=WordSection1><p class=MsoSalutation>Hello Chris,<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoBodyText>Yes you can, you need to make a query on your server to get the GetCapabilities XML (a list of all the available layers and options).<o:p></o:p></p><p class=MsoBodyText>The GeoExt.data.WMSCapabilitiesStore can make the query for you by giving it an URL. Then, it will return you a set of records. Afterward with the records, you can generate manually a Tree for a greater flexibility.<o:p></o:p></p><p class=MsoBodyText>Otherwise, I think you can use GeoExt.tree.WMSCapabilitiesLoader to generate the Tree automatically for you. <o:p></o:p></p><p class=MsoBodyText><o:p> </o:p></p><p class=MsoBodyText>Here is an exemple of a valid XML file :<o:p></o:p></p><p class=MsoBodyText>http://api.geoext.org/1.1/examples/data/wmscap.xml<o:p></o:p></p><p class=MsoBodyText><br>François<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=FR style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span lang=FR style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@geoext.org [mailto:users-bounces@geoext.org] <b>De la part de</b> Christoph Mayrhofer<br><b>Envoyé :</b> 18 avril 2013 10:05<br><b>À :</b> users@geoext.org<br><b>Objet :</b> [Users] Add all geoserver layers automatically<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p>Hi,<o:p></o:p></p><p>I saw some examples that had a List of available layers and a button that you could click to add a selected layers to the map.<br>Is it possible to have all layers on a Geoserver instance automatically added to the map.<br>This would eliminate the need to change the JS code when a new layer is added to Geoserver.<o:p></o:p></p><p>regards, Chris<o:p></o:p></p><div><p class=MsoNormal> <o:p></o:p></p></div></div></body></html>