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.

Similar Messages

  • Dynamically generate JSF Source code in a JSP

    Hi,
    I have a JSP and instead of writing the JSF source Code like:
    <h:inputText
    styleClass="entryInput"
    id="textNumberOfServerMachinesInput"
    value="#{DataAccess.value}"
    valueChangeListener="#{InputValueChanged.processValueChange}">
    </h:inputText>
    manually in the jsp I want the JSF source code to be added dynamically to the jsp.
    So what I want is including a tag in the jsp and this tag generates JSF source code like seen above.
    This source code should then be treated just the way it would be if I had written it manually in the JSP. This means that the dynamically generated JSF code must be interpreted and all Listeners and Beans work just fine.
    How can I make this???

    Hi,
    I have a smiliar problem:
    JSP:
    <h:panelGrid binding="#{fileUploadGrid.panelGrid}">
       <%-- emty in jsp --%>
    </h:panelGrid>The panel should be populated with items the backing bean creates in source code:
    FileUploadGrid.java
    public void setUploadFieldNumber(int uploadFieldNumber) {
        this.uploadFieldNumber = uploadFieldNumber;
        this.refresh();
    private void refresh() {
        if (this.panelGrid == null)
          this.createPanelGrid();
        List children = this.panelGrid.getChildren();
        children.clear();
        for (int i = 0; i < this.uploadFieldNumber; i++) {
          HtmlOutputText out = new HtmlOutputText();
          out.setTitle("Image " + i);
          out.setRendered(true);
          HtmlInputText in = new HtmlInputText();
          children.add(out);
          children.add(in);   
    private void createPanelGrid() {
        this.panelGrid = new HtmlPanelGrid();
        this.panelGrid.setColumns(2);
        this.panelGrid.setCellpadding("1");
        this.panelGrid.setBorder(1);
        this.panelGrid.setWidth("50%");
        this.panelGrid.setRendered(this.isRendered());
    public void setPanelGrid(HtmlPanelGrid panelGrid) {
        this.panelGrid = panelGrid;
      public HtmlPanelGrid getPanelGrid() {
        return this.panelGrid;
    }The backing bean is initialized in faces-config.xml:
    <managed-bean>
      <managed-bean-name>fileUploadGrid</managed-bean-name>
      <managed-bean-class>org.smi.pte.isf.FileUploadGrid</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
        <property-name>rendered</property-name>
        <value>true</value>
      </managed-property>
      <managed-property>
         <property-name>uploadFieldNumber</property-name>
         <value>6</value>
      </managed-property>
    </managed-bean>The problem is: although the debug output of the faces framework (I use it along with Tomcat) shows that the in- and output fields are added correctly to the panel, the page remains empty at display.
    Thanks in advance for any help.
    F. Eckhardt

  • 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?

  • To get the value of Dynamically generated Items

    Hi , i am Writting an applications using HTMLDB, i have a page which is an input page for inputting number of hours you worked on different projects i am createing the Input text filed items dynamically through web PL/SQL , what i want to do is when the user click on the sumbit button i want to read the values of the ITem and insert into a table , since they are dynamically created Items how does HTML DB handle them is there a way to get the Value for the items i tried displaying &P9_1. which is one of the items created dynamicaly but empty value is displayed.
    Any assiatnce is of great help.
    Thanks in advance
    Bharath

    This is done once the page is submitted, and the values are available in the arrays e.g. htmldb_application.g_f01 etc.
    This is covered in the manual

  • 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

  • Making a dynamically generated field as Read Only

    Hi All,
    I am extending a standard CO and in that I wanted to make an entire table as read only. I checked by personalizing the page from front end, but as the items are dynamically generated fields , they are not visible in personalize page.
    So is there any way to cach these fields and make them read only programmatically.
    Thanks,
    Srikanth

    Hi Pratap,
    I have looked into the view source and took the name of a input type ( There is no ID for the field) and used it in findIndexedChild, but it returns a null. I guess this is happening is the current CO is a mere region level CO and it is not being given the access.
    The code in the class file is as follows :
    public static void processTable(OAPageContext oapagecontext, OAWebBean oawebbean)
    oapagecontext.startTimedProcedure("CrossTableCO", "processTable");
    String s = null;
    String s1 = null;
    int i = oawebbean.getIndexedChildCount();
    String as[[][]] = new String[7];
    int j = 0;
    String as1[[][]] = new String[i][6];
    for(int k = 0; k < oawebbean.getIndexedChildCount(); k++)
    UINode uinode = oawebbean.getIndexedChild(k);
    if(!(uinode instanceof OAMessageStyledTextBean))
    continue;
    OAMessageStyledTextBean oamessagestyledtextbean = (OAMessageStyledTextBean)uinode;
    if(oamessagestyledtextbean.isRendered())
    oamessagestyledtextbean.setRendered(false);
    oamessagestyledtextbean.setAttributeValue("benCustomBeanRender", "Y");
    if("TotalPlanLabel".equals(oamessagestyledtextbean.getUINodeName()))
    s1 = oamessagestyledtextbean.getLabel();
    continue;
    if(s == null)
    s = oamessagestyledtextbean.getViewUsageName();
    as[j][0] = oamessagestyledtextbean.getViewAttributeName();
    as[j][1] = oamessagestyledtextbean.getSortByAttributeName();
    as[j][2] = oamessagestyledtextbean.getLabel();
    as[j][3] = oamessagestyledtextbean.getExportByViewAttrName();
    as[j][4] = oamessagestyledtextbean.getDestination();
    as[j][5] = oamessagestyledtextbean.getUINodeName();
    as[j][6] = oamessagestyledtextbean.getDataType();
    if(as[j][4] != null && as[j][5] != null)
    as1[j][0] = as[j][5];
    as1[j][1] = as[j][0];
    as1[j][2] = s;
    as1[j][3] = as[j][4];
    as1[j][4] = as[j][6];
    as1[j][5] = as[j][3];
    j++;
    continue;
    if("TotalPlanLabel".equals(oamessagestyledtextbean.getUINodeName()))
    s1 = "XXHideXXTotalXX";
    oawebbean.setAttributeValue("CrossTableUpdateInfo", as1);
    oawebbean.setAttributeValue("CrossTableRenderCount", Convert.getString(j));
    if(s == null)
    return;
    OAViewObject oaviewobject = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject(s);
    if(oaviewobject == null || !oaviewobject.isPreparedForExecution() || oaviewobject.first() == null)
    return;
    } else
    oawebbean.addIndexedChild(createTable(oawebbean, oaviewobject, as, j, s1));
    oawebbean.setAttributeValue("CrossTableRowCount", Convert.getString(oaviewobject.getRowCountInRange()));
    oapagecontext.endTimedProcedure("CrossTableCO", "processTable");
    return;
    private static UINode createTable(OAWebBean oawebbean, OAViewObject oaviewobject, String as[][], int i, String s)
    int j = oaviewobject.getRowCountInRange();
    DataTextNode datatextnode = new DataTextNode(new DataBoundValue("text"));
    String as1[] = new String[j + 1];
    CrossTableData acrosstabledata[] = new CrossTableData[i];
    int k = -1;
    for(int l = 0; l < i; l++)
    acrosstabledata[l] = new CrossTableData(new CrossTableCellData[j + 1]);
    for(int i1 = 0; i1 <= j; i1++)
    if(i1 > 0)
    try
    if(s != null && j > 1 && CT_NUM_MINUS_ONE.equals(oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("GroupOiplId")))
    as1[i1] = s;
    else
    as1[i1] = (String)oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("Name");
    catch(Exception exception)
    datatextnode = null;
    as1[i1] = "";
    if(k < 0 && j > 1 && "XXHideXXTotalXX".equals(s) && CT_NUM_MINUS_ONE.equals(oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("GroupOiplId")))
    k = i1;
    for(int j1 = 0; j1 < i; j1++)
    if(i1 == 0)
    acrosstabledata[j1].getData()[i1] = new CrossTableCellData(as[j1][2]);
    else
    acrosstabledata[j1].getData()[i1] = new CrossTableCellData(null, as[j1][2], oaviewobject, i1 - 1, as[j1][0], as[j1][1], as[j1][3], as[j1][4], as[j1][5], as[j1][6]);
    TableBean tablebean = new TableBean("CrossTable", new ArrayDataSet(acrosstabledata), null, null, datatextnode, new ArrayDataSet(as1, "text"));
    tablebean.setWidth("100%");
    tablebean.setSummary(" ");
    tablebean.setNameTransformed(false);
    tablebean.setTableFormat(new DictionaryData("tableBanding", "rowBanding"));
    tablebean.setID((new StringBuilder()).append("CrossTable").append(oawebbean.getID()).toString());
    oawebbean.setAttributeValue("CrossTableId", tablebean.getID());
    DictionaryData adictionarydata[] = new DictionaryData[j + 1];
    Object obj = null;
    Object obj1 = null;
    for(int k1 = 0; k1 <= j; k1++)
    OAWebBean oawebbean1 = createColumn(k1);
    if(k1 == k)
    oawebbean1.setRendered(false);
    tablebean.addIndexedChild(oawebbean1);
    if(k1 == 0)
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "textFormat");
    continue;
    try
    String s1 = (String)oaviewobject.getRowAtRangeIndex(k1 - 1).getAttribute("TextFormat");
    if("Y".equalsIgnoreCase(s1))
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "textFormat");
    else
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "numberFormat");
    catch(Exception exception1)
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "numberFormat");
    tablebean.setColumnFormats(new ArrayDataSet(adictionarydata));
    return tablebean;
    private static OAWebBean createColumn(int i)
    OAFlowLayoutBean oaflowlayoutbean = new OAFlowLayoutBean();
    OAMessageTextInputBean oamessagetextinputbean = new OAMessageTextInputBean();
    OAMessageStyledTextBean oamessagestyledtextbean = new OAMessageStyledTextBean();
    OAMessageDateFieldBean oamessagedatefieldbean = new OAMessageDateFieldBean();
    OASwitcherBean oaswitcherbean = new OASwitcherBean();
    Hashtable hashtable = new Hashtable();
    hashtable.put("CtPPRTrgCol", new DataBoundValue(new CrossTableColumnData(i, "Name")));
    oaswitcherbean.setNamedChild("input", oamessagetextinputbean);
    oaswitcherbean.setNamedChild("date", oamessagedatefieldbean);
    oaswitcherbean.setChildNameBinding(new CrossTableColumnData(i, "Render"));
    oaflowlayoutbean.addIndexedChild(oaswitcherbean);
    oaflowlayoutbean.addIndexedChild(oamessagestyledtextbean);
    oamessagetextinputbean.setNameBinding(new CrossTableColumnData(i, "Name"));
    oamessagetextinputbean.setTextBinding(new CrossTableColumnData(i, "Text1"));
    oamessagetextinputbean.setAttributeValue(DESCRIPTION, new DataBoundValue(new CrossTableColumnData(i, "Label")));
    oamessagetextinputbean.setAttributeValue(COLUMNS_ATTR, "12");
    oamessagetextinputbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, OAWebBeanUtils.getFirePartialActionForSubmit(oamessagetextinputbean, null, "update", hashtable, null));
    oamessagetextinputbean.setDataType("NUMBER");
    oamessagetextinputbean.setAttributeValue(READ_ONLY_ATTR, new DataBoundValue(new CrossTableColumnData(i, "ReadOnly")));
    oamessagetextinputbean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, new DataBoundValue(new CrossTableColumnData(i, "SubmitValidator")));
    oamessagedatefieldbean.setNameBinding(new CrossTableColumnData(i, "Name"));
    oamessagedatefieldbean.setTextBinding(new CrossTableColumnData(i, "Text1"));
    oamessagedatefieldbean.setValueBinding(new CrossTableColumnData(i, "Text1"));
    oamessagedatefieldbean.setAttributeValue(DESCRIPTION, new DataBoundValue(new CrossTableColumnData(i, "Label")));
    oamessagedatefieldbean.setAttributeValue(COLUMNS_ATTR, "12");
    oamessagedatefieldbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, OAWebBeanUtils.getFirePartialActionForSubmit(oamessagedatefieldbean, null, "update", hashtable, null));
    oamessagedatefieldbean.setDataType("DATE");
    oamessagedatefieldbean.setAttributeValue(READ_ONLY_ATTR, new DataBoundValue(new CrossTableColumnData(i, "ReadOnly")));
    oamessagestyledtextbean.setTextBinding(new CrossTableColumnData(i, "Text2"));
    return oaflowlayoutbean;
    Pls let me know for any clarifications.
    Thanks,
    Srikanth

  • Resetting the firewall?

    we have Yosemite on both of our Macs at home; an early-2008 Mac Pro and a 2013 iMac. the firewall on both of the Macs is broken.
    when the firewall is broken, processes are listed instead of packages, and the firewall actually stops all traffic irrespective of the custom app settings. turning the firewall off and on again does not fix the problem. removing all processes from the custom list does not fix the problem. rebooting the Mac does not fix the problem. in the past, complete clean reinstallation of the OS did not fix the problem.
    with Mavericks, I was able to delete the alp.plist file (/Library/Preferences/com.apple.alf.plist) and reboot to fix the problem. that's no longer possible with Yosemite because Yosemite seems to be caching the data and reinstating it after a reboot. the result is that the firewall is permanently broken.
    both of our Macs are now exposed because their firewalls need to be turned off to allow file sharing and screen sharing to work. don't tell me that because we're behind an NAT router that we don't need our firewalls. that's rubbish!
    I've reported this serious security bug to Apple multiple times. they're acknowledged it privately but have so far been unable to fix it.
    does anyone know how to reset the firewall on Yosemite?
    a Terminal command-line would be nice.
    any other pref/setting/config files that I could delete to reset the firewall?
    cheers,
    Gregory

    that worked before Yosemite.
    I've found that I can usually reset the firewall now by:
    open Security & Privacy/Firewall/Firewall Options and delete all of the services/processes/applications.
    turn off the Firewall.
    turn off all Sharing services.
    turn on the Sharing services I need.
    turn on the Firewall.
    at this point, I usually get asked to allow/reject access to a process (not application) called 'kdc'. I allow this process because it seems to be involved in the Firewall process itself. when I then open Firewall Options, the 'kdc' process will however not be listed, and the Firewall seems to work as expected.
    fortunately, this method seems to work and doesn't require a Reboot... at least for now.
    I don't know if it matters, but I've also changed another security aspect on our Macs. I now have a dedicated Admin account. our 'people' accounts no longer have admin privileges. someone here in the discussions community suggested this for better security and it makes a lot of sense. this change means that during the Firewall reset procedure above, I have to enter the admin's account/password 3 or 4 times but I don't mind the extra hassle for the extra security.

  • Accessing Dynamically Generated Spry Checkboxes

    I've got a list with checkboxes that is generated with a data
    set. When the user checks some boxes and clicks "Assign" I need the
    assign function to run, serializing the checkbox values and running
    an ajax update. However, when I run my loop in the function to add
    each checkbox to an array, I always get the value of the checkbox
    as undefined....and the length as well.....I'm wondering, if a
    checkbox is generated dynamically in a Spry repeat region, does it
    get added to the DOM? Am I missing something?

    Let me try to make that more understandable.
    I have 2 forms. 1 Form contains a repeating Spry list that
    generates checkboxes. The ID's and Value's of the checkboxes are
    dynamically generated based on the dataset.
    My 2nd form is a dummy form, just one I built to test - no
    spry, no nothing - just 3 check boxes with the same names and
    different values.
    When I run my function based on the dummy form, it does
    everything I want it to. When I run the form on the Spry form, it
    breaks.
    I inspected the element w/ Safari and saw the Source still
    shows the Spry code, however, the DOM shows the executed Spry
    (there's really multiple checkboxes).
    Has anybody else run into this type of problem? It's driving
    me nuts and I'm 21 hours past deadline.

  • Drop down required for fields in dynamically generated structure

    Hi All,
    I have an application where i am  entering the structure name in the inputfield and dynamically generating the structure on the screen with all the fields of it.
    But i need to show a dropdown for a particular field which contains values in its domain (f4)  .
    what is happening now , suppose i have given structure as SBOOK and i get all the components of the structure now for CUSTTYPE i am getting the f4 help but instead i need a dropdown .....
    how can i achieve that ????
    hope u understood the requirement ....
    Thanks
    Haritha

    Hi,
    Are you using TABLE or ALV elements.
    Get the column reference of the TABLE for CUSTYPE.
    You can create an object of tyep DRPBYKEY and insert this cell editor.
    As it has domain values, You need to set the VALUESET using the IF_WD_CONTEXT_NODE_INFO for that attirbute.
    Regards,
    Lekha.

  • Resetting the Admin password in single user mode

    Ok, my friend bought an old Imac from someone she went to school with with OS 10.4.2 on it. It works fine except that she can not install any programs because there is an admin password that she does not know. She asked the person she bought it from, he says he doesn't even remember setting a password. Normaly with this issue id just pop in the install disk and reset it from there, except neither of them have the install disk, and my install disk is to current for the machine. Does anyone know how I can reset the admin acount using single user mode commands? I can do it on my Mac Book pro but it doesn't seem to work the same way on 10.4. Please help!
    EDIT: It is a Power PC G3 if that helps.
    Message was edited by: CartooNxHerO

    CartooNxHerO wrote:
    Ok, so I used the advice from the third link you gave me but i'm still in single user mode trying to figure out how to delete the users home folders.
    Message was edited by: CartooNxHerO
    You do not need to delete "the users home folders". Nor do you need to delete the netinfo database. Here are two proceedures:
    Change Password
    Mac OS X:
    Changing or resetting an account password via GUI:
    Resetting a user's password
    Resetting the original administrator account password
    http://docs.info.apple.com/article.html?artnum=106156
    You do not have a CD/DVD
    Changing password from single user mode:
    You can also change the administrator's password from single user mode or create a new administrator account.
    You need to get into single use mode for steps one and two that are listed below.
    This page will tell you how to get into single user mode.
    http://support.apple.com/kb/HT1492
    Basically, you hold down the command-s key then powering on your machine. The command key has a little apple symbol on the lower left. It is between the alt/option key and the space bar. On a PC keyboard, it will be the windows key, I think.
    1) You can change the password on an account. ( Do you know Unix. You are in a Unix single user console. ) The setup commands you need should be listed on the screen. For Mac OS 10.4.11, the commands are:
    # Type the follow two instructions to access the startup disk in read/write:
    /sbin/fsck -fy
    /sbin/mount -uw /
    # Start up some utility processes that are needed.
    sh /etc/rc
    # You will probably need to press the return key once the system stops typing.
    # To find out the users on the system type, use the list command. The l is a lower case L:
    ls /Users
    # One of these accounts will be the administrator.
    # Pick one of the users which I'll call a-user-name and type it in this command:
    passwd a-user-name
    # and enter the new user password. You need six characters.
    # You will need to enter your password twice. Your typing will not show up on the screen just
    # press enter when you complete the typing.
    # For cryptic information on these commands try:
    man ls
    man passwd
    The root account isn't enabled by default. I am not sure if changing the password on root will enable it.
    2) Get the Mac to set up an additional administrative account. You can then change the password on your old account.
    Start with your computer power off. Hold down command-s. Power on your computer.
    Type in the following:
    The first two commands will depend on your release of Mac OS X. Look at what is typed out in the console to determine the exact format.
    # Type the follow two instructions to access the startup disk in read/write. Press return after each command.
    /sbin/fsck -fy
    /sbin/mount -uw /
    cd /var/db
    pwd
    #List all files. The l is a lower case L.
    ls -a
    #The move command acts as a rename command in this format.
    mv -i .applesetupdone .applesetupdone.old
    reboot
    Once you've done that the computer reboots and it's like the first time you used the machine. Your old accounts are all safe. From there you just change all other account passwords in the account preferences!!
    Limnos adds detailed explainations:
    http://discussions.apple.com/message.jspa?messageID=8441597#8441597
    The above the idea came from a post by JoseAranda at September 9, 2006 3:48 AM
    http://www.askdavetaylor.com/howdo_i_reset_my_mac_os_x_admin_rootpassword.html
    You will need to scroll down to see this post. Search for applesetupdone
    Or see:
    http://superpixel.ch/articles/running-setup-assistant-again/
    Once you have a new administrative account, you can change the password of your old administrative account
    blue apple > System Preferences > Accounts

  • [CS3]  Custom Data Links for InCopy story

    Hi,
    I want to create custom data links for InCopy story.
    I am retrieving incopy story from the database and importing it on the document. I have created custom data link as shown in the samples but if I open the indesign document in InCopy I get message - no incopy story found - galley and story view are not avaiable.
    Also when I import InCopy file it is also added in Assignment Panel. I want to handle check-in/check-out on my own.
    Is there any special thing for creating InCopy Data Links ?
    Thanks in Advance.
    Anderson

    Hi Norio
    Thanks a lot for your help and your hints.
    Its my first time to solve a problem like this. And I have no idea what I have to do exactly. I mean I see the samples in the SDK, see the properties and so on. And I suppose I have to add my property to kINXScriptManagerBoss. But thats all at the moment.
    I don't know what I have to do exactly. I don't know what elements I have to add. I don't know how I can add a custom defined variable type as a property.
    I have a structure defined for my slugs:
    struct structTabFlowTableModelSlug
       int32 iUIDTableModel;   // ID des Tabellenmodells
       int32 iLinkPASHID;      // Entspricht der ID der Produktion LinkPASHID
       int32 iDtpTableID;     // Entspricht der ID der DTP Tabelle (Tabelle DtpTable)
      void reset() {
         iUIDTableModel = -1;
         iLinkPASHID = -1;
         iDtpTableID = -1;
    typedef structTabFlowTableModelSlug stTabFlowTableModelSlug;
    And I think I have to add this structure as a property. But does this work? How?
    In my plugin the slugs are added to a ITableModel interface. So I suppose I have to add the property to this scripting element. But I am not sure.
    Its a bit tricky for me to implement this.
    But anyway, thanks for your help.
    Regards
    Hans

  • JSF HTML Command Button: Prevent Page Reload

    I know that for ADF Faces Core Command Buttons, you can set partialSubmit to true to prevent the page from reloading. I need to do the same thing for a JSF HTML Command Button, but there is no such property. I really just want to change properties for the button when it is clicked using javascript. I don't want anything to submit at all. Is there something I could put for the action property to prevent this?
    thanks,
    tim

    Have you tried returning false from your Javascript? If it's a function, you need to make sure you return the function's result, as well.
    Edited by: Avrom Roy-Faderman on Sep 19, 2008 11:31 AM
    Oh, BTW--while I (and I'm sure many others on this forum) are happy to answer generic Java EE (as opposed to ADF or JDeveloper Tooling for J2EE) questions when we can, you'll probably get a better mix of JEE gurus on a JEE forum.

  • How to create a dynamic mapping of columnar at the Runtime using ADF or JSF

    How to create a dynamic GUI at the Runtime using ADF or JSF in JDeveloper 11g.
    What I am trying to build is to allow the user to map one column to another at the run time.
    Say the column A has rows 1 to 10, and column B has rows 1 to 15.
    1. Allow the user to map rows of the two tables
    2. An dhte rows of the two columns are dynamically generated at the run time.
    Any help wil be appreciated.....
    Thnaks

    Oracle supports feedback form metalink was; "What you exactly want to approach is not possible in Htmldb"
    I can guess that it is not
    exactly possible since I looked at the forums and documantation etc. but
    couldnt find anything similar than this link; "http://www.oracle.com/technology/products/database/htmldb/howtos/tabular_form.h
    t". But this is a very common need and I thought that there must be at least a workaround?
    How can I talk or write to Html Db development team about this since any ideas, this is very important item in a critial project?
    I will be able to satisfy the need in a functional way if I could make the
    select lists in the tabular form dynamic with the noz_id;
    SELECT vozellik "Özellik",
    htmldb_item.select_list_from_query(2, t2.nozellik_deger, 'select vdeger
    a,vdeger b from tozellik_deger where noz_id = 10') "Select List",
    htmldb_item.text(3, NULL, t2.vcihaz_oz_deger) "Free Text"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    But what I exactly need i something like this dynamic query;
    SELECT
    vozellik "Özellik",
    CASE
    WHEN (t2.nozellik_deger IS NULL AND t2.vcihaz_oz_deger IS NOT NULL) THEN
    'HTMLDB_ITEM.freetext(' || rownum || ', NULL) ' || vozellik
    WHEN (t2.nozellik_deger IS NOT NULL AND t2.vcihaz_oz_deger IS NULL) THEN
    'HTMLDB_ITEM.select_list_from_query(' || rownum ||
    ', NULL, ''select vdeger a,vdeger b from tozellik_deger where noz_id = ' ||
    t1.noz_id || ''' ) ' || vozellik
    END AS "Değer"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    Thank you very much,
    Best regards.
    H.Tonguc

  • Problem in dynamically generating the file upload field

    Hello all
    I am using netbeans 5.5 and visualwebpack for my jsf project.
    i have a problem in dynamically generating the file upload field and using it.
    I have a panel say "panelA" which holds file upload fields.
    Depending upon the count value i generate the file upload field using following code snippet:
    Upload upload1 = new Upload();
    upload1.setId("upload1");
    getPanelA.getChildren().add(upload1);
    The page successfully shows up the file upload fields. While the user clicks the submit button, i have used following logic to perform upload:
    List components = getPanelA().getChildren();
    for(int i = 0; i<components.size(); i++){
    if(components.get(i) instanceof Upload){
    UploadedFile uploadedFile = ((Upload)components.get(i)).getUploadedFile();
    I am getting this UploadedFile object null.
    How can i solve this problem.

    Anyway,
    I solved the problem.
    Actually i was using label property of the upload field due to which i got null pointer exception.
    I removed the label property of the upload field and things worked as i wanted.

  • Dynamically generate the Column header

    Hi friends,
    I am using Binary Cache method for Export to Excel. I am using a separate method for generating the column headers. My question is : Is there a way to put the attribute names from the node directly instead of the one I am currently using.
      public java.util.Map getOrderColumnInfos( )
        //@@begin getOrderColumnInfos()
              //     Returns Header for the Table to be passed on to method toExcel()
              Map columnInfosMap = new LinkedHashMap();          
    columnInfosMap.put(
                   IPrivateABC.ISearchResultstoExcelElement.ATTRIBUTE1,
                   "Name");
              columnInfosMap.put(
                   IPrivateABCSearchResultstoExcelElement.ATTRIBUTE2,
                   "Reference");
              columnInfosMap.put(
                   IPrivateABC.ISearchResultstoExcelElement.ATTRIBUTE3,
                   "Created By");
              columnInfosMap.put(
                   IPrivateABC.ISearchResultstoExcelElement.ATTRIBUTE4,
                   "Input Date");
              return columnInfosMap;
        //@@end
    Instead of putting the header texts, I want the attribute names to be displayed on the Excel file headers. Please let me know if this is possible.

    Hello Rasim,
    The idea was to create the Column headers dynamically. This means basically at runtime the Application would recognize what is there in the screen and use it for Column headers. This involved reading the from the View Table->The Table Column Element-> The header and saving those values in a Context. This context is then mapped to the Excel Custom Controller and then all we have to do is read from the context, Convert to XML (The usual way that is.... )
    And ...There it is....!!!!
    Bit hectic to code this than the obvious Map and stuff. But it saves a lot of headache for future additions/deletions of columns to the table.
    Sample Code :
      public void populateExcelColumnsFromView( java.lang.String tableName, com.sap.tc.webdynpro.progmodel.api.IWDView view )
        //@@begin populateExcelColumnsFromView()
              //Created By : AVIK SANYAL Date : 28 March 2008
              //This method will fetch the header names from the Table in the View and set the
              // Attributes in nodeExcelTableColumns(). These nodes are mapped to
              //Excel Custom Controller and hence used to set the Column headers for the Excel File.
              IWDTable searchTable = (IWDTable) view.getElement(tableName);
              wdContext.nodeExcelTableColumns().invalidate();
              String tableDataSource = searchTable.bindingOfDataSource();
              wdContext.currentContextElement().setDataSource(tableDataSource);
              for (int i = 0; i < searchTable.numberOfGroupedColumns(); i++) {
                   //               Read the Column
                   IWDTableColumn col =
                        (IWDTableColumn) searchTable.getGroupedColumn(i);
                   IWDTableCellEditor TCE = col.getTableCellEditor();
                   IWDCaption header = col.getHeader();
                   //               This will check if the column is visible in the View only then it will
                   //               go for further processing.
                   if (WDVisibility.VISIBLE.equals(col.getVisible())) {
                        IExcelTableColumnsElement columnElement =
                             wdContext
                                  .nodeExcelTableColumns()
                                  .createExcelTableColumnsElement();
                        //               If the header is not null then set the header as in the View
                        if (header != null) {
                             columnElement.setHeading(header.getText());
                        } else {
                        //               Add the column name to the nodeExcelTableColumns()
                        //This checks the type of column in the View and then take the value.
                        if (TCE != null) {
                             if (TCE instanceof IWDTextView) {
                                  IWDTextView element = (IWDTextView) TCE;
                                  columnElement.setBinding(element.bindingOfText());
                                  wdContext.nodeExcelTableColumns().addElement(
                                       columnElement);
        //@@end

Maybe you are looking for