Skip to Content
avatar image
Former Member

passing context data to table ( table binding )

Hi Friends

I have very strange problem.

I want to pass data from my context fields to my table using bind_table method. Actually I am facing some problem in that

I have context node named workstation.

Workstation <node>

serial_num <attribute>

works_name <attribute>

I have two input fields in that user inserts values. this input fields are mapped with workstation nodes attributes. I have a button that adds the user input fields to table. on addaction

now what happend. i get duplicate values for first time entry. if user enters second time its fine no duplicate entries. if i clear the context node before binding the table i have all the correct entries but it start from the empty row in the table ui. if i select the display not black something property to false it shows me the blank line any way.

without clearing the context my records are like this

s00042253 sony vio

s00023423 dell vostro

s00042344 hpcomp 2310

s00043353 sony vio <-duplicate record

after clearing the context output is like this

<--- blank line

s00023423 dell vostro

s00042344 hpcomp 2310

s00043353 sony vio

can any one tell me how can i insert records correctly. your any help will be appreciated,

p.s: tale shares the same context node what is shared by those two input fields.

Thanks Regards

Naeem

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 16, 2011 at 04:14 PM

    Hi, Naeem

    It is really duplicated?

    s00042253 sony vio

    s00043353 sony vio <-duplicate record

    As i see it, those are 2 different records, its the same model, but 2 different serial numbers (from 2 workstations).

    Besides, it looks like when clearing the context you are just deleting the first row content, not the first row itself.

    For clearing the context you should use

    wdContext.nodeWorkstation().invalidate();

    PD: What cardinality are you using for the Workstation node?.

    Regards

    Julio Herrera

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Good morning Julio!

      Thank you so much for your kind help, problem was due to incorrect cardinality. thanks to u i see and change it.

      Regards

      Naeem