Custom command link in renderer

Hello, I have created my own custom tree renderer that displays a tree structure on screen. For each node, I want to generate a command link that is bound to a single method in my backing bean. I am trying to use writer.startElement and writer.writeAttribute for this, but I don't know how to code the actual method binding. Here is what I have so far:
writer.startElement("a", component);
writer.writeAttribute("href", "#", "href");
writer.writeAttribute("onclick" document.forms['workArea:subview1:treeTestForm'].submit();", "onclick); writer.write("My Node Label");
writer.endElement("a");
However, clicking this link submits the form, runs my encode method again and then runs my decode in the renderer. How can I write attributes to this link so that a single method in my backing bean is called each time a node is clicked?

Basically what I'm doing now then is creating a MethodBinding in the decode method, so that it calls a method I'm looking for when the row is clicked. I have two problems now:
1. The encodeBegin method is called again in this instance and I only want it called once when the component is first rendered. Is there a way to only allow it to run once?
2. My ID is not being passed back in the UIComponent argument, even though I am setting it in the ResponseWriter.
I read that the basic syntax for command links is:
document.forms['CLIENT_ID']['CLIENT_ID'].value='CLIENT_ID' but when I view source on some of my other pages that use the h:commandLink tag, the second CLIENT ID reads : '['__LINK_TARGET__']. and I have no idea where that is coming from.
Any ideas?

Similar Messages

  • Resetting the id of dynamically generated JSF custom command link

    I have a java faces page which displays data from an arraylist.
    This list is populated when user inputs data in the input text field and clicks "Add Group" button.
    The arralylist consist of another arraylist within the former.
    I have created a custom command link for the former arraylist.
    As an user can add data to the arraylist so can he remove it from the arraylist.
    The command link has a method binding "closeTask" which is invoked when command link is clicked.
    This action removes the clicked element from the arraylist and displays the fresh list.
    The key field from the bean in the former arraylist is set in request, and is retrieved in the "closeTask" method to be assigned to the command link output text id (i.e. it identifies the element that is to be deleted from the arraylist).
    This functionality does not work as expected, i.e. command link component is not created/rendered during deletion as it is created while addition.
    As a result eventhough the element is removed from the arraylist, the id corresponding to the fresh arraylist is not refreshed and for further actions correct id is not passed and the deletion function does not work.
    How can I have resolve this problem?
    The sample code is included.
    Thanks in advance.
    Java Faces Code:
    <%
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    Bkbean bean = (Bkbean)app.createValueBinding("#{bckbean}").getValue(facesContext);
    List aList = bean.getAList();
    if(aList!=null && aList.size()>0) {                                                            
    for(int i=0; i<aList.size(); i++) {
    ABean abean = (ABean) aList.get(i);
    int keyValue = abean.getKey();
    request.setAttribute("key", String.valueOf(keyValue));
    %>
    <TR>
    <TD width="90%">
    <%=abean.getCtg()%>
    </TD>
    <TD width="9%">
    <%=abean.getKey()%>
    </TD>
    <TD width="1%" align="right" valign="top">
    <h:commandLink binding="#{bckbean.commandLnk}" styleClass="commandLink">
    </h:commandLink>
    </TD>
    </TR>
    <%
    List dList = abean.getDList();
    if(dList!=null) {
    for(int j=0; j<dList.size(); j++) {
    String tData = (String) dList.get(j);
    %>
    <TR>
    <TD width="90%">
    <%=tData%>
    </TD>
    <TD width="10%" colspan="2">
    </TD>
    </TR>
    <%
    }%>
    <%
    %>
    <TR>
    <TD align="right">
    <h:inputText id="inputtxt001" value="#{bckbean.val}"></h:inputText>
    </TD>
    <TD align="left" colspan="2">
    <hx:commandExButton type="submit" value=" Add Group " styleClass="commandExButton" id="submitbtn001" action="#{bckbean.addVal}">
    </hx:commandExButton>
    </TD>
    </TR>
    Backing Bean Code:
    public void closeTask(ActionEvent event) {
    String key = "";
    UIOutput lnkTxt = null;
    UICommand comp = (UICommand)event.getComponent();
    if(comp.getChildren() != null && comp.getChildren().size() >0) {
    for (int i=0; i<comp.getChildren().size(); i++) {
    lnkTxt = (UIOutput)comp.getChildren().get(i);
    key = lnkTxt.getId();
    int selectedKey = (new Integer(key.substring(2))).intValue();
    if(aList!=null) {
    for(int i=0; i<aList.size(); i++) {
    ABean abean = (ABean) aList.get(i);
    if(abean.getKey()==selectedKey) {                                             
    aList.remove(i);
    break;
    public UICommand getCommandLnk() {
    String id = (String) request.getAttribute("key");
    UICommand commandLnk = new UICommand();
    commandLnk.setId("key" + id);
    UIOutput outTxt = new UIOutput();
    outTxt.setId("id"+id);
    outTxt.setValue("X");
    commandLnk.getChildren().add(outTxt);
    MethodBinding mb = app.createMethodBinding("#{bckbean.closeTask}", new Class[]{ActionEvent.class});
    commandLnk.setActionListener(mb);
    commandLnk.setImmediate(true);
    return commandLnk;
    }

    You cud define jsObjectNeeded and onClientClick properties for the htlm component and catch the event to find itz ID.
    This might help you:
    Accessing HTMLB form values from JAVASCRIPT
    To give you an idea abt how the code works:
    Portal: Bug in the  radio button's javascript api
    Regards,
    N.
    Plz click a star if it helped.

  • Creating custom command link rather than command button

    Hi
    I have a custom component which I extended from UICommand. I am trying to show it as a link but it shows up as a button. I know that both command_link as well as command_button are UICommand components... How do I make my custom component show up as a link rather than a button?
    Thanks

    Hi
    I have a custom component which I extended from
    UICommand. I am trying to show it as a link but it
    shows up as a button. I know that both command_link as
    well as command_button are UICommand components... How
    do I make my custom component show up as a link rather
    than a button?
    ThanksThe renderer actually used is based on the value returned by getRendererType(). If you are subclassing UICommand but not overriding this (or setting it in some other way), you're going to find that the default renderer type for a UICommand is "Button". You'll want to change it (to "Link" in this case) to select the hyperlink rendering.
    Craig

  • Best approach to using command link from within a custom component

    I have created a navigation component "Menu" , used as follows:
    <custom:menu />The contents of menu are stored in an xml file and the Menu component delegates the rendering to a custom renderer, which basicaly writes out html links. (Actually, the component does a lot more, but I'm simplifying to get to the point.).
    Sometimes, I need to render a command link instead of a regular html link. I don't want to re-invent the wheel here, so I want to delegate this to the standard command link components.
    Approach 1: create child components within the Menu component constructor, e.g.
    HtmlCommandLink c = new HtmlCommandLink();
              MethodExpression e = FacesContext.getCurrentInstance().getApplication().getExpressionFactory().
                   createMethodExpression(FacesContext.getCurrentInstance().getELContext(),
                   "#{registrationEditor.enterSubmission}",
                   String.class,
                   new Class[] { });
              c.setActionExpression(e);
              c.setValue("TestLink");
              c.setTransient(true);
              getChildren().add(c);Approach 2: delegate to the CommandLinkRenderer within my custom renderer, e.g.CommandLinkRenderer delegate = new CommandLinkRenderer();
                        HtmlCommandLink link = new HtmlCommandLink();
                        ExpressionFactory elFactory =
                             FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
                        MethodExpression actionExpression =
                             elFactory.createMethodExpression(context.getELContext(), c.getExpression(), String.class, new Class[] {});
                        link.setActionExpression(actionExpression);
                        link.setParent(component.getParent());
                        link.setValue(c.getLabel());
                        delegate.encodeBegin(context, link);
                        delegate.encodeChildren(context, link);
                        delegate.encodeEnd(context, link);Is either of these a respectable approach - they feel a little hackish. If so, which do you prefer. If not, what do you recommend?
    Thanks
    Richard

    I think either is a fine approach and not at all hackish. I prefer the second, although I couldn't tell you why (just a gut feeling). That said, I haven't tried either so there may be hidden problems. My main concern would be what happens when the request is submitted from the page, that the Restore View phase is done correctly so that the proper event is fired.

  • Command links are not rendering properly in panel collection toolbar facet

    Hi
    I am using jdev 11.1.2.3.0
    I added toolbar component to the toolbar Facet of panel collection component .
    Under the tool bar I added two command link components with name create and delete,
    the problem is at run time the buttons are not rendering properly,they are hiding,instead of links
    this symbol(>>) is displaying.
    On clicking the symbol,I am able to see the links,I used <af:spacer> after the links but not worked.
    what I have to do to render the links properly in the panel collection toolbar facet

    Hi Timo
    This is the code and I am using 11.1.2.3.0
         <f:facet name="toolbar">
                    <af:toolbar id="t1">
                            <af:commandImageLink icon="#{resource['images:create.png']}" text="Create" id="cbInsert">
                            <af:showPopupBehavior popupId="p1"/>
                        </af:commandImageLink>
              </af:toolbar>

  • Command links are not rendering properly in the toolbar facet of panel collection

    Hi
    I am using jdev 11.1.2.3.0
    I added toolbar component to the toolbar Facet of panel collection component .
    Under the tool bar I added two command link components with name create and delete,
    the problem is at run time the buttons are not rendering properly,they are hiding,instead of links
    this symbol(>>) is displaying.
    On clicking the symbol,I am able to see the links,I used <af:spacer> after the links but not worked.
    what I have to do to render the links properly in the panel collection toolbar facet

    Hi Timo
    This is the code and I am using 11.1.2.3.0
         <f:facet name="toolbar">
                    <af:toolbar id="t1">
                            <af:commandImageLink icon="#{resource['images:create.png']}" text="Create" id="cbInsert">
                            <af:showPopupBehavior popupId="p1"/>
                        </af:commandImageLink>
              </af:toolbar>

  • Custom Command - Invoke a link file

    Hi All,
    I was able to write custom command that could invoke an exe file in the device. The exe file had to be present in the Windows folder (or) root folder (or) Oracle Lite installation folder.
    Is the only file that could be invoked by System.execute method are "exe" files. Can I invoke any link or batch files in Windows Mobile, so that would be helpful in invoking my java programs instead of having to invoke exe.
    Thanks,
    Aravind.

    We are able to launch a .bat file using the System.execute("cmd /C \test.bat") call from a customize command.
    Though cmd.exe is not available in Windows Mobile 6 prof by default. It can be installed from the windows mobile developer power toys.
    We need to do a registry tweak to get it working.
    We were trying to launch a batch file from custom command because we want to launch a java program whenever a custom command is sent from the mobile server.
    We are also successful in launching a java program directly without using cmd.exe as following:
    <c:set var="j9_home" value="\\IBM\\WECE\\WM60\\PRO\\ARM\\FOUN11\\bin\\"/>
    <c:set value="${System.Execute (j9_home+"j9w \Test\HelloWorld")}"/>
    This works fine and it launches the HelloWorld java program on windows mobile 6 prof emulator.
    The problem is that it does not work if the j9_home point to a folder path which contains spaces
    ex <c:set var="j9_home" value="\\Program Files\\IBM\\WECE\\WM60\\PRO\\ARM\\FOUN11\\bin\\"/>
    Is there is a workaround available to get it working ?
    We have to re-install the j9 to a folder whose folder path does not contain spaces to get it working.

  • Command Link in ADF table is not working/ PPR event not getting fired

    Hi All,
    I am having ADF Table, in that one column is with command link if click on command link, it is not navigating to corresponding page or method of a bean. If i give same command link out of the table it working fine, this issue i am facing is in IE9.
    if i use IE in compatibility mode the links works fine, even in IE8 version also.
    Browser: IE 9
    Jdev version: 11.1.1.5.0
    I tried all possible things, but nothing workout for me.
    showPopupBehavior not working in IE9 for af:table buttons (jdev11.1.1.5.0)
    Partial page rendering not working in ie9
    Command Link in ADF table is not working
    Thnks

    Hi,
    please file a bug if you have a customer support contract and provide a testcase
    Frank

  • Add custom command in the context KM menu

    Hello All,
    Wanna know if its possible to add custom command in the KM context menu?
    If yes, please guide as to how can I do this....
    Example: Print option in the context menu
    Awaiting Reply.
    Thanks & Warm Regards,
    Ritu

    Hi Ritu,
       Yes, you can do that.
       First of all, you should identify the layout set that you are using. If you do not know it you can enable debugging setting option.
       Then, you must know where you need to appear this command. I mean, in a folder, link or document.
       If you are using a standard layout you should not modify it, you must duplicate it (you ca use advance copy).
      The command must be added in a group command, you can use an exist command or create a new one. (System Administration-System Configuration-KM-CM-User Interface-Command Groups). Before that you can create your command.
    These groups are referenced from collection and resource renderer. A layout set is a set of collection and resource rendeders.
    You should read this link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/98/dd48a9b4a197489a54187c99372bce/frameset.htm
    Once you added your comamnd a group and assign this group in your collection or resource renderer. You have to assign this layout to your km navigation iview or directly the folder.
    Don't forget to enable presentation service in your repository in order to change the layout.
    Patricio.

  • Command Link as a row of a datatable in JSF

    Hi All,
    I am new to JSF. I have a Datatable with n number of rows.
    I would like to have a command Link in each of the rows, so that when i click the command link i should get the data of the entire row in my edit page.
    Can anyone suggest how can i achieve this.
    Regards
    SN

    Hi,
    Do following:
    1- add a datatable in your page and fill it with data comes from database(Assume u have no problem with datatable)
    2- add a column as commandLink in data table. e.g.
    <h:column>
    <f:facet name="header">
    <h:outputText value="name" />
    </f:facet>
    <t:commandLink action="editObject" immediate="true" >
    <h:outputText value="#{theobject.name}" />
    <t:updateActionListener property="#{objectForm.id}" value="#{objectDto.id}" />
    </t:commandLink>
    </h:column>
    in this code:
    "name" is header of column,
    "editObject" is defined in navigation rule to navigate to edit page, lets say object form.
    "theobject.name" the value that mouse gets finger over it!
    "objectForm.id" the pointer to an "id setter" of a managed bean (named objectForm) defined in faces-config.xml. In this setter you can load corresponding data from database
    "objectDto.id" the pointer to an "id getter" of a managed bean (named objectDto) defined in faces-config.xml. this getter return the id of the entity row you clicked on.
    3- Clearly, you need to defined all managed beans, and dont forget to have a customized setter for id of objectForm (setId) to load the entity from database and fill all editable properties(as you like) in this function (setId).
    4- you need a JSF page to redirect to it for editing properties and feed by objectForm
    5- Thats it :)

  • Command link used as tree node

    I'm using an ADF Tree where one of my nodes is a command link. I've given the link an id="myLink".
    When I run the page, the tree shows up fine with just one node.
    But the View Page source does not contain any entry that says id="mylink".
    Where could be the problem?
    Thanks
    RV

    Hi,
    I assume you use ADF Faces RC, because otherwise you would have posted this to the JDeveloper forum. If you add a command link t a node, then this command link is used for any node that is rendered for the tree (unless you implemented it in a way that only has exactly one command link component showing in the whole tree - which I don't think you have).
    In JSF you cannot have more than one component with a specific ID, which means that assigning an ID to a command link in a tree doesn't make much sense.
    In ADF Faces RC, trees are active components, which means they are created in the DOM and not HTML. So using a DOM inspector like Firebug you should see your tree and link components
    <a id="j_id___jsp_tag_ctru4:7:myLink" class="xdk" href="#" onclick="return false;">commandLink 1</a>
    Frank

  • Command link display wrong

    I have a table with a commandLink nested into a column. command link display itemID.
    When I click the commandLink , it will take me to the item edit page(ADF Dialog).
    ** The problem is, Sometime I click first item in the table, command link switch to display third item
    and open pop up page to third item data.
    i develop by Toplink , JDeveloper 10.1.3.3.0, connect to Oracle10gR2 Database.
    The table in page display data from DB View.
    Code JavaServer Face address.jspx :
    <af:table value="#{bindings.findVAddressesByKey1.collectionModel}"
    var="row" rows="#{bindings.findVAddressesByKey1.rangeSize}"
    first="#{bindings.findVAddressesByKey1.rangeStart}"
    emptyText="#{bindings.findVAddressesByKey1.viewable ? 'No rows yet.' : 'Access Denied.'}"
    selectionState="#{bindings.findVAddressesByKey1.collectionModel.selectedRow}"
    selectionListener="#{bindings.findVAddressesByKey1.collectionModel.makeCurrent}"
    binding="#{backing_app_App_guaadd.table1}" id="table1"
    width="100%" partialTriggers="cmdEditaddGuaLink">
    <f:facet name="selection"/>
    <af:column sortProperty="cgFirstTName" sortable="false"
    headerText="#{res['app_guaadd.guaFirstLast']}">
    <af:outputText value="#{row.cgFirstTName} #{row.cgLastTName}"/>
    </af:column>
    <af:column sortable="false"
    headerText="#{res['appaddcus.adShareFlag']}"
    binding="#{backing_app_App_guaadd.column1}" id="column1"
    rendered="false">
    <af:outputText value="#{row.adShareFlag}"
    binding="#{backing_app_App_guaadd.outputText1}"
    id="outputText1"/>
    </af:column>
    <af:column sortProperty="adWavArea" sortable="false"
    headerText="#{res['appaddcus.adwavarea_status']}"
    rendered="false">
    <afh:tableLayout width="100%">
    <afh:rowLayout>
    <afh:cellFormat halign="center">
    <af:selectBooleanCheckbox value="#{row.ad_wav_area}"
    disabled="true"/>
    </afh:cellFormat>
    </afh:rowLayout>
    </afh:tableLayout>
    </af:column>
    <af:column headerText="#{res['appaddcus.adtype_status']}">
    <*af:commandLink* text="#{(row.adType=='C')?res['appaddcus.adtype1_status']:(row.adType=='O')?res['appaddcus.adtype2_status']:(row.adType=='R')?res['appaddcus.adtype3_status']:res['appaddcus.adtype4_status']}"
    binding="#{backing_app_App_guaadd.commandLinkEdit}"
    returnListener="#{backing_app_App_guaadd.refreshPage}"
    id="cmdEditaddGuaLink"
    useWindow="true" windowWidth="1100"
    action="#{backing_app_App_guaadd.guaEditLink_Action}">
    <af:inputHidden value="#{row.adPersonType}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdPersonType}"/>
    <af:inputHidden value="#{row.adW1Size}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdW1Size}"/>
    <af:inputHidden value="#{row.adW1Pos}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdW1Pos}"/>
    <af:inputHidden value="#{row.adF1Pos}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdF1Pos}"/>
    <af:inputHidden value="#{row.adG1Pos}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdG1Pos}"/>
    <af:inputHidden value="#{row.adP1Size}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdP1Size}"/>
    <af:inputHidden value="#{row.adType}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdType}"/>
    <af:inputHidden value="#{row.adWavArea}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdWavArea}"/>
    <af:inputHidden value="#{row.adGuaSeq}"
    binding="#{backing_app_App_guaadd.inputHiddenEditAdGuaSeq}"/>
    </af:commandLink>
    </af:column>
    <af:column sortProperty="adType" sortable="false" rendered="false"
    headerText="#{res['appaddcus.adtype_status']}">
    <af:outputText value="#{(row.adType=='C')?res['appaddcus.adtype1_status']:(row.adType=='O')?res['appaddcus.adtype2_status']:(row.adType=='R')?res['appaddcus.adtype3_status']:res['appaddcus.adtype4_status']}"/>
    </af:column>
    </af:table>
    Any help is appreciated.
    Thanks.

    I'm having same issue in JDev 10.1.3.4. When I click first item in the table to go to the detail page, command link switch to display third item. This happens only after I click on the column sorting or after createInsert new record.
    I used af:setActionListener for link from the table:
    <af:commandLink text="#{row.UsrUserid}" action="editUser">
    <af:setActionListener from="#{row.rowKeyStr}"
    to="#{processScope.requestRowKey}"/>
    </af:commandLink>
    I got the value from the detail pagedef:
    <action IterBinding="SssUsersView1Iterator" id="setCurrentRowWithKey"
    InstanceName="SSSServiceAppModuleDataControl.SssUsersView1"
    DataControl="SSSServiceAppModuleDataControl"
    RequiresUpdateModel="false" Action="96">
    <NamedData NDName="rowKey"
    NDValue="#{processScope.requestRowKey}"
    NDType="java.lang.String"/>
    </action>
    Any suggestions? Thanks.

  • My command link doesn't work

    hi all,
    i have a created a page where i am performing a web type search with search form and search results on the same page and i have also implemented the conditional display of search results table as directed by the ADFBC guide.
    i.e., I created a managed bean where in am setting the searchFirstTime flag. here is the code of my managed bean.
    public class UserState {
    private static final String SEARCH_FIRSTTIME_FLAG = "SEARCH_FIRSTTIME_FLAG";
    private HashMap hmUserSettings = new HashMap();
    public UserState() {
    try{
    System.out.println("setting the user settings in constructor");
    hmUserSettings.put(SEARCH_FIRSTTIME_FLAG,true);
    }catch(Exception e){
    e.printStackTrace();
    public boolean isSearchFirstTime(){
    Boolean firstTime = (Boolean)hmUserSettings.get(SEARCH_FIRSTTIME_FLAG);
    try{
    System.out.println("setting the search flag in isSearchFirstTime firstTime.booleanValue() :"+firstTime.booleanValue());
    if (firstTime == null){
    firstTime = true;
    }catch(Exception e){
    e.printStackTrace();
    return firstTime.booleanValue();
    public void setSearchFirstTime(boolean searchFlag){
    try{
    System.out.println("setting the search flag searchFlag :"+searchFlag);
    hmUserSettings.put(SEARCH_FIRSTTIME_FLAG, new Boolean(searchFlag));
    }catch(Exception e){
    e.printStackTrace();
    In the search results table one of the columns is a command link, clicking on which opens a pop up window where i have some more details being displayed.
    here is the code of my jspx page for the command link
    <af:commandLink text="#{row.OrderNumber}"
    binding="#{backing_TestDDPUD.commandLink1}"
    action="#{backing_TestDDPUD.commandLink1_action}"
    useWindow="true"
    partialSubmit="true"
    windowHeight="200"
    windowWidth="500"
    id="commandLink1"/>
    i have specified the action to be performed,in the backing bean of my page, here's the code
    public String commandLink1_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("setCurrentRowWithKey");
    Object result = operationBinding.execute();
    System.out.println("inside commandLink1_action");
    if (!operationBinding.getErrors().isEmpty()) {
    System.out.println("$$$$$$$$$$$$$$$ has errors $$$$$$$$$$$$4");
    return null;
    DCIteratorBinding ib = (DCIteratorBinding)bindings.get("OeOrderHeadersViewResultsIterator");
    Row row = ib.getCurrentRow();
    Number numHeaderId = (Number)row.getAttribute("HeaderId");
    FacesContext fc = FacesContext.getCurrentInstance();
    // 2. Create value binding for the #{data} EL expression
    ValueBinding vb = fc.getApplication().createValueBinding("#{data}");
    // 3. Evaluate the value binding, casting the result to BindingContext
    BindingContext bc = (BindingContext)vb.getValue(fc);
    // 4. Find the data control by name from the binding context
    DCDataControl dc = bc.findDataControl("TestDDAppModuleDataControl");
    // 5. Access the application module data provider
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    ViewObject vo = am.findViewObject("OeOrderLinesAllView");
    vo.setNamedWhereClauseParam("theHeaderId",numHeaderId);
    System.out.println((vo.getNamedWhereClauseParam("theHeaderId")));
    return "dialog:orderDetails";
    my problem is that now when i enter a search criteria and execute the search, the search results are displayed properly in the table but when i click on the command link it does not open the pop up window, it does not even enter into the commandlink1_action() method..here's the log which i get after i click on the command link..can somebody please tell me what is going wrong or what exactly is happening
    07/03/28 17:19:20 [363] Reusing a cached session application module instance
    07/03/28 17:21:03 [364] **** refreshControl() for BindingContainer :TestDDPUDPageDef
    07/03/28 17:21:03 [365] *** Using bean introspection to lookup value :result
    07/03/28 17:21:03 [366] Invoke method Action:999
    07/03/28 17:21:03 [367] DCInvokeMethod:Invoking TestDDAppModuleDataControl.dataProvider.setOrgPolicyContext()
    07/03/28 17:21:03 inside the setOrgPolicyContext
    07/03/28 17:21:03 blnSetOrgPolicyContext finally :true
    07/03/28 17:21:03 [368] Resolving VO:TestDDAppModule.OeOrderHeadersView for iterator binding:OeOrderHeadersViewIterator
    07/03/28 17:21:03 [369] DCUtil, RETURNING: <null> for TestDDAppModule.OeOrderHeadersView
    07/03/28 17:21:03 [370] Resolving VO:OeOrderHeadersView for iterator binding:OeOrderHeadersViewResultsIterator
    07/03/28 17:21:03 [371] DCUtil, returning:oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding, for OeOrderHeadersView
    07/03/28 17:21:03 [372] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    07/03/28 17:21:03 [373] valiateToken:Decompressed BC state:BCST:=0OeOrderHeadersViewIterator=-F-,OeOrderHeadersViewResultsIterator=-D-000100000004C30A031F,
    07/03/28 17:21:03 setting the user settings in constructor
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true
    07/03/28 17:21:03 [374] **** refreshControl() for BindingContainer :TestDDPUDPageDef
    07/03/28 17:21:03 [375] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true

    hi Frank,
    i have my table inside a panel page which is already sorrounded with h:form so i cannot sorround my table again with h:form or af:form. the command link in the page was working fine, till i included the code for the conditional display of the results table. If i look at the log printed after i click on the command link, i don't see any of the sop's being printed that i have given inside the commandlink1_action() method, i have a feeling that my action method is not being called at all and i am not able to figure out why the sop in the isSearchFirstTime() method is being printed 4 times.
    here is the entire code of my .jspx
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <afh:html binding="#{backing_TestDDPUD.html1}" id="html1">
    <f:loadBundle basename="UIResources" var="res"/>
    <afh:head title="SalesOrderTemplate" binding="#{backing_TestDDPUD.head1}"
    id="head1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    </afh:head>
    <afh:body binding="#{backing_TestDDPUD.body1}" id="body1">
    <af:messages binding="#{backing_TestDDPUD.messages1}" id="messages1"/>
    <h:form binding="#{backing_TestDDPUD.form1}" id="form1">
    <af:panelPage title="Change Me"
    binding="#{backing_TestDDPUD.panelPage1}"
    id="panelPage1">
    <f:facet name="menu1"/>
    <f:facet name="menuGlobal"/>
    <f:facet name="branding"/>
    <f:facet name="brandingApp"/>
    <f:facet name="appCopyright"/>
    <f:facet name="appPrivacy"/>
    <f:facet name="appAbout"/>
    <af:panelForm binding="#{backing_TestDDPUD.panelForm1}"
    id="panelForm1">
    <af:inputText value="#{bindings.OrderNumber.inputValue}"
    label="#{bindings.OrderNumber.label}"
    columns="#{bindings.OrderNumber.displayWidth}"
    binding="#{backing_TestDDPUD.inputText8}"
    id="inputText8"/>
    <af:inputText value="#{bindings.SoldToOrgId.inputValue}"
    label="#{bindings.SoldToOrgId.label}"
    columns="#{bindings.SoldToOrgId.displayWidth}"
    binding="#{backing_TestDDPUD.inputText39}"
    id="inputText39"/>
    <f:facet name="footer">
    <af:panelGroup layout="vertical"
    binding="#{backing_TestDDPUD.panelGroup1}"
    id="panelGroup1">
    <af:panelButtonBar binding="#{backing_TestDDPUD.panelButtonBar2}"
    id="panelButtonBar2">
    <af:commandButton actionListener="#{bindings.Execute.execute}"
    text="Search"
    disabled="#{!bindings.Execute.enabled}"
    binding="#{backing_TestDDPUD.commandButton2}"
    id="commandButton2">
    <af:setActionListener from="#{false}"
    to="#{UserState.searchFirstTime}"/>
    </af:commandButton>
    </af:panelButtonBar>
    </af:panelGroup>
    </f:facet>
    </af:panelForm>
    <af:table value="#{bindings.OeOrderHeadersView.collectionModel}"
    var="row"
    rows="#{bindings.OeOrderHeadersView.rangeSize}"
    first="#{bindings.OeOrderHeadersView.rangeStart}"
    emptyText="#{bindings.OeOrderHeadersView.viewable ? 'No rows yet.' : 'Access Denied.'}"
    binding="#{backing_TestDDPUD.table1}" id="table1"
    rendered="#{UserState.searchFirstTime == false}">
    <af:column sortProperty="OrderNumber" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.OrderNumber}"
    binding="#{backing_TestDDPUD.column1}" id="column1">
    <af:commandLink text="#{row.OrderNumber}"
    binding="#{backing_TestDDPUD.commandLink1}"
    action="#{backing_TestDDPUD.commandLink1_action}"
    useWindow="true" partialSubmit="true"
    windowHeight="200" windowWidth="500"
    id="commandLink1"/>
    </af:column>
    <af:column sortProperty="SoldToOrgId" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.SoldToOrgId}"
    binding="#{backing_TestDDPUD.column2}" id="column2">
    <af:inputText value="#{row.SoldToOrgId}"
    required="#{bindings.OeOrderHeadersView.attrDefs.SoldToOrgId.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.SoldToOrgId.displayWidth}"
    binding="#{backing_TestDDPUD.inputText2}"
    id="inputText2">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.OeOrderHeadersView.formats.SoldToOrgId}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="OrderTypeId" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.OrderTypeId}"
    binding="#{backing_TestDDPUD.column3}" id="column3">
    <af:inputText value="#{row.OrderTypeId}"
    required="#{bindings.OeOrderHeadersView.attrDefs.OrderTypeId.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.OrderTypeId.displayWidth}"
    binding="#{backing_TestDDPUD.inputText3}"
    id="inputText3">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.OeOrderHeadersView.formats.OrderTypeId}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="RequestDate" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.RequestDate}"
    binding="#{backing_TestDDPUD.column4}" id="column4">
    <af:inputText value="#{row.RequestDate}"
    required="#{bindings.OeOrderHeadersView.attrDefs.RequestDate.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.RequestDate.displayWidth}"
    binding="#{backing_TestDDPUD.inputText5}"
    id="inputText5">
    <f:convertDateTime pattern="#{bindings.OeOrderHeadersView.formats.RequestDate}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="OrderedDate" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.OrderedDate}"
    binding="#{backing_TestDDPUD.column5}" id="column5">
    <af:inputText value="#{row.OrderedDate}"
    required="#{bindings.OeOrderHeadersView.attrDefs.OrderedDate.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.OrderedDate.displayWidth}"
    binding="#{backing_TestDDPUD.inputText6}"
    id="inputText6">
    <f:convertDateTime pattern="#{bindings.OeOrderHeadersView.formats.OrderedDate}"/>
    </af:inputText>
    </af:column>
    </af:table>
    </af:panelPage>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_TestDDPUD-->
    </jsp:root>
    thanks,
    lavanya

  • Hide/Show a Panel group or Panel Box with a command link

    I need to show and hide a panel group/box that has a lot of components inside ..with a command link ...I need to do this with partial submit ....please advise.
    <af:commandLink >
    hide the panel box with all the comps inside it ..change commandlink text ....
    use the same command link to show the panel box and change the command link
    text back
    </af:commandLink>
    <af:panelGroup layout="vertical">
    <af:panelBox>
         <af:panelGroup>
    ALOT of components .......
         </af:panelGroup>
    </af:panelBox>
    </af:panelGroup>
    I tried with partial trigger ..I tried everything i know ..it did not work .....it only worked I do a I full submit and setting some processScope(session) variables ..
    Thanks.

    Hi,
    - have a managed bean in session scope
    - define a boolean variable that is set to true
    - expose the variable through a public method
    - use EL on the panelBox rendered property to link to this boolean method
    - define an action listener on the command link and set the autosubmit property to true
    - use the action listener to set the boolean value
    - define a value for the ID property of the command link
    - set the ID vaule to the PartialTrigger property of the panelGroup component
    Frank

  • ADF Tree Command Link + Content Menu

    Hi,
    I am trying to build a tree, in which the nodes should have a command link and a context menu enabled. Using JDeveloper 11.1.1.6.0, however the context menu is not showing up, if the command link is enable for a particular node. If the command link option is not set for a node, then the menu option does shows up. Below is what my code looks like. Has anyone faced a similar issue/know of a solution?
    My Code is something like -
    *<f:facet name="contextMenu">*
    <af:popup id="p1" contentDelivery="lazyUncached">
    <af:menu text="Location Menu" id="m31"
    visible="#{pageFlowScope.TreeData.showLocationMenu}" contentDelivery="immediate">
    <af:commandMenuItem text="Add new Department"
    id="cmi2" partialSubmit="true" immediate="true"
    actionListener="#{pageFlowScope.TreeData.createDepartment}">
    <af:setPropertyListener from="#{node.viewType}"
    to="#{pageFlowScope.formView}"
    type="action"/>
    <f:attribute name="node" value="#{node}"/>
    </af:commandMenuItem>
    </af:menu>
    </facet>     
    <f:facet name="nodeStamp">
    *<af:commandLink text="#{node.key} #{node.text}"*
    *action="#{pageFlowScope.DynamicRegionBean.getDep}" id="cl1" partialSubmit="true" immediate="true"/>*
    *</f:facet>*
    Thanks
    Sachin

    Hi Timo,
    Yeah... adding an output text, shows the context menu on the text, however I was looking for something like one 'text' rendered and it doing the option of both.
    Something like what we can do for any hyper link, if click on it, it opens that link or else if I right click on the link, it gives me options like - Open in new Tab/Window etc.
    Any suggestions??
    Thanks
    Sachin

Maybe you are looking for

  • Applet very slow and shows no activity, but its running

    I have a new applet for the users, but I am reluctant to implement until I get some others opinions. It is very slow (30 - 40 seconds) Before it outputs a screen with about 20 lines, it reads 90 different html files. It looks at the forth rec of each

  • Screen is blurry and angled

    hi, i m a mac user and suddenly i can t get firefox to work properly. the screen is all "funny" (it would be best if i could send you a screen shot), angled and blurry. I have re downloaded and reinstalled firefox but the issue persists. any other so

  • Can i use facetime if I upgrade from Mac Os 10.8 to lion?

    Can someone tell me if it's possible to use face time on my mac book pro after this update? Alss Icloud?

  • Converting smart forms as a pdf in different languages

    Hi Experts, I have been created a smart form and later on i converted it to in pdf also, but how can i convert a smart form output into different languages (English(defualt), German, Italian, French, Spanish,). Can anyone tell me about the idea behin

  • How to make downpayment to onetime vendor

    Hi experts, When I post a down payment to one-time vendor, the system responded that: Special GL indicator to vendor is not define. How could I fix this error? First let me know whether it is possible or not (downpayment to one time vendor) Please he