Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Long tabular form checkboxes not working right. (APEX 3.2)
Long tabular form checkboxes not working right. [message #539905] Thu, 19 January 2012 04:44 Go to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Hi,

I'm having a problem with a long tabular form with checkboxes. Its basically just a list and you select the things that are relevant to you using the checkboxes then a PL/SQL process updates the database accordingly:
Delete from LEGAL_PERSON_SPOKEN_LANGUAGE
where MUID = :P19_MUIDD;
FOR i in 1..APEX_APPLICATION.G_F09.count
LOOP
if APEX_APPLICATION.G_F09(i) is not null then
   insert into legal_person_spoken_language(MUID, language_code)
   values(:P19_MUIDD, APEX_APPLICATION.G_F09(i));
end if;
END LOOP;

as I say, its a long list. So its on more than 1 page (I mean you have to click 'next' at the bottom to see everything) and this is what seems to be the problem.
Lets say there are 10 rows and it displays 5 at a time.
Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.
I want to select 1, 3, and 9 so I select 1 and 3 on the first page then click 'next' and select 9 on the second.
If I then submit when I'm on the second page, only the 9 gets enterred into the database. If I submit when I'm on the first page only the 1 and 3 get submitted...so it only submits the ones you've selected on the current page...
I'm really sure why it should do that...surely once the checkboxes are selected, thats that?
I don't know if this is something other people have encountered...I couldn't find anything helpfull online so...yeh

thanks Smile

source for the tabular form:
select 
ea.language_code,
ea.language_name name,
APEX_ITEM.CHECKBOX(9,ea.language_code,DECODE(lpea.language_code,null,'','CHECKED') ) sel
from LEGAL_PERSON_spoken_language lpea, spoken_language ea
where MUID (+)= :P19_MUID
  and lpea.language_code (+)= ea.language_code
order by muid, language_name



EDIT: oh I'll just add that I have checked going back to a page where I've selected something and the checkbox is no longer checked...

[Updated on: Thu, 19 January 2012 04:47]

Report message to a moderator

Re: Long tabular form checkboxes not working right. [message #540174 is a reply to message #539905] Fri, 20 January 2012 09:41 Go to previous messageGo to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
I'm guessing no one knows how to fix it :/ I think its just a problem with APEX 3.2 because its I noticed its happening to a different table aswell, just that one doesn't matter because I'm just using the checkboxes for deleting so it doesn't matter if you can only do it one page at a time...

Can anyone think of another way of setting it out? Is it possible to put a scroll bar on it maybe?
I would rather have it in this checkbox form if possible...a guy I know suggested creating another table (hidden) that users wouldn't change and then instead of deleting all the data for that MUID and then Inserting it all into the database, make a process that compares the two to see what needs updating...but I don't think that would make any difference would it? you'd still need to have the next and previous buttons so some values would become deselected as soon as you did...
short of displaying all 176 in one looong page...I can't think of anything
Re: Long tabular form checkboxes not working right. [message #540375 is a reply to message #540174] Mon, 23 January 2012 02:51 Go to previous message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Found this: http://atulley.wordpress.com/2007/06/14/apex-using-scrollbars-in-a-region/
Solved it perfectly Smile
Previous Topic: How to change the size of a picture on the page
Next Topic: Web self service app working in IE8 but not IE9
Goto Forum:
  


Current Time: Sat Oct 24 19:21:54 CDT 2020