cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michel Erard <michel.er...@corix.ch>
Subject Problem in flow
Date Mon, 23 Jun 2008 14:15:28 GMT
Hello, 

I've a site with a flow like this:

on a search mask a user can enter some conditions --> after the results
are shown in a list --> there the user can choose one and de detail is
displayed.

Every step on a different page.

On every of these pages, the user can change the langauge. For this I've
links like this on the page:

<a href="?locale=fr">f</a>

On the search and detail page the changing of the language is no
problem, but when the action is made on the result list, the user gets
on the search page that is empty and showing validation errors as if the
user didn't made some input.

Does someone see, what's going wrong?

Here my code:

function search() 
{ 
        var resultList; 
        var form = newForm("search_model.xml");  
        var searchRequest =
WebServiceRequestFactory().createSearchRequest(); 
        var userId =
cocoon.session.getAttribute(ParameterLoadAction.USER_ID); 
       
                
        searchRequest.setUserId(userId);        
     
        form.createBinding("search_binding.xml"); 
        
    
       
        while(true){ 
                form.load(searchRequest); 
                form.showForm("search.form"); 

                var action = form.submitId; 
                form.save(searchRequest); 

                // search clicked 
                if(action != null && action.equals("search")){ 
                           try { 
                             resultList =
BridgeFactory.getInstance().getSearchBridge().search(userId,searchRequest).getResults(); 

                             searchResult(resultList); 
                           } catch(exception){ 
		               //errorhandling
                           }                          
                 }           
        } 
} 

function searchResult(resultList) 
{                
        var form = newForm("searchResult_model.xml"); 
        var response =new SearchResultTO();  

        form.createBinding("searchResult_binding.xml"); 
        form.load(response); 
        
        while(true) 
        { 
                form.showForm("searchResult.form",{list:resultList}); 
                form.save(response); 
                  
                var rowIdx = response.getSelectedRow(); 
                if(rowIdx > -1){ 
                    try { 
                            var detail = resultList.get(rowIdx)); 
                            showDetail(detail); 
                     } catch (exception) { 
                        	//errorhandling
                    } 
                } 
        } 
} 

Thanks for your hints, 

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message