Problem in creating new row
Hi,
I am facing a strange problem. i have created many new rows and inserted the data, but now i am facing a strange problem.
This is my requirement.
I have table with table action button as create.
when i click create it is not at all creating new row for the view object but instead it will take the row at the top of the table and replace that line with new data.
Below is the code :
In CO
In PR
if (!pageContext.isBackNavigationFired(false))
TransactionUnitHelper.startTransactionUnit(pageContext, "RVSchematicAttributeCreateTxn");
if (!pageContext.isFormSubmission())
System.out.println("control entered create block");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
System.out.println("before calling ");
am.invokeMethod("createRVSchematicAttribute",null);
System.out.println("after calling ");
else
if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "RVSchematicAttributeCreateTxn", true))
OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
pageContext.redirectToDialogPage(dialogPage);
IN PFR
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("Apply")!=null)
System.out.println("apply button is clicked");
OAViewObject vo = (OAViewObject)am.findViewObject("xxczVAGCSSchematicAttributeVO1");
String schematicId = (String)vo.getCurrentRow().getAttribute("SchematicId");
String msg= "SchematicId "+schematicId+"has been added";
am.invokeMethod("apply");
System.out.println("returned back to create CO");
OAException confirmMessage = new OAException(msg,OAException.CONFIRMATION);
pageContext.putDialogMessage(confirmMessage);
pageContext.forwardImmediately("OA.jsp?page=/va/oracle/apps/xxcz/gcs/maintenance/webui/xxczVAGCSRVSchematicAttributeResultsPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
in AM
public void createRVSchematicAttribute()
System.out.println("entered createRVSchematicAttribute ");
xxczVAGCSSchematicAttributeVOImpl vo = this.getxxczVAGCSSchematicAttributeVO1();
// OAViewObject vo = (OAViewObject)this.getxxczVAGCSSchematicAttributeVO1();
vo.setMaxFetchSize(0);
vo.clearCache();
if (!vo.isPreparedForExecution())
vo.executeQuery();
/* Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
System.out.println("Row.STATUS_INITIALIZED");*/
int rowCount = vo.getRowCount();
Row row = vo.createRow();
vo.insertRowAtRangeIndex(rowCount, row);
row.setNewRowState(Row.STATUS_INITIALIZED);
Please help me i don't know where i am going wrong. i have checked so many times but didn't find any bug.
-Mithun
Hi Zafar,
Ok i will explain my problem with an example.
I have employee table with following fields.
Empname
Empnumber
Salary
Table data
Empname EmpNumber Salary
Jack 10 1000
sam 20 2000
joe 30 3000
Above is the table structure for which i need to add another row
I have two page one results page and another create page
In Results page i will show the above table structure with table action button "Create" in order to insert new record to table.
When i click Create button it will navigate to create page
In Create page i will get the below data
Empname : Jack
Empnumber :10
Salary :1000
Instead of
Empname :
Empnumber :
Salary :
suppose now if i change the jack to jack1 , 10 to 11 , or 1000 to 10001 and click submit
Now the result page will show
Empname EmpNumber Salary
Jack1 11 1001
sam 20 2000
joe 30 3000
No fourth row is created it is actually behaving like update functionality and updating the top most row.
-Mithun
Similar Messages
-
Problem in Creating new row & inserting data using CreateInsert and Commit
Hello All,
I have created a page there are few input text and i want to insert the data into a database table. I have created an Application Module I am using CreateInsert and Commit operation but there is one problem.
At first it created a row in database after that it is not creating the new row instead it is updating the same row with the new values.
In bindings of my jspx page I have created two binding for action (1) CreateInsert for the VO of that Application Module (2) Commit operation of that Application Module.
Here is the code snippet of my application:
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
*if (!operationBinding.getErrors().isEmpty()) {*
return null;
OperationBinding operationBinding1 = bindings.getOperationBinding("Commit");
Object result1 = operationBinding1.execute();
*if (!operationBinding1.getErrors().isEmpty()) {*
return null;
I have tried using Execute+Commit and Insert+Commit case also in every case it is updating the same row and not inserting a new row.
Is there anything I am missing?
Please Help.hi user,
i dono. why are trying with codes. adf provides zero lines codes.
a wonderful drag and drop functionality provide by the framework.
while double click the button the codes are registered in your bean
public String cb6_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb8_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb7_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Delete");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb14_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("Delete4"); // some different here. after deleting usually do commit
OperationBinding operationBinding1 =
bindings.getOperationBinding("Commit"); // so here commit operation.
Object result = operationBinding.execute();
Object result1 = operationBinding1.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
if (!operationBinding1.getErrors().isEmpty()) {
//add error handling here
return null;
return null;
}if am not understud correctly. please some more explanation need. -
Creating new row right after popup opens (JBO-35007 because of trigger)
Hi,
I have the same popup (with an ADF form) to add and to edit data. But i have two buttons which displays this popup - Add new and Edit, Edit works OK, on add, i insert new record like this:
DCIteratorBinding dciter =
(DCIteratorBinding)bindingContainer.get(iterator);
ViewObject view = dciter.getViewObject();
Row newRow = view.createRow();
view.insertRow(newRow);
view.setCurrentRow(newRow);before popup is open. And it adds a new record. But the record has id -10 (or some other negative number). This -10 is shown on calling page (the page from which the popup is open) in ADF ReadOnly table as -10 as id and other cells in row empty. That shouldn't happen (se bellow why). User then edits empty form in popup, and commits - then i get JBO-35007 because -10 changed to 123 - because of trigger.
I tried to requery - it doesn't help, see Refresh after pop-up window closes.
Can you suggest a solution on how to create a row right after popup opens?
Also,
i create new record on button's LaunchListener method. This method seems to execute before popup is open and so it affects the calling page also. I think the problem would be solved if new row would be created after popup is opened, not while opening it. (clicking create in popup works fine)in my real case, i usually don't show ids; but to simplify debugging, i created test project where i show as many things as possible.
you mean, creating new record like following?
bindings.getOperationBinding("Create").execute();I don't use that because i don't get empty fields in popup window (although new record is created). Actually, i don't know how to set this created record to be selected one. Suggestions?
And I did some more testing, if I create new record with clicking on Create (not creating new row automatically), i get JBO-35007 only if there was selected any other than the first row in table.
and i tried to move create method binding in pagedef, so it's the first one.. But it seems like there is no effect.
btw, i found this in one of examples on web:
<invokeAction Binds="Execute"
id="refreshTableViewObjectAfterAddingNewApp"
Refresh="prepareModel"
RefreshCondition="#{processScope.addedNewApp}" />refresh condition must be true when adding new row and false for everything else. I'm not sure what that does, but it seems to work... :)
I really shouldn't use the same View Objects in popup and 'master' page, should I? -
Unable to create new rows in master detail
Hi, I am new to ADF
I am using Jdeveloper 11.1.1.6, I have two tables customer and contacts, customerId is a foriegnKey in contacts. when customer is deleted all the contacts need to be deleted.
I have created an association (1 to * customer to contacts) between customerEO & contactsEO (checked Composite association, implement cascade delete option), and a view link (1 to * customerVO to contactsVO).
I am testing the viewlink through AM, not using JSF
when i am trying to create new row in details(contacts) table, the customer id is populating in details table.
when i am trying to commit to database (Details table) i am getting the following error
java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (CONTACT_CUSTOMERID_FK) violated - parent key not found
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3904)
at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9417)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1512)
at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6893)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)
at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)
at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (CONTACT_CUSTOMERID_FK) violated - parent key not found
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
Can you please help me how to solve this issue
Thanks & Regards
Ani
Edited by: 987691 on Feb 12, 2013 2:50 PM
Edited by: 987691 on Feb 12, 2013 2:54 PMHere is My CustomerEO.xml file_
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
<!---->
<Entity
xmlns="http://xmlns.oracle.com/bc4j"
Name="CustomerEO"
Version="11.1.1.61.92"
InheritPersonalization="true"
DBObjectType="table"
DBObjectName="XX_CUSTOMER"
AliasName="CustomerEO"
BindingStyle="OracleName"
UseGlueCode="false"
xmlns:validation="http://xmlns.oracle.com/adfm/validation"
RowClass="customer.model.CustomerEOImpl">
<DesignTime>
<AttrArray Name="_publishEvents"/>
<Attr Name="_codeGenFlag2" Value="Init|Access"/>
<Attr Name="_isCodegen" Value="true"/>
</DesignTime>
<Attribute
Name="Customerid"
ColumnName="CUSTOMERID"
SQLType="NUMERIC"
Type="oracle.jbo.domain.DBSequence"
ColumnType="NUMBER"
TableName="XX_CUSTOMER"
PrimaryKey="true"
IsUpdateable="while_insert"
DefaultValue="@0"
Domain="oracle.jbo.domain.DBSequence"
RetrievedOnInsert="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="22"/>
</DesignTime>
</Attribute>
<Attribute
Name="Firstname"
IsNotNull="true"
Precision="50"
ColumnName="FIRSTNAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Firstname_Rule_0"
ResId="customer.model.CustomerEO.Firstname_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Firstname_Rule_1"
ResId="customer.model.CustomerEO.Firstname_Rule_1"
ValName="Precision : (50)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Firstname_Rule_2"
OnAttribute="Firstname"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"
ResId="customer.model.CustomerEO.Firstname_Rule_2"/>
</Attribute>
<Attribute
Name="Middlename"
Precision="10"
ColumnName="MIDDLENAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="10"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Middlename_Rule_0"
ResId="customer.model.CustomerEO.Middlename_Rule_0"
ValName="Precision : (10)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Middlename_Rule_1"
ResId="customer.model.CustomerEO.Middlename_Rule_1"
OnAttribute="Middlename"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Lastname"
IsNotNull="true"
Precision="50"
ColumnName="LASTNAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Lastname_Rule_0"
ResId="customer.model.CustomerEO.Lastname_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Lastname_Rule_1"
ResId="customer.model.CustomerEO.Lastname_Rule_1"
ValName="Precision : (50)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Lastname_Rule_2"
ResId="customer.model.CustomerEO.Lastname_Rule_2"
OnAttribute="Lastname"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Dob"
IsNotNull="true"
ColumnName="DOB"
SQLType="TIMESTAMP"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="7"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Dob_Rule_1"
ResId="customer.model.CustomerEO.Dob_Rule_1"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:MethodValidationBean
Name="Dob_Rule_0"
ResId="customer.model.CustomerEO.Dob_Rule_2"
MethodName="validateDob"/>
</Attribute>
<Attribute
Name="Address1"
IsNotNull="true"
Precision="100"
ColumnName="ADDRESS1"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Address1_Rule_0"
ResId="customer.model.CustomerEO.Address1_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Address1_Rule_1"
ResId="customer.model.CustomerEO.Address1_Rule_1"
ValName="Precision : (100)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Address1_Rule_2"
ResId="customer.model.CustomerEO.Address1_Rule_2"
OnAttribute="Address1"
Pattern="^[a-z0-9A-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Address2"
Precision="100"
ColumnName="ADDRESS2"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Address2_Rule_0"
ResId="customer.model.CustomerEO.Address2_Rule_0"
ValName="Precision : (100)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Address2_Rule_1"
ResId="customer.model.CustomerEO.Address2_Rule_1"
OnAttribute="Address2"
Pattern="^[a-z0-9A-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="City"
IsNotNull="true"
Precision="30"
ColumnName="CITY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="City_Rule_0"
ResId="customer.model.CustomerEO.City_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="City_Rule_1"
ResId="customer.model.CustomerEO.City_Rule_1"
ValName="Precision : (30)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="City_Rule_2"
ResId="customer.model.CustomerEO.City_Rule_2"
OnAttribute="City"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Country"
IsNotNull="true"
Precision="30"
ColumnName="COUNTRY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Country_Rule_0"
ResId="customer.model.CustomerEO.Country_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Country_Rule_1"
ResId="customer.model.CustomerEO.Country_Rule_1"
ValName="Precision : (30)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<Attribute
Name="State"
IsNotNull="true"
Precision="30"
ColumnName="STATE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="State_Rule_0"
ResId="customer.model.CustomerEO.State_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="State_Rule_1"
ResId="customer.model.CustomerEO.State_Rule_1"
ValName="Precision : (30)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<Attribute
Name="Gender"
IsNotNull="true"
Precision="5"
ColumnName="GENDER"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="5"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Gender_Rule_0"
ResId="customer.model.CustomerEO.Gender_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Gender_Rule_1"
ResId="customer.model.CustomerEO.Gender_Rule_1"
ValName="Precision : (5)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<Attribute
Name="Primaryphone"
IsNotNull="true"
Precision="12"
ColumnName="PRIMARYPHONE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER"
DefaultValue="###-###-####">
<DesignTime>
<Attr Name="_DisplaySize" Value="12"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Primaryphone_Rule_0"
ResId="customer.model.CustomerEO.Primaryphone_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Primaryphone_Rule_1"
ResId="customer.model.CustomerEO.Primaryphone_Rule_1"
ValName="Precision : (12)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Primaryphone_Rule_2"
ResId="customer.model.CustomerEO.Primaryphone_Rule_2"
OnAttribute="Primaryphone"
Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Secondaryphone"
Precision="12"
ColumnName="SECONDARYPHONE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER"
DefaultValue="###-###-####">
<DesignTime>
<Attr Name="_DisplaySize" Value="12"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Secondaryphone_Rule_0"
ResId="customer.model.CustomerEO.Secondaryphone_Rule_0"
ValName="Precision : (12)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Secondaryphone_Rule_1"
ResId="customer.model.CustomerEO.Secondaryphone_Rule_1"
OnAttribute="Secondaryphone"
Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Email"
IsNotNull="true"
Precision="100"
ColumnName="EMAIL"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Email_Rule_0"
ResId="customer.model.CustomerEO.Email_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Email_Rule_1"
ResId="customer.model.CustomerEO.Email_Rule_1"
ValName="Precision : (100)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Email_Rule_2"
ResId="customer.model.CustomerEO.Email_Rule_2"
OnAttribute="Email"
Pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Fax"
Precision="12"
ColumnName="FAX"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER"
DefaultValue="###-###-####">
<DesignTime>
<Attr Name="_DisplaySize" Value="12"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Fax_Rule_0"
ResId="customer.model.CustomerEO.Fax_Rule_0"
ValName="Precision : (12)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Fax_Rule_1"
ResId="customer.model.CustomerEO.Fax_Rule_1"
OnAttribute="Fax"
Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Languages"
IsNotNull="true"
Precision="50"
ColumnName="LANGUAGES"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Languages_Rule_0"
ResId="customer.model.CustomerEO.Languages_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Languages_Rule_1"
ResId="customer.model.CustomerEO.Languages_Rule_1"
ValName="Precision : (50)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<AccessorAttribute
Name="ContactsEO"
Association="customer.model.CustomerEOtoContactsEO"
AssociationEnd="customer.model.CustomerEOtoContactsEO.ContactsEO"
AssociationOtherEnd="customer.model.CustomerEOtoContactsEO.CustomerEO"
Type="oracle.jbo.RowIterator"
IsUpdateable="false"/>
<Key
Name="SysC007004">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007004"/>
<Attr Name="_checkCondition" Value='"CUSTOMERID" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes"/>
</Key>
<Key
Name="SysC007005">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007005"/>
<Attr Name="_checkCondition" Value='"FIRSTNAME" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Firstname"/>
</AttrArray>
</Key>
<Key
Name="SysC007006">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007006"/>
<Attr Name="_checkCondition" Value='"LASTNAME" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Lastname"/>
</AttrArray>
</Key>
<Key
Name="SysC007007">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007007"/>
<Attr Name="_checkCondition" Value='"DOB" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Dob"/>
</AttrArray>
</Key>
<Key
Name="SysC007008">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007008"/>
<Attr Name="_checkCondition" Value='"ADDRESS1" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Address1"/>
</AttrArray>
</Key>
<Key
Name="SysC007009">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007009"/>
<Attr Name="_checkCondition" Value='"CITY" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.City"/>
</AttrArray>
</Key>
<Key
Name="SysC007010">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007010"/>
<Attr Name="_checkCondition" Value='"STATE" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.State"/>
</AttrArray>
</Key>
<Key
Name="SysC007011">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007011"/>
<Attr Name="_checkCondition" Value='"COUNTRY" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Country"/>
</AttrArray>
</Key>
<Key
Name="SysC007012">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007012"/>
<Attr Name="_checkCondition" Value='"GENDER" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Gender"/>
</AttrArray>
</Key>
<Key
Name="SysC007013">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007013"/>
<Attr Name="_checkCondition" Value='"PRIMARYPHONE" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Primaryphone"/>
</AttrArray>
</Key>
<Key
Name="SysC007014">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007014"/>
<Attr Name="_checkCondition" Value='"EMAIL" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Email"/>
</AttrArray>
</Key>
<Key
Name="SysC007015">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007015"/>
<Attr Name="_checkCondition" Value='"LANGUAGES" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Languages"/>
</AttrArray>
</Key>
<Key
Name="XxCustomerdetailsPk"
PrimaryKey="true">
<DesignTime>
<Attr Name="_DBObjectName" Value="XX_CUSTOMERDETAILS_PK"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Customerid"/>
</AttrArray>
</Key>
<ResourceBundle>
<PropertiesBundle
PropertiesFile="customer.model.CustomerModelBundle"/>
</ResourceBundle>
</Entity> -
Problem with creating new user in portal = portlet is not visible
Hi,
I've got a problem with creating new users in portal. In the Administer tab of the builder is the user portlet not visible.
How can I make this portlet visible?
Please Help
thank you...
GilbertHi..my problem slightly similar.
I created one new user, and didn't select anything from "Public Groups Assignment" and "Privilege Assignment" for him.
I expect the user will be a public user.
But, when he try to logged in the portal,
He cannot see all the PORTLETS related to database values..
All he can see just LINKS -that all in my portal right now beside the report from database that the user cannot see :)
So, what did i do wrong?
Plz Advise, and thanks. -
Problem in creating new communication channel template in IR
Hi experts,
I currently have problems with creating new communication channel template in Integration Repository. If I choose the New-Context (Adapter Objects-->Communication Channel Template) the dialog "CREATE OBJECT" is shown. After I have inserted the Name of my template I push the create button.
Then the following error occurs:
STOP: Internal error: Object cannot be changed in display mode
DETAILS: Internal error: Object cannot be changed in display mode(CANT_SET_MODIFIED).
So can anybody help me. Thanks for your help.
Best regards.
MarioHi Mario,
This is genral problem appearing in PI 7.0 with SP12.
Previously, i have the same problem.
i.e STOP: Internal error: Object cannot be changed in display mode
DETAILS: Internal error: Object cannot be changed in display mode(CANT_SET_MODIFIED)
Regarding this we raise an OSS note SAP people.
they gave the suggestion that update with SP13.
i discuss with basis team and install the SP13.
now the problem is solved, i can able to create the Communication Channel Template.
Please award points, if it really help to u
Regards
Mahesh. -
Problem in creating new versions for existing DIR using CV01N
I am working in SAP ERP 6.0 EHP 4.0 system.
I have problem in creating new versions for existing DIR using CV01N
I create a DIR version 00 with functional location and mpd cycles. Then when i try to create a new version by copying the contents created from already created document.I change the MPD cycles in the new version and save it.
once when i display the first document created the mpdcycle specified in version 01 is copied to the 00 version.
The document is inconsistent where versioning of document doesnot work properly wrt MPDCYCLE and MP HEADER.
The problem which i found was the document identification guid remains the same for all the document versions getting created.
The same is working fine in SAP ERP6.0 EHP3.0 sytem.
Please someone help me in resolving the above issue.
Regards,
Prasad.BThere is a change in the standard code.The reason for the above problem was because of a missing Enhancemnet point in a standard function module 'CV110_DOC_CREATE_WITH_TEMPLATE'.
IS-ADEC-MPD - Enhancement to copy MPD data
ENHANCEMENT-POINT CV110_DOC_CREATE_WTEMPL_01 SPOTS ES_SAPLCV110.
+*$*$-Start: CV110_DOC_CREATE_WTEMPL_01----------------------------------------------------------$*$*+
+**ENHANCEMENT 1 ZSF_AD_MPD_SAPLCV110. "active version**+
+*** copy MPD relevant data from templ. doc to current doc**+
+**CALL FUNCTION 'MPD02_COPY_MPD_DATA'**+
+**EXPORTING**+
+**is_draw = ls_draw**+
+**TABLES**+
+**ct_drad = lt_drad.**+
+*ENDENHANCEMENT.**$*$-End: CV110_DOC_CREATE_WTEMPL_01----------------------------------------------------------$*$*+
Created a custom enhancement point similar to SAP ECC6.0 EHP 3.0 system.
The reason was the buffer was not getting cleared previously.After inserting the above code the DIR's are getting created withot any issues.
Regards,
Prasad.B -
Please help! (creating new rows in a table)
Hi guys.
I have the following table:
Guest ID | visit ID | start date | end date | days | total amount | avg amount
1234.......| 6750...| 01/01/08...| 20/01/08 | 20....| $2000.........| $100
Avg amount = amout per day = days/total amount
I need to figure out a way of summing up all the profits from, say, last 3 weeks, 2 months etc.
To do that, I am thinking of breaking up each stay period by days.
i.e. to create a new row in a table for each day.
So, for this example, we'd have 20 new rows,
with same guest iD and visit ID,
start date and end date are the same because we only count one day...
Guest ID | visit ID | start date | end date | days | total amount | avg amount
1234.......| 6750...| 01/01/08 ..| 01/01/08 | 1.......| $100............| $100
1234......| 6750....| 02/01/08 ..| 02/01/08 | 1.......| $100..........| $100
etc
The question is, is there any way to make oracle do this?
As in, to create new rows (maybe in a new table?)
Any help/ideas would be appreciated!
I am using Oracle SQL Plus 8.1.7.0.0I have used all_objects to populate multiple records as you are living in stone age :-)
SQL> drop table temp;
Table dropped.
SQL> create table temp (
2 Guest_ID integer primary key,
3 visit_ID integer,
4 start_date date,
5 end_date date,
6 days integer,
7 total_amount integer,
8 avg_amount integer);
Table created.
SQL> insert into temp values (1234, 6750, '01/jan/08', '20/jan/08', 20, 2000, 100);
1 row created.
SQL> commit;
Commit complete.
SQL> select t.guest_id,t.visit_id,t.start_date+rownum-1 start_date,t.start_date+rownum-1 end_date, 1 as days, avg_amount as total_amount, avg_amount
2 from temp t,
3 (select 1
4 from all_objects,
5 (select (end_date - start_date) + 1 day_count
6 from temp t
7 where guest_id = 1234)
8 where rownum <= day_count);
GUEST_ID VISIT_ID START_DAT END_DATE DAYS TOTAL_AMOUNT AVG_AMOUNT
1234 6750 01-JAN-08 01-JAN-08 1 100 100
1234 6750 02-JAN-08 02-JAN-08 1 100 100
1234 6750 03-JAN-08 03-JAN-08 1 100 100
1234 6750 04-JAN-08 04-JAN-08 1 100 100
1234 6750 05-JAN-08 05-JAN-08 1 100 100
1234 6750 06-JAN-08 06-JAN-08 1 100 100
1234 6750 07-JAN-08 07-JAN-08 1 100 100
1234 6750 08-JAN-08 08-JAN-08 1 100 100
1234 6750 09-JAN-08 09-JAN-08 1 100 100
1234 6750 10-JAN-08 10-JAN-08 1 100 100
1234 6750 11-JAN-08 11-JAN-08 1 100 100
GUEST_ID VISIT_ID START_DAT END_DATE DAYS TOTAL_AMOUNT AVG_AMOUNT
1234 6750 12-JAN-08 12-JAN-08 1 100 100
1234 6750 13-JAN-08 13-JAN-08 1 100 100
1234 6750 14-JAN-08 14-JAN-08 1 100 100
1234 6750 15-JAN-08 15-JAN-08 1 100 100
1234 6750 16-JAN-08 16-JAN-08 1 100 100
1234 6750 17-JAN-08 17-JAN-08 1 100 100
1234 6750 18-JAN-08 18-JAN-08 1 100 100
1234 6750 19-JAN-08 19-JAN-08 1 100 100
1234 6750 20-JAN-08 20-JAN-08 1 100 100
20 rows selected.Thanks,
Karthick. -
I have problems with creating new projects in iMovie.
I have problems with creating new projects. When i try, the mac says the following "Make sure there is enough disk space and that you have permission to write the projects to the drive." I have 8GB available, so its not that.
thanks for your support
lol -
Creating new rows in OrderLines child
I am currently having an issue when trying to create a new row in my order_lines table for an existing Order. When I try to do row.createRow() I get:
Trying to create a new order line
oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
void oracle.jbo.server.EntityImpl.create(oracle.jbo.AttributeList)
void org.cgfns.cerpass.bc.products.CrpOrderLinesImpl.create(oracle.jbo.AttributeList)
void oracle.jbo.server.ViewRowStorage.create(oracle.jbo.AttributeList)
void oracle.jbo.server.ViewRowImpl.create(oracle.jbo.AttributeList)
oracle.jbo.server.ViewRowImpl oracle.jbo.server.ViewObjectImpl.createInstance(oracle.jbo.server.ViewRowSetImpl, oracle.jbo.AttributeList)
oracle.jbo.server.RowImpl oracle.jbo.server.QueryCollection.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.server.ViewRowSetImpl,oracle.jbo.AttributeList)
oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.AttributeList)
oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRow()
oracle.jbo.Row oracle.jbo.server.ViewObjectImpl.createRow()
void org.cgfns.cerpass.bc.products.TestMasterDetailView.main(java.lang.String[])
This is the meat of the program. I've started simple to try to isolate the issue. BCs are having trouble inserting using the example provided in other OTN posts covering the same type of issue. I thinking BC4J might have a problem with the primary keys. The OrderHeaders table is linked to the OrderLines table via the OrderHeaderID but there is also a DB Sequence field for OrderLines called OrderLinesId. Both of there are checked as PK. I'm not sure if this may be causing an issue or not.
I did create a test using the OE schema on Orders and Orderlines and I am able to create rows in it. Howerver there is no DBSequence in the OrderItems table like there is in the OrderLines table that is giving me a problem. I am able to create a view link to the OrderHeaders table and the do the link.getSource and link.getDestination calls to get the viewObjects. I then create a new row using createRow and set the attributes and commit. All works fine in OE. I do the same on the other table (OrderLines, OrderHeaders) I get the error. My source is a follows.
public static void main(String[] args) {
TestMasterDetailView test = new TestMasterDetailView();
test.getApplicationModule();
String orderId = "1106";
if(test.am == null) {
System.out.println("Error appMod null");
ViewLink ordersToItems = test.am.findViewLink("CrpOrderHeaderFk1Link");
ViewObject ordersV = ordersToItems.getSource();
ordersV.setWhereClause("ORDER_HEADERS_ID = " + orderId);
ordersV.executeQuery();
System.out.println("RowCnt = " + ordersV.getRowCount()); // returns 1
Row oRow = ordersV.next(); // throws invalid entity
System.out.println("OrderHeadersId = " + oRow.getAttribute("OrderHeadersId"));
ViewObject itemsV = ordersToItems.getDestination();
if(itemsV == null) {
System.out.println("Error itemsV == null!");
System.out.println("Trying to create a new order line");
Row itemRow = itemsV.createRow();
itemRow.setAttribute("OrderHeadersId", orderId);
itemRow.setAttribute("OrderLinesId", "3030");
itemRow.setAttribute("StatusTypesId", "125");
itemRow.setAttribute("Quantity", "111");
itemRow.setAttribute("BundlesId", "139");
itemsV.insertRow(itemRow);
test.am.getTransaction().commit();
test.am.remove();
All I really want to do is insert a new record into the OrderLines table. From what I've read this seems to be an issue because of the associations. Any help would be greatly appreciated.
Thanks,
Brad Gibson
TUSCIt doesn't look like you're using DBSequence domain for the OrderLinesId attribute. If you are then you do not need to fill in the sequence as you've done in the create method.
Getting back to create issue, You may want to set the 'order' id (foreign key) values before calling super and then call the getOrder() (or getXXX where XXX is the order accessor in this entity) method to verify if the order of the given ID exists/found in the cache.
By the way, are you also using a similar create() in order with DBSequence as the type for the pK and you force a sequence value on top of it via setAttribute?
Yes, this is the create method inside CrpOrderLinesImpl.java
protected void create(AttributeList attributeList) {
super.create(attributeList);
SequenceImpl s = new SequenceImpl("CRP_ORDER_LINES_ID_SEQ", getDBTransaction());
setAttribute("OrderLinesId",s.getSequenceNumber());
Thanks,
Brad -
Create new row in Report automatically
Post Author: miwalker
CA Forum: Crystal Reports
I have a report that contains a table with a row for each week and columns containing totals for how many defects are in each state (i.e. Open, Verify, Closed). Each week I update the table and add a new row with the totals for that week. I also have a bar graph that displays this information graphically. Is it possible to create a formula that when I run the report it automatically creates a new row in the table and updates the totals rather than me having to do it manually? If I can do that I would then like to use a scheduler to automatically run the report each week. Thanks,Post Author: miwalker
CA Forum: Crystal Reports
Thanks Mavrick5. I was able to generate the correct date now, but I'm still having problems getting it to write on a new row. Row #1 will contain the running totals of each "state" for the week. I then want a new line generated when I run the report the following week with the totals for that specific week, and so on as the weeks progress. Right now it just keeps overwriting the first row. Is there a function I can use in the formula to get it to write to a new line? I've been looking through the forum but haven't found anything on this subject. Thanks, -
JBO-26031 Error encountered when attempting to create new row
Hi
We are experiencing an intermittent error whereby sometimes the call to
View1Impl.createRow() fails with the following error message:
JBO-26031 Association end Entity1 of assoc Entity1Entity2FkAssoc invalid for entity based Entity1 in view object View2.
View1 is a generated view object based on a single entity whereas View2 joins the entity from View1 (Entity1 in the error message) with Entity2 and three other entities.
View2 has previously been executed with a WHERE clause defined within the code. We have tried re-setting the parameters to null prior to the createRow() call but this does not seem to have fixed the problem.
Has anybody any suggestions as to why this error would be thrown (and if possible why it does not happen every time we attempt to create a new row)?
Thanks in advance for any help
LisaI have exactly the same problem when I deployed the ADF application to JBOSS.
I am using jdev 10.1.3.3 ADF 10.1.3.41.57 and JBOSS 4.0.3 sp1 / JAVA 1.5.0
The strange think is that when I am running the application from jdev (using the embedded OC4J) the problem dos not occur.
Any suggestions? -
STRANGE PROBLEM with "Create New Mail Account.scpt" when creating POP acct.
I am using "Create New Mail Account.scpt" to create a POP account. It creates the account successfully. It fetches the mails successfully. Now the problem begins. After fetching all the mails once if u click "Get Mail" in mac mail, it fetches all the emails again and has now 1 original and 1 copy of the email set which is on the server. I just need 1 copy of the mail set not multiple. Please give me a solution or direct me to a help.
Thanks
SCRIPT
global theUsername
global thePassword
set success to 1
set theResult to true
if theResult is not equal to false
#set theAccountName to getAccountName()
#set theUsername to getUsername()
#set thePassword to getPassword()
#set theEmailAddresses to getEmailAddress()
#set theFullName to getFullName()
-- POP Account
if accountTypeString is equal to "POP" or accountTypeString is equal to "IMAP" then
set theHostname to "THE HOST NAME"
-- POP specific options
if accountTypeString is equal to "POP" then
set deletionPolicy to my getDeletionPolicy()
if deletionPolicy is not equal to false then
set deletionPolicy to item 1 of deletionPolicy
set theNewAccount to my createAccount(accountTypeString, theAccountName, theUsername, theHostname, thePassword, theEmailAddresses, theFullName)
if theNewAccount is not equal to false then
setDeletionPolicy(theNewAccount, deletionPolicy)
getAndSetAuthenticationScheme(accountTypeString, theNewAccount)
getAndSetSMTPServer(theNewAccount)
else
set success to 0
end if
end if
-- IMAP specific options
else if accountTypeString is equal to "IMAP" then
set theNewAccount to my createAccount(accountTypeString, theAccountName, theUsername, theHostname, thePassword, theEmailAddresses, theFullName)
if theNewAccount is not equal to false then
getAndSetCachingSettings(theNewAccount)
getAndSetAuthenticationScheme(accountTypeString, theNewAccount)
getAndSetSMTPServer(theNewAccount)
else
set success to 0
end if
end if
end if
if success is equal to 1 then
display dialog "Account created!"
else
display dialog "Account creation failed!"
end if
end if
-- Convenience handler for creating accounts
on createAccount(theAccountType, theAccountName, theUsername, theHostname, thePassword, theEmailAddresses, theFullName)
tell application "Mail"
try
if theAccountType is equal to ".Mac" then
set theNewAccount to make new Mac account with properties {name:theAccountName, user name:theUsername, server name:theHostname, password:thePassword, full name:theFullName, email addresses:{theEmailAddresses}}
else if theAccountType is equal to "IMAP" then
set theNewAccount to make new imap account with properties {name:theAccountName, user name:theUsername, server name:theHostname, password:thePassword, uses ssl:true, full name:theFullName, email addresses:{theEmailAddresses}}
else if theAccountType is equal to "POP" then
set theNewAccount to make new pop account with properties {name:theAccountName, user name:theUsername, server name:theHostname, include when getting new mail:true, password:thePassword, uses ssl:true, full name:theFullName, email addresses:{theEmailAddresses}}
end if
on error
set theNewAccount to false
end try
end tell
return theNewAccount
end createAccount
-- Ask the user what they would like to name the account
on getAccountName()
repeat
set theResult to display dialog "What would you like this account to be named?" default answer "Example: My Home Account"
set theAccountName to text returned of theResult
if theAccountName does not start with "Example:" then
exit repeat
end if
end repeat
return theAccountName
end getAccountName
-- Ask the user for the user name for their email account
on getUsername()
repeat
set theResult to display dialog "What is your email user name?" default answer "Example: janedoe"
set theUsername to text returned of the theResult
if theUsername does not start with "Example:" then
exit repeat
end if
end repeat
return theUsername
end getUsername
-- Ask the user for the password for their email account
on getPassword()
set theResult to display dialog "What is the password for this account?" default answer ""
set thePassword to text returned of theResult
return thePassword
end getPassword
-- Ask the user for the email addresses for their email account
on getEmailAddress()
repeat
set theResult to display dialog "What email address would you like to use for this account?" default answer "Example: [email protected]"
set theEmailAddress to text returned of theResult
if theEmailAddress does not start with "Example:" then
exit repeat
end if
end repeat
return theEmailAddress
end getEmailAddress
-- Ask the user for the full name for their email account
on getFullName()
repeat
set theResult to display dialog "What is the full name for this account?" default answer "Example: Steve Smith"
set theFullName to text returned of theResult
if (theFullName does not start with "Example:") then
exit repeat
end if
end repeat
return theFullName
end getFullName
-- Convenience handler for asking the user what settings they would
-- like to have for their special mailboxes. This handler also sets these
-- values in Mail.
on getAndSetSpecialMailboxes(theAccount)
-- Sent messages default to storing locally
set theResult to display dialog "Would you like to store Sent Messages on the IMAP server?" buttons {"Yes", "No"} default button 2
log theAccount
tell application "Mail"
tell theAccount
if button returned of theResult is equal to "Yes" then
set store sent messages on server to true
else if button returned of theResult is equal to "No" then
set store sent messages on server to false
end if
end tell
end tell
-- Drafts default to storing locally
set theResult to display dialog "Would you like to store Drafts on the IMAP server?" buttons {"Yes", "No"} default button 2
tell application "Mail"
tell theAccount
if button returned of theResult is equal to "Yes" then
set store drafts on server to true
else if button returned of theResult is equal to "No" then
set store drafts on server to false
end if
end tell
end tell
-- Trash defaults to storing on the IMAP server
set theResult to display dialog "Would you like to store Deleted Messages on the IMAP server?" buttons {"Yes", "No"} default button 1
tell application "Mail"
tell theAccount
if button returned of theResult is equal to "Yes" then
set store deleted messages on server to true
else if button returned of theResult is equal to "No" then
set store deleted messages on server to false
end if
end tell
end tell
end getAndSetSpecialMailboxes
-- Convenience handler for asking the user what IMAP
-- caching setting they would like to use and configuring
-- it in Mail.
on getAndSetCachingSettings(theAccount)
set theResult to choose from list {"Cache everything", "Cache everything but attachments", "Cache when read", "Don't cache"} ¬
with prompt "Choose a message caching setting for this account:" default items {"Cache everything"} without multiple selections allowed
if theResult is not equal to false then
tell application "Mail"
tell theAccount
if (item 1 of theResult is equal to "Cache everything") then
set message caching to all messages and their attachments
else if (item 1 of theResult is equal to "Cache everything but attachments") then
set message caching to all messages but omit attachments
else if (item 1 of theResult is equal to "Cache when read") then
set message caching to only messages I have read
else if (item 1 of theResult is equal to "Don't cache") then
set message caching to do not keep copies of any messages
end if
end tell
end tell
end if
end getAndSetCachingSettings
-- Convenience handler for asking the user whether they want to use
-- an already defined SMTP server (if any) or whether they want to
-- define a new one.
on getAndSetSMTPServer(theAccount)
tell application "Mail" to set everySMTPServer to every smtp server
if ((count of everySMTPServer) > 0) then
set listOfSMTPServers to {}
repeat with eachServer in everySMTPServer
try
set listOfSMTPServers to listOfSMTPServers & name of eachServer
end try
end repeat
createNewSMTPServer(theAccount)
else
createNewSMTPServer(theAccount)
end if
end getAndSetSMTPServer
-- Handler for creating a new SMTP server, if the user has none set up
-- already or if they choose not to use one of their existing servers.
on createNewSMTPServer(theAccount)
set theServerName to "THE SERVER NAME"
tell application "Mail"
set theSMTPServer to make new smtp server with properties {server name:theServerName, port:25, uses ssl:true}
set smtp server of theAccount to theSMTPServer
end tell
getAndSetAuthenticationScheme("SMTP", theSMTPServer)
end createNewSMTPServer
-- Handler for asking the user what authentication scheme their server supports.
-- The options are different for POP, IMAP, and SMTP. Unless you are told otherwise,
-- it's best to leave these at their default settings.
on getAndSetAuthenticationScheme(accountType, theAccount)
if accountType is equal to "POP" then
set theChoices to {"Password", "Kerberos 4", "Kerberos 5", "KPOP", "MD5"}
set theDefault to {"Password"}
else if accountType is equal to "IMAP" then
set theChoices to {"Password", "Kerberos 4", "Kerberos 5", "MD5"}
set theDefault to {"Password"}
else if accountType is equal to "SMTP" then
set theChoices to {"None", "Password", "Kerberos 4", "Kerberos 5", "MD5"}
set theDefault to {"Password"}
end if
set theResult to choose from list theChoices ¬
with prompt ¬
"Choose an authentication scheme for this " & accountType & " server. Most servers support 'Password' authentication." default items theDefault without multiple selections allowed
if theResult is not equal to false then
tell application "Mail"
set theScheme to item 1 of theResult
tell theAccount
if theScheme is equal to "Password" then
set authentication to password
else if theScheme is equal to "Kerberos 4" then
set authentication to «constant exutaxk4»
else if theScheme is equal to "Kerberos 5" then
set authentication to kerberos 5
else if theScheme is equal to "MD5" then
set authentication to md5
else if theScheme is equal to "None" then
set authentication to none
else if theScheme is equal to "KPOP" then
set authentication to «constant exutakpo»
end if
end tell
end tell
if accountType is equal to "SMTP" then
set theSMTPLogin to theUsername
set theSMTPPassword to thePassword
tell application "Mail"
tell theAccount
set user name to theSMTPLogin
set password to theSMTPPassword
set uses ssl to true
set port to 25
end tell
end tell
end if
end if
end getAndSetAuthenticationScheme
-- Handler for asking the user what POP deletion policy
-- they would like to use for their account.
on getDeletionPolicy()
set theResult to choose from list {"Immediately after being downloaded", "After a specified number of days", ¬
"When I remove them from the inbox", "Always leave them on the server"} ¬
with prompt ¬
"Choose a POP message deletion option:" default items {"Always leave them on the server"} without multiple selections allowed
return theResult
end getDeletionPolicy
-- Handler for setting the deletion policy established in getDeletionPolicy()
on setDeletionPolicy(theAccount, thePolicy)
tell application "Mail"
tell theAccount
if thePolicy is equal to "Immediately after being downloaded" then
set delete mail on server to true
set delayed message deletion interval to 0
else if thePolicy is equal to "After a specified number of days" then
set numberOfDays to my getDeletionInterval()
set delete mail on server to true
set delayed message deletion interval to numberOfDays
else if thePolicy is equal to "When I remove them from the inbox" then
set delete mail on server to true
set delete messages when moved from inbox to true
else if thePolicy is equal to "Always leave them on the server" then
set delete mail on server to false
end if
end tell
end tell
end setDeletionPolicy
-- Handler for asking the user what deletion interval they
-- would like to use, if they are setting up a POP account
on getDeletionInterval()
set theResult to display dialog "After how many days would you like POP messages to be deleted from the server?" default answer "30"
set numberOfDays to text returned of theResult as integer
return numberOfDays
end getDeletionIntervalHi amiaba, and a warm welcome to the forums!
I can't quite tell what it's doing, but open Keychain Access in Applications>Utilities, click on your Keychain on the left, put .mac in the search bar, once you find it, double click on it and click show password.
If you have no mail in there try this with Mail quit.
Drag this file to the Desktop...
/Users/YourUserName/Library/Preferences/com.apple.mail.plist
Start Mail & see if it steps you through it.
Not sure on the .uk thing, but is Date & Time>Time Zone set to the UK? -
How to add one button at top of table that creates new rows each time a user clicks on it?
In the help guide, there is an example of adding buttons to each row - an Add Row and Delete Row button. I am interested in having one button at the top of the table that can add rows.
Hi,
You can create a table with a header row, where you can place your add button in one of its cells.
Then you need a script to create a new row in the buttons click event. In a table named 'Table1' with a row named 'Row1' it looks this way:
Table1._Row1.addInstance() -
Problem in creating new implementation for filter dependent badi
Hi Experts,
I want to use badi NOTIF_EVENT_POST.It is a filter dependent badi. It is asking filter type while implementing thro se19. Could anyone pls tel me how to create new implementation for the filter dependent badi. Existing filter type is QMART. is there any problem if i change the filter type?
Thanks in Advance!Hi ,
NOTIF_EVENT_POST is filter dependent and filter values are based on QMART value in table TQ80. You need to specify the filter value ie : QMART value before implimentation , before that check all active implimentations for the same , if u have to impliment on same filter value , you need to deactivate the one which is implimented on same filter value .
You are not supposed to change the filter type.
Regards,
Vamsi
Edited by: CH. VAMSHI on Sep 29, 2009 11:58 AM
Maybe you are looking for
-
Unable to load font"^0" "Helvetica Neue" After Effects CC
After updating After Effects CC, the warning appears: Unable to load font"^0" "Helvetica Neue" HelveticaNeue.dfont is available in my HD/System/Library/Fonts I work with: Before the CC update everything worked fine. Please help me.
-
BI Report based on Age bands?
Hi all, I need to create a simple OBIEE report on the sales made by sales persons based on the age band: Eg: Sales Person Sales Age 25 - 35 --> 30000 units Age 36 - 45 --> 10000 units Age 46 - 55 --> 5000 units Age 56 - 65 --> 20000 units I have the
-
Convert HTML Web form to a PDF
I have an HTML web form which will be filled out by a user online. Is it possible for me to convert this form and the data which has been filled in by the user to a pdf and save it to a file after the user selects submit? Thanks, Patti.
-
I have a series of 4 objects (object1, object2, etc) and 4 empty boxes (box1, box2, etc). What I want to happen is this: 1) Click the object and all empty boxes light up 2) Click an illuminated box and the object moves to it and it along with the no
-
Configuration Utility does not start after 9.3.1 to 9.3.3 upgrade
Hi All, I'm trying to upgrade my 9.3.1 VM environment to 11.1.2.1. So first i need to get it to 9.3.3 as per the supported upgrade path. I followed the various readme and other docs and proceeded with the following order: 1. Shared Services 2. Essbas