Combobox in Datagrid with different values
Hi All,
I have a datagrid. One of the columns in the datagrid is set
to display a combobox as the ItemRenderer. Now, the data for the
combobox is different for each row. How do I set up the data
provider for the combobox in such a scenario.
For example : I have a collection of Shirt objects.
public class Shirt {
public String id;
public String type;
public String[] color; //this is an array
This should be displayed in the datagrid, with the Color
column rendered as a combobox. The colors will be different for
each shirt.
Thanks
CS
Yes. Some more detail:
in the function,
override public function set data(value:Object): void {
the "value" parameter will contain a refernce to an entire
"Shirt" instance.
So you can assign the comboBox.dataProvider=value.color;
Now, It is more complicated than this, because you will want
the combobox to show the correct value for each row, right?
For this to happen, you will need a selectedColor property on
Shirt. When the user chooses a color, you will need to update this
property with the selection.
Next, your renderer must read the value of selectedColor and
set the comboBox.selectedIndex.
If selectedColor contains the *index* of the color then you
have it easy. If it contains the color name itself, then you will
have to for-loop over the color array until yom match the
selectedColor. then you will have the index and can set
selectedIndex.
ComboBox does not support setting the value directly. It is
pretty easy to extend combo to do this. There are several examples
out there. I posted a link to one on CFLEX.net
Tracy
Similar Messages
-
PDF for multiple users with different values
Is there a way to create a PDF to be sent to multiple users but have different values in the PDF? For expample employee A's offer letter is for $50/hour while employee B's offer letter is for $55/hour. But they have the same offer letter just with different values.
I have Enterprise EchoSign and FormsCentral.
Thank you!Hi,
Thanks for asking, but FormsCentral currently does not support this.
Perry -
Mass changes of Material Master field with different values
Hi,
How to change a field in Material Master for more than thousand materials. I think MM17 can only be used for mass changes of materials with same values. I need to upload different values for different materials. Is there any other way to do this.
Thanks,
K R Vishnu KumarHi Kumar.
I think you have to use LSMW for mass updation for Material Master fields with different values.
Regards,
Rahul. -
Calling a sequence in a new thread with different values
I have a sequence that I want to call that runs in parallel (seperate thread). The question I have is that I want to run this sequence from a lot of different places, but with different values of the variables going into the steps inside the sequence.
If I change the values inside the sequence (running on seperate thread), then I will have to duplicate this sequence over and over. What I really want to be able to do is run a step in a seperate thread, and not wait for it to complete. Is this possible? Or a method of passing step values into a seperate thread. I don't want to use globals unless I really have to.Hi ADL,
I have attached an example which I hope will illustrate an answer to your question.
Regards
Ray Farmer
Regards
Ray Farmer
Attachments:
Sequence_File.seq 34 KB -
Call a service twice with different values
Hi,
I have two DropDownBoxes I want to fill with the service Helpvalues.GetList with different values. So I call the service in the init method. But then the second call overwrites the first call.
I thought about adding my own value attributes in my view but I get an error when I assign a ComplexType to the attributes.
Thank you
JuliaHi Julia,
I think your DropDownboxes referring to same context.That is why your second call over writes the first one.
use 2 local context nodes ,fill them seperately from your service calls. -
Revision: 13716
Revision: 13716
Author: [email protected]
Date: 2010-01-22 09:26:12 -0800 (Fri, 22 Jan 2010)
Log Message:
since include-read-only is a server global setting, we can't have two channels with different value. remove the test for the include-read-only false. update the service-config.xml as well.
Modified Paths:
blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.xml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/ReadOn lyTest.mxmlYou can give this a try on your Ultimate machine. While these are said to be for Vista, I used it on my Win 7 machine just fine and it fixed the problems I was having. Hope it works for you.
The problem is that Vista, by default, will only use NTLMv2 for authentication, which is not supported by Mac OS X's Windows Sharing service.
The other problem is the Minimum Session Security for NTVLM SSP based Clients.
To get around this:
1. In Vista, open the Control Panel
2. Switch to "Classic" view
3. Double-click Administration Tools
4. Double-click Local Security Policy
5. Or Secpol.msc
6. Expand "Local Policies" and select "Security Options"
7. Alternate : Type secpol.msc to get editor up then
8. Locate "Network Security: LAN Manager Authentication Level" in the list and double-click it.
9. Change the setting from "Send NTMLv2 response only" to "Send LM & NTLM - use NTLMv2 session if negotiated"
10. Network Security: Minimum session security for NTLM SSP Based (including secure RPC) Clients
11. Change the setting from "require 128 bit" to unchecked (No Minimum)
12. Click OK
the real difference between vista and windows 7 procedure is 10 and 11 -
[OCI] Parameter Binding, repeated Statements with differing values
Hello
I am working on an application written in C which sends about 50 different SQL Statements to an Oracle Database using OCI. These Statements are executed repeatedly with different values.
In order to improve performance I would like to know what possibilities I have.
Whats the benefit of the following "techniques" ?
- Parameter Binding
- Statement Caching
What else could I look into?
with friendly greetings.It doesn't take zero-time of course, and it does level-off after a while, but array-bind/define or pre-fetching can make a significant impact on performance:
truncated table: 0.907 / 0.918
insert_point_stru_1stmt_1commit: x100,000: 0.141 / 0.144Above I truncate the table to get repeatable numbers; deleting all rows from a previous run leaves a large free list (I guess...), and performance of this little contrived benchmark degrades non-negligeably otherwise. This is a single array-bind insert statement.
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@0: 7.594 / 7.608
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@1: 4.000 / 4.004
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@10: 0.906 / 0.910
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@100: 0.297 / 0.288
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@1,000: 0.204 / 0.204
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@10,000: 0.265 / 0.268
fetched 100,000 rows. (0 errors)Above I do a regular "scalar" define, but turn pre-fetching on (default is one row, but I tested with pre-fetching completly off too). @N means pre-fetch N rows.
select_points_array: x100,000@10: 0.969 / 0.967
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@100: 0.250 / 0.251
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@1,000: 0.156 / 0.167
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@10,000: 0.156 / 0.157
fetched 100,000 rows. (0 errors)Above I use array-defines instead of pre-fetch.
select_points_struct: x100,000@10: 0.938 / 0.935
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@100: 0.219 / 0.217
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@1,000: 0.140 / 0.140
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@1,000: 0.140 / 0.140Above I use array-of-struct defines instead of pre-fetch or array-bind. Performance is just a little better, probably because of better memory "locality" with structures.
The table is simple:
create table point_tab(
id number,
x binary_float,
y binary_float,
z binary_float
So each row is 22 + 4 + 4 + 4 = 34 bytes. There are no constraints or indexes of course to make it as fast as possible (this is 11g on XP win32, server and client on the same machine, single user, IPC protocol, so it doesn't get much better than this, and is not realistic of true client-server multi-user conditions).
There aren't enough data point to confirm or not your prediction that the advantage of array-bind level-off at the packet size threshold, but what you write makes sense to me.
So I went back and tried more sizes. 8K divided by 34 bytes is 240 rows, so I selected 250 rows as the "middle", and bracketed it with 2 upper and lower values which "double" up or down the number of rows:
truncated table: 0.953 / 0.960
insert_point_stru_1stmt_1commit: x100,000: 0.219 / 0.220
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@67: 0.329 / 0.320
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@125: 0.297 / 0.296
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@250: 0.250 / 0.237
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@500: 0.218 / 0.210
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@1,000: 0.187 / 0.195
fetched 99,964 rows. (0 errors)
select_points_array: x99,964@67: 0.297 / 0.294
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@125: 0.235 / 0.236
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@250: 0.203 / 0.206
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@500: 0.188 / 0.179
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@1,000: 0.156 / 0.165
fetched 99,964 rows. (0 errors)
select_points_struct: x99,964@67: 0.250 / 0.254
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@125: 0.203 / 0.207
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@250: 0.172 / 0.168
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@500: 0.157 / 0.152
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@1,000: 0.125 / 0.129As you can see, it still gets faster at 1,000, which is about 32K. I don't know the packet size of course, but 32K sounds big for a packet.
truncated table: 2.937 / 2.945
insert_point_stru_1stmt_1commit: x100,000: 0.328 / 0.324
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@1,000: 0.250 / 0.250
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@2,000: 0.266 / 0.262
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@3,000: 0.250 / 0.254
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@4,000: 0.266 / 0.273
fetched 100,000 rows. (0 errors)
select_first_n_points: x100,000@5,000: 0.281 / 0.278
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@1,000: 0.172 / 0.165
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@2,000: 0.157 / 0.159
fetched 99,000 rows. (0 errors)
select_points_array: x99,000@3,000: 0.156 / 0.157
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@4,000: 0.141 / 0.155
fetched 100,000 rows. (0 errors)
select_points_array: x100,000@5,000: 0.157 / 0.164
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@1,000: 0.125 / 0.129
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@2,000: 0.125 / 0.123
fetched 99,000 rows. (0 errors)
select_points_struct: x99,000@3,000: 0.125 / 0.120
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@4,000: 0.125 / 0.121
fetched 100,000 rows. (0 errors)
select_points_struct: x100,000@5,000: 0.125 / 0.122Above 32K, there doesn't seem to be much benefit (at least in this config. My colleague on linux64 is consistently faster in benchmarks, even connecting to the same servers, when we have the same exact machine). So 32K may indeed be a threshold of sort.
In all, I hope I've shown there is value in array-binds (or defines), or even simple pre-fetching (but the latter helps in selects only). I don't think one can very often take advantage of it, and I have no clue how it compares to direct-path calls, but value there is still IMHO. --DD -
Updating multiple rows with different values
Hi!
I have a problem. I need to update more then 1000 rows with different values. How can I do it?
For exsample i have table:
id; color, date,
1 red
2 green
3 white
I need to update date field.
Update table
set date='01.02.03'
where id=1
Update table
set date='01.03.03'
where id=2
Maybe there is way how to update multiple rows at one query?
Sorry for my bad english.
Thanks!Hi,
You can try this
UPDATE TABLE SET DATE = CASE
WHEN ID = 1 THEN TO_DATE('01-02-03','DD-MM-RR')
WHEN ID = 2 THEN TO_DATE('01-03-03','DD-MM-RR')
ENDcheers
VT -
Moveing average price after posting invoice with different value than GR
Hello all
I have a question as in subject.
If I will post goods receipt and after this I would like to post an invoice in MIRO with different value than in goods receipt , the MAP on my stock will change about this different???Hi,
Your MAP will get recalculated as the price difference will change the total value of the stock and the stock quantity will remain the same
MAP=Total value/Total stock
Hope this will help you
Reward if useful
Thanx and Regards
SHYAM.R -
How to update a column with different values but all other row values r sam
Hi,
I have a table like this.
Col1 col2 col3 col4
10 20 30
10 20 30
10 20 30
i need to update col4 with different values coming from other table like this
Col1 col2 col3 col4
10 20 30 xxxx
10 20 30 yyyy
10 20 30 zzzz
how can i update the table. pls let me know how to use the where condition in the update stmt.
thanks,
jay
Edited by: user2558790 on Nov 20, 2009 12:26 PMwhat is the logic for this kind of update...????
Greetings,
Sim -
Column with dropdown with different values in each cell
Hello,
I have a Table and one of the columns contains a dropdown list (dropdownbykey). My problem is that the list of values for each drop down element is different because it depends on the value in the rest of the row cells. Obviously I need to calculate the values dynamically at runtime.
I have created a context node and linked it to the table columns, one of the attributes in the node is linked to the 'selectedKey' property of the dropdown. Then in my code I try to give the list of values to this attribute using the method set_attribute_value_set from the if_wd_context_node_info interface. The process it's explained in the DEMO_UIEL_STD_SELECTION component.
But I only get the same values for each row.
I would like to know if it's possible to have dropdowns with different values in the same column of a Table, and if so any indication of how to do that.
Best regards,Hello Javier,
unfortunately you cannot use dropdown by key if you want to have different dropdowns per line of your table.
Instead you will need to use dropdown by index, and bind your dropdown to a subnode of the table element (ensure that this is a non-singleton node).
To make life easier for yourself, I would also have an attribute in your main structure that holds the selected value of the dropdown by index - update this value on any "onSelect" action of the dropdown by index.
e.g. for a table that holds addresses:
Context Node Address:
attribute street
attribute city
attribute country
attribute region
subnode regionlist
...attribute regionkey
...attribute region_text
table - bound to node address
input field bound to street
input field bound to city
dropdown by key bound to country (onSelect event populates subnode regionlist)
dropdown by index bound to subnode regionlist, text bound to region text, (onSelect event populates address element attribute region with key field of selected element).
I hope this helps,
Chris -
How to populate SNDPRN with different values in Development and Production?
Hello experts,
I have to fill the field SNDPRN in the message mapping with a different value in Development and in Production. As I am new to PI, I used a simple solution - but it is rather ugly: I set a constant value in the mapping in development and a different one in Production. However, I would like to know if there is any solution to have a condition in the mapping like:
IF system is Development, set SNDPRN as Constant1.
IF system is Production, set SNDPRN as Constant2.
(And eventually IF system is Test, set SNDPRN as Constant3)
Thanks in advance for your help,
LuisHi Luis,
You can go with the parameterized mapping , where you can provide different values for SNDPRN in interface determination for development and production.
At point of time if you want to change the values it requires only a change in the configuration.
Please refer the below links for reference;
Parameterized Mapping Programs - Enterprise Services Repository - SAP Library
http://scn.sap.com/people/jin.shin/blog/2008/02/14/sap-pi-71-mapping-enhancements-series-parameterized-message-mappings
We are following the same approach for some of our interfaces.
- Muru -
In billing document VAT condition type flowing 2 times with Different value
Hi,
1. In my requirement, In order creation time , in the pricing procedure ZPROJT (Proj Material Sales) VAT condition type (JLST) is flowing one time with the condition record of 5% for one line item and the same we changed manually to 12.75 %, for the same condition type (JLST) and we saved the order. After that we created delivery with reference to the same order, final the billing document creation time with reference to the delivery (in the pricing procedure ZPROJT (Proj Material Sales))for the same line item VAT condition type (JLST) is flowing 2 times with 2 different values ( 5% and 12.75%) and it is calculating the 2 different values to the final value. But normally only the manually changed (12.75%) value should be taken to the account. Please help me How to stop the condition type (VAT C Type "JLST") from flowing two times for the same line item in the billing - and we need to take the value of (12.75% manually changed value) to the final calculation.
2. In one pricing procedure normally if you add the same "C Type" for two times it will throw the error message like "Duplication Of C type" and you can't save the order with out deleting the same. Please tell me, where is the contole for the same.Hi,
Check copy control settings in VTFL
At item level make pricing type as D - Copy pricing elements unchanged
KAPIL -
ABAP WebDynpro: Table cells with different values.
Hello,
I am not sure how the following can be achieved.
I have a table with 10 rows in it. First column should have different values in cells (static value that do not come from anywhere). For example, colors: black, green, yellow, etc.
I inserted a table column. In that column I inserted a Cell Editor of type TextView. If I define a 'text' property of this element than it marks all cells in this column with this text. I need to assign different values to each cell.
How can this be done?
Thank you.Probably you should post this the Web Dynpro Forum
Web Dynpro Java
Regards,
Ravi
Note : Please close this thread. -
Schedule a store proc to run with different values
Hi ALL ,
I have a store Proc i need to schedule it using the sql agent that i can do but the requirement is to exec the same store proc for different values at same time .
like for eg i need to run the below same store proc for 3 different values at the same time.
exec getIPs 'US'
exec getIPs 'IND'
exec getIPs 'UK'
So for instance time is 02:30 am .
The Same Store Proc should exec for values like US,IND & UK . If the exec for one of the values fail it should still continue .
Like for eg if by chance due to some reason US fails it should move to next value IND in short continue with the exec.
These values US,IND,Uk am getting from a table called Countries .
Kindly help with this requirement.
Thanks
PriyaI am unable to test but you can try something like this,
DECLARE @COUNTRYID INT
SET @COUNTRYID = 1WHILE @COUNTRYID <= (SELECT MAX(COUNTRY_ID) FROM COUNTRY)
BEGIN
DECLARE @COUNTRY_CODE VARCHAR
BEGIN TRY
SELECT @COUNTRY_CODE = COUNTRY_CODE FROM COUNTRY WHERE COUNTRY_ID = @COUNTRYID
EXEC getIPs @COUNTRY_CODE
END TRY
BEGIN CATCH
INSERT INTO [dbo].[ERROR_LOG]
SELECT
GETDATE(),
ERROR_NUMBER() AS ErrorNumber
,ERROR_SEVERITY() AS ErrorSeverity
,ERROR_STATE() AS ErrorState
,ERROR_PROCEDURE() AS ErrorProcedure
,ERROR_LINE() AS ErrorLine
,ERROR_MESSAGE() AS ErrorMessage
END CATCH;
SET @COUNTRYID = @COUNTRYID + 1
END
Regards, RSingh
Maybe you are looking for
-
Error while creating RMA with Original Order
Hi All, Can any one pls help to troubleshoot this error. I'm using oe_order_pub.process_order API. Error: message is :ORA-06502: PL/SQL: : NULL value of a key of the index table an error of number or value in a package OE_Order_PVT, procedure Lines m
-
How do you hide the 'Album by Artist' column
I recently bought a brand new MBP and the default iTunes layout is slightly different to how it was on my previous MB. When in songs view, in the main music window, i used to have 3 columns- Name, Artist, Album but on my new MBP, there are 2 addition
-
Flash Player 10.1 crashing in Safari when playing H.264 .mov files
Since installing Flash Player 10.1.53.64 on a Mac OS X 10.6.4 system, WebKitPluginHost in Safari Version 5.0 (6533.16) crashes every time when playing H.264 Quicktime movie. We have disabled hardware acceleration and tried other things to no avail. I
-
Rotating image, decomposition page, recognizing text... etc.
Hi, Each time I open new pdf file, there is a small pop-uo with black background on the right bottom of the file indicating some operations: rotating image, decomposition page, recognizing text... as here: These popups appear automatically, even if t
-
My screen saver is word of the day and doesn't appear any word!
When i had snow leopard this works but now i have lion all updates check it now and doesn t appear any word.