[GeoNetwork-users] default region in simple search form

Hi

I'd like to set the default region for the regions combobox in the simple
search form. In searchform_simple_template.xsl there is the code to make
this possible :
<xsl:if test="id=/root/gui/searchDefaults/region">
                                    <xsl:attribute name="selected"/>
</xsl:if>

But I have not found which file to modify to set the corresponding
"searchDefaults/region" value ?
Thanks
Yves.

Hi Yves,

On Thu, Aug 27, 2009 at 10:42 PM, Yves Gillet <ygillet@anonymised.com> wrote:

Hi

I'd like to set the default region for the regions combobox in the simple
search form. In searchform_simple_template.xsl there is the code to make
this possible :
<xsl:if test="id=/root/gui/searchDefaults/region">
                                   <xsl:attribute name="selected"/>
</xsl:if>

But I have not found which file to modify to set the corresponding
"searchDefaults/region" value ?

The default value of the combobox is "Any" or empty depending on the
combobox.
But the searchDefaults value is the value of the combobox for the last
search, so if it was the default one it will be the same, but if you changed
it during last search you will have the last selected value.

If you don't care about the last search value and if you want to set up your
own default value you have to test it with your xsl test and then select it.

ciao,

Mathieu

Thanks

Yves.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hi Mathieu

merci pour l'info. Unfortunately I'd like to also keep the last search
region value, but also set it to a default value (other than Any) at the
first user load .
As I've digged the code, the searchDefault values are hard coded in class
.guiservices.search.GetDefaults and it would have it be nice if these were
externally configurable.

Thanks,
Yves
2009/9/2 Mathieu Coudert <mathieu.coudert@anonymised.com>

Hi Yves,

On Thu, Aug 27, 2009 at 10:42 PM, Yves Gillet <ygillet@anonymised.com> wrote:

Hi

I'd like to set the default region for the regions combobox in the simple
search form. In searchform_simple_template.xsl there is the code to make
this possible :
<xsl:if test="id=/root/gui/searchDefaults/region">
                                   <xsl:attribute name="selected"/>
</xsl:if>

But I have not found which file to modify to set the corresponding
"searchDefaults/region" value ?

The default value of the combobox is "Any" or empty depending on the
combobox.
But the searchDefaults value is the value of the combobox for the last
search, so if it was the default one it will be the same, but if you changed
it during last search you will have the last selected value.

If you don't care about the last search value and if you want to set up
your own default value you have to test it with your xsl test and then
select it.

ciao,

Mathieu

Thanks

Yves.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork