Don,

Wtihout your WOD file, it's difficult to determine what is going wrong. My first guess is that you don't have the binding for the WOCheckbox set correctly - a common mistake... you should be binding to the 'checked' attribute. I assume the numerics are 0 and 1 ?

Ken

On Jun 12, 2006, at 10:22 AM, Don wrote:

Hello All;


I am using WO 5.3 on Tiger with an Oracle 10G 10.0.3.0 database. I am able to render a listing of people with two checkboxes (the fields in the database are numeric for these checkboxes) The fields are named trainer and custodian.

Everything renders correctly, puling the correct data etc. However if I check any of the boxes then press my save button (which is a submit) (WORepetition and Submit are inside a form). It does not appear any changes are being saved.

I have included the source from page as well as the java source, eo model class, and table structure.

Please help, I am sure it is something small that is causing the error.

Thanks,

Don Lindsay

Java Source:

public void appendToResponse(WOResponse response, WOContext context) {
                EOFetchSpecification fetchSpec = null;
                EOEditingContext ec = null;
                try{
                        ec = session().defaultEditingContext();
                        fetchSpec = new EOFetchSpecification("Agent",null,null);
                                
//EOFetchSpecification.fetchSpecificationNamed("byName","Agent");
                        NSArray tempT = 
ec.objectsWithFetchSpecification(fetchSpec);
                        AgentList = new NSMutableArray(tempT);
            WXDebug.println(7, "AgentList:"+AgentList.count());
        } catch(Exception e){
            WXDebug.println(1, "e:"+e);
            e.printStackTrace();
        } finally{
            super.appendToResponse(response,context);
        }
        }
        
    public WOComponent saveAgent()
    {
                EOEditingContext ec = null;
                try{
                        ec = session().defaultEditingContext();
                        //WXDebug.println(1,);
                        ec.saveChanges();
            WXDebug.println(1, "Agents.java:saveAgent()");
                } catch( Exception e) {
WXDebug.println(1, "An Error Occurred in Agents.java:SaveAgent() error:"+e);
          e.printStackTrace();
                } finally {
                  //ec.unlock();
        }
        return null;
    }


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lists% 40anderhome.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to