Changing the Updatable property of a View Object Attribute through code

Hi,
Is there a way to set the "Updatable" property of an attribute in a view object through code ?
I checked the API docs for the AttributeDef class but there is no method to set this. there is a constant (UPDATEABLE_WHILE_NEW) which gives the current value.
My requirements in short - I have a ADF editable Table. Based on a flag whether it is SET or NOT, i need to make a particular column such that the inputTextBox on this column must appear for only the new rows inserted into the table. For all the existing rows users should not be allowed to edit values on this column.
I know this can be controlled with the UPDATABLE property on the attribute in the view object by setting the value as "WHILE  NEW".
Now i need to control this through code at runtime.
Please let me know on ow to do this.
JDev version: 11.1.2.3
Thanks.

the method you are looking for is available in the AttributeDefImpl class which you can get from the EntityImpl like
this.mDefinitionObject.getAttributeDefImpl("YOUR_ATTRIBUTE_NAME").setUpdateableFlag(AttributeDef.UPDATEABLE_WHILE_NEW);
Timo

Similar Messages

  • How do I change the name property of a file in a document library?

    I am trying to come up with an Event Receiver that will change the name property of an file when it is uploaded. For instance when a file is uploaded into a document Library, currently the Title is being generated (which is fine)...I want to be able to
    change the "Name" property from whatever it is, to match exactly what is in the "Title" property. Are there any sample codes/blogs out there that I can take a look at? Has anyone  had any experience doing this? It seems like something
    that should be straight forward, to change the "Name" property to match what is in the "Tilte" property.

    Hi,     
    You can try the code below which use the SPFile.MoveTo() function to change the name of the file.
    EventFiringEnabled = false;
    SPFile f = properties.ListItem.File;
    string spfileExt = new FileInfo(f.Name).Extension;
    f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
    "/" + properties.ListItem["Title"]+ "_new" + spfileExt);
    f.Update();
    EventFiringEnabled = true;
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5cafb8e4-bb85-4147-9bda-4ab42a4d4817/sharepoint-2013-event-receiver-to-rename-files-not-working?forum=sharepointdevelopment
    A link about rename uploaded file using Event Receiver for your reference:
    http://paulgalvinsoldblog.wordpress.com/2008/01/25/quick-easy-rename-uploaded-file-using-sharepoint-object-model-via-an-event-receiver/
    Best regards
    Patrick Liang
    TechNet Community Support

  • How do I query changed view object attribute in another view object

    Jdeveloper 10.1.3.4
    My requirement is that I want to be able to query a view object (based on entity) on a non-key attribute where the value I am searching on may either be in the database on an existing record or, have just been recorded by updating a different view object based on the same entity (and yet to be committed).
    When querying the second view object for a value just updated via a different view object, the second view object always returns no rows. I had expected the process to be :
    EntityA
    ViewObjectA based on EntityA
    ViewObjectB based on EntityA
    ViewObjectA - query row with key = 123. update attribute Y with value 456 (attribute Y in database null). Entity cache for EntityA, key 123, atttribute Y updated with value 456
    ViewObjectB - query row with attribute = Y. expect record in EntityA cache just updated to be returned. Instead, nothing is returned
    Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are identical view objects based on entity object RandSchedule)
      public static void main(String[] args) {
        String        amDef = "test.cache.model.AppModule";
        String        config = "AppModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
        ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
        Key rsKey = new Key(new Object[]{40});
        Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
        Row rsEditRow = rsEditRows[0];   
        rsEditRow.setAttribute("SId", new Number(7827));
        ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
        rsSearch.setWhereClause("S_ID = :SId");
        rsSearch.defineNamedWhereClauseParam("SId", null, null);
        rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
        rsSearch.executeQuery();
        Row rsSearchRow = rsSearch.first();
        Configuration.releaseRootApplicationModule(am, true);
      }Why does rsSearch not find the record S_ID = 7827 ? It seems to only be querying new records in the database and ignoring the cached record just updated ?
    Any help greatly appreciated.
    Cheers,
    Brent

    rsSearch.setNamedWhereClauseParam("SId",new Number(7827));This might help:
    rsSearch.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    rsSearch.executeQuery();

  • Can not change the field property - 10gR2 reports crashing on Linux :(

    All I want to do, is to change one field's property from NUMBER to DATE in the property palette. It does not allow me to do it (not east like forms). I can not change the field property - 10gR2 reports keep crashing on Linux :(
    I don't know if this is a Linux specific iDS issue, or a generic one.
    What are the proper steps to change one field (in my query, the field name is ptime, it was defined as a number field originally, and now I need to change it to DATE and apply the proper format mask). The matching database field definition was modified from number to date.
    very frustrating...
    Any input is appreciated.
    Message was edited by:
    zaferaktan

    nop, did not change anything in the select statement at all. Just selected the related query under the data model (in the navigator), then selected the related query from within the property panel, connected to the db, then from the related navigor menu selected compile all, when the related query was highlighted (selected). Then I saved it, checked the groups, and bingo - the datatype was changed from number to date. Then I went to the related object under the page layout and applied the format mask (that was another funny story). And it worked. It is not as flexible as the forms for sure - pain in the a.. And I still don't know why Reports Builder keeps crashing on Linux - have no problems with Forms Developer on Linux at all. It is a certified RH platform with all the required libs, rpms, etc installed. I am certain it is not an installation issue. Maybe I should check Metalink and apply if an iDS 10gR2 patch exists for reports.

  • CS6 it is being hanged attempting to change the font property

    Hi,
    I am working on Flash CS 6 is working fine but one issue i am facing all the time while working on any file whenever i am attempting to change the font property (like from arial or verdana etc.) it is being hanged for few moments like 1 to 2 minutes.
    Can help in solving this issue.

    You're at the point where you've done every other rational thing to solve the issue. If you have no issue using font drop-downs in any other Adobe or any other app and have reset Flash to defaults, have no font manager or any corrupt settings, I'm out of suggestiong.
    Since Flash is basically back to default install status, that's the last recommendation I could make. If you reinstall Flash and you still have the issue, this is something Adobe support may need to jump in on. There has to be a difference between your environment and everyone elses, only you know what that is. If a fresh install of Flash doesn't work, there's an environment issue.
    Are you using an encrypted filesystem or have you manually copied any web fonts into your Windows font directory (where typically they're colored green) and have not clicked 'Unblock' on the file? Windows can sometimes mark downloaded files as dangerous until you view the file properties and click to 'Unblock' it. It's down to this level of "some small thing" that's causing this odd hiccup for Flash.

  • How to reference the Parent view Object attribute in Child View object

    Hi , I have the requirememt to generate Tree like struture to display Salary from joining date to retirement date in yearly form.I have writtent two Pl/SQL function to return parent node and child nodes(based on selected year).
    1.First function --> Input paramter (employee id, retirement date , joining date) --> return parent node row with start_date and end_date
    2. 2nd function --> input paarmter(employee id, startDate, end_date) --> return child node based on selected parent node i.e. start date and end date
    I have created two ADF view object based on two function return
    Parent Node --> select * from Table( EUPS.FN_GET_CONTR_SAL_BY_YR(employeeId,retirement Date, dateOf joining)) ;
    Child Node --> select * FROM TABLE( EUPS.FN_GET_CONTR_SAL_FOR_YEAR( employeId,startDate, endDate) ) based on selected parent node.
    I am giving binding variable as input for 2nd function (child node) . I don't know how to reference the binding variable value in child view from parent view.
    Like I have to refernce employeId,startDate, endDate values in 2nd function from parent view object. some thing like parentNode.selectedStart_date parentNode.employeeId.
    I know we can achive this writing the code in backing bean.But i want to know how can we refernce parent view object attribute values in child view object using Groovy or otherway?
    I will appreciate your help.
    Thanks

    I have two view com.ContractualSalaryByYearlyView for Parent Node and com.ContractualSalaryByYearlyView for child Node.
    I have created view link(ContractualSalYearlyByYearViewLink) betweem two view by giving common field empId, stDate , endDate.(below is the view link xml file).
    I tried give the binding attribute values using parent object reference like below in com.ContractualSalaryByYearlyView xml file but getting error
    Variable ContractualSalaryByYearlyView not recognized.I think i am using groovy expression.
    Thanks for quick response.
    com.ContractualSalaryByYearlyView xml
    <ViewObject
    <DesignTime>
    <Attr Name="_isExpertMode" Value="true"/>
    </DesignTime>
    <Variable
    Name="empId"
    Kind="where"
    Type="java.lang.Integer">
    <TransientExpression><![CDATA[adf.object.ContractualSalaryByYearlyView.EmpId]]></TransientExpression>
    </Variable>
    ContractualSalYearlyByYearViewLink.xml file
    <ViewLinkDefEnd
    Name="ContractualSalaryByYearlyView"
    Cardinality="1"
    Owner="com.ContractualSalaryByYearlyView"
    Source="true">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryByYearlyView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryByYearlyView.EmpId"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.StDate"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd
    Name="ContractualSalaryForYearView"
    Cardinality="-1"
    Owner="com.ContractualSalaryForYearView">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryForYearView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryForYearView.EmpId"/>
    <Item
    Value="com.ContractualSalaryForYearView.StDate"/>
    <Item
    Value="com.ContractualSalaryForYearView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>

  • JSP, Data Web Bean, BC4J: Setting the where clause of a View Object at run time

    Hi,
    I am trying to develop a data web bean in which the where clause of a View Object will be set at run time and the results of the query then displayed.
    My BC4J components are located in one project while the coding for the data web bean is in another project. I used the following code bu t it does not work. Could you please let me know what I am doing wrong?
    public void populateOSTable(int P_EmpId)
    String m_whereString = "EmpView.EMP_ID = " + P_EmpId;
    String m_OrderBy = "EmpView.EMP_NAME";
    oracle.jbo.ApplicationModule appModule = null;
    ViewObject vo = appModule.findApplicationModule("EMPBC.EMPAppModule").findViewObject("EMPBC.EMPView");
    vo.setWhereClause(m_whereString);
    vo.setOrderByClause(m_OrderBy);
    vo.executeQuery();
    vo.next();
    String empName numAttrs = vo.getAttribute(EmpName);
    System.out.println(empName);
    Thanks.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team (Laura):
    Here is how I have usually done mine:
    1. In the JSP, use a RowsetNavigator bean to set the where clause and execute the query.
    2. Use a custom web bean to process the results of the query (print to HTML).
    for example:
    <jsp:useBean class="oracle.jbo.html.databeans.RowsetNavigator" id="rsn" scope="request" >
    <%
    // get the parameter from the find form
    String p = request.getParameter("p");
    String s = request.getParameter("s");
    // store the information for reference later
    session.putValue("p", p);
    session.putValue("s", s);
    // initialize the app module and view object
    rsn.initialize(application,session, request,response,out,"wt_bc_WT_bcModule.wtjoinView");
    // set the where clause string
    String theclause = "presname = '" + p + "' AND slideno=" + s;
    // set the where clause for the VO
    rsn.getRowSet().getViewObject().setWhereClause(theclause);
    rsn.getRowSet().getViewObject().executeQuery();
    rsn.getRowSet().first();
    %>
    </jsp:useBean>
    <jsp:useBean class="wt_bc.walkthruBean" id="wtb" scope="request" >
    <%
    // initialize the app module and VO
    wtb.initialize(application,session, request,response,out,"wt_bc_WT_bcModule.wtjoinView");
    wtb.render();
    %>
    In this case, the render method of my custom web bean mostly gets some session variables, and prints various content depending on the session variable values.
    Hope this helps.
    </jsp:useBean><HR></BLOCKQUOTE>
    Laura can you give the code of your walkthru bean? i wna't to initialize a viewobject, set the where clause and give that viewobject back to initialize my navigatorbar.
    Nathalie
    null

  • How can I change the name of a Materialized View?

    How can I change the name of a Materialized View?

    Oracle permitted renaming the snapshot in the earlier versions of 8i. However, it does not permit renaming the materialized view in 9i or 10g.
    SQL> rename mymatview to mymatview2;
    rename mymatview to mymatview2
    ERROR at line 1:
    ORA-32318: cannot rename a materialized view
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining options
    SQL> rename mymatview to mymatview2;
    rename mymatview to mymatview2
    ERROR at line 1:
    ORA-32318: cannot rename a materialized view
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.3.0 - Production

  • Changing the Chart Title in Graphic View in Interactive demand Planning

    Hi All,
    Is it possible to change the Chart title in Graphic View in interactive demand planning screen.
    When we go to interactive planning after loading the data we go to Univariate forecast then switch to graphic, the chart title shows the selection at which the planning is done. For eg; If I plan at die level and i select a particular sap material, the chart title displays Die value and not the material value.
    Is it possible to change the chart title such that it displays all the selections made in selection winodw, like in the above case both Die value as well as SAP Material Number.
    Thanks and Regards,
    Diana

    Dear Diana,
    unfortunately this is not possible.
    The chart title is build from the planning book name + the Show characteristic in the shuffler (+ available nav. attributes of the Show char).                                                           
    The functionality you requested doesn't exist in standard.            
    Regards,
    Tibor

  • To Change the Readonly Property

    Hi,
    In Portal  Personal data Screen for belgium , Country of Birth field (Drop Down Box) is  Read Only.
    We have to change the readonly property.
    I tried through iView personalisation ,the property of that field is Not readonly.
    2) In the WD java Application  the field property is  NORMAL .
    3) I have checked in V_T588MPROPC, there also we dont have any entry for this field.
    In Backend ECC this field is editable ,
    Can any one please let me know where should i will change to make this field as Editable.
    Regards
    Alexi

    Please check the following tables:
    V_T005
    V_T588MFPROPC
    V_T588MFPROPS
    T77WWW_SC
    V_T582ITVCHCK
    Note 1498555 - How to make a field mandatory or optional in ESS
    "V_T588MFPROPC only makes the field mandatory, optional or unused
    by the back-end business logic checks it will not change a
    UI display property like Read-Only
    You could try the Personalization options - Ctrl and Right
    mouse button over the UI element (either in the browser
    or in a PCD preview - for global changes for all users)
    - please check there for options to change the country
    field to editable
    However I suspect the field is read-only because
    1) You are on a lower release than EHP3 -foreign address
    maintainence via Country field is only available
    as standard from EHP3
    2) You do no have EHP3 business function HCM_ESS_CI_1 switched on
    these business functions activate foreign address functionality
    3) You are editing a record - try instead creating a new record
    4) Inconsistency in V_T7XSSPERFORADD - check this against client 000
    Hope this helps identify the problem

  • IWeb: changing the slideshow image scale and viewing time

    I moved my iWeb sites over to another server (iPage) and went through the sites to observe for inconsistencies and problems.  While doing this, I noted that my image galleries, when placed into the slides show mode, were very small on my iPad 2 and that they cycled through at a very high speed.  I thought this was odd and I wondered if anyone else has observed the same thing?  It sounds to me that an HTML under-the-hood modification may be required or a bug fix to the iWeb code is in order, to change the sideshow image scale and viewing time/slide value.  Comments?  [I suspect that Apple does not hold iWeb bug fixes at or near to the top of its software development to-does priority list.  Sounds like I need to change web authoring software.]

    Why do you think it's a bug?
    Anyway :
    Is there any reason photos in an album page display small on the iPad, but normally on an iMac? And videos on a movies page don't play on the iPad, but are OK on the iMac?
    I use my own show :
    http://home.wyodor.net/photo/

  • How Do I Change the Font Size in Design View?

    The font size when coding in Dreamweaver's "Design View" is
    too small. How do I change the size in "Design View" to make it
    bigger? I've found that you can change the code view in Preferences
    but it has no way to change the font size in Design View.
    P.S.--I'm using DW8

    Hi,
    By "a meeting notice", do you mean the Outlook meeting reminder? It's not possible to change the font in Calendar reminders. It's a system font.
    If I've misunderstood something, please feel free to let me know.
    Best Regards, 
    Steve Fan
    TechNet Community Support

  • How can we change the state of records in view cache and entity cache

    Hi everybody,
    I am trying to achieve selective rollback, or selective commit. By this I mean that I am looking for a way to change the state of rows in view cache, so that the selective changed rows can be rolled back during comit.
    if anyone has tried anything in this please help me.

    I agree!
    I can't top this approach.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Any problem in changing the update mode.

    Hi Gurur's,
                    We have set Unserialized V3  update mode  in R/3 production for 2lis_03_bf.
                    We are getting '0' records while running delta.
                    Now can we change the update mode to queued delta and run and for that what are the precautionary steps to be done.And will be the effect if we done like that happen.
    Cheers,
    Satish.M.R.

    Hi Satish
    The diffrence between these 2 update modes are
    Queued Delta:With this update mode, the extraction data is collected for the affected application instead of being collected in an extraction queue, and can be transferred as usual with the V3 update by means of an updating collective run into the BW delta queue. In doing so, up to 10000 delta extractions of documents for an LUW are compressed for each DataSource into the BW delta queue, depending on the application.
    unserialized V3:With this update mode, the extraction data for the application considered is written as before into the update tables with the help of a V3 update module. They are kept there as long as the data is selected through an updating collective run and are processed. However, in contrast to the current default settings (serialized V3 update), the data in the updating collective run are thereby read without regard to sequence from the update tables and are transferred to the BW delta queue.
    Please go through the below article
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/5039632a-c398-2d10-0aaf-97167a3de753?QuickLink=index&overridelayout=true
    You will get clear idea about how the data flow differs in this 2 update modes
    Hope this helps
    Regards,
    Venkatesh

  • How to change the color picker/color space view?

    I wanted to change the color picker/color space view to what it looks like in the other Adobe programs. I have gotten used to using the color picker from the other programs and I have had problems with the look and function of this color view.
    In InDesign the color picker looks like this:
    And the Photoshop/Illustrator/etc. looks like this:
    I've tried changing the "Convert To Profile..." and the Transparency Blend Space, but neither have done anything to what I want to be done.
    Is there some way to change this in InDesign?
    Note: I want to change the looks of the gradient-like area if that isn't obvious.

    I was wanting to do the same change as you, until I saw your two images.
    Within the InDesign image you've selected a dark blue colour (R:16, G:49, B:152)  AND you've got the (R)ed channel selected.
    Within the Photoshop image you've selected a white colour(R:255, G:255, B:255)  AND you've got the (H)ue channel selected.
    In Photoshop I can recreate both of your images by having the same settings for RGB/CMYK and selecting the same channel item as you have in those images.
    That's all.
    There is no difference between the two colour selection dialogs except where the HSB, RGB, CMYK and LAB are placed.

Maybe you are looking for

  • How to find out size of objects

    hi, i need to draw a few objects in PS - a few rectangles and circles, and i need to draw them with precise size - width and height, but i dont know where i can find some information about their width and height (in cm or mm). once i draw them, there

  • How to Silent camera sound of 6233

    User Guide says that there is an option of sound in camera setting, but there is no such option in my 6233 mobile. Do anyone know shortcut to silent the camera or any solution. Regards

  • My iCloud keeps asking me for a password even when I enter it, it still keeps asking. I have tried turning it off but it doesn't work.

    My iCloud keeps asking me for a password even when I enter it, it still keeps asking. I have tried turning it off but it doesn't work. It is really annoying!! Please help me!! (The same thing happened on this device and when I reset it, it worked....

  • Does Xserve with OS 10.6.4 support multipath on non-apple storage now?

    Hi, We are installing 3 Xserves and a non-apple storage (Compellent, dual controller) at customer site, Xserve is running MAC OS 10.6.4 and have installed Xsan. One fibre cable on Xserve is connected to the fibre switch. During test we found that if

  • Can't get Firefox working

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/891364]]</blockquote> I can't seem to get Firefox working, along with Firefox IE is also not working. I have to use chrome. Although I have to get Firefox working. Firefox a