Set the value and read Only attributes just before PageLoad
HI All,
I am using JDev ver 11.1.1.4.0.
Is there any event in ADF equivalent to PageLoad event of ASP.NET where we can set the components property on page load.
When I try to access components in the beforePhase of any any Phase I get NullPointerException.
Thanks,
Rohit
Hi,
You can use dummy component with binding value attribute to bean with setter and getter in get method you can access components.
private String dummyText;
public void setDummyText(String dummyText) {
this.dummyText= dummyText;
public String getDummyText() {
Implement your components access here..
return dummyText;
}
Similar Messages
-
We've been told that the default on the inferred value changed from version 9 to version 10 from read-only to writable. This messes us up on testing because it does not indicate which values are inferred and which aren't so it's possible values could get changed that were inferred.
This can be fixed by us re-factoring our code to mark the value read-only we are told. This is quite a bit of work though and it concerns me that a default was changed without regard to legacy code.
Is it possible that an option could be set to determine default value for inferred rules or a rule put in place that blankets all inferred values?It sounds like you are authoring interview screens that include the inferred values. Is this because sometimes you want data to be entered into those fields (i.e. when no value has been inferred when that screen is displayed)?
If not, what is the reason for showing the inferred values on the screens, instead of at the end of the interview, and could you not just default the inferred fields to read-only in your screen definition?
Davin. -
Setting the value of a single attribute for multiple line items
Hi all,
I am working on a Web Dynpro application, I have created this applicaion for an accounting document so it has header data and multiple line item data. As per the requirement I have to put the following logic:
1. When a user enters a value in the field KBLNR on the line item, all the other fields like cost centerm fund, functional area should populate from a database table based on the value of the KBLNR. to get this I have put the following code:
TYPES: BEGIN OF t_kblp,
fipos TYPE kblp-fipos,
kostl TYPE kostl,
END OF t_kblp.
DATA lv_kblnr TYPE wd_this->element_t_bseg-kblnr.
DATA: lt_kblp TYPE STANDARD TABLE OF t_kblp,
wa_kblp LIKE LINE OF lt_kblp,
lt_bseg TYPE STANDARD TABLE OF bseg,
wa_bseg TYPE bseg.
DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
DATA: ls_t_bseg TYPE wd_this->element_t_bseg,
lo_api_controller TYPE REF TO if_wd_controller,
lo_message_manager TYPE REF TO if_wd_message_manager,
lo_nd_tbseg TYPE REF TO if_wd_context_node,
lo_el_tbseg TYPE REF TO if_wd_context_element,
lt_el_tbseg TYPE wdr_context_element_set,
lv_bseg TYPE bseg.
lo_nd_t_bseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
lo_nd_tbseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
lt_el_tbseg = lo_nd_tbseg->get_elements( ).
LOOP AT lt_el_tbseg INTO lo_el_tbseg.
lo_el_tbseg->get_static_attributes(
IMPORTING static_attributes = lv_bseg ).
IF lv_bseg-kblnr NE ' '.
SELECT belnr
fipos
kostl
PSPNR
geber
saknr
fkber
grant_nbr
gsber
FROM kblp
inTO corresponding fields of wa_kblp
WHERE belnr = lv_bseg-kblnr and
saknr = lv_bseg-saknr.
ENDSELECT.
lo_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
* get element via lead selection
lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
lo_el_tbseg->set_static_attributes(
EXPORTING static_attributes = wa_kblp ).
CLEAR: lv_bseg, wa_kblp.
ENDLOOP.
everything is working fine but now the problem is couple of fields that I have in wa_kblp are with different names in bseg table and hence they are not updating... I tried putting the following logic within the loop :
lo_el_t_bseg->set_attribute(
name = `PROJK`
value = wa_kblp-pspnr ).
but it's only setting the value of the first line item and not working for the multiple line items, can you please tell me how can do this?
Thanks,
Rajat Garg
Edited by: rajatg on Jun 24, 2011 5:09 PMHi Chris,
I tried your code and it worked fine but after I put this code I am getting another issue. within the loop I had a code to make the fields non modifiable on the screen and was working fine but now what's happening is it's making the all the lines uneditable except the one with data on it (which is completely opposite), this is what I have coded:
LOOP AT lt_el_tbseg INTO lo_el_tbseg.
lo_el_tbseg->get_static_attributes(
IMPORTING static_attributes = lv_bseg ).
IF lv_bseg-kblnr NE ' '.
SELECT belnr
fipos
kostl
PSPNR
geber
saknr
fkber
grant_nbr
gsber
FROM kblp
inTO corresponding fields of wa_kblp
WHERE belnr = lv_bseg-kblnr and
saknr = lv_bseg-saknr.
ENDSELECT.
move: wa_kblp-belnr to wa_bseg-kblnr,
wa_kblp-fipos to wa_bseg-fipos,
wa_kblp-kostl to wa_bseg-kostl,
wa_kblp-pspnr to wa_bseg-projk,
wa_kblp-geber to wa_bseg-geber,
wa_kblp-saknr to wa_bseg-saknr,
wa_kblp-fkber to wa_bseg-fkber,
wa_kblp-grant_nbr to wa_bseg-grant_nbr,
wa_kblp-gsber to wa_bseg-gsber,
lv_bseg-dmbtr to wa_bseg-dmbtr.
append wa_bseg to lt_bseg.
lo_nd_edit_property = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG.EDIT_PROPERTY` ).
get element via lead selection
lo_el_edit_property = lo_nd_edit_property->get_element( ).
lo_el_edit_property->set_attribute(
name = `EDIT_FIELD`
value = 'ABAP_TRUE' ).
lo_el_edit_property->set_attribute(
name = `EDIT_WBS`
value = 'ABAP_TRUE' ).
endif.
endloop.
o_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
get element via lead selection
lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
CALL METHOD lo_nd_t_bseg->bind_table
EXPORTING
new_items = lt_bseg.
Can you please see what I am doing it wrong here.... -
Defaulting Values and Read-Only Items?
Hi All,
Brand new to APEX and trying to think of ways to get a few things working for me hoping you might have some suggestions.
1. Want to have a few items default upon the creation of a record.
- Created Date - have a column/page item that I would like to default/auto populate with the current date
- Create by - would like to have column/page item default with the login id of the user
2. Dynamically make page/items read-only.
- Once a record is created I would like to ensure that the only person able to edit the record would be the creator. I assume I can use the Read Only feature at the item level but am unsure of the syntax to use to make the item read-only for only the user who created/or is creating the record. Since I would like to be defaulting the "Create by" (see question 1) column to the login id of the user this should be plausible just not sure of the syntax to reference the current user id.
3. Passing a value to to bind variable.
- I have build a basic page with an Interactive Report and have made one of the columns in the Interactive report 'linkable' which launches a BI Publisher report by calling a Report Query. Currently in my report query I have hard coded a value in the SQL statements where clause to prove the theory works what I am struggling with is a declarative way to pass the value that I am clicking to a bind variable in my SQL statements where clause in the query.
Thanks in advance for any suggestions and appreciate your patience with an APEX newbie .. about 2 days old at this juncture. The more specific you can be on what to do and where to go is greatly appreciated.
For those interested in have greater control with your report layout BI Publisher looks to be a great options. I was able to getting by reviewing [how to document:|http://www.oracle.com/technology/products/database/application_express/howtos/howto_master_detail_pdf.html] on OTN. My challenge some in the fact that rather then simply being on the exact row that I want reported on I would like to simply click on a link in a list and pass that value as the bind variable.
JESHi -
"1. Want to have a few items default upon the creation of a record."
This is typically done in a trigger at the db level.
CREATE OR REPLACE TRIGGER mytrigger
BEFORE INSERT OR UPDATE
ON mytable
REFERENCING NEW AS new OLD AS old
FOR EACH ROW
BEGIN
if (:new.CREATED_DATE is null)
then
:new.CREATED_DATE := sysdate;
end if;
if (:new.CREATED_USER is null)
then
:new.CREATED_USER := nvl(v('APP_USER'),user);
end if;
:new.UPDATED_DATE := sysdate;
:new.UPDATED_USER := nvl(v('APP_USER'),user);
END CREATE OR REPLACE TRIGGER mytrigger;"2. Dynamically make page/items read-only."
See 'APP_USER' in the Apex docs...
"3. Passing a value to to bind variable."
This is done in the report configuration in the Apex UI...
Session State Include application and session information.
You might want to consider reviewing some of the Apex docs and tutorials, I recommend this:
[http://download.oracle.com/docs/cd/E14373_01/appdev.32/e13367/toc.htm]
Good luck. -
Data Source is OLEDB connecting to AdventrureWorks2012
Setting Person.Address table column SpatialLocation to move it's data to Excel File
Connection Manager created
Right click on Source and choose Advance Editor
External Column SpatialLocation Data Type DT_IMAGE and Output Column DT_BYTES Click OK is fine
Destination is Excel Destination
Connection Manager created
Right click on Source and choose Advance Editor
External Column SpatialLocation Data Type DT_BYTES and Output Column DT_BYTES by default click OK and Advance Editor dialog got closed
Now I open Advance Editor check the settings found that my settings not accepted instead sets "Unicode string [DT_WSTR]"
Is there any bug? or any ideas how to make it work to save settings.
FYI yesterday I carried it was OK worked fine but today it's not working I have no changes to my system.
If you have a questions please let me know.
Any help is appreciated.Hi Sarojamaly,
I’m curious about the reason why you need to change the External Column data type in OLE DB Source. As per my understanding, we couldn’t change the External Column data type in OLE DB Source. Because the External Column data type is dependent on the source
table. We can only change the output column data type via Advance Editor or some transformations, like Data Conversion, Derived Column etc.
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Opening the file in read only mode
hi all,
i am using
i want to open any type of files in read only mode using host command.so first i am setting the attribute to read only and then opening the file. But still the opened file is editable. i have written like below
Host( 'cmd /c attrib +r "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);
Host( 'cmd /c "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);is this is the way to open the file in readonly mode?
Along with the above the files which i opened with the help of above said code those files i am not able to delete also.(i have to delete the selected file)
i thing when i am setting the attribute something is going for a mess!
Please help.
Thanks..
Edited by: GD on Jun 23, 2011 2:25 AMhi,
Read only means you cannot mofiy the file. This also includes that you cannot delete a readonly-file yes,
what i am doing is i have three button in my layout 'save','view' and 'delete'.
1.so when user press 'save' button after selecting the file then the file gets saved into the specified.
2. when user press 'view' button the file has to open in read only mode.
for this i have written above mentioned code(but still i am able to edit the file)
3.when user press 'delete' button the file has to be deleted from the specified location.
so my problem is after setting file to read only mode, i am able to edit but i am not able to delete it.
What i am using to set the file to read only mode is right?
Please help.
Thanks.. -
Setting Default permission to Read Only
Hi,
When sharing access to a User, when clicking on the "Share" option, by default the page shows the group which has "Contribute" access. Is it possible to set the default to "Read Only" or the Visitors group.
ThanksTry:
Site Actions > Site Permissions > click the Visitors group link > Settings < Make Default Group
Click OK
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com -
I created a Custom list New Form and need to make the text fields read only
When I use SharePoint Designer and add the read only attribute to the SharePoint form field, then it throws a web part error.
but here is the thing, I have current user Filters populating the Form Fields. So the form fields populate First name , last name etc. and I need these fields read-only....
the Client doesn t want the end user to Change those fields. Is there any way to "LOCK" the form fields?
As I have only 7 text fields that need to be locked down. and one field is a signature line that is a true input field.. where the user has to inter their initials.
Any ideas? as I have tried most of the items available thru searches nothing works, or it throws that web part error message.
Steve AtheyDaniel: ( I'm now at work, a different ID is logged on for me)
I used SharePoint Designer.
Steps:
created a web part page
then on the SharePoint Designer ribbon I then went to insert:
new item form
Then I selected my data source (list)
then I placed the 8 columns on the page
a page viewer web part to pull the manual that people have to read.
and 7 current user filter webparts. (1 for each form field) Yes it is over kill, but I'm trying to keep this straight out of box as much as possible...
then for the form fields
I added a parameter and the read only tag see below in bold:
<asp:TextBox runat="server" text="{$ParamEmployID}" id="ff17{$Pos}" __designer:bind="{ddwrt:DataBind('i',concat('ff17',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Employee_x0020_ID')}"
ReadOnly="True" />
I also added the parameters in the ribbon area
the error message doesn't tell me much, it just send me to web part maintenance page...
if I removed the ReadOnly = True then the error goes away..... So I was trying to find a quick simple JQuery and or javascript code item that would make the 7 text fields readonly and leave the
8th text field alone to allow people to place their initials on the page to say that they read the manual.
I have created hundreds of these types of pages .. this is the first time I have run into this issue, but it also the first time I have tried to use the ReadOnly = True item.
Any Ideas and or thought on how to make the items read only? and not throw the error.
Steve -
Permit user to administrate Model AND have read-only attributes
This issue concerns SQL Server Master Data Services 2012
I have a scenario where the same user is handling data and doing version management. Now I want to make one attribute in one specific entity read-only as I want to make sure the attribute is never changed.
The problem is, as soon as I set the read-only privilege on the attribute, the user
loses all administrative rights on the entire model. This, of course, includes version management.
I've tried working around the issue by making sure the user has explicit update permissions on both the model and the entity (and all attributes except the one I need read-only). But the result is the same.
Does anyone know a workaround?Hi,
I think if you explicitly grant the update permissions, it should work. According to the MSDN doc. Could you please check if the user belongs to other hierarchy?
When a member belongs to multiple hierarchies
Two or more hierarchies can contain the same member.
•If one hierarchy node is assigned Update permission and another is assigned Read-only, then the members in the node are Read-only.
•If one hierarchy node is assigned Update or Read-only permission and another node is assigned Deny, then the members in the node are not displayed.
Hierarchy Member Permissions (Master Data Services)
https://technet.microsoft.com/en-us/library/ee633750(v=sql.110).aspx
Model Object Permissions (Master Data Services)
https://technet.microsoft.com/en-us/library/ee633764(v=sql.110).aspx
Regards,
Doris Ji -
HOW to set the value attribute of FORM INPUT data to a variable in a JSP
eg. Registration.jsp
The data is accessed from an hidden field called course
for example, if I have "Java programming" in the field course, and I use
an expression to access the value from the hidden field.
**My problem is that the data gets truncated to "Java" , I need "Java Programming"to display. The code looks like this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<INPUT TYPE="text" SIZE=12 NAME="course"
VALUE=<%=getParameter("course") %>
IS there ANY OTHER WAY to set the value of VALUE to a variable?Instead of value=<%=request.getParameter("course")%>
Use double codes
value="<%=request.getParameter("course")%>" -
I need to set the Maximum so that the use can use the mouse to change the value of numericstepper (and not go over a certain number), but at the same time I have to allow the user to enter their value by typing in the text field. When the user enters a number greater than the Maximum, I disable the "Ok" button of the dialog and show a red warning(error message). The issue is that the user can hit "Enter" and numeric stepper would set the value to the Maximum and the dialog box would close and the rest of code would run. I want the numericstepper not to change the value and keep showing the warning even if the user hits the "Enter".
Note: Setting maxChar does not help since my maximum is 1000, and user might enter 5555
I would appreciate the help.Thanks for trying to help, But
The issue is that if I set the maximum value of stepper 1 greater than the max value that I want, then the user can select an invalid value(of myMax + 1) when he clicks on the UP arrow of the numeric stepper(which is not acceptable for what I am working on).
I need to preserve the users invalid number, while not letting the user to select an invalid number by clicking UP key.
I noticed that when the user enters a number greater than the Maximum, and then click on the down arrow, it would set the value to 1 less than the maximum. This is not acceptable either. -
Function to compare tow dates and set the value
Hi All,
I have two dates with close date and Due date.And i want to set the value as 1 if close date is less then or equal to to due date else 0 .And my other condition is to set 1 when close date is greater the due date.Can any one help me how can I
achieve it.
Thanks, SidHello Sid,
For this you can use a simple IF Statement with a compare on the Dates:
= If(Tabelle1[CloseDate] <= Tabelle1[DueDate]; 1; 0)
= IF(Tabelle1[CloseDate] > Tabelle1[DueDate]; 1; 0)
Olaf Helper
[ Blog] [ Xing] [ MVP] -
I upgraded to lion, now that I am restarting my mac, it is asking for a password. mind you i never set a password in the begining.
So i used my start up cd and re set the password and restarted my mac only to be faced with the same delima. user password please.
I am currently in safe mode, otherwise I can't log on to mymac
Please help, anyonethank you to all who responded. the final line was that I had to reboot and loss all of my info.
this was per apple store intelligence. -
On the initial set up for apple tv it just sits there trying to set the date and time . it is a wireless setup and the ipaddress and router address is correct . I can't get by this screen. The setting is on automatic and I have picked a city in my time zone yet it still tries to set a time and date but fails.
thanksMake sure router is up to date. Try ethernet to rule out any wifi issues. Reboot ATV and router.
-
How to set only part of the document as "read-only"?
Hi,
I am using SharePoint 2010. I would like to set some of the columns as "read-only" while some of them are still editable. If I use Advanced Settigns>Item-Level Permissions, I can only set the whole document as "read-only".
Is there a way I can do what I wannt?
Thanks a lot!Hi,
There is no OOTB way to set a column as read-only. I think you want to make some of the fields as Read-Only in the EditForm.aspx. If so, then you can use the Javascript to do.
Add a Content editor webpart to the Editform.aspx page and place the javascript method to make a field read-only.
You can use the _spBodyOnLoadFunctionNames.push("MakeReadOnly()") method to assocaite your method to the EditForm.
Here are the links which will help you.
http://dishasharepointworld.blogspot.in/2011/08/read-only-field-in-sharepoint.html
http://nishantrana.wordpress.com/2009/01/30/read-only-field-in-sharepoint-editformaspx/
http://www.jbmurphy.com/2010/06/01/how-to-make-a-field-in-a-sharepoint-edit-form-readonly/
*******Don't forgot to MARK AS ANSWER / VOTE AS HELPFUL if it really helps************
R.Mani http://rmanimaran.wordpress.com
Maybe you are looking for
-
It is most sluggish when I turn on my laptop after it has been shut down overnight or for any other period of time.
-
Organizer Disappears after launch
I can launch my PS Elements 10 Organizer and it opens, briefly, then after a few seconds just disappears. When I open Task Manager and check my applications I can see it is still running. I did discover that if I open PSE10's Editor and then click
-
Ldapmodify: invalid format
I ran ldapmodify to modify Domain Organization ACIs I type ldapmodify -D "cn=Directory Manager" dn: ou=2007-student,o=xxx.com,dc=xxx,dc=com changetype: modify add: aci aci: (target="ldap:///cn=*,ou=groups,ou=2007-student,o=xxx.com,dc=xxx,dc=com") (ta
-
Hi All, I've created a simple form based on an registered UDO (2 tables: Document and Document Lines). This form contains a matrix bounded to the lines of my UDO document. Everything works fine except the Delete button that should delete a document l
-
Performance comparisons between POF & open source serialization mechanism?
I'm curious whether anyone has done any comparisons of performance and serialized object sizes between POF and open source mechanisms such as Google Protocol Buffers and Thrift, both of which seem to be becoming quite popular. Personally, I dislike h