Creating a databound JSP pop-list (with dependent values)
I was able to create a databound JSP pop-list from the "How To Create a Databound Pop-list with Oracle JDeveloper 10g" article. Where would I have to modify the code so that I can define a WHERE clause to the DepartmentView object so that only a subset of values are displayed? My goal is to try to create pop-lists so that the values of pop-list #2 is dependent on the current value in pop-list #1.
You can create both static values and also
values based on record group .
I think you know how to create static values.
(for static just give the values in "Element List" property of list item)
Using Record group. see this example.
Declare
Rg_Id RecordGroup;
Rg_Name varchar2(20) := 'Type';
List_Id Item;
Temp Number;
Rowcount Number;
Begin
Rg_Id := Find_Group('Type');
If Not Id_Null(Rg_Id) Then
Delete_Group(Rg_Id);
End If;
Rg_Id := Create_Group_From_Query('Type','select empno,'
| |'empno'
| |' from emp ');
List_Id := Find_Item('CTRL_BLOCK.IT_LIST');
Temp := populate_Group(Rg_Id);
Populate_List(List_Id,Rg_Id);
End;
In the selection you must give two columns one for label and another one for value.
Try this and let me know if you have any problem.
Regards,
viji.
null
Similar Messages
-
How do I create a group distribution email list with my contacts?
I have many contacts and need to create email distribution lists with my contacts. It is too difficult to choose each contact with every email. How do I create a group contact list with my contacts on iCloud?
Hello there, swcoxdpm.
The following Knowledge Base article provides information on creating Group Contacts in Mavericks on your Macbook Air:
Mail (Mavericks): Address messages
http://support.apple.com/kb/PH14922
Use a group address
If you regularly send messages to the same group of people, you can save them as a group in Contacts, then use the group address to email them.
Group contacts
The steps to do that, are found here:
Contacts (Mavericks): Group contacts
http://support.apple.com/kb/PH15075
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
How to create and handle sharepoint custom list with more than 300 columns?
Hi,
I have requirement for our project where in the input form is having around 320 columns in it.below are the columns and data types.
Single line of text-180
Yes or No Radio button -95
Date time control-35
Checkbox-10
I have checked the sharepoint boundry and limits for columns and data types.
https://technet.microsoft.com/en-us/library/cc262787.aspx
But how can we handle a sharepoint list with these many large number columns.
Is it safe to create all columns in a single list?
How it will impact the performance?
What is the other approach acheive this requirement?
Any help would be appreciated.
Regards,
PooviHi,
According to your description, my understanding is that you want to know if it has some performance issue and limitation when create large number column in a list.
When creating columns in the list , you can still create all 320 columns in the list. But when retrieve the items in a view, then there is a list view threshold limit which causes the performance issue, see the link below:
Sharepoint list column limit
To handling the large number columns, I suggest you can distinguish the column with business logic to create in different list, it will be clear to display the logic relationship.
Thanks
Best Regards,
Jerry Guo
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Repopulating a multiselect list with saved values
Hi,
I am new to using HTML DB and have been searching the Internet on information I could find about it.
I found some useful information about multiselect boxes and can get the inserts to work but I am having problems with the repopulating of the multiselect from the underlying table.
I am using the following code to get the information from the table and the process point is On Load - After Header.
DECLARE
l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
BEGIN
SELECT risk_owner_id BULK COLLECT
INTO l_selected
FROM rmd_risk_risk_owners
WHERE risk_id = :P34_RISK_ID;
:P34_RISK_OWNER_ID := HTMLDB_UTIL.TABLE_TO_STRING( l_selected );
END;
but the multiselect list doesn't seem to repopulate with the values.
Does anyone have an idea I what I could be doing wrong from their previous experience. Any suggestions would be appreciated.
Regards,
Scott.Lets break the problem statement in multiple steps
1. We need a way to know the selection on all rows.
2. We need the association of the checkBox with the data
The solution is to use a arrayCollection/array that holds all the instances created for checkbox.This collection should be a property of component containing the datagrid. We need to use a custom component implementation or inline ItemRenderer. The way you have used is called dropinItemRenderer. Preferaly use custom component implementation and add the instance to the arrayCollection at CreationComplete. Make sure you use addItemAt so that you add the instance in the same row as the data. To get rowIndex the custom Checkbox should implement IDropInListItemRenderer. You could iterate this collection to check all the instances that are checked.
Note: This is the approach considering your dataprovider doesnt have a selection field.
Nishant -
Creating Combo Box or Pop list
I created list of values.But i never used combo box and poplist.I created a item and in itemtype i changed to listitems and functionality nodes changed to combo box.How to generate value in the list through programatically.Can any one help me .
ThanksYou can create both static values and also
values based on record group .
I think you know how to create static values.
(for static just give the values in "Element List" property of list item)
Using Record group. see this example.
Declare
Rg_Id RecordGroup;
Rg_Name varchar2(20) := 'Type';
List_Id Item;
Temp Number;
Rowcount Number;
Begin
Rg_Id := Find_Group('Type');
If Not Id_Null(Rg_Id) Then
Delete_Group(Rg_Id);
End If;
Rg_Id := Create_Group_From_Query('Type','select empno,'
| |'empno'
| |' from emp ');
List_Id := Find_Item('CTRL_BLOCK.IT_LIST');
Temp := populate_Group(Rg_Id);
Populate_List(List_Id,Rg_Id);
End;
In the selection you must give two columns one for label and another one for value.
Try this and let me know if you have any problem.
Regards,
viji.
null -
How to use array list with fixed values to insert record in trigger
I have a list of number 1,30,40,45,60 . These numbers are not being changed so I don't need to keep in a table. So have to create a after insert trigger for
As
Begin
@list = 1,30,40,45,60 // Array value
for i=1 to @list.count
Insert into mappingtable(arrayvalue,itemcode) values (list[i],Inserted.Itemcode)
Next
End
Please can you help with a code
Regards
Pol
polachanBe careful what you assume - rarely are lists of values like this truly static. One thing to keep in mind that arrays in sql server are tables. So, one example is:
set nocount on;
/* represents the virtual inserted table in your trigger */
declare @inserted table (itemcode char(4));
insert @inserted (itemcode) values ('ABCD'), ('JJKL');
select * from @inserted;
select * from @inserted cross join (values (1), (30), (40), (45), (60)) as arrayx(value); -
REGEXP_SUBSTR for comma delimited list with null values
Hi,
I have a column which stores a comma delimited list of values. Some of these values in the list may be null. I'm having some issues trying to extract the values using the REGEXP_SUBSTR function when null values are present. Here are two things that I've tried:
SELECT
REGEXP_SUBSTR (val, '[^,]*', 1, 1) pos1
,REGEXP_SUBSTR (val, '[^,]*', 1, 2) pos2
,REGEXP_SUBSTR (val, '[^,]*', 1, 3) pos3
,REGEXP_SUBSTR (val, '[^,]*', 1, 4) pos4
,REGEXP_SUBSTR (val, '[^,]*', 1, 5) pos5
FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);
POS P POS P P
AAA BBB
SELECT
REGEXP_SUBSTR (val, '[^,]+', 1, 1) pos1
,REGEXP_SUBSTR (val, '[^,]+', 1, 2) pos2
,REGEXP_SUBSTR (val, '[^,]+', 1, 3) pos3
,REGEXP_SUBSTR (val, '[^,]+', 1, 4) pos4
,REGEXP_SUBSTR (val, '[^,]+', 1, 5) pos5
FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);
POS POS POS POS P
AAA BBB DDD FFFAs you can see neither of the calls works correctly. Does anyone know how to modify the regular expression pattern to handle null values? I've tried various other patterns but was unable to get anyone to work for all cases.
Thanks,
Martin
http://www.ClariFit.com
http://www.TalkApex.comHi, Martin,
This does what you want:
SELECT
RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 1), ',') pos1
,RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 2), ',') pos2
,RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 3), ',') pos3
,RTRIM (REGEXP_SUBSTR (val, '[^,]*,', 1, 4), ',') pos4
,RTRIM (REGEXP_SUBSTR (val || ','
, '[^,]*,', 1, 5), ',') pos5
FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);The query above works in Oracle 10 or 11, but in Oracle 11, you can also do it with just REGEXP_SUBSTR, without using RTRIM:
SELECT
REGEXP_SUBSTR (val, '([^,]*),|$', 1, 1, NULL, 1) pos1
,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 2, NULL, 1) pos2
,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 3, NULL, 1) pos3
,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 4, NULL, 1) pos4
,REGEXP_SUBSTR (val, '([^,]*),|$', 1, 5, NULL, 1) pos5
FROM (SELECT 'AAA,BBB,,DDD,,FFF' val FROM dual);The problem with your first query was that it was looking for sub-strings of 0 or more non-commas. There was such as sub-string. consisting of 3 characters, starting at position 1, so it returned 'AAA', as expected. Then there was another sub-string, of 0 characters, starting at position 4, so it returned NULL. Then there was a sub-string of 3 characters starting at position 5, so it returned 'BBB'.
The problem with your 2nd query was that it was looking for 1 or more non-commas. 'DDD' is the 3rd such sub-string.
Edited by: Frank Kulash on Feb 16, 2012 11:36 AM
Added Oracle 11 example -
Hi there,
How to get Managed Metadata Lists ALL Columns and ALL Choice Lists Columns that are used in the Site Collection programmatically please.
RegardsHi sharepointaju,
Managed Metadata list is a hidden list, that you can access it through
http://siteurl/Lists/TaxonomyHiddenList/AllItems.aspx, then it is similar to other lists, you can use server or client code to interate each field in the list, show the the value for each item.
For all choice list columns, I'm not clear what you mean in this situation, do you mean to get all choice columns in the site collection, if so, iterate site columns, and lists to get list fields, check whether it is a choice type field.
This may be not your requirement, please provide more information how you want to get which value.
Thanks,
Qiao Wei
TechNet Community Support -
Quering properties with dependant value
Hi,
I have 2 properties in KM which property B is dependant on property A.
for example:
Property A - Country
Property B - Cities
Allowed values are:
Germany - Walldorf, Berlin, Frankfurt, Hamburg
France - Paris, Nice, Bordeaux
(values were entered hard coded when properties were defined)
How do I get propery B's values by quering on property A by Java Code?
For example: for Germany I want to get Walldorf, Berlin, Frankfurt, Hamburg.
Thanks,
OmriSolved it my on.
By querying on the 'additional_meta_tags' field I can get the 'dependOn' value and correct property.
Omri -
Hi all,
I read Oracle "How to create Databound pop-list with Oracle Jdeveloper10g" to create a Single Select List.
In this paper the DepartmentId input text will be replaced with a Databound pop-list. This works fine for a single language. How can I create a i18n Databound pop-list with the same mechanism of the paper? It's possible?
thxFrom a design point of view I wouldn't do it your way because you'll have to change the table structure if you find you need to add another language.
I'd use a structure like
TABLE answers
answers_id NUMBER
answers_country_code VARCHAR2
answers_answer VARCHAR2
That way you can have as many languages as you like and simply query based on the country code.
However, assuming your Structure, you'll have to do something with JSTL.
So maybe you'd create three list bindings in the UIModel for the page, one for each language, with the correct column being displayed for the display value. The use a <c:choose> statement in the page to define which one to actually show based in the locale -
Sample JSP code needed with jdbc select lists
Hello java experts!
I need to create a series a jsp pages that connects to an ms access "books" database. This first page should connect to the books.mdb and populate select lists with the values from the database. The solution would be similar to the the books shopping cart in the CoreServlets book, EXCEPT I must do everything in JSP only.
All I have done to this point is Java servlets. (I've done shopping cart stud in ASP.net, but not JSP).
I know everyone hates to post code samples, but seeing the code will help me understand. I've read the API, the tutorials, 3 textbooks, and any other doc I could find. I understand Java beans and jsp, but I need to see the JSP for this to finally crystalize.
Thanks in advance.
-JavaGirlwhat school is teaching db access from jsp?
-
Populating select list in a JSP with enumeration values
I'm working on a JSP in which I need to populate a select list with enumeration values.
Everytime I'm trying to insert these values (using enum.nextElement()) in a select box only the first enumerated value gets inserted correctly, the rest of the values shows up outside the select list. I would appreciated any help...thanks!!!I'm not exactly sure how your generating your list to begin with, however the following code will work:
<form>
<select>
<%
java.util.Vector v = new java.util.Vector();
for(int i=0;i<12;i++){
v.addElement(new Integer(i));
java.util.Enumeration enum = v.elements();
while(enum.hasMoreElements()){
Object obj = enum.nextElement();
out.println("<option name='"+obj+"'>"+obj+"</option>");
%>
</select>
</form>Anthony
BTW does anyone know why the greater than symbol never renders properly in these forums when text is encapsulated in the code tag?
pre:
>code:
> -
Hi!
Version Info: SharePoint 2013 Server Standard (*BTW...I do not have access to Visual Studio*)
I have two lists, let's call them
-Assets
-Asset Checkouts
"Assets" is the parent list, and "Asset Checkouts" has a lookup column (multiselect) which is tied to the serial # column in the "Assets" list.
Basically, what I need to accomplish is this: I would like to be able to select multiple list items in the "Assets" list, and create a new item in "Asset Checkouts", and pre-fill the multiselect lookup column in the NewItem form
for "Asset Checkouts" with the values from the selected items in "Assets".
Any ideas or suggestions on how to do this would be most appreciated!
Thanks!Hi,
According your description, you might want to add new item in "Asset Checkouts" list when selecting items in "Assets" list.
If so, we can achieve it with SharePoint Client Object Model.
We can add a button in the "Assets" list form page, when selecting items, we can take down the values of columns of the selected items, then click this button which will create
new item in "Asset Checkouts" list with the values needed.
Here are some links will provide more information about how to achieve it:
Use
SP.ListOperation.Selection.getSelectedItems() Method to get the list items being selected
http://msdn.microsoft.com/en-us/library/ff409526(v=office.14).aspx
How to: Create, Update, and Delete List Items Using JavaScript
http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
Add ListItem with Lookup Field using Client Object Model (ECMA)
http://notuserfriendly.wordpress.com/2013/03/14/add-listitem-with-lookup-field-using-client-object-model-ecma/
Or if you just want to refer to the other columns in "Assets" list when add new item in "Asset Checkouts" list, we can insert the "Assets" list web part into the NewForm page
of the "Asset Checkouts" list, then when we add new item in the "Asset Checkouts" list, we will be able to look through the "Assets" list before we select values for the Lookup column.
To add web part into the NewForm.aspx, we need to find the button "Default New Form" from ribbon under "List" tab, then we can add web part in the NewForm.aspx.
In the ribbon, click the button “Default New Form”:
Then we can add web part into NewForm.aspx:
Best regards
Patrick Liang
TechNet Community Support -
Something like a list with components... how to?
First of all forgive me for the topic title, i couldnt find any better...
My problem is :
Id like to create something like a clickable list with graphics to keep trace of actives file transfers.
In my program i used a JList with a string for each transfer but i would like to improve it, maybe adding a progress bar and some buttons to each list row.
Is this possible?
Thanks for the help,
JNoobNiteIs this possible?Nothing is impossible
Id like to create something like a clickable list with graphics to keep trace of actives file transfers.It can be done
In my program i used a JList So continue using a JList (well I believe it will work). Have you read up on ListCellRenderers? Here is one that allows you to have a checkbox in the JList, which can be checked and unchecked: http://www.geocities.com/icewalker2g/downloads/IconedCellRenderer.java
i would like to improve it, maybe adding a progress bar and some buttons to each list rowUsing a JList in this case might be too much work. Instead, you could use JPanels (probably a custom class which has all the components, ie buttons, progressbars, icons, and then use some kind of model architecture to manage them ie, retrieve, remove, add, etc. This should allow you to easily interact with the components.
That's my 3 and a half cents
ICE -
Initialising a list, with values - how to?
Hi
I want to create a list with some values already in it - how do you do this? I know the constructor is
List<Integer> = new ArrayList<Integer>();
but how would I create a new list already containing the following values at construction time?:
[244753217,613613369,415120695,355142652,134856040,478060706,331972076, 532347366,600207262]
Many thanks, RonHi
Yes, but could you add all the numbers at once, and
my question is really in regard to initialising the
list in the first place!No it isn't. You think it is but it isn't.
There is a constructor whereby you can feed ArrayList another Collection and it will add the items of that collection to it's own list when it is constructed.
Of course you still have to initialize A collection at some point to do that. Which means in the end that you have to add items to a collection. So it all comes back to you really needing to do this at intialization and the answer is in the end you can't. But as I said you don't HAVE to do this and if you think you must you are mistaken.
If you continue to insist that you MUST do this then please post some formatted code that explains why and we can point out the flaws in your thinking.
Maybe you are looking for
-
How can i create a new instance on unix
Hi, How can i create a new instance(instance only) on UNIX and how can i mount my database with this new instance.
-
PREMIERE CS4 won't open my recent projetcts!! 3rd time ...
It's the third time now that I cannot open a saved file... I save incremently the different versions of our 26 minutes animated project. I have no idea when/why it started - around once a month (the past 3 months) I open PREMIERE, open my latest file
-
I want to block the Line items which are already done the Invoice Verification. the sceneraio is like this :- When I select Vendor in MIRO Instead of Purchase Order for payment , it should appear only pending items for Invoice Verification. but at my
-
How can I re-download Safari (running iOS 6.1 on iPhone 4)?
It has disappeared & seems to be affecting many other apps. I have searched the App Store, support, Q & A here and am not finding an answer. In the App Store, I would think it shouldn't be that hard to find. I searched "Safari"- over 900 results as w
-
Date Calculation in Adobe Designer 7
I have a 'simple' expense sheet that allows the user to pick the start date of a 7 day week for recording and reporting business expenses. The 'start' date is chosen from the drop-down caledar; and the remaining 6 days of the week are generated from