Hi,
I've a problem with my page flow when the user changes the language.
I show a search site, where the user can make the query, he submitts and a page
with the found items is showed. There he can choose one an becames a detailed
view. Nothing special.
On every of these three pages, I have some links to change the language. The
link points on the current page with a postfix for the selected language:
[url]?locale=en for example.
This works for the search and the detail page. But changes the user the
language on the result list page. The search page is displayed and the
validation runs. So in fact it's the search page with some validation errors,
because there isn't any input on the form.
I thing it's something with the continuation, but I don't understand. Can
someone please give mit a hint?
Here's my flowscript (cocoon 2.2).
function search()
{
var carList;
var form = new Form("pages/forms/car/search_model.xml");
var carSearchRequest = new CarSearchRequest();
form.createBinding("pages/forms/car/search_binding.xml");
form.load(carSearchRequest);
// while -> to loop until all the fields in case of ruecksetzen
while(true) {
form.showForm("carSearch.form");
var action = form.submitId;
form.save(carSearchRequest);
// search clicked
if(action != null && action.equals("search")) {
carList =
BridgeFactory.getInstance().getCarBridge().searchCars(carSearchRequest);
searchResult(carList);
}
}
}
function searchResult(carList)
{
var form = new Form("pages/forms/car/searchResult_model.xml");
form.createBinding("pages/forms/car/searchResult_binding.xml");
var resultTo = new ResultTo(carList);
form.load(resultTo);
while(true)
{
form.showForm("searchResult.form");
form.save(resultTo);
var rowIdx = resultTo.getSelectedRow();
if(rowIdx > -1) {
var car =
BridgeFactory.getInstance().getCarBridge().getCar(carList.get(rowIdx));
carDetail(car);
}
}
}
function carDetail(car) {
//...
}
Thanks Mike