Hi Laurie,
thanks for your attempts.. I give up.. I cannot find in the help how to
submit via email... I have tried.. and this is another attempt with no
openning tag mark "<" ....


--------------- in JSP: (1)  ------------- 

table>
  logic:iterate id="funPro" name="funProForm" property="functionProList ">
  tr>
    td>
      table border="0">                                                 
        tr>
           logic:iterate id="pro" name="funPro" property="pros">
           td>
                html:multibox name="funPro" property="selectedPros">
                   bean:write name="pro" property="label" /> 
                /html:multibox>
          /td>  
          /logic:iterate>                                                       
        
       tr>
    /table>
   /td>
  /tr>
/table>

---------- in JSP: (2) ------------
logic:iterate id="item" name="myForm" property="myList">
td>
  html:multibox property="selectedValues">
    bean:write name="item" property="label" /> 
  /html:multibox>
/td>    
/logic:iterate>




Laurie Harper wrote:
> 
> Sorry, I don't see a repost with the JSP readable so there's still 
> nothing to take another look at :-/
> 
> L.
> 
> houser wrote:
>> Thanks for your reply..
>> I have already changed it by using  tag and the JSP pieces of code are
>> displayed.. can give it another look please?
>> 
>> houser
>> 
>> Laurie Harper wrote:
>>> None of the JSP code made it out of your mail client into the message 
>>> I'm afraid. Try re-posting with your mail program set for plain text 
>>> instead of multipart/mime.
>>>
>>> L.
>>>
>>> houser wrote:
>>>> Hi All,
>>>>
>>>> I am in very strange situation, and stuck! please help, I have found
>>>> one
>>>> thread that much more or less but does not help..
>>>>
>>>> http://www.nabble.com/Check-a-multibox-dynamically-to6630704.html#a6630704
>>>> http://www.nabble.com/Check-a-multibox-dynamically-to6630704.html#a6630704 
>>>>
>>>> I have already use some example and it works.. Now the situation is
>>>> lsightly
>>>> different:
>>>>
>>>> I have a form:
>>>>
>>>> ------------ Start Code ------------
>>>>
>>>>
>>>> .... FunctionProForm extends ActionForm {
>>>>     private List functionProList = new ArrayList();
>>>>     
>>>>     ...
>>>>
>>>>    public List getSelectedPros(FunctionDto fun){
>>>>
>>>>            List result = new ArrayList();
>>>>            for(FunProMap fp : functionProList){
>>>>
>>>>                    if(fp.getFunction().getName().equals(fun.getName())){
>>>>
>>>>                            for(int i = 0; i < fp.getSelectedPros().length; 
>>>> i++){
>>>>                                    result.add(fp.getSelectedPros()[i]);
>>>>                            }
>>>>                            return result;
>>>>                    }
>>>>            }
>>>>
>>>>            return result;
>>>>    }
>>>> }
>>>>
>>>>
>>>> ------    the serializable object FunProMap  ------------------
>>>>
>>>>
>>>> public class FunProMap implements Serializable{
>>>>
>>>>    private static final long serialVersionUID = 1L;
>>>>
>>>>    private FunctionDto function = new FunctionDto();
>>>>    private List pros = new ArrayList();
>>>>    private String[] selectedPros = {};
>>>>
>>>> ....
>>>> }
>>>>
>>>>
>>>> --------------- in JSP: -------------
>>>>
>>>>
>>>>
>>>>   
>>>>   
>>>>
>>>>            
>>>>       
>>>>                                                    
>>>>         
>>>>
>>>>            
>>>>                    
>>>>            
>>>>                        
>>>>            
>>>>            
>>>>                                                                    
>>>>        
>>>>
>>>>     
>>>>
>>>>    
>>>>   
>>>>
>>>>
>>>>
>>>>
>>>> --------------------- in the SaveAction ----------------------
>>>>
>>>>
>>>> .... SaveAction extends Action {
>>>>   protected ActionForward doExecute(ActionMapping mapping, 
>>>>                     ActionForm form, HttpServletRequest request,
>>>> HttpServletResponse response){
>>>>
>>>>      FunctionProForm myForm = (FunctionProForm) form;
>>>>      ...
>>>>
>>>>      List functions = myService.listFunctions();
>>>>
>>>>      for(FunctionDto fun : functions){
>>>>
>>>>         fun.setPros(myForm.getSelectedPros(fun));
>>>>    
>>>>    myService.updateFunction(fun);
>>>>     }
>>>>     ....
>>>>     return mapping.findForward("success");
>>>>    }
>>>> }
>>>>
>>>>
>>>> ------------ End Code ------------
>>>>
>>>> The check boxes are populated correctly from the database, i.e. for
>>>> each
>>>> FUnction, the corresponding checkbos is checked according to the list
>>>> of
>>>> available Pros (function.pros).
>>>>
>>>> The problem is that if I edit these boxes, check and uncheck, and click
>>>> the
>>>> Submit button, the changed is not saved to the database.
>>>>
>>>> I have run the debug and find that the method
>>>> myForm.getSelectedPros(fun)
>>>> returns the old values but not the new checked-unchecked boxes' values
>>>> :-(
>>>> !!
>>>>
>>>> I have used  with a simple form according to:
>>>>
>>>> http://www.jguru.com/faq/view.jsp?EID=925277
>>>> http://www.jguru.com/faq/view.jsp?EID=925277 
>>>>
>>>>
>>>> MyForm extends ActionForm {
>>>>   List myList;
>>>>   String[] selectedValues;
>>>>   // ....
>>>> }
>>>>
>>>>
>>>> and
>>>>
>>>>
>>>>
>>>>
>>>>   
>>>>      
>>>>   
>>>>    
>>>>
>>>>
>>>>
>>>> and this works fine..
>>>>
>>>> Please help...
>>>>
>>>> ruga
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html%3Amultibox-read-but-not-write-tp17100080p17134793.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to