users@woodstock.java.net

Re: Hidden field for "remembering" an old value.

From: Quintin Beukes <quintin_at_last.za.net>
Date: Mon, 21 Jul 2008 15:18:56 +0200

Hey,

My second question is if I can have it reference the same value, but the
change in one, doesn't change both.

So basically, TextField references object.id by reference (meaning changing
the text field changes the object value).

And HiddenField references object.id by value (copies the value), so
changing it doesn't change object.id, and changing textfield doesn't changed
hidden field's value. Basically a way to store and post the "original"
value.

Q

On 7/21/08, Stefan Bley <stefan.bley_at_saxsys.de> wrote:
>
>
> Regarding question (1)
>
> If you bind your tableRowGroup's sourceData to a object list data provider
> you can get the current lamp like this:
>
> public Object getSelectedObject() {
> try {
> for (RowKey rowKey : getRgReaders().getSelectedRowKeys()) {
> return this.myObjectListDataProvider().getObject(rowKey);
>
> }
> } catch (Exception e) {
> }
> return null;
> }
>
> I don't really understand your second question. You *don't* want it
> reference the same value as the textfield?
>
> Stevy
>
>
>
> Q Beukes wrote:
> >
> > Hey,
> >
> > I have the following:
> > <webuijsf:table id="gridReaders" paginateButton="true"
> > paginationControls="true">
> > <webuijsf:tableRowGroup binding="#{ConfigLamps.rgReaders}"
> > id="rgReaders" rows="10"
> > sourceData="#{ConfigLamps.readers}" sourceVar="currentRow">
> > <webuijsf:hiddenField binding="#{ConfigLamps.readerId}"
> > converter="#{ConfigLamps.integerConverter}"
> > id="readerId" text="#{currentRow.value['id']}"/>
> > <webuijsf:tableColumn sort="id">
> > <webuijsf:textField binding="#{ConfigLamps.txtReaderID}"
> > converter="#{ConfigLamps.integerConverter}"
> > id="txtReaderID" text="#{currentRow.value['id']}"
> >
> >
> valueChangeListenerExpression="#{ConfigLamps.readerData_processValueChange}"/>
> > </webuijsf:tableColumn>
> > </webuijsf:tableRowGroup>
> > </webuijsf:table>
> >
> >
>
>
> --
> View this message in context:
> http://www.nabble.com/Hidden-field-for-%22remembering%22-an-old-value.-tp18559843p18565295.html
>
> Sent from the Project Woodstock - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>


-- 
Quintin Beukes