Re: Field not binding.
OK, all I did was copy an existing field and, through a process of elimination, created the a new field similar to the old one and it works. The only difference is the name and the position in the various files. Weird. I would dwell on this, but I have other things to do. Thanks for the help Simone. Kamal Bhatt wrote: Simone Gianni wrote: Hi Kamal, I can't see anything wrong with your binding, except fb:identityfbvalue id=position path=position//fb:identity where fdvalue should be fb:value, but this would prevent your repeater from binding correctly also all other fields in the repeater, so I think this is a typo in your mail rather than in your form. Try to set it required=true, this will cut your problem : if the form returns a validation error, then the form is not receiving the value, so maybe the problem is in the HTML/XSL or somewhere else after the form itself, while if it does not return a validation error, then the forms receives the value, so the problem is in the binding/bean. I tried this, validation works correctly, so the problem is with the binding. Another suggestion could be to run cocoon in debug mode, connect to it with your IDE, and place a breakpoint both in Information.getChannelInfo and Information.setChannelInfo to see if they are called and if the proper values are passed. This will again cut your problem, if setter is called correctly then the problem is not in binding, if it's not called then it is in binding. I don't have easy access to an IDE so I used log4j and logged it that way. The log statements are never called (I am pretty sure I am using the logger correctly as I am logging a field I know is working.) I have also tried renaming the field (twice). I am using an OJB mapping, but I have saved the data to the bean without saving to the database and my log messages for channel remain uncalled. Curious thing about the OJB though is that even that doesn't trigger the log messages, which leads me to conclude that the problem with the whatever mechanism is used to guess the get/set routines. Here are the interfaces for my get/set routines: public int getChannelInfo() {...} public void setChannelInfo(int inChannelInfo) {...} and the attribute: private int mChannelInfo; Any help would be appreciated. -- Kamal Bhatt -- Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Field not binding.
Hi Kamal, I can't see anything wrong with your binding, except fb:identityfbvalue id=position path=position//fb:identity where fdvalue should be fb:value, but this would prevent your repeater from binding correctly also all other fields in the repeater, so I think this is a typo in your mail rather than in your form. Try to set it required=true, this will cut your problem : if the form returns a validation error, then the form is not receiving the value, so maybe the problem is in the HTML/XSL or somewhere else after the form itself, while if it does not return a validation error, then the forms receives the value, so the problem is in the binding/bean. Another suggestion could be to run cocoon in debug mode, connect to it with your IDE, and place a breakpoint both in Information.getChannelInfo and Information.setChannelInfo to see if they are called and if the proper values are passed. This will again cut your problem, if setter is called correctly then the problem is not in binding, if it's not called then it is in binding. Let me know. Simone Kamal Bhatt wrote: Hi I have a form binding to a java bean. I needed to add an integer value to this bean and the associated template/form/bindings. The field is part of a repeater and it displays on the form (It uses a selection list) but when I save the form to the bean, it does not save the field. All other fields on the form save correctly. The field (on the form) is called channel_info, on the bean it is channelInfo. The binding structure looks something like this: fb:context ... fb:repeater id=information parent-path=. row-path=information fb:identityfbvalue id=position path=position//fb:identity fb:on-bind ... fb:value id=channel_info path=channelInfo/ ... /fb:on-bind fb:on-insert-row fb:insert-bean classname=creative.beans.Information addmethod=addInformation/ /fb:on-insert-row fb:repeater .. /fb:context The form definition looks like this: fd:repeater id=information ... fd:widgets ... fd:field id=channel_info required=false fd:labelChannel/fd:label fd:datatype base=integer/ fd:selection-list src=cocoon:/channel_list/ /fd:field ... /fd:widgets ... /fd:repeater In the Information bean I have an attribute called mChannelInfo of type Integer (I have also tried using int) and get/set routines. I am using cocoon 2.1.7 . The channel_list pipeline is being used elsewhere, so is probably correct (and it still doesn't work without it).. Any ideas why this will not bind? Cheers. -- Simone Gianni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Field not binding.
Simone Gianni wrote: Hi Kamal, I can't see anything wrong with your binding, except fb:identityfbvalue id=position path=position//fb:identity where fdvalue should be fb:value, but this would prevent your repeater from binding correctly also all other fields in the repeater, so I think this is a typo in your mail rather than in your form. Try to set it required=true, this will cut your problem : if the form returns a validation error, then the form is not receiving the value, so maybe the problem is in the HTML/XSL or somewhere else after the form itself, while if it does not return a validation error, then the forms receives the value, so the problem is in the binding/bean. I tried this, validation works correctly, so the problem is with the binding. Another suggestion could be to run cocoon in debug mode, connect to it with your IDE, and place a breakpoint both in Information.getChannelInfo and Information.setChannelInfo to see if they are called and if the proper values are passed. This will again cut your problem, if setter is called correctly then the problem is not in binding, if it's not called then it is in binding. I don't have easy access to an IDE so I used log4j and logged it that way. The log statements are never called (I am pretty sure I am using the logger correctly as I am logging a field I know is working.) I have also tried renaming the field (twice). I am using an OJB mapping, but I have saved the data to the bean without saving to the database and my log messages for channel remain uncalled. Curious thing about the OJB though is that even that doesn't trigger the log messages, which leads me to conclude that the problem with the whatever mechanism is used to guess the get/set routines. Here are the interfaces for my get/set routines: public int getChannelInfo() {...} public void setChannelInfo(int inChannelInfo) {...} and the attribute: private int mChannelInfo; Any help would be appreciated. -- Kamal Bhatt -- Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]