Creating new Auto-Suggest Component

Hi,
I am new to ADF and looking for Auto-Suggest options. Found Franks code and it was really heplful.
We tried to create a new component based on this but not able to use multiple components of the type on the same page/form.The problem we are thinking of is because of the popup having the same id for all the components we embed in.If we attach 3 components of this type to a form then one of the random ones work as per logic and other 2 not doing any pop ups at all.
Could you please help us to resolve this please?
Thanks
Subha
CODE
suggestComponentModel.java
package com.dstintl.ic.ui.component.suggestbox;
import java.util.List;
public interface SuggestComponentModel{
* Method called to filter data shown in the suggest list. Initial
* request is made with inMemory = false. If in memory sorting is
* enabled then all subsequent calls are made passing trues as the
* value for the inMemory parameter. Implementations may decid to
* ignore the inMemory argument and always query the data source.
public List<String> filteredValues(String filterCriteria,
boolean inMemory);
SuggestBoxTag.java+
package com.dstintl.ic.ui.component.suggestbox;
import javax.el.ValueExpression;
import oracle.adf.view.rich.component.rich.fragment.RichDeclarativeComponent;
import oracle.adfinternal.view.faces.taglib.region.RichDeclarativeComponentTag;
import org.apache.myfaces.trinidad.bean.FacesBean;
* ICDateComponent tag class.
public class SuggestBoxTag extends RichDeclarativeComponentTag {
     /*input text properties*/
private ValueExpression styleClass;
private ValueExpression label;
private ValueExpression required;
private ValueExpression displayWidth;
private ValueExpression maximumLength;
private ValueExpression tooltip;
private ValueExpression disabled;
/*popup properties*/
private ValueExpression itemList;
* {@inheritDoc}
@Override
protected String getViewId() {
return "/component/SuggestBox.jspx";
* {@inheritDoc}
@Override
protected RichDeclarativeComponent createComponent() {
return new SuggestBox();
* {@inheritDoc}
@Override
public void release() {
super.release();
label = null;
* {@inheritDoc}
@Override
protected void setProperties(final FacesBean bean) {
super.setProperties(bean);
/*Input text box properties*/
if (label != null) {
bean.setValueExpression(SuggestBox.LABEL_KEY, label);
if (styleClass != null) {
bean.setValueExpression(SuggestBox.STYLE_CLASS_KEY, styleClass);
if (required != null) {
bean.setValueExpression(SuggestBox.REQUIRED_KEY, required);
if (displayWidth != null) {
bean.setValueExpression(SuggestBox.DISPLAY_WIDTH_KEY, displayWidth);
if (maximumLength != null) {
bean.setValueExpression(SuggestBox.MAXIMUM_LENGTH_KEY, maximumLength);
if (tooltip != null) {
bean.setValueExpression(SuggestBox.TOOLTIP_KEY, tooltip);
if (disabled != null) {
bean.setValueExpression(SuggestBox.DISABLED_KEY, disabled);
if (itemList != null) {
bean.setValueExpression(SuggestBox.POPUP_SELECTITEMLIST_KEY, itemList);
* @return label
public ValueExpression getLabel() {
return label;
* @param label
* label
public void setLabel(ValueExpression label) {
this.label = label;
* @return style class.
public ValueExpression getStyleClass() {
return styleClass;
* @param styleClass
* style class.
public void setStyleClass(ValueExpression styleClass) {
this.styleClass = styleClass;
* @param required
* required.
     public void setrequired(ValueExpression required) {
          this.required = required;
* @return required .
     public ValueExpression getrequired() {
          return required;
* @param displayWidth
* displayWidth.
     public void setDisplayWidth(ValueExpression displayWidth) {
          this.displayWidth = displayWidth;
* @return displayWidth .
     public ValueExpression getDisplayWidth() {
          return displayWidth;
* @param maximumLength
* maximumLength.
     public void setmaximumLength(ValueExpression maximumLength) {
          this.maximumLength = maximumLength;
* @return maximumLength .
     public ValueExpression getmaximumLength() {
          return maximumLength;
* @param tooltip
* tooltip.
     public void setTooltip(ValueExpression tooltip) {
          this.tooltip = tooltip;
* @return tooltip .
     public ValueExpression getTooltip() {
          return tooltip;
* @param disabled
* disabled.
     public void setDisabled(ValueExpression disabled) {
          this.disabled = disabled;
* @return disabled .
     public ValueExpression getDisabled() {
          return disabled;
* @param itemList
* itemList.
     public void setItemList(ValueExpression itemList) {
          this.itemList = itemList;
* @return itemList .
     public ValueExpression getItemList() {
          return itemList;
SuggestBox.java+
package com.dstintl.ic.ui.component.suggestbox;
import java.util.ArrayList;
import java.util.List;
import javax.faces.component.UIComponent;
import javax.faces.model.SelectItem;
import oracle.adf.view.rich.component.rich.fragment.RichDeclarativeComponent;
import oracle.adf.view.rich.component.rich.input.RichSelectOneListbox;
import oracle.adf.view.rich.context.AdfFacesContext;
import oracle.adf.view.rich.render.ClientEvent;
import org.apache.myfaces.trinidad.bean.PropertyKey;
* suggestBox.
public class SuggestBox extends RichDeclarativeComponent {
/** label. **/
public static final PropertyKey LABEL_KEY = PropertyKey.createPropertyKey("label");
/** styleClass **/
public static final PropertyKey STYLE_CLASS_KEY = PropertyKey.createPropertyKey("styleClass");
/** required **/
public static final PropertyKey REQUIRED_KEY = PropertyKey.createPropertyKey("required");
/** displayWidth **/
public static final PropertyKey DISPLAY_WIDTH_KEY = PropertyKey.createPropertyKey("displayWidth");
/** precision **/
public static final PropertyKey MAXIMUM_LENGTH_KEY = PropertyKey.createPropertyKey("maximumLength");
/** toolTip **/
public static final PropertyKey TOOLTIP_KEY = PropertyKey.createPropertyKey("tooltip");
/**disabled **/
public static final PropertyKey DISABLED_KEY = PropertyKey.createPropertyKey("disabled");
/** itemList **/
public static final PropertyKey POPUP_SELECTITEMLIST_KEY = PropertyKey.createPropertyKey("itemList");
* Constructor.
public SuggestBox() {
* Gets the value set to the <code>label</code> attribute.
* @return String label.
public String getLabel() {
String t = (String) getAttributes().get("label");
return t;
* Gets the value set to the <code>styleClass</code> attribute.
* @return String styleClass.
public String getStyleClass() {
String t = (String) getAttributes().get("styleClass");
return t;
* Gets the value set to the <code>required</code> attribute.
* @return b.
public boolean getrequired() {
Boolean b = (Boolean) getAttributes().get("required");
return b;
* Gets the value set to the <code>displayWidth</code> attribute.
* @return String displayWidth.
public String getDisplayWidth() {
String t = (String) getAttributes().get("displayWidth");
return t;
* Gets the value set to the <code>precision</code> attribute.
* @return String precision.
public String getMaximumLength() {
String t = (String) getAttributes().get("maximumLength");
return t;
* Gets the value set to the <code>toolTip</code> attribute.
* @return String styleClass.
public String getToolTip() {
String t = (String) getAttributes().get("tooltip");
return t;
* Gets the value set to the <code>disabled</code> attribute.
* @return b.
public boolean getDisabled() {
Boolean b = (Boolean) getAttributes().get("disabled");
return b;
* Main popUp functionality.
     /**Get popUpId label */
private String popUpLabel;
public void setPopUpLabel(String popUpLabel) {
          this.popUpLabel = popUpLabel;
     public String getPopUpLabel() {
          this.popUpLabel =(String) getAttributes().get("label");
          return popUpLabel;
/** fullitemList from the binding **/
private List<SelectItem> fullitemList;
/** suggestedList - to populate list of suggestions squeezed from the fullitemList **/
private List<SelectItem> suggestedList = new ArrayList<SelectItem>();
/** suggestListBox - attached to the Main popUp RichSelectOneListbox**/
private RichSelectOneListbox suggestListBox;
* sets suggestListBox
     public void setSuggestListBox(RichSelectOneListbox suggestListBox) {
          this.suggestListBox = suggestListBox;
* gets suggestListBox
* @return suggestListBox
     public RichSelectOneListbox getSuggestListBox() {
          return suggestListBox;
* Sets suggested list on the selectOneListbox component
* @param suggestedList
* suggestedList.
     public void setSuggestedList(List<SelectItem> suggestedList) {
          this.suggestedList = suggestedList;
* Retrieves the list from the bindings and
* initialise suggestedList with the full list(only done during initialisation)
* @return suggestedList.
     public List<SelectItem> getSuggestedList() {
          if(fullitemList == null){
               fullitemList = new ArrayList<SelectItem>();
     List<SelectItem> result = (List<SelectItem>) getAttributes().get("itemList");
     this.fullitemList.addAll(result);
     this.suggestedList.addAll(result);
          return suggestedList;
* doFilterList - On Every user keystroke in the suggest input field, the browser client calls
* the doFilterList method through the af:serverListerner component
* af:selectoneListbox (popup) is refreshed at the end of each call to the doFileterList so that
* new list value is populated.
* @param clientEvent
public void doFilterList(ClientEvent clientEvent) {
     if(suggestListBox == null) {
          UIComponent uic = clientEvent.getComponent();
          suggestListBox = (RichSelectOneListbox) uic.getChildren().get(0);
// set the content for the suggest list
String srchString = (String)clientEvent.getParameters().get("filterString");
this.suggestedList.clear();
for(SelectItem item : fullitemList) {
     if( item.getLabel().contains(srchString)){
     this.suggestedList.add(item);
AdfFacesContext.getCurrentInstance().addPartialTarget(suggestListBox);
SuggestBox.jspx+
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
     <jsp:directive.page contentType="text/html;charset=windows-1252" />
     <af:componentDef var="attrs" componentVar="component">
<af:document>
<f:facet name="metaContainer">
<af:group>
<![CDATA[
<script>
function handleKeyUpOnSuggestField(evt){
// start the popup aligned to the component that launched it
suggestPopup = evt.getSource().findComponent("suggestPopup");
inputField = evt.getSource();
//don't open when user "tabs" into field
if (suggestPopup.isShowing() == false &&
evt.getKeyCode()!= AdfKeyStroke.TAB_KEY){
hints = {align:AdfRichPopup.ALIGN_AFTER_START, alignId:evt.getSource().getClientId()+"::content"};
suggestPopup.show(hints);
//disable popup hide to avoid popup to flicker on
//key press
suggestPopup.hide = function(){}
//suppress server access for the following keys
//for better performance
if (evt.getKeyCode() == AdfKeyStroke.ARROWLEFT_KEY ||
evt.getKeyCode() == AdfKeyStroke.ARROWRIGHT_KEY ||
evt.getKeyCode() == AdfKeyStroke.ARROWDOWN_KEY ||
evt.getKeyCode() == AdfKeyStroke.SHIFT_MASK ||
evt.getKeyCode() == AdfKeyStroke.END_KEY ||
evt.getKeyCode() == AdfKeyStroke.ALT_KEY ||
evt.getKeyCode() == AdfKeyStroke.HOME_KEY) {
return false;
if (evt.getKeyCode() == AdfKeyStroke.ESC_KEY){
hidePopup(evt);
return false;
// get the user typed values
valueStr = inputField.getSubmittedValue();
// query suggest list on the server
AdfCustomEvent.queue(suggestPopup,"suggestServerListener",
// Send single parameter
{filterString:valueStr},true);
// put focus back to the input text field
setTimeout("inputField.focus();",400);
//TAB and ARROW DOWN keys navigate to the suggest popup
//we need to handle this in the key down event as otherwise
//the TAB doesn't work
function handleKeyDownOnSuggestField(evt){               
if (evt.getKeyCode() == AdfKeyStroke.ARROWDOWN_KEY) {                   
selectList = evt.getSource().findComponent("suggestListBox");
selectList.focus();
return false;
else{
return false;
//method called when pressing a key or a mouse button
//on the list
function handleListSelection(evt){
if(evt.getKeyCode() == AdfKeyStroke.ENTER_KEY ||
evt.getType() == AdfUIInputEvent.CLICK_EVENT_TYPE){                                          
var list = evt.getSource();
evt.cancel();
var listValue = list.getProperty("value");
hidePopup(evt);
inputField = evt.getSource().findComponent("suggestField");
inputField.setValue(listValue);
//cancel dialog
else if (evt.getKeyCode() == AdfKeyStroke.ESC_KEY){
hidePopup(evt);
//function that re-implements the node functionality for the
//popup to then call it
function hidePopup(evt){
var suggestPopup = evt.getSource().findComponent("suggestPopup");
//re-implement close functionality
suggestPopup.hide = AdfRichPopup.prototype.hide;
suggestPopup.hide();
</script>
]]>
</af:group>
</f:facet>
<af:messages/>
</af:document>
     <!-- START Suggest Field -->
     <af:inputText id="suggestField"
     clientComponent="true"
     disabled="#{attrs.disabled}"
     label="#{attrs.label}"
     required="#{attrs.required}"
     columns="#{attrs.displayWidth}"
     maximumLength="#{attrs.maximumLength}"
     styleClass="#{attrs.styleClass}"
     shortDesc="#{attrs.tooltip}">
     <af:clientListener method="handleKeyUpOnSuggestField"
                         type="keyUp"/>
     <af:clientListener method="handleKeyDownOnSuggestField"
     type="keyDown"/>
     </af:inputText>
     <!-- END Suggest Field -->
     <!-- START Suggest popUp -->
<af:popup id="suggestPopup" contentDelivery="immediate" animate="false" clientComponent="true" >
     <af:selectOneListbox id="suggestListBox" contentStyle="width: 250px;"
     size="5" valuePassThru="true">
     <f:selectItems value="#{component.suggestedList}"/>
     <af:clientListener method="handleListSelection" type="keyUp"/>
     <af:clientListener method="handleListSelection" type="click"/>
     </af:selectOneListbox>
     <af:serverListener type="suggestServerListener"
     method="#{component.doFilterList}"/>
</af:popup>
     <!-- END Suggest popUp -->
<af:xmlContent>
               <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
<display-name>suggestBox</display-name>
<attribute>
<attribute-name>id</attribute-name>
</attribute>
                    <attribute>
<attribute-name>label</attribute-name>
</attribute>
<component-extension>
<component-tag-namespace>com.dstintl.ic.ui.component</component-tag-namespace>
<component-taglib-uri>/com/dstintl/ic/ui/component</component-taglib-uri>
</component-extension>
</component>
</af:xmlContent>
</af:componentDef>
</jsp:root>
component.tld+
<?xml version="1.0" encoding="windows-1252"?>
<taglib xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" version="2.1" xmlns="http://java.sun.com/xml/ns/javaee">
     <display-name>component</display-name>
     <tlib-version>1.0</tlib-version>
     <short-name>component</short-name>
     <uri>/com/dstintl/ic/ui/component</uri>
     <!--
          Component Name: SuggestBox Description: AutoSuggest or AutoComplete - shows a list of vales
          in a drop down list that is filtered by the user input in the input text field.
     -->
     <tag>
          <name>SuggestBox</name>
          <tag-class>com.dstintl.ic.ui.component.suggestbox.SuggestBoxTag</tag-class>
          <body-content>JSP</body-content>
          <attribute>
               <name>label</name>
               <required>false</required>
               <deferred-value/>
          </attribute>
          <attribute>
               <name>styleClass</name>
               <required>false</required>
               <deferred-value/>
          </attribute>
          <attribute>
               <name>disabled</name>
               <required>false</required>
               <deferred-value/>
          </attribute>
          <attribute>
               <name>required</name>
               <required>false</required>
               <deferred-value>
                    <type>boolean</type>
               </deferred-value>
          </attribute>
          <attribute>
               <name>displayWidth</name>
               <required>false</required>
               <deferred-value/>
          </attribute>
          <attribute>
               <name>maximumLength</name>
               <required>false</required>
               <deferred-value/>
          </attribute>
          <attribute>
               <name>tooltip</name>
               <required>false</required>
               <deferred-value/>
          </attribute>
          <attribute>
               <name>itemList</name>
               <required>false</required>
               <deferred-value/>
          </attribute>
     </tag>
</taglib>

Hi Subha,
you can distinct the different components using clientAttribute tag with clientListener
<af:inputText id="suggestField" .....>
<af:clientListener method="handleKeyUpOnSuggestField" type="keyUp"/>
<af:clientListener ......"/>
<af:*clientAttribute* name="eventName" value="myCustomEvent"/>
<af:*clientAttribute* name="popupId" value="......"/>
</af:inputText>
in javascript you get the eventName or PopuId from the attribute
component = event.getSource();
var eventName = component.*getProperty* ("eventName");
// Call the server
AdfCustomEvent.queue(popup, *eventName*, ......);
var popupId = component.*getProperty* ("popuId");
var popup = AdfPage.PAGE.findComponent(popupId);
Hope this help,
Maroun

Similar Messages

  • How to create  Auto suggestion component by using of ADF tag

    Hi ,
    In my project, I am using the ADF frame work and I need to use the auto suggestion component.
    Can any body suggest me how to create Auto suggestion component by using of ADF tag.
    Waiting for your valuable suggestions...

    Try this forum:
    JDeveloper and ADF
    You might get a lot more response.
    Jan Kettenis

  • Create new component in CRM

    Hi Experts,
    I am new to CRM Technical, can any one explain how to create a Z component step by step procedure in CRM and what is the difference between BSP Application and Component.
    Thanks In Advance
    Ramesh.

    read the following blog: http://techskills.wordpress.com/2009/04/25/sap-crm-create-new-web-ic-component-using-bsp-wd-workbench-bsp_wd_cmpwb/

  • Ajax auto-suggest with adf

    Hi..
    I am trying to implement ajax auto-suggest using the example @ http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html
    After trying it, i realised the auto-suggest component does not work in firefox, but only in IE. Also when using IE 7, the auto-suggest pop up.screen. does not display directly under the textbox.. but rather away from it..unlike what we see in the example.
    Is there any other ways to implement autosuggest that work in both firefox and IE using ADF?
    thanks

    The limitation on browsers is a function of the ajax library used, namely https://blueprints.dev.java.net/bpcatalog/distDrops.html, not ADF. I would suggest finding a similar library that supports the browsers you wish to use.
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem using Auto Suggest Behavior

    Hi all,
    I am using Jdeveloper 11.1.1.2 and ADFBC.
    I want to implement auto suggest behavior and I am following the steps on: http://www.oracle.com/technology/products/jdev/howtos/autosuggest/explaining_autosuggestbehavior.htm
    When I am writing a partial string on the component I don't show auto suggestion and if I click on the button on the right of the component (the lens for finding records) I see a panel search with all the fields of my VO.
    It is a normal behavior I have a warning in the auto suggest component when I write #{bindings.myField.suggestedItems}?? I don't find it under bindings using the expression builder.
    Where am I wrong?Any suggestions?
    Thank you
    Andrea

    Sorry,
    after the tag validator I have:
    <af:autoSuggestBehavior suggestedItems="#{bindings.myAttribute.suggestedItems}"/>
    When I am writing something on the inputText of myAttribute I have this error:
    Target Unreachable, 'DescrizioneTecnica' returned null.
    Stack trace:
    javax.el.PropertyNotFoundException: Target Unreachable, 'myAttribute' returned null
         at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:153)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at oracle.adfinternal.view.faces.el.InternalELObject.autoSuggest(InternalELObject.java:134)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  • Auto suggest behavior for af:query component LOV fields.

    Hi,
    I am new to ADF development and need help on implementing auto suggest behavior to the LOV fields generated by af:query component. For inputList and inputCombo.. fields we can add af:autosuggestbehavior tag to enable this. How do we enable the same for af:query generated LOV fields.
    Regards,
    C.R

    Thanks Timo for such a quick response.
    JDev version we are using is 11.1.1.6.0
    Unfortunately, we have gone too far with the AF:Query and Everything else is working apart from Auto-Suggest on AF:Query. Now will take a lot of time to implement and test. Also, users will have to spend considerable time to test it again.
    Thanks and Regards,
    Satya

  • I am looking for a spreadsheet app that I can create new spreadsheets. So far nothing looks promising, any suggestions or do I have to go to windows?

    I am looking for a spreadsheet app that I can create new spreadsheets. So far nothing looks promising, any suggestions or do I have to go to windows?

    Hi Tx Tar Heel,
    I've been using Office2HD: https://itunes.apple.com/us/app/office2-hd/id364361728?mt=8
    Its cheaper than Numbers and it also works for Word and PowerPoint files too. I like the Dropbox integration. I can start on my Office docs (Word, Excel, PowerPoint) in the office and then edit those files with Office2HD when I'm out of the office. Files saves right back to Dropbox so that when I get back to the office the files are already updated. Not bad for a $7.99 app!
    Hope this helps!
    ~Joe

  • Help needed for creating new component in web ui

    hi experts,
          i need documentation on the component workbench. i need to cretae a new assignment block in web UI, similar ti the items assignemnt block in opportunity screen.
    Where can i find material to learn how to develop new components using component workbench?
    Thanks,
    Shantanu.

    Hi Shantanu,
    In fact, you need to create a context node. You can create this context node using the wizard. Click with right button in "Context node" of the view and follow the steps.
    Best regards,
    Caíque Escaler

  • Create new / add Custom Node in Component Pallete - Workflow Editor

    is there anyway to Create new / add Custom Node in Component Pallete - Workflow Editor in SQL Developer - Oracle Data Miner?
    Now i'm in progress create data cleansing engine in database package, and I have an idea to create new node in workflow editor, the node will call my procedure data cleansing.
    Anybody help?

    Hi,
    Not currently.
    We are working on a SQL Query node that would process data on connected input nodes and allow the user to create any sql query specification they would like.
    So as long as your implementation is compatible with being included as part of a sql query, then you may be able to take advantage of this new node.
    Since you describe your implementation as a data cleansing implementation, I could see it taking in what ever input is provided in the flow, and then returning a cleansed result set.
    Thanks, Mark

  • How can I create new 3D component in Multisim

    请问一下可以在Multisim中创建完全三维的虚拟元件吗
    那个元件要任意方向都可以旋转
    如果可以    要采用什么方法
    要采用什么编程语言
    谢谢高手指点
     could I create new 3D component in Multisim?
    the new 3D component could rotate in any direction
    if it could be realized
    which program language should I choose
    how should I create 3D component
    thanks

    There is a tutorial here: http://zone.ni.com/devzone/cda/tut/p/id/5631 for creating a new component. There is a section for creating a 3D model that may be helpful. http://zone.ni.com/devzone/cda/tut/p/id/5631#toc8

  • Create New Awt Component

    Is it possible, and if it is, how can I create completely new gui component using awt?

    Sure. Just extend Component and override the paint method to draw it the way you want. Add a mouse listener to capture clicks or drags and do whatever you want with those, etc. I create new Swing components with special behavior all the time. (I don't think I've ever done one in pure AWT, but the principle is the same.) My variations tend to be trivial, like labels with text that wraps to the available space instead of a single line, not stuff that is going to set the computer world on fire. Depening on how complex the new component you want to invent is, this might be far from a trivial task. But it's certainly do-able.

  • No "Add DAQ Component" Dialog box after creating new project

    I'm using VS2012 and have installed Measurement Studio, NIDAQmx, drivers, VISA. When creating a new project in Visual Studio, I do the following:
    1. Select C# > Measurement Studio
    2. Select NI Windows Forms Application
    3. Give the project a name
    4. Click OK
    5. Measurement Studio Class Libraries window pops up and I check the boxes
    The project loads fine but I keep readin about an "Add DAQ Component" dialog box after doing the above steps. Since I don't have the box, I can't create new tasks (without writing th actual code). What am I missing? See attached picture for what dialog box I'm missing.

    Hi Musent,
    To see this dialog box, you'll need to create an NI DAQ Windows Application instead of a Windows Foms Application.
    Kristen

  • Error in creating new layout controller.

    I have decompile the SimpleLayoutController, and duplicate the class and rename to TestLayoutController.
    Here is how I do it (I follow the KMC Developer Guide):
    1) Create new portal application struture.
    2) Create java class: TestLayoutController in src.api.
    3) Create a portal service ; create RFServiceWrapper.
    4) Configure portalapp.xml
    5) Deploy te par.
    6) Configure the new TestLayoutController in the System Admi. (Same steps as stated in KMC Guide)
    Here is the detail for my codes:
    TestLayoutController class:
    package com.sap.km.flex.ui.layout;
    import com.sapportals.htmlb.Component;
    import com.sapportals.htmlb.GridLayout;
    import com.sapportals.wcm.rendering.control.cm.NeutralControl;
    import com.sapportals.wcm.rendering.layout.AbstractLayoutController;
    import com.sapportals.wcm.rendering.layout.ILayoutController;
    import com.sapportals.wdf.WdfException;
    import com.sapportals.wdf.stack.Control;
    Created on Jan 10, 2006
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    @author Administrator
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class TestLayoutController extends AbstractLayoutController {
         public TestLayoutController() {
         /* (non-Javadoc)
    @see com.sapportals.wcm.rendering.layout.ILayoutController#getNewInstance()
         public ILayoutController getNewInstance() {
              // TODO Auto-generated method stub
              return new TestLayoutController();
         /* (non-Javadoc)
    @see com.sapportals.wcm.rendering.layout.ILayoutController#render()
         public Component render() throws WdfException {
              writeDebugInformation();
           return super.controls[0].render();
         /* (non-Javadoc)
    @see com.sapportals.wcm.rendering.layout.ILayoutController#getControls()
         public Control[] getControls() {
              if(super.controls == null)
                 createControls();
            return super.controls;
         private void createControls() {
              super.controls = new Control[1];
            super.controls[0] = new NeutralControl(getProxy(), null);
    portalapp.xml :
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal"/>
      </application-config>
      <components/>
      <services>
        <service name="RFServiceWrapper">
          <service-config>
            <property name="className" value="com.sap.km.flex.ui.RFServiceWrapper"/>
            <property name="startup" value="true"/>
          </service-config>
        </service>
      </services>
    </application>
    RFServiceWrapper class:
    package com.sap.km.flex.ui;
      import com.sapportals.portal.prt.service.IServiceContext;
    import com.sapportals.wcm.crt.CrtClassLoaderRegistry;
      public class RFServiceWrapper implements IRFServiceWrapper{
      private IServiceContext mm_serviceContext;
    Generic init method of the service. Will be called by the portal runtime.
    @param serviceContext
      public void init(IServiceContext serviceContext)
        mm_serviceContext = serviceContext;
         CrtClassLoaderRegistry.addClassLoader(this.getClass().getClassLoader());
    This method is called after all services in the portal runtime
    have already been initialized.
      public void afterInit()
    configure the service
    @param configuration
    @deprecated
      public void configure(com.sapportals.portal.prt.service.IServiceConfiguration configuration)
    This method is called by the portal runtime
    when the service is destroyed.
      public void destroy()
    This method is called by the portal runtime
    when the service is released.
    @deprecated
      public void release()
    @return the context of the service, which was previously set
    by the portal runtime
      public IServiceContext getContext()
        return mm_serviceContext;
    This method should return a string that is unique to this service amongst all
    other services deployed in the portal runtime.
    @return a unique key of the service
      public String getKey()
        return KEY;
    IRFServiceWrapper interface:
    package com.sap.km.flex.ui;
    import com.sapportals.portal.prt.service.IService;
    public interface IRFServiceWrapper extends IService
        public static final String KEY = "TestLayoutController";
    Here is the error that I got:
    com.sapportals.wdf.WdfError
         at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:678)
         at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:32)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:936)
         at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
         at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:62)
         at com.sapportals.htmlb.page.PageProcessorServlet.doGet(PageProcessorServlet.java:29)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.wcm.app.servlet.WcmHtmlbBaseServlet.service(WcmHtmlbBaseServlet.java:100)
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:321)
         at com.sapportals.portal.prt.core.broker.ServletComponentItem$ServletWrapperComponent.doContent(ServletComponentItem.java:110)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    --- Nested WDF Error -
    java.lang.NullPointerException
         at com.sapportals.wcm.rendering.layout.LayoutControllerFactory.getLayoutController(LayoutControllerFactory.java:165)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.createLayoutController(WdfProxy.java:1926)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.prepareNestedControls(WdfProxy.java:1313)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.createNestedControls(WdfProxy.java:1209)
         at com.sapportals.wdf.stack.Control.create(Control.java:291)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.create(WdfProxy.java:1280)
         at com.sapportals.wdf.stack.Pane.createControls(Pane.java:464)
         at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
         at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
         at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
         at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
         at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
         at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
         at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
         at com.sapportals.wdf.WdfCompositeController.doInitialization(WdfCompositeController.java:268)
         at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:659)
         at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:32)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:936)
         at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
         at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:62)
         at com.sapportals.htmlb.page.PageProcessorServlet.doGet(PageProcessorServlet.java:29)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.wcm.app.servlet.WcmHtmlbBaseServlet.service(WcmHtmlbBaseServlet.java:100)
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:321)
         at com.sapportals.portal.prt.core.broker.ServletComponentItem$ServletWrapperComponent.doContent(ServletComponentItem.java:110)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    I truly appreciate your constructive suggestions. (Points will be rewarded).
    Thanks.
    Kent

    Some remark:
    I think the problem is the LayoutControllerFactory cannot get this new customized TestLayoutController.
    Referring to the following error message:
    --- Nested WDF Error -
    java.lang.NullPointerException
         at com.sapportals.wcm.rendering.layout.LayoutControllerFactory.getLayoutController(LayoutControllerFactory.java:165)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.createLayoutController(WdfProxy.java:1926)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.prepareNestedControls(WdfProxy.java:1313)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.createNestedControls(WdfProxy.java:1209)
    Question:
    1) Is that because the new customized TestLayoutController is not registered in the portal yet in the runtime?
    But I thought this code in RFServiceWrapper did that:
    public void init(IServiceContext serviceContext)
        mm_serviceContext = serviceContext;
         CrtClassLoaderRegistry.addClassLoader(this.getClass().getClassLoader());
    Thanks.
    Kent

  • Implement auto suggest behaviour with af:selectOneChoise

    Hi
    I'm using jdeveloper 11.1.2.3.0
    I would like to know how could I Implement auto suggest behaviour with af:selectOneChoise?

    Hi,
    Drop a af:autoSuggestBehavior from component pallet to the SOC component and bind it to a backing bean method as below
    private List<SelectItem> items = new ArrayList<SelectItem>();
    public List getSuggestions(String input) {
    if (input!=null && input.length()>3) {
    ViewObject vo = util.getViewObject("XYZ1Iterator");
    vo.setNamedWhereClauseParam("bindx]Xyz", input);
    vo.executeQuery();
    System.out.println("Row count is " + vo.getRowCount());
    // autoSuggestItemBeanList.clear();
    RowSetIterator itr = vo.createRowSetIterator(null);
    while (itr.hasNext()) {
    Row row = itr.next();
    items.add(new SelectItem(row.getAttribute("FirstName")));
    return items;
    If you don't want your db to be queried for each and every character, then create a bean and set each and every attribute value of that bean from the db after your page gets rendered. So each character hit from the keyboard will look into your bean rather than hitting the db.
    Thanks,
    Sanjeeb

  • Creating new VM ends with Error code 3430 and 3040 in Hyper-V log. Does anyone have any insight into what might cause this?

    The new VM is being created via a P2V process run from SCVVM. It reaches a completion of 60% and dies. I asked about this in another question detail of the VVM can be seen at this link:
    http://social.technet.microsoft.com/Forums/en-US/virtualmachinemgrp2vv2v/thread/71aae7dc-13b5-46f1-b794-cc1b8085541f
    Running Win2008 R2 w/ Hyper-V role enabled & SCVVM 2008R2
    In any event I checked the Hyper-V logs to see if they might shead any light on the problem and there were two error messages associated with the attempted conversion. The first Event ID 3430
    Log Name:      Microsoft-Windows-Hyper-V-Worker-Admin
    Source:        Microsoft-Windows-Hyper-V-Worker
    Date:          5/23/2011 4:51:25 PM
    Event ID:      3430
    Task Category: None
    Level:         Error
    Keywords:     
    User:          NETWORK SERVICE
    Computer:      Virtual-Mgt.amrinc-corp.local
    Description:
    'test1' failed to set/change partition property: The system cannot find message text for message number 0xtest1 in the message file for 18568CA2-82E9-4A9F-B462-701D8FB4C447. '0x8007013D'.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-Hyper-V-Worker" Guid="{51DDFA29-D5C8-4803-BE4B-2ECB715570FE}" />
        <EventID>3430</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2011-05-23T21:51:25.956775200Z" />
        <EventRecordID>1</EventRecordID>
        <Correlation />
        <Execution ProcessID="3316" ThreadID="2716" />
        <Channel>Microsoft-Windows-Hyper-V-Worker-Admin</Channel>
        <Computer>Virtual-Mgt.amrinc-corp.local</Computer>
        <Security UserID="S-1-5-20" />
      </System>
      <UserData>
        <VmlEventLog xmlns:auto-ns2="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://www.microsoft.com/Windows/Virtualization/Events">
          <VmName>test1</VmName>
          <VmId>18568CA2-82E9-4A9F-B462-701D8FB4C447</VmId>
          <ErrorCodeString>%%2147942717</ErrorCodeString>
          <ErrorCode>0x8007013D</ErrorCode>
        </VmlEventLog>
      </UserData>
    </Event>
    And the second Event ID 3040
    Log Name:      Microsoft-Windows-Hyper-V-Worker-Admin
    Source:        Microsoft-Windows-Hyper-V-Worker
    Date:          5/23/2011 4:51:25 PM
    Event ID:      3040
    Task Category: None
    Level:         Error
    Keywords:     
    User:          NETWORK SERVICE
    Computer:      Virtual-Mgt.amrinc-corp.local
    Description:
    'test1' could not initialize. (Virtual machine ID 18568CA2-82E9-4A9F-B462-701D8FB4C447)
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-Hyper-V-Worker" Guid="{51DDFA29-D5C8-4803-BE4B-2ECB715570FE}" />
        <EventID>3040</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2011-05-23T21:51:25.956775200Z" />
        <EventRecordID>2</EventRecordID>
        <Correlation />
        <Execution ProcessID="3316" ThreadID="2716" />
        <Channel>Microsoft-Windows-Hyper-V-Worker-Admin</Channel>
        <Computer>Virtual-Mgt.amrinc-corp.local</Computer>
        <Security UserID="S-1-5-20" />
      </System>
      <UserData>
        <VmInitialize xmlns:auto-ns2="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://www.microsoft.com/Windows/Virtualization/Events">
          <VmName>test1</VmName>
          <VmId>18568CA2-82E9-4A9F-B462-701D8FB4C447</VmId>
        </VmInitialize>
      </UserData>
    </Event>
    I have blownout the server and reinstalled the operating system and SCVVM and applied all the current updates to no avail. I have the exact same issue again. The problem seem to be at least on the serface an authority problem because I have no problem creating
    new VM via the P2V process on an old Virtual Server running on Win2003R2.
    Oh yes I can create new virtual machines on the system in question and move them to the library as was suggested to verify in a Blog post so I am really wondering what the problem is?
    Configuration Analyzer Just gave me a warning about reporting not being setup on the VVM which it isn't so no suprise there?
    Any information that might help me figure this would be greatly appreciated

    I've looked at both threads, and there simply isn't enough information for me to tell you what is wrong.  Please collect a trace (instructions in General forum) and open a case with CSS.  CSS can provide more in depth analysis than what a forum
    post allows. 
    As a shot in the dark, I have seen the issue outlined in the following KB article cause this exact same error message and symptom,
    http://support.microsoft.com/kb/967902
    Best Regards, Mike Briggs [MSFT] -- posting provided "AS IS" with no warranties and confers no rights

Maybe you are looking for