Set proprty as value of another property

my datacollector bean has refrenc of type data with 4 different properties
<jsp:useBean id="data" class="com.custom.util.DataCollector" scope="request"/>
        <c:set target="${data}" property="IP1" value="${param.subnet1}" />
        <c:set target="${data}" property="IP2" value="${param.subnet2}" />
        <c:set target="${data}" property="IP3" value="${param.subnet3}" />
        <c:set target="${data}" property="IP4" value="${param.subnet4}" />now i want to set the data as property of another refernce. I tried this way
<jsp:useBean id="saved" class="com.custom.util.SaveData" scope="request"/>
        <c:set target="${saved}" property="DataSafe" value="${data}" />my SaveData class
package com.custom.util;
import java.util.*;
import java.io.*;
public class SaveData implements Serializable {
    ObjectOutputStream dos;
    int ip1;
    int ip2;
    int ip3;
    int ip4;
    public SaveData() {
    public void setIP1(int ip1){
        this.ip1 = ip1;
    public void setIP2(int ip2){
        this.ip2 = ip2;
    public void setIP3(int ip3){
        this.ip3 = ip3;
    public void setIP4(int ip3){
        this.ip3 = ip3;
    public void setDataSafe(SaveData sd)throws FileNotFoundException, IOException{
        dos = new ObjectOutputStream(new FileOutputStream("data.txt"));
        dos.writeObject(sd);
        dos.flush();
}and my DataCollector class
package com.custom.util;
import java.util.*;
import java.io.*;
public class DataCollector implements Serializable {
    TreeMap dataMap = new TreeMap();
    int ip1;
    int ip2;
    int ip3;
    int ip4;
    public DataCollector() {
    public void setIP1(int ip1){
        this.ip1 = ip1;
    public void setIP2(int ip2){
        this.ip2 = ip2;
    public void setIP3(int ip3){
        this.ip3 = ip3;
    public void setIP4(int ip4){
        this.ip4 = ip4;
}and i got illegalargumentexception
please help..

from ehat i could understand from the method is that my code should be like this
<jsp:useBean id="data" class="com.custom.util.DataCollector" scope="request"/>
        <c:set target="${data}" property="IP1" value="${param.subnet1}" />
        <c:set target="${data}" property="IP2" value="${param.subnet2}" />
        <c:set target="${data}" property="IP3" value="${param.subnet3}" />
        <c:set target="${data}" property="IP4" value="${param.subnet4}" />
        <jsp:useBean id="saved" class="com.custom.util.SaveData" scope="request"/>
        <c:set target="${saved}" property="dataSafe" value="${data}" />and exception i m getting because of this
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
java.lang.IllegalArgumentException
     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     java.lang.reflect.Method.invoke(Method.java:597)
     org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:154)
     org.apache.jsp.basics1.Saved_jsp._jspx_meth_c_set_0(Saved_jsp.java:139)
     org.apache.jsp.basics1.Saved_jsp._jspService(Saved_jsp.java:79)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

Similar Messages

  • Filter EPM Property values based on another property in same dimension

    Hi,
    I need to restrict property values of a Dimension based on selected value of another property of the same dimension.
    For example, in Material Dimension, I have properties Planner and LOB
    Material
    Planner
    LOB
    100
    ABC
    LOB1
    200
    ABC
    LOB1
    300
    XYZ
    LOB2
    The Planner will select a Planner Name, based on which the corresponding list of materials should be shown along with LOB.
    I have tried EPMDimensionPropertyValues but it doesnt allow to restrict the IDs based on another filter condition.
    Please help.

    Thanks everyone for the response.
    As mentioned in the post, the requirement is a bit twisted.
    Let me rephrase the requirement:
    I need to have two dropdowns ( which should act as filters to the template).
    MATERIAL diemnsion has a property PLANNER.
    I need to have the first drop down as list of all PLANNERS ( I could do this easily by EPMDimensionPropertyValues).
    For the next dropdown, I need to show only those MATERIALS which has PLANNER1 ( lets say, PLANNER1 was selected in the first dropdown).
    I am facing issues for the second dropdown, as I cannot have a condition to show the Property (ID) values in EPMDimensionPropertyValues
    Also note that MATERIAL is not present in the report ( this is because we need a different aggreagation for material in the report) so we cannot use EPMDiemnsionOverride.
    Please help.

  • Values for 'Uid' property must be Text_for style on listbox

    <Style x:Name="foo" TargetType="ListBox">
    <Setter Property="Background">
    <Setter.Value>
    <!-- Your resources go here. -->
    <SolidColorBrush x:Uid="{ThemeResource ListBoxFocusBackgroundThemeBrush}" Color="Green"/>
    </Setter.Value>
    </Setter>
    </Style>
    Error Values for 'Uid' property must be Text

    What are you trying to do here?
    As the error states, the x:Uid must be plain text. You cannot bind it to a brush.
    The Uid is used for localization to identify which localized resource to use. It makes no sense in the SolidColorBrush context.

  • Unable to set a new value in an extended property from within a For Each Loop

    Setting a new value in an extented property fails when the property is dereferenced within a For Each loop usin the item  iterator. However, if you use the First or Last Iterators from the Find Targets activity works fine.
    The error message is : "Setting a value for this object type is not allowed"
    I believe this is a defect, can you please confirm

    Looks like a bug that needs to be reported.
    While we are figuring out the issue you can work around the bug.
    Add another "Find Targets" inside the loop, and use the ID of the current item in the loop to find the target (again) by ID.
    And then use Set Variable on the target that was just found...
    I know... Not an ideal workaround, so please open a Severity 4 bug for this.

  • Set the css style of text in a column according to the value of another col

    I'd like to set the css style of text in a column according to the value of another column. Each field may end up with a different style of text as a result, for instance.
    Any ideas? I looked thru the forums but couldn't find anything.
    Thanks,
    Linda

    Does the class=”t7Header” make it into the rendered HTML?
    ---The text "class="tHeader" does not show but the other text is rendered using the style t7Header as defined in the stylesheet! Exactly what I wanted.
    You might want to use a div or a span instead of a p.
    ---Yes -
    What's very cool is we can create a display column that is dynamically filled with the html and style wrappers based on a lookup to see what style should be applied according to the actual data value. This is critical as our tables are all dynamic so I can't depend on using the additional APEX methods to control the display of a column (as the # of columns in the view vary from instance to instance) and I did not want the display specs to muddy up my SQL queries.
    I wonder why this is not well documented. It is so easy!
    Thanks again for your help.
    Linda

  • Set lookup value from another item

    Hi!
    I add to my list in SP 2013 new column like type Lookup field and select item from another document library
    and display field select "Title". How i can set this filed value for new item from document library item?

    Hi AllXander,
    From your description, my understanding is that you want to set lookup field value with C# CSOM.
    You could use method "FieldLookupValue()". Please refer to this code below to set lookup field value when add an new item to a list:
    // replace your site URL
    using (ClientContext context = new ClientContext("http://sp/sites/sp2013"))
    // replace your user, password and domain
    context.Credentials = new NetworkCredential("Administrator", "Access1", "contoso");
    // the library that you get value for the lookup field
    List list = context.Web.Lists.GetByTitle("Department");
    context.Load(list);
    context.ExecuteQuery();
    CamlQuery query = new CamlQuery();
    query.ViewXml = "<View/>";
    ListItemCollection allContacts = list.GetItems(query);
    context.Load(allContacts);
    context.ExecuteQuery();
    foreach (ListItem item in allContacts)
    // replace the id that you want to set value to the lookup filed
    if (item.Id == 1)
    // replace the list title with your list that you want to add the item
    List oList = context.Web.Lists.GetByTitle("Employee");
    ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
    ListItem oListItem = oList.AddItem(itemCreateInfo);
    oListItem["Title"] = "My New Item!";
    // set the lookup field value
    FieldLookupValue lookup = new FieldLookupValue();
    lookup.LookupId = item.Id;
    oListItem["Department"] = lookup;
    oListItem.Update();
    context.ExecuteQuery();
    You could refer to this article about creating/updating/deleting a new item with C# CSOM:
    http://www.c-sharpcorner.com/UploadFile/sagarp/create-update-delete-a-list-using-client-object-model-cso/
    You could refer to this article about updating multi-value lookup column:
    https://sunbin0704.wordpress.com/2013/10/11/update-multi-value-lookup-column-values-in-sharepoint-2010-using-managed-csom/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • How to assign One Dimension Property value to another Dimension ID

    Business senario:
    There are two dimensions Entity and Plant. Plant also has a property Entity.
    In my Input Form, I need to derive Entity Property based on PLANT selection and should map it to ENTITY Dimension.
    I have selected PLANT Dimension and ENTITY Dimension in Page Axis. I have updated EPMOLAPMember() formula with EPMMemberProperty() for deriving Entity values. When I tried to save data an error message appears saying TOT_Code is not a base level member. So I checked Edit Report window and found that ENTITY Dimension is automatically moved to default left panel from Row Axis and Entity Dimension Context Menu is mapped to TOT_Code which is the top node of the total hierarchy.
    I tried EPMMemberOverride() function to overwrite ENTITY Dimension values with Entity Property of PLANT Dimension but unable to overwrite it.
    In Simple Words:
    ENTITY Dimension = PLANT Dimension (Entity Property)
    Is there any way to map/assign property value to another dimension??? Please help me.
    Thanks in advance.

    Hi,
    see please this thread for a possible solution http://scn.sap.com/thread/3230754
    Regards
         Roberto

  • NSInvalidArgumentException : Attempt to set value for immutable property

    I get "An unexpected error has occurred. Please quit and reopen Keynote." EVERY time I try to copy a slide and change the master that controls it. Console says "Exception caught by top level: NSInvalidArgumentException : Attempt to set value for immutable property moviePoster." I'm not using any 3rd party themes. Advice from anyone?

    You can use the skip property of the train stop. You can have an EL expression for it, some thing like this #{pageFlowScope.isContinueEnabled}.
    Once all the mandatory fields are entered, you can set the isContinueEnabled flag and refresh the train button bar.
    For more info refer this: http://docs.oracle.com/cd/E14571_01/web.1111/b31974/taskflows_complex.htm#CJHFBFIE
    Also, you can try navigating to different train stops programmatically.
    Check: 082.      How-to programmatically navigate ADF train models
    in http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

  • How to set field checkbox values based on another field

    I'm trying to provide the user with the ability to check one box "Check All" which would then set the check boxes for a section to the same value as shown in the example.  Anyone know how I can accomplish this?
    Thank you.
    Example
    General Category A     [  ] Check All
         [  ]  Item 1
         [  ]  Item 2
         [  ]  Item 3
         [  ]  Item 4
    If user selects "Check All", all the Items in the list for "General Category A" are then checked automatically.

    You can create a document level function to check a series of check fiels as long as they all have the same checked value.
    // document level function that can be used for many sections
    function CheckAll(aFields, sChecked) {
    // test to see Check All box for being checked
    // and if checked set to aFields to checked value
    // otherwise clear fields
    if(this.getField(event.target.name).value == 'Off') {
    // field unchecked
    this.resetForm(aFields); // clear the fields
    // end box not checked
    } else {
    // check all box has been checked
    // loop through the fields to check
    for (i = 0; i < aFields.length; i++) {
    // all fields are assumed to have a value of 'Yes' when selected
    var f = this.getField(aFields[i]); // get field for element i
    f.value = sChecked; // set to checked value
    } // end loop to check
    // end checked
    } // end unchecked
    } // end CheckAll function
    // end document level function
    You can then add a mouse up aciton for the check all check box:
    // mouse up action for check all check box
    // define array of check box fields to process
    var aSecFields = new Array('Item 1', 'Item 2', 'Item 3', 'Item 4');
    // call CheckAll function
    // passing the array list of field names and checked value
    CheckAll(aSecFields, 'Yes');
    or you can use 1 line of executable code:
    // mouse up action for check all check box
    // call CheckAll function
    // passing the array list of field names and checked value
    CheckAll(['Item 1', 'Item 2', 'Item 3', 'Item 4'], 'Yes');

  • How to Visible/Hide an Item based on the value of another Item

    Hi
    I need to visible and hide a textitem based on the value of another item.This form has 3 blocks, and the both item is in the first Master Block.
    My code is:
    if :RECORDTYPE=7 then
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_TRUE);
         Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_TRUE);
    ELSE
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_FALSE);
    Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_FALSE);
    :BLOCK.ITEM:=NULL;
    end if;     
    I wrote the code in the Validate Trigger, but not working when moving Next Record & Previous Record
    Thanks in advance
    Rizly

    Read the 'Propagation of Property Changes' section towards the end of the page for Set_Item_Property in the online help. I'm not sure what you mean by locking automatically but perhaps it's because of this.
    You should also ensure the item you're setting to invisible is not the current item (check :system.cursor_item and go to a different item if necessary).

  • Unable to set the selected value for a ADF LOV

    Hi,
    I am developing an application using jdeveloper 10.1.3 and Struts.
    I have created a ADF LOV on my JSP Page as given below:
    <html:select property="lob" onchange="javascript:selectLOB(this.form)">
    <html:optionsCollection label="prompt" value="index" property="lob.displayData"/>
    </html:select>
    When i submit the form, i am able to get the value of the selected Value in the List.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) formBean.get("Lob");
    Row r = (Row) listBinding.getSelectedValue();
    String SoLob = (String) r.getAttribute("LobLob");
    But i am unable to set the selected value back in the list when i return to the form again.
    I tried the following:
    int x = listBinding.getSelectedIndex();
    listBinding.setSelectedIndex(x);
    It would be really helpful if some one could let me know what needs to be done.
    Thanks,
    Subashini

    Gyan,
    I tried with the code you suggest , its trying to set the value of a field, but my requirement is to change the property for
    "Rendered" on the field so that based on search parameters we can hide result table column.
    After searching online, I modified the controller code as follows
    1.Created a new transient attribute (Testrender) with type "Boolean" and always updateable.
    2.changed the "Rendered" property value on the field I want to hide as ${oa.PoSearchVO1.Testrender}.
    3. Modified the controller code as follows :
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            OAViewObject testvo = (OAViewObject)am.findViewObject("PoSearchVO1");
            OADBTransaction txn = am.getOADBTransaction();
            if (testvo != null)
              OARow row = (OARow)testvo.first();
                if (a.equalsIgnoreCase("Approved"))
                     row.setAttribute("Testrender", Boolean.FALSE);
                else
                     row.setAttribute("Testrender", Boolean.TRUE);
            } But now when i run the page and populate the search field and click "Go" its hiding the field but throwing the following error and the search results are also bad.
    Its using only the value of one search parameter but not the second one .
    The search cannot be executed because the table has pending changes that would be lost. I think the vo is getting dirty when I update the transient attribute value. So I used txn.rollback ,then search is working fine but its not hiding the field.
    So can you please let me know how to proceed from here ?

  • Redirecting an item value to another page..

    Hi,
    I am trying to auto-populate couple of values on page 2 when I click a button on page 1. Tried setting the item values using the comma separated list and also by re-directing to an url. Hit an issue when the values that need to be set itself contain a comma within itself. Could you let me know if there is any other de-limiter that I can use instead of a comma while setting the item values.
    For instance:
    There is a button on Page 58. When this button is clicked, I should be redirected to page 45 in the application and the values in P58_Name and P58_LocId should be auto-populated in P45_Name and P_45LocId.
    Only when there is NO comma in value of P58_Name, this works fine. But, when there is a comma in P58_Name this is what happens:
    P58_Name = Mickey, Mouse
    P58_LocId = 145
    Once the button is clicked on page 58, the fields in page 45 are auto-populated as below:
    P45_Name = Mickey
    P45_LocId = Mouse
    Will there be a way to use a different de-limiter in the comma separated list? Kindly help.
    Thanks,
    P

    the trouble is that the comma in the item name messes up with Apex URL structure, since it uses a comma separated list of item names and values..
    You can set another item with the escaped value of the item in Javascript using the escape function(builtin)
    escape( $v('ITEM_NAME'))or in PSLQL using APEX_UTIL.URL_ENCODE or HTF.encode functions
    and then refer that new item in the Branch instead of the old one one(with commas)

  • Unable to get value of the property 'nodeName': object is null or undefined  Error in apex_ns_3_1.js

    I am getting the following error with IE9 and Firefox 26 with application express 3.2:
    SCRIPT5007: Unable to get value of the property 'nodeName': object is null or undefined
    apex_ns_3_1.js, line 589 character 10
    this.dialog.check2 = function (e){
    var tPar = html_GetTarget(e);
    var lEl = $x('apexir_col_values_drop');
    var l_Test = true;
    ******  while(tPar.nodeName != 'BODY'){
    tPar = tPar.parentNode;
    if(tPar == lEl){l_Test = false;}
    if(l_Test){$x_Remove('apexir_col_values_drop')}
    This happens when I click the Gear Icon, then Filter, then I click the dropdown arrow under expressions and pick an expression from the list.
    If I set (through IE Developer tools) back to IE8 mode, I don't get the error.

    Guess no one is using 3.2 any longer or no one else gets this error.....  Guess I can edit the JavaScript file to trap the error since it really doesn't seem to cause an issue.  Just didn't want to have to go that route.

  • How to get all possible values of a property

    I have a single-valued restricted property which has a number of predefined values.
    I want to be able to get all of these values to use to populate a drop down list in my portlet.
    Does anyone know how I can do this?

    Hello Angela,
    Here is an example portlet that I wrote for WLPS 2.0. It should work for WLPS 3.1 also, but it
    didn't verify it on 3.1 yet. The key is that you have to use the SchemaManager to get a Schema
    which will allow you to get get PropertyMetaData. See the javadoc for more information.
    Here you go:
    <%-- This JSP page lists the restricted values for a multiple restricted property --%>
    <%@ page import="java.util.*" %>
    <%@ page import="com.beasys.commerce.axiom.util.helper.JNDIHelper,
    com.beasys.commerce.foundation.property.SchemaManagerHome,
    com.beasys.commerce.foundation.property.SchemaManager,
    com.beasys.commerce.foundation.property.Schema,
    com.beasys.commerce.foundation.property.SchemaManagerConstants,
    com.beasys.commerce.foundation.property.PropertyMetaData,
    com.beasys.commerce.axiom.util.ToolkitException,
    java.rmi.RemoteException,
    javax.ejb.CreateException" %>
    <%@ page extends="com.beasys.commerce.axiom.jsp.JspBase" %>
    <%
    I used the admin tool to create a "test" property set with
    a multiple, restricted text property called "restrictedWords". The
    allowable values are "how", "now", "brown", "cow". I selected one
    default value ("brown").
    SchemaManagerHome smh = null;
    try
    smh = (SchemaManagerHome) JNDIHelper.getHome("com.beasys.commerce.foundation.property.SchemaManager");
    catch (ToolkitException e)
    e.printStackTrace();
    PropertyMetaData metaData = null;
    try
    SchemaManager sm = smh.create();
    // Get the schema for the user/group property set called "test"
    Schema schema = sm.getSchema("test", SchemaManagerConstants.USER_TYPE);
    // Get the meta data for the "restrictedWords" property
    metaData = schema.getPropertyMetaData("restrictedWords");
    catch (CreateException e)
    e.printStackTrace();
    catch (RemoteException e)
    e.printStackTrace();
    Collection restrictedValues = metaData.getRestrictedValues();
    Iterator restrictedIter = restrictedValues.iterator();
    while (restrictedIter.hasNext())
    out.println("<br>restricted value is: " + restrictedIter.next());
    %>
    Ture Hoefner
    BEA Systems, Inc.
    2590 Pearl St.
    Suite 110
    Boulder, CO 80302
    www.bea.com
    [att1.html]

  • How to call a dialog program with return value in another dialog program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    You can you SET/GET parameters to do this.
    This is some information about this.
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
    To fill one, use:
    SET PARAMETER ID pid FIELD f.
    This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID pid FIELD f.
    This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
    Thanks,
    SriRatna

Maybe you are looking for