I too have trouble with this stuff all the time... if it is a stateless components where does qtyForSynthManifestTransaction get stored? Do you have automatic binding turned off as well?
On Nov 14, 2012, at 3:51 PM, Pascal Robert <[email protected]> wrote: > I think I still have to understand a couple of things about components. So I > have a component that display a table where each row is coming from a > WORepetition. Inside each row, I have a column that calls a stateless > sub-component: > > <td class="manifest_column"> > <wo:BuildManifest selectedProject="$selectedProject" > spec="$childSpec.spec" transactions="$~transactionsForSpec(childSpec.spec)" > employee="$~employee" rootTransaction="$rootTransaction" /> > </td> > > In BuildManifest, I have the following code: > > <wo:loop list="$spec.parts" item="$partItem"> > <wo:if condition="$spec.isLotInventory"> > <wo:str value="$partItem.serialNumber" /> > </wo:if> > <wo:textfield value="$qtyForSynthManifestTransaction" size="4" > numberformat="#" style="padding: 0px; margin: 0px;" /> > <wo:if condition="$spec.isLotInventory"> > <wo:AjaxSubmitButton updateContainerID="$spec.inventoryNumber" > value="SM" action="$~createSyntheticTransactionFromPart(partItem)" /> <br /> > </wo:if> > <wo:else> > <wo:AjaxSubmitButton updateContainerID="$spec.inventoryNumber" > value="SM" action="$~createSyntheticTransactionFromSpec()" /> > </wo:else> > </wo:loop> > > qtyForSynthManifestTransaction is a Integer, with a setter and a getter in > BuildManifest.java. Now, if I submit the form, > setQtyForSynthManifestTransaction is called with the value that I submitted, > that's fine, but the setter is called a second time, and it sets the value to > null, so when createSyntheticTransactionFromSpec or > createSyntheticTransactionFromPart are finally called, the quantity is set to > null! > > I have put a breakpoint on the awake method in BuildManifest, and awake() is > called as many time as I have rows in my table. So for example, if I had 10 > rows, BuildManifest is called 10 times. After the first awake, > setQtyForSynthManifestTransaction is called to the correct value, after than > awake() is called a couple of times and boum! > setQtyForSynthManifestTransaction is called with a null value! > > So what's the trick? > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
