Dependent choice list with Idoc Script
Hi,
I'm developing a customized component and I have made my own template.
This is made in *.hcst* extension.
I use 3 variables dependent (they are choice lists),
If I put these variables in a checkin profile everything is O.K.,
but the problem I have using these fields in my template,
if I select the first variable it shows a javascript error:"setOption is not defined", maybe that is problem because
I must include the script that contains the function but I don't know where it is located.
I do exactly what Bex's book says (as follows):
<$include std_doc_page_definitions$>
<$include std_html_head_declarations>
<$fieldName="xCountry", fieldCaption="<b>Country:</b>",
fieldIsOptionList=1, isInfoOnly=#active.isHcsp$>
<$include std_display_field>
<$fieldName="xState", fieldCaption="<b>State:</b>",
fieldIsOptionList=1, isInfoOnly=#active.isHcsp$>
<$include std_display_field-->
<$fieldName="xCity", fieldCaption="<b>City:</b>",
fieldIsOptionList=1, isInfoOnly=#active.isHcsp$>
<$include std_display_field>
<$include std_page_end$>
the result is the first field with its list options properly filled in, but the second and third choice list do not have values, even if I select any in the first list
I think the problem could be in some include
(I do not know if there includes missing, or I forgot something)
Please help me
Best regards,
Juanele
The setOption function is defined in this dynamic html include:
query_form_std_script
There's also a different version defined in this include:
expired_form_std_script
Similar Messages
-
Implementing dependent choice list with internal columns as varchar
Hi,
While implementing dependent choice list I created two tables & their views with internal column as varchar(for example: countryName for country table & stateName for states table) instead of int. I couldn't get the DCL working: selecting a value from the dropdown of parent field won't show up only the dependent values of the child field; it will display the dropdown with all values (it will show all values of the States irrespective of the countryname selection). However when I select the internal column as int & visible column as varchar the DCL works fine.
Our requirement is to use the internal columns as varchar instead of int. Please suggest/help.
Thanks,
MadhurHi Shashwat,
I have done that. The problem is: dependent choice list doesn't seem work is you choose primarykey/foreign key as varchar. It works if I choose the primarykey/foreign key as int. And this key will be the internal column in the views. My requirement is to have them as varchar so that while checking-in content using RIDC API I don't have to provide the int value.
Thanks & Regards,
Madhur -
Populate Actual values in Dependent Choice List
Hi,
I have a scenario wherein 3 metadata fields are dependent on each other.
Department -- > EmpNames --> EmpID
On implementing the dependent choice list, if i select the department, empnames of that department gets displayed.
But by default it loads up with No Selection option followed by empnames.
My client has a requirement wherein on selecting the empname, empid should get auto poulated. In our case it is,
by default No Selection option is present and empid comes after that.
Please let us me how to remove that No Selection type and make the value to get populate.
Regards,
BhaskarHi Bhaskar,
This can be achieved in ODC. Which GUI you are talking about?
Regards,
Vikrant Korde. -
How to make dependent choice lists grow dynamically?
Is it possible to have dependent choice list which grow as the new content is added for choice list item?
E.g If we have countries, states, cities as dependent choice lists. If contributor adds a new country the value should appear in the drop down next time. That value of country can be in turn be used to add states for it. The id of state in trun should be used to add cities. Is this possible?
Regards,
PratapHello All,
by the way, it is very simple to let opltion lists grow dynamically, and moreover to have a predefined structure before.
First you create a table and fill the view for this table with you start values, as it has been described before in this thread.
Then you make the option list for the field Edit and Select.
And then, as you know, your predefined values are stored in your custom schTable (whatever the name is), but all the values entered by the user are stored in DOCMETA table!
All you need to do is to create a trigger with SQL Developer, so that on update and insert in table DOCMETA for your custom metadata field it is checked whether this value is already in your predefined option list stored in your schTable.
And if the value is not there, make the trigger add a new record to custom table with this value and related values as well.
Simple.
This is true for any option list with predefined value and updated by the end-user.
If it is dependent option list, then you need to add both values for parent and child fields in your custom table.
There is another problem for which I can not find a solution --> if the field depends on two fields...
Regards,
Guli -
Exclusive choice list with Palm OS Emulator
hi,
I try to use an exclusive choice list with a palm os 3.5 and 4.0. (MIDP for Palm 1.0.3)
But my screen show me only the text with a small point in front of it. It isn't possible to determine visually which line is selected!
I haven't find any information about this problem in bug list and I'm very surprised!
Is that a solution?
Thanks
Pascal[rapazp],
Firstly, I do know that the MIDP for Palm OS 1.0 BETA has not been officially tested on PalmOS 4.0, so you may get some funny rendering issues with the screen. However, you should not get any problems with PalmOS 3.5.
An "Exclusive Choice" List is usually rendered to the screen as a group of radio buttons so you should get to see a couple of radio buttons that you can scroll up or down and pick one choice. Are you testing this on the emulator or are you testing this with the MIDP.prc installed on your Palm device?
Below is some simple source code sniplets using Exclusive Choice List:
List list = new List("Border Style", Choice.EXCLUSIVE);
list.append("Selection 1", null);
list.append("Selection 2", null);
list.append("Selection 3", null);
list.addCommand(BackButtonPressed);
list.addCommand(OKButtonPressed);
public void commandAction(Command cmd, Displayable d) {
if (cmd == OKButtonPressed) { int i = (List)d.getSelectedIndex();}
else if (cmd == BackButtonPressed) { //code to handle the Back button command}
}HTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/ -
Hi,
I would like to be able to present the user with two dropdown lists, with the data from the second one dependant on the first. I understand with 10g this is somewhat simpler due to the introduction of primaryClientAction. I thought of using the query type facility within JHeadstart to read a value from the session Data to populate the second list. My question ? Is this possible without having to submit the form (assuming that the value is only going to get set on the sessionData once the form has been submitted). Is there a way that I could store the value on the sessiondata using a javascript function on my first choice list ??
Thanks,
Brent HarlowHi Peter,
Thanks for the reply ! Seemed somewhat daunting at first but not bad once I tried it out. Not 100% successful yet though. I thought that I would first try it out populating a table on a separate page to make sure I had the basics right. First problem is that "'<%=sessionData.getAttribute("controller")%>" does not seem to be getting resolved - the alert(xmlHTTP.responseText) returns "404 Error : Resource /Choicedemo/<%9cessionData.getAttribute("controller")xtarget......"do I need to include something else in my javascript or struts-config ? Secondly, when I replace the code above and hard-code in the web url, the action returns success but the forward table page is not displayed ?? Here is my code
struts-config
<action path="ModuleRouter" type="oracle.jheadstart.controller.struts.action.DynamicActionRouter">
<set-property property="forwardParameterName" value="targetGroup"/>
<set-property property="attributeNameParameter" value="targetCondition"/>
<set-property property="attributeValueParameter" value="targetConditionValue"/>
<set-property property="defaultForward" value="Studies"/>
<set-property property="defaultPreviousForward" value="false"/>
<forward name="Studies" path="StudiesRouter"/>
<forward name="Kits" path="KitsRouter"/>
</action>
<action path="StudiesRouter" type="oracle.jheadstart.controller.struts.action.ActionRouter">
<set-property property="defaultForward" value="initial"/>
<forward name="initial" path="GetStudiesSet"/>
<forward name="browse" path="BrowseStudiesSet"/>
<forward name="insert" path="GetDefaultStudies"/>
<forward name="save" path="SaveStudies"/>
<forward name="delete" path="DeleteStudies"/>
<forward name="firstPoplistChanged" path="getSecondPoplist"/>
<forward name="groupPage" path="/WEB-INF/page/StudiesPage.uix"/>
</action>
<action path="getSecondPoplist" type="oracle.jheadstart.controller.struts.action.GetDataObjectSet">
<set-property property="dataObjectInterface" value="hmdclinical.choicedemo.model.invkitdetail"/>
<set-property property="dataObjectSetName" value="KitsSet"/>
<set-property property="isUpdatable" value="true"/>
<set-property property="rangeSize" value="30"/>
<set-property property="queryType" value="SecondPoplistQuery"/>
<set-property property="attributeNames" value="firstPoplistValue"/>
<set-property property="useAttributeNameAsKey" value="false"/>
<forward name="success" path="/WEB-INF/page/KitsTablePage.uix"/>
<forward name="userError" path="/WEB-INF/page/KitsTablePage.uix"/>
<forward name="dataObjectNotFound" path="/WEB-INF/page/KitsTablePage.uix"/>
</action>my javascript that is being called from the onChange handler
function firstPoplistChanged(item)
if (item.selectedIndex >0)
// This is a url that will invoke a specific forward on
// a specific actionRouter in your Struts config file.
// var url = '<%=sessionData.getAttribute("controller")%>?targetGroup=Studies&targetCondition=firstPoplistChanged&targetConditionValue=true';
var url = 'http://192.168.0.39:8989/Choicedemo/StartChoicedemo.do?targetGroup=Studies&targetCondition=firstPoplistChanged&targetConditionValue=true';
// Add a parameter to the URL that holds the selected
// value in the first poplist
url += '&firstPoplistValue='+item.options[item.selectedIndex].value;
alert(url)
// Invoke this URL
var xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP");
xmlHTTP.open("GET",url, false);
xmlHTTP.send();
// Decomment this alert to see what you actually got back
// from the server.
alert(xmlHTTP.responseText);
// Find the second poplist (you'll need to set its id),
// and overwrite its content
// document.getElementById("secondPoplist").outerHTML = xmlHTTP.responseText;
else
// If the first poplist is not selected, clear the
// second one.
// document.getElementById("secondPoplist").innerHTML = "";
alert("Item selected index <= 0")
}and finally the oc4j debug showing me that the getSecondPoplist action was successful
22:42:17 DEBUG (DynamicActionRouter) -Forward returned: Studies
22:42:17 DEBUG (JhsRequestProcessor) -Execute StudiesRouter
22:42:17 DEBUG (ActionRouter) -Forward returned: firstPoplistChanged
22:42:17 DEBUG (JhsRequestProcessor) -Execute getSecondPoplist
22:42:17 DEBUG (GetDataObjectSet) -Forward returned: successHow come /WEB-INF/page/KitsTablePage.uix is not being shown then ?
Also..I appreciate you are giving me lots of info here but the last paragraph in your email "Finally, you need to write the simple secondPoplist.jsp that renders the second poplist with the new contents" has got me stumped - Sorry, I dont know where to begin ! How are the normal poplists rendered ? I was trying to find an example.......Im guessing that the JSP just provides the html that creates the poplist - dont understand how to hook it up to the dataObjectSetName. Also, the second list is going to be rather large so I wanted to use a LOV instead of a poplist ? Any pointers ? Do I just need to call the same lovFrame.jsp and pass in the new dataObjectName from the getSecondPoplist action ??
Thanks a million Peter,
Cheers
Brent -
Dependent Choice List Not working in ECapture as Expected
Hi Martin_A,
In ECapture i am trying to create a dependent Chocie list which will show City name based on Country name.
But in ECapture that configuration is not working since during the creation of Depedent list from Parent
Source,configuration is taking only one value of Parent source for eg. Country- US
Hence child choice list is showing cities related to only US.
Which should not be the case since in actual scenarios depended list means filter on the basis of selected parent value.
Please let me know if i configured it wrongly.
Please send me the steps if you did it perfectly last time
@Martin_ALooking at the documentation 3.7 of Managing Oracle Webcenter Capture, that's how it is, you have to have a separate child list of cities for every country in the country list, only 196 parent items and 196 lists to configure then
In a choice list dependency, a parent field is linked to two or more child choice lists,
one of which is displayed after the user makes a selection in the parent field.
Important Points About Choice List Dependencies
■ You can create choice list dependencies between Capture user defined choice lists,
database choice lists, or between choice list types.
■ Create all choice lists you plan to link before creating a choice list dependency. At
a minimum, you need a parent choice list, and two or more child choice lists.
■ Each item in a child list can be related to multiple parent items. For example,
Supplies could be a child item to Household and Automotive subproducts.
■ You can create multi-level dependencies (for example, great grandparent,
grandparent, parent, and child choice lists).
■ Only one choice list dependency may be assigned to a client profile. Multiple
parent/child dependencies must be defined within a single choice list dependency.
Martin -
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 -
Make HTTP request with Idoc Script
Is there a way to make an HTTP request to a remote host with Idoc?
For example, in PHP you could do:
file_get_contents('http://website.com/');
Does Idoc have a similar method?"garry.b" <[email protected]> wrote in
message
news:gnndbf$i2q$[email protected]..
> Hi,
>
> When using AS3 to generate an HTTP POST request:
>
> var service:HTTPService = new HTTPService ();
> service.url = "
http://localhost:9090/service";
> service.method = "post";
> // service.request = {itemId: "12345"};
> service.send ({itemId: "12345"});
>
> my CherryPy web server complains about unexpected body
parameters:
>
> HTTPError: (400, 'Unexpected body parameters: itemId')
>
> Using Firebug's Network display, its Post tab shows the
following content:
>
> Referer:
http://localhost:8080/log/log-1.0-SNAPSHOT.swf
> Content-type: application/x-www-form-urlencoded
> Content-length: 12
>
> itemId=12345
>
> which looks very strange to me as I would expect the
Referer, etc.,
> request
> headers to show up in the Request Headers section and
not as POST body
> content.
> While this could be some Firebug issue, I think the
request message is
> really
> formatted incorrectly. When the web server gets the
request, it does
> recognize
> 'itemId' as a body parameter but then complains that
it's unexpected.
>
> I've googled the error message, studied HTTPService
examples, spent
> several
> hours playing with it and am stumped. Tracy Spratt
suggested setting the
> service 'request' to force a POST and I tried it but am
getting the same
> error.
> How do I make a POST request? Can I get POST data into
the message body?
> Stick with URL parameters only?
What happens if you post to the same service using an html
form? -
Hi Gurus,
Can anyone please suggest How to create dependant message choice list in OAF.
Basically I am having two message choice list MC1 and MC2 where MC2 values depends on the MC1 value.
Thanks
PiyushHi Piyush,
I assume you have two different view object/instances created for the MC1 and MC2 attached as PickListViewObject with return value and display value. Now you can achieve your requirement like:
1) Set partial action on MC1.
2) In PorcessFormRequest handled event of MC1 and set where clause on MC2's PickListViewObject with value selected by MC1 --> Execute view object.
Note:: On page load you may need to write where clause for MC2's PickListViewObject with the value which returns no rows.!
Regards,
Swati -
ADF BC Attribute with VC of CONTAINS Ignores Choice List on the LOV
JDev 11g PS 1.
Objects:
- A view criteria with attribute defined as CONTAINS (literal)
- An LOV on that attribute with a default list type UI hint of Choice List
- ADF Faces query-table based in the VC
Problem: query-table ignores the Choice List and renders an Input Text.
Clue: Changing the operator to EQUALS causes the expected Choice List to be rendered in ADF BC.
If this is documented in the online help or in this forum, it is escaping me.
Anyone know the best workaround? Set the VC using EQUALS and switch it to CONTAINS in buildWhereClause() maybe?
Thanks,
PeterFrank,
Thanks for the fast reply and for the bug entry. Unfortunately stopping work is not an option. We've come up with a solution using a query listener that replaces EQUALS with CONTAINS before the query and resets it to EQUALS after the query (otherwise the component draws the text item after the query).
Maybe you can think of another solution to our requirement: display a single master record in the results table for a master-detail database view. For example, in an altered Oracle HR world, each DEPARTMENTS record is associated with multiple LOCATIONS records (through a DEPT_LOC table). A database view, DEPT_LOC_VW, based on that table also contains the location description and department description.
Users want to select and then edit (on another page) a department by querying by location. If we represent DEPT_LOC_VW in the query-table component, we see multiple result rows for a single department and that is unnecessary confusion for the purpose of editing a single department.
So we have created an alternative database view, DEPT_VW, based on DEPARTMENTS only, with an additional column -- LOC_LIST -- based on a function that returns a delimited list of all location codes for that department. This way, the user sees only one department record in the results table (although we lose the location description in the results -- not an issue) and is still able to query based on location.
A LOCATIONS_VW view contains the location code surrounded with the delimiiter. The DeptVw view attribute LocList contains an LOV based on that database view.
We want the view criteria to create a query condition:
WHERE loc_list LIKE '%'||<selected location code>||'%'We thought about some kind of clever use of a subquery using a bind variable:
SELECT...
FROM departments -- not DEPT_VW or DEPT_LOC_VW
WHERE department_id IN (
SELECT department_id
FROM dept_loc
WHERE location_id = NVL(:userSelectedLocationId, location_id);But that bind variable does not show in the view criteria selection list so it will not appear in the query component.
Thanks again,
Peter -
Using JDeveloper 10.1.3.4.0. BC4J+ADF Faces
I have a page with an edit form that shows one record at a time for a view object ("VO one") and also has buttons to navigate to other records in the view object (first, prev, next, last).
I use a selectOneChoice component to edit one of the attributes on the edit form. The choices for the selectOneChoice are driven by another view object ("VO two").
The query for "VO two" so that it has a bind variable which is populated with one of the attributes of the current record of "VO one". Therefore, as the user navigates through records the choice list on the page shows different choices.
What is the best way set up the selectOneChoice and to update the bind variable for "VO two" and re-execute its query when the form is navigated to different records in 10.1.3.4.0?
(Yeah, I know its easy in 11g but I can't update the project yet...)
Thank you for reading my question.Hello -
I found a solution and am documenting it here in case someone else finds this while trying to solve a similar problem.
1. I added the bind variable to my list choices view object and added a method in the app module that would set the bind variable and execute the query of the view object. The method was then added to the app module's public interface.
2. In the page definition for the edit form page, I created a method binding for the method in the app module and set as parameter values data from attribute bindings already in the page definition.
3. I created a backing bean to act as a page phase listener as detailed here:
http://download.oracle.com/docs/html/B25947_01/bcdcpal005.htm#sm0271
4. In the "onPagePreRender" method I get a hold of the method binding and execute it. -
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 -
IDOC script to get list of users in alias
Hi ,
In Workflow script, I want to check if dDocAuthor exists in some alias. IF exists then do some processing.
I am not able to compare dDocAuthor with users in alias. Infact I could not find any IDOC script function that returns users in alias.
Please help.
thanksCheck out my blog post on how to bypass workflow via idoc if the author is part of a specific alias (:
-
ADF Dependent select one choice list
hi all
i have two lists in my page, and the second one takes value from the first, but it is not working, the second list is empty always whatever i select in the first one.
i have searched many threads and it is not working. i also did the steps in the page http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html#t2
this what i have did in details:
first list : LevelComboVO
select distinct group_level from mrcps_group_link
second list: GroupComboVO
select large_group_seq, group_level, symbol
from mrcps_group_link
where group_level = :selectedLevel
then i made a bind variable for the second list GroupComboVO named selectedLevel
for the first list LevelComboVO i made the following:
press plus on the ListOfValues:GroupLevel and for the list data source i have made new one for GroupComboVO and choosen the list attribute groupLevel and for ui hent i chosed groupLevel
then i have tested the AM but no data returned for GroupComboVO
please helpfirst i have done the 2 view objects and the corresponding two select one choice list
for the first list i have made a managed bean for valueChangedListener -- > #{GrouplLevelBean.passLevel}
and i have put code as you told me :
package mrcps.view;
import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.jbo.ViewObject;
public class GrouplLevelBean {
public GrouplLevelBean() {
public void passLevel(ValueChangeEvent valueChangeEvent) {
// Add event code here...
DCIteratorBinding testListIter1 = getItrtBindings("GroupComboVOObj1Iterator");
ViewObject vo1 = testListIter1.getViewObject();
vo1.setNamedWhereClauseParam("selectedLevel", valueChangeEvent);
vo1.executeQuery();
getItrtBindings( is giving me a red underline indication that method not found
Edited by: user604057 on Apr 3, 2009 3:27 PM
Maybe you are looking for
-
How to limit the number of items that a list control can hold?
Hi, I am using a Flex3 List control for one of my projects. I add drag & drop functionality to it, so that i can drag & drop elements from one control to another. How to limit the number of items that a list control can hold / can be dropped in a lis
-
How to use currentNode Object in jsp ???
Hi all , I have created a component for leftNav and i have a jsp in it. The currentNode Object the jsp is returning null. Please let me know why i am getting this . Thanks in advance !!
-
I have an MacBook Pro 15% w/Retina (whatever that means), bought in April 2014, but I have no idea whether it's Lion, or Maverick (although I think it is), or something else. I've read a lot here about partitions and, since I am computer illiterate,
-
Need program to read document properties
Dear Experts, I have one requirment, I need a program that i have one document in local folder called c:/client/templete.doc i need to get that templete properties such as title ,author.And that properties should be write in to the excel sheet. Pleas
-
I need to reinstall my apps but the desktop CC manager says the apps are all still installed
I have been dealing with some problems with my computer following a power failure. I have had the hard drive replaced and the OS reinstalled by a technician. I reinstalled my Adobe apps a few days ago but I am still having some issues. The technic