Add the line in a table
Hello
I am creating a coloring book simple application and I have for the most part work based on the code I found on the web and tutorials. I use a table for my color chart and I'm trying to add a race, but it does not work. The markers in the table are based on a symbol called "Colours".
Here is the action script that I use.
Table to hold the colors
var colorArray:Array = new Array(0xE97DB1,0xF58240,0xF9ED41,0x82C34D,0x00B0F0,0x935CA4,0xFFFFFF);
A new instance of the class of color transformation.
var colorTrans:ColorTransform = new ColorTransform;
var currentColor:int = 0;
This adds the ovals on the scene with the corresponding color of the table
and the mouse click events.
for (var i: int = 0; i < colorArray.length; i ++) {}
var c = new Colours();
c.y = 500 + i * 50;
c.buttonMode = true;
addChild (c);
colorTrans.color = colorArray [i];
c.transform.colorTransform = colorTrans;
c.addEventListener (MouseEvent.CLICK, ovalsClick);
c.arrayIndex = i;
}
This sets the value of currentColour of dynamic property array index.
function ovalsClick(e:MouseEvent):void {}
currentColor = e.currentTarget.arrayIndex;
}
Adds the mouse click event to the holder.
holder.addEventListener (MouseEvent.CLICK, holderHandler);
This function changes the color of the clip to the inside
When he is selected.
function holderHandler (e:MouseEvent): void {}
for (var i: int = 0; i < holder.numChildren; i ++) {}
If (holder.getChildAt (i) .hitTestPoint (mouseX, mouseY, true)) {}
colorTrans.color = colorArray [currentColor];
holder.getChildAt (i).transform.colorTransform = colorTrans;
}
}
}
Thanks in advance,
-Owen
For what I described the code of the loop would be similar to the following...
for (var i: int = 0; i< colorarray.length;="" i++)="">
var marker: Sprite = new Sprite();
Marker.y = 500 + i * 50;
var c = new Colours();
c.buttonMode = true;
marker.addChild (c);
colorTrans.color = colorArray [i];
c.transform.colorTransform = colorTrans;
c.addEventListener (MouseEvent.CLICK, ovalsClick);
c.arrayIndex = i;
var o: Outline = new Outline();
marker.addChild (o);
addChild (marker);
}
In this way your color coding objects remains as it was and you add just a few band-aid around it.
Tags: Adobe Animate
Similar Questions
-
I added a button to a form to add a line in a table. He was working. I passd of the subforms to the top and now the button does not work.
Can someone take a look and help me understand what I am doing wrong?
In addition, I can't understand today why I can't insert a copy of the form! Any clues?
Thank you
MDawn
There's something wrong with the code that you used to create an instance. You're missing instanceManager in your script. Same is the case with the button Delete.
Header.detailHeader. instanceManager.addInstance (1);
I have sent the form fixed in a separate email. I hope this helps.
Thank you
Srini
-
Add the line in the advanced table
Hello
I need to create a line while click on the button Add another in a table.
Can any body help on this.
Kind regards
VincentHi Vincent,.
You can do this using a declarative approach or through coding.
Here are two ways I want to say. You can use an any of them.
To create a new line in advancedTable, you have two options.First of all is to click with the right button on advancedTable--> New--> the foot of page
Now right-click on tableFooter1--> New--> addTableRow
Set the following properties for addTableRow1
Add labels to lines: Adding line
To add line: 1
Insert automatically the lines: trueSecond option is to create a "submit" button and in the method of construction of the controller use code below.
' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processFormRequest (pageContext, webBean);
If (pageContext.getParameter ('ID of the button send Add row')! = null)
{
OAApplicationModule am = pageContext.getApplicationModule (webBean);
OAViewObject vo = (OAViewObject) am.findViewObject ("VO Instance name");
If (vo! = null)
{
VO. Last();
VO. Next();
Line = vo.createRow ();
vo.insertRow (row);
row.setNewRowState ((byte) - 1);
}
}
}Kind regards
Works -
Add the line in the table of the ADF
I am trying to add a new line to the table of the ADF. Here are my steps:
1 create new entities to tables (new-> EJB-> entities from Tables)
2. create the Session Bean (new->-> Session Bean EJB) with all required methods for earlier of the entity created
3 create the control of data off of it (right click-> session bean create a Data control)-, it creates 'testFindAll '.
4. After these steps, I drag / drop my "testFindAll" of data controls to form and create the table
5. now I do drag & drop operation Create since my 'testFindAll-> operations", create a button and move the action to create CreateInsert
And now, eating disorders: ((...)) When I click on the button to add the new line I get null pointer exception. Here is the part of the trace:
java.lang.NullPointerException
at oracle.adf.model.adapter.bean.UpdatableBeanDataControl.createRowData(UpdatableBeanDataControl.java:137)
at oracle.adf.model.bean.DCBeanDataControl.createRowData(DCBeanDataControl.java:642)
at oracle.adf.model.bean.DCDataVO.doCreateData(DCDataVO.java:870)
at oracle.adf.model.bean.DCDataRow.create(DCDataRow.java:306)
at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:432)
at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:4679)
at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:567)
at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1818)
at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2211)
at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2257)
at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2233)
at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:9404)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1223)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:464)
at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
...
I know I can do it if you create ViewObject rather than Tables and SessionBean entities. But I need this approach.
Thank you very much!Hi Goran,
What is your version of JDev? You try with EJB 3.0 or 2.1? I just tried (with 3.0) and it works fine (tested in JDev 11.1.1.2.0).
Here's my pagedef
Infact, I don't have to change the action of creation at CreateInsert. By default, it is CreateInsert only.
Arun-
-
tabular: Add the line: line does not get inserted
Hi all
I have a tabular presentation based on a products table, quantity, unit_price and product_id columns
in the form of Tha also has a calculated field price (unit_price * amount) and a total on the price column
When the user changes unit_price or quantity, the price is calculated together total whith, this is done using javascript
I want to accomplish is add when you click line, and then the total row of the report should remain the last row
I managed to do it, but when I add a line and then fill in the same row is ignored by apex, 0 rows inserted
This is because when you change a field in the hidden input field fcud_xxxx does not change to would be "to 'C'
How can I fix this, I have to write a change event for each column?
any other ideas?
I put the code on apex.oracle.com
workspace: martijnke
login/password: demo/demo
application: 78396: apex advance
Start the application and click orders, and then click on any order to go to the edit page 4 control elements
Click Add line and see what happens
the javascript code is on page 4, the function is called switch_last_row()
I found this in widget.tabular.js:
// Register change handler on new row form fields, change "fcud_*" hidden element to C if a change occurs lNewRowIndex = tabular.pad( ( tabular.gNumRows + tabular.gNewRows ), 4 ); $( ":input[id^=f][id$=_" + lNewRowIndex + "]", apex.gPageContext$ ).change( function() { $( "#fcud_" + lNewRowIndex, apex.gPageContext$).val( "C" ); });
Why change this event not working for my vacuum dial-up?
DB: 11 GR 2
Apex 5.0.2
KR
Martin
Martijnke wrote:
I have a tabular presentation based on a products table, quantity, unit_price and product_id columns
in the form of Tha also has a calculated field price (unit_price * amount) and a total on the price column
When the user changes unit_price or quantity, the price is calculated together total whith, this is done using javascript
I want to accomplish is add when you click line, and then the total row of the report should remain the last row
I managed to do it, but when I add a line and then fill in the same row is ignored by apex, 0 rows inserted
This is because when you change a field in the hidden input field fcud_xxxx does not change to would be "to 'C'
How can I fix this, I have to write a change event for each column?
any other ideas?
I put the code on apex.oracle.com
workspace: martijnke
login/password: demo/demo
application: 78396: apex advance
Thanks for the creation of the example. Makes it so much easier to understand the problem and to work there.
Start the application and click orders, and then click on any order to go to the edit page 4 control elements
Click Add line and see what happens
the javascript code is on page 4, the function is called switch_last_row()
I found this in widget.tabular.js:
- Sign change on the form fields Manager new line, change "fcud_ *" element hidden C if a change occurs
- lNewRowIndex = tabular.pad ((tabular.gNumRows + tabular.gNewRows), 4);
- $(«: entrée [id ^ = f] [id$ = _ » + lNewRowIndex + «]», apex.gPageContext$) .change (function() {}
- $(«_#fcud__»_+_lNewRowIndex,_apex.gPageContext$).val ('C');
- });
Why change this event not working for my vacuum dial-up?
It does not work because the use of the method. html() in this function replaces the DOM elements these managers events are related to the:
function switch_last_row(){ var l_total = $('td[headers="CHECK$01"] b').parent().parent().html(); var l_last = $('td[headers="CHECK$01"]'); var count = l_last.length; //$('td[headers="CHECK$01"] b').parent().parent().html(l_last[count - 1].innerHTML); var v_html = $(l_last[$('td[headers="CHECK$01"]').length - 1]).parent().html(); //alert(l_total); //alert(v_html); $(l_last[count - 1]).parent().html(l_total); $(l_last[count - 2]).parent().html(v_html); }
Event managers are left intact by using an approach much more simple that moves the total line node below the newly added in the DOM instead of exchanging their content:
function switch_last_row() { var totalRow = $('td[headers="CHECK$01"] b').closest('tr'); totalRow.next().after(totalRow); }
I created a demonstration of this in page 4 a new application in your workspace. However, this leads to a number of other problems. As I'm not sure of the magnitude that these additional questions were present or planned in the original, I left things to this page 4 and started from scratch on pages 586 and 587. In general, the JS code in the example seems to be too procedural. It does not entirely the ability to work at a higher level of abstraction using jQuery (' write less do more ") and the DOM objects. Doing this, in conjunction with dynamic actions APEX gives more compact code, better separation of concerns and an application that is much easier to debug and maintain. Compare the use of the CSS level page and unique dynamic action to bind several columns of report versus change events manually adding/changing the attributes of style event and online at the column level.
-
Add a line in a table with a button
Good day to all;
I think I have now lost...; >)
Life cycle of Designer 8.05
In any case, if the user of the form requires additional lines to enter the infoamtion, I want them to be able to add a line using a button. I tried to use the following
"
Table "N". Row2.instanceManager.addInstance (1); = "N" is the name of the table.
I did it on a couple other forms but I must be missing something that I get the following error in Consol java
"GeneralError: failed the operation."
XFAObject.addInstance:1:XFA:form1 [0]: #subform [0]: #subform [1]: Button1 [0]: click
The item [max] has violated its number of occurrences. »
The form is registered as a form Arcobat 8 dynamic XML
I have
1 page is sent
Subform is cast
Someone would be kind enough to point me in the right direction.
Thank you all
Chomp
Eventually, you forgot to put the line to be reapetable.
-
Add the line in the long-form Master
Hi all
I wonder if there is a way to simply add a line in the form of master (tabular) detail without actually submitting the page. So if the user has updated an existing line before clicking on the add a line button, the update does not have to be submitted by click on the button Add a line. If possible, so I want to submit (insert) the newly added line, but also the updates made to existing lines when the user click on the button 'apply changes '.
A little luck?
Thanks for the help.
MilanMilan,
Well, your intent is not UPDATED when the user has clicked on the "ADD ROW" button.
When we create tabular, AEPX creates two submit after MRU (for updating the table) processes, a MRU runs when you click the button SUBMIT and other MRU runs when you click on the button 'ADD ROW '. Then change this SRM process and set it to run EVER (conditional processing > Type of Condition)
Kind regards
Hari -
-Order of the lines of external tables
Hi all
I have a request that copies of the user DB files and then system file it opens as external table... The following data flow is to copy the data from this external table and perform actions on this issue.
My question is that I have to report line number, where an error has occurred and this line number must match the number of physical lines in the file... Can I rely on the fact that if I do something like
the ROWNUM will correspond to the line number in the file. I'm just a question because it is not documented anywhere.SELECT rownum, t.* FROM ext_table t
I'm under Oracle XE, but we will probably move to 11g (or something never) in the future.
Thank you
AdamYou can add a column in the external table and use the RECNUM parameter to fill. Then use ORDER BY this column for lines in the same order that they are in the source file.
SY.
-
Hide the line of adf table based on the transient attribute does not
I have a JSF
page where the user can insert new line in
View object
. this
View object
contains a transitional
attribute which indicates whether or not the record is newly created.
On the same page, I have a table adf
which is bounded on the city
view object
. This table should show only newly created records. my approach is to use
expression language of
in the
renditions
property to hide all the other lines that are not newly created. I changed the render property for the columns of the table as:
rendered="#{row.bindings.RowStatus.inputValue eq'new'}"
, but the table does not show anything.Then, I tried to change the
made
not for the column property, but to the
outputText
inside the same way. It worked, but the problem is that the blank line is always on display.
So, basically because I do not hide the entire line, instead I'm hiding the text in the lines and lines with spaces empty is still on display in the page aside.
The Table of JSF
page where the
made
property is applied on
outputText
inside the column:
<af:table value="#{bindings.UplodedFilesView1.collectionModel}" var="row"
rows="#{bindings.UplodedFilesView1.rangeSize}"
binding="#{CreatSR_UserBean.fileTable}">
<af:column sortProperty="#{bindings.UplodedFilesView1.hints.FileName.name}"
headerText="File Name" id="c1">
<af:outputText value="#{row.bindings.FileName.inputValue}" id="it1"
rendered="#{row.bindings.RowStatus.inputValue eq'new'}"/>
</af:column>
</af:table>I use Jdeveloper with ADF technology 11.1.2.3
Thanks Timo,
You are right. Its to late to hide lines after stamping in the row set. I solve the problem by filtering the view object, based on the transitional attribute in the section of liaison page. The steps as follows: (assuming that the object from view with the temporary attribute has been created, and the transient attribute contains the filtered values)
- Drag the view object on the page and also make the Table (in my case it might otherwise listen)
- On the page, go to the connection tab.
- Double-click the object desired in the links column.
- New window will appear titled with (change the binding tree)
- Check the option (enable filtering)
- Select the (filter attribute) and (filter value) for the selected filter attribute.
- Select (Display attribute) you want to appear in the page.
- Press OK
-
How to automatically add the line number in the query
Hello
Can anyone please glimpses me the path to achieve this?
I want to write a query that will search the record based on the line number in the result set.
Let's say I have 500 rows in the employee table, but I want to put a condition on request where will see record only between 100 to 200 line number in the result set.
Thank you
Madam.It is wrong to say that look for the lines between ROWNUM 100 to 200 unless you define a column of lines must be ordered.
Oracle does not guarantee that the lines will be be returned in the same order if you run the query several times without defining the ORDER BY clause.
So first decide on what columns you want to order the files and then use the rownum to assign the line number and then get the records you want.
something like that
SQL>SELECT * 2 FROM ( SELECT e.* 3 ,ROW_NUMBER() OVER (ORDER BY sal) row_num 4 FROM emp e 5 ) 6 WHERE row_num BETWEEN 5 AND 10; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ROW_NUM ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ---------- 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 5 7934 MILLER CLERK 7782 23-JAN-82 1300 10 6 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 8 7782 CLARK MANAGER 7839 09-JUN-81 2450 10 9 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 10 6 rows selected. SQL>
Concerning
Arun -
Graphic style that adds the line without changing the filling?
I want to assign a graphic style that adds to the existing style. For example, I need to add the same line to various objects that have different fillings. I can do it with a graphic Style? I know that I can the group object and add the style of the group, but it complicates the structure of the file. I would have preferred the race has been added to the object itself. I watched "additives styles", but don't think they are what I'm looking for.
Thank you
Select the object of Alt/Option click on the graphic Style with the stroke to be added.
-
Add the lines in the report.
Hi all
I have a question, I have a problem here and editable report, it is when I press the button Add a LINE, the new line is getting added to the top, but I have need of this line to be added in the background, can any body please help me with this problem
Thank youHello
If you delete the sort option? After remove start new session and try if new line comes down
BR, Jari
-
I want to add the number of records in a table with the number of records in the second table. How is that possible?
Thanks in advanceTry something like:
select count(*) from( select * from tableA union all select * from tableB)
or
select (select count(*) from tableA)+(select count(*) from tableB) from dual
Kind regards
Miguel -
Hello-
I've done this before and I have a unique document that has examples in this document, which work just fine, however, I can't seem to get this table works correctly.
Is someone can please show me what I'm missing? I'm pulling my hair out.
Thank you, Gretchen
1. Please save the form as "Adobe XML dynamic form".
2. in the properties of form > overview > overview Adobe XML form as is it dynamic XML form.
If you make these changes, that would work.
I sent u the updated.
Sofiane
-
Add the line of text in the list box
Hi all
I am trying to add lines of text programmatically,
I am tiring to implement is a simple terminal for my software of text in order to display text messages.
My problem is that I need to add lines of text of different vi.
Can one recommend a good approach?
Kobi Kalif wrote:
1. with the reference: how to change a value from array in the Subvi
2. with the process: if I update a value in the table, then the entire table inserts into the property in my list, so basically he rewrite the entire table to the list of all changes, is it not a bit wasteful?
1.
2. that's what you do for normal matrices as well.
Maybe you are looking for
-
Why I can't download snapchat from the App Store?
Because my snapchat does not open, I have demolished it and tried to download it again from the App Store. It shows a circle and a square in the Middle, as it is updated or download it again, but it is not does not appear on my homescreen it download
-
Address bar has unwanted keywords "search for" appearing
For no apparent reason my address bar now unwanted shows in terms of 'finding '. As I type these words will appear with an icon of a magnifying glass located next to them. I want to stop and I can not find a solution. When I type in the address bar I
-
My iPad is more listed on my Apple ID. How do listed?
MY iPad 2 model MC770LL/A with OS 9.2.1 (13 D 15) does not appear on my list of device Apple ID. How do listed? When the iPad application my Apple ID in the dialog box, the box is a former ID, I've updated some time ago. And I have more the old ema
-
I bought a Moto X 2014 thru Motorola UK and I do not remember if I got Motocare insurance. I could not see where I can buy (if I have) on the UK site. I can't tell from the American website that my order does not appear when you are connected (probab
-
Hernan Please provide a fresh link to the files in your sky drive.