| View previous topic :: View next topic |
| Author |
Message |
neuron
Joined: 14 Oct 2006 Posts: 4
|
Posted: Sat Oct 14, 2006 8:13 pm Post subject: Populate ListBox B based on the value selected in ListBox A |
|
|
Hi there!
I have two list boxes (drop downs) on a tab. Say one is A and other is B.
I want to Populate ListBox B based on the value selected in ListBox A.
If I use sql validation while defining the Reference for ListBox B, It works but only at the start of the tab only once. I want the listBox B to be populated every time the value ListBox A is changed.
If I have to use CallOut then how to populate the ListBox B (Reference Type) from within the CallOut.
Thanks in Advance.  |
|
| Back to top |
|
 |
red1 Site Admin
Joined: 06 Jul 2004 Posts: 1756 Location: Kuala Lumpur, Malaysia
|
Posted: Sat Oct 14, 2006 8:26 pm Post subject: |
|
|
After u use the Callout, u may have to refresh to get the new value. I dont think this webstart works like Ajax does for Web UI. That may take some time in the ADempiere project.
Using Callout to change the value of another field is shown in my tutorial Callout.pdf. As a Callout updates a value in the DB, it wont be shown on screen until refresh. |
|
| Back to top |
|
 |
neuron
Joined: 14 Oct 2006 Posts: 4
|
Posted: Sat Oct 14, 2006 9:11 pm Post subject: |
|
|
| red1 wrote: | After u use the Callout, u may have to refresh to get the new value. I dont think this webstart works like Ajax does for Web UI. That may take some time in the ADempiere project.
Using Callout to change the value of another field is shown in my tutorial Callout.pdf. As a Callout updates a value in the DB, it wont be shown on screen until refresh. |
First things first! thank you for prompt reply
Well my question is not about Web UI, it is about Windows UI.
I had a bird's eye view of your callout tutorial. In case I need to use CallOut, then the question is how to populate a listBox from CallOut? |
|
| Back to top |
|
 |
red1 Site Admin
Joined: 06 Jul 2004 Posts: 1756 Location: Kuala Lumpur, Malaysia
|
Posted: Sat Oct 14, 2006 11:29 pm Post subject: |
|
|
Its a challenging scenario u posed there - populating a list box dynamically? So that when u pull down it has values due to the values entered in another field? Well, that can be done. Your callout will have to seek and populate the AD_Validation value by searching the right record id. Back of my head i say it can be done. But still u have to refresh the screen to make it appear in the list.
I am refering to Ajax UI cos it is known to be able to do that easily. |
|
| Back to top |
|
 |
neuron
Joined: 14 Oct 2006 Posts: 4
|
Posted: Mon Oct 16, 2006 6:56 pm Post subject: |
|
|
| red1 wrote: | ...populating a list box dynamically? So that when u pull down it has values due to the values entered in another field?...
|
Yes you got my point. This is what I was trying to ask. Ok, now the question is, if I don't want to do it in callout, is it possible without it?
Let me summarize now!
There is a ListBox; A
There is another ListBox; B
I Select a Value from A.
I want ListBox B to change its contents based upon the contents of A.
Can I make it work without using CallOut? If yes, HOW?
In Case of CallOut (as you have mentioned earlier); can I find any example already developed in core compiere modules? I want to copy their methond |
|
| Back to top |
|
 |
red1 Site Admin
Joined: 06 Jul 2004 Posts: 1756 Location: Kuala Lumpur, Malaysia
|
Posted: Mon Oct 16, 2006 9:40 pm Post subject: |
|
|
AS i said, its a straightforward callout to set the value at the right record in the Ad_ValidationList (not sure of exact table).
About displaying, i got a further idea here. Why dont u use two tabs instead of one?
The second tab holds the target list field. When u input the values in tab one, then u go to next tab, voila! that tabs hold the fresh values in its list.
Just an idea.. There are more... no stopping u from trying further.
gud luck!
red1 |
|
| Back to top |
|
 |
neuron
Joined: 14 Oct 2006 Posts: 4
|
Posted: Tue Oct 17, 2006 12:35 am Post subject: |
|
|
| red1 wrote: | About displaying, i got a further idea here. Why dont u use two tabs instead of one?
|
This is what i am doing already . Anyways! thank you for valuable suggestions. I shall give them a try!  |
|
| Back to top |
|
 |
|