[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sdx-users] xsp:attribute
From: |
Pierrick Brihaye |
Subject: |
Re: [sdx-users] xsp:attribute |
Date: |
Tue, 05 Mar 2002 16:46:17 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 |
Rui AVELINO wrote:
j'ai du mal a comprendre ...
quelque chose de particulier empêche de faire la commande suivante ?
<sdx:executeFieldQuery fieldParam="indexSet" valueParam="texte_a_rechercher"
sfParams="tri">
Euh... indexSet, c'est une *variable* que je récupère dans un paramètre
(un SUBMIT)
Présenté comme tel, tu la considères comme une *constante*.
Je joins mon code pour examen. Inutile de dire que cette solution
temporaire ne me plaît pas, mais bon, ça tourne...
String indexSet = "xxx";
String baseQuery = sdxRequest.getParameter("baseQuery");
String baseOperator = sdxRequest.getParameter("baseOperator");
boolean useJokers = (sdxRequest.getParameter("usejokers") != null);
if (sdxRequest.getParameter("recherche").equals("Rechercher dans
l'index")) indexSet = "primary";
else if (sdxRequest.getParameter("recherche").equals("Rechercher dans le
metaindex")) indexSet = "metaindex";
//solution temporaire
if (indexSet == "primary")
{
if (useJokers)
{
if ((baseQuery != null) && (baseOperator != null))
{
<sdx:executeFieldQuery fieldParam="primary" valueParam="query"
bqParam="baseQuery" boParam="baseOperator" sfParams="tri"/>
}
else
{
<sdx:executeFieldQuery fieldParam="primary" valueParam="query"
sfParams="tri"/>
}
}
else
{
if ((baseQuery != null) && (baseOperator != null))
{
<sdx:executeExactFieldQuery fieldParam="primary"
valueParam="query" bqParam="baseQuery" boParam="baseOperator"
sfParams="tri"/>
}
else
{
<sdx:executeExactFieldQuery fieldParam="primary"
valueParam="query" sfParams="tri"/>
}
}
}
else if (indexSet == "metaindex")
{
if (useJokers)
{
if ((baseQuery != null) && (baseOperator != null))
{
<sdx:executeFieldQuery fieldParam="metaindex" valueParam="query"
bqParam="baseQuery" boParam="baseOperator" sfParams="tri"/>
}
else
{
<sdx:executeFieldQuery fieldParam="metaindex" valueParam="query"
sfParams="tri"/>
}
}
else
{
if ((baseQuery != null) && (baseOperator != null))
{
<sdx:executeExactFieldQuery fieldParam="metaindex"
valueParam="query" bqParam="baseQuery" boParam="baseOperator"
sfParams="tri"/>
}
else
{
<sdx:executeExactFieldQuery fieldParam="metaindex"
valueParam="query" sfParams="tri"/>
}
}
}
--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:address@hidden