red1.org Forum Index red1.org
Nihili est - in vita priore ego imperator romanus fui
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Populate ListBox B based on the value selected in ListBox A

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    red1.org Forum Index -> Ask RED1 personally
View previous topic :: View next topic  
Author Message
neuron



Joined: 14 Oct 2006
Posts: 4

PostPosted: Sat Oct 14, 2006 8:13 pm    Post subject: Populate ListBox B based on the value selected in ListBox A Reply with quote

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. Smile
Back to top
View user's profile Send private message Send e-mail
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Sat Oct 14, 2006 8:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
neuron



Joined: 14 Oct 2006
Posts: 4

PostPosted: Sat Oct 14, 2006 9:11 pm    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message Send e-mail
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Sat Oct 14, 2006 11:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
neuron



Joined: 14 Oct 2006
Posts: 4

PostPosted: Mon Oct 16, 2006 6:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Mon Oct 16, 2006 9:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
neuron



Joined: 14 Oct 2006
Posts: 4

PostPosted: Tue Oct 17, 2006 12:35 am    Post subject: Reply with quote

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 Smile . Anyways! thank you for valuable suggestions. I shall give them a try! Cool
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    red1.org Forum Index -> Ask RED1 personally All times are GMT + 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group