Create UI elements dynamically in AppleScript Studio?
I'd like to create an applescript studio app that can create UI elements (radio buttons, checkboxes, etc) dynamically based on certain other criteria. I've been writing applescripts for a while but am somewhat new to applescript studio, so I don't know where to look for this, other than here. Any help would be greatly appreciated.
that's what I thought. Unfortunately I'd like to have the ability to have no prior knowledge of what UI elements are needed, and call them into being at any time. So I'm gonna infer that that just isn't possible.
Related question: can I set up a UI element, let's say a checkbox, and dynamically tell the UI element how many checkboxes I need and what their names/values should be? Or once again do I need to have prior knowlege of how many checkboxes I need?
Similar Messages
-
How to create Invisible Element Dynamically?
Dear All,
I am trying to create a Form dynamically and for aligment prupose i need to create one InvisbleElement also dynamically.But i dont know why that is not reflecting in the Screen .The code is deploying properly without error but the Invisible Element is not getting created .The code i used is
IWDInvisibleElement Invis1=(IWDInvisibleElement)view.createElement(IWDInvisibleElement.class,null);
Invis1.setEnabled(true);
Invis1.setVisible(WDVisibility.VISIBLE);
thetransparent.addChild(Invis1);
Can anyone please tell me if i need to set any property or if the method i am creating is wrong .Please guide me in the correct way.
Thanks and Regards,
Nishita SalverHi,
check "Dynamic Programming" part in below library file
http://help.sap.com/saphelp_nw70/helpdata/EN/0f/f08841e3af1609e10000000a155106/frameset.htm
or else,
still you are getting Problem, create any other ui element and set its visibility to false. (dont know how far it will help you)
regards,
Pradeep
Edited by: pradeep bondla on Jun 25, 2008 3:20 PM -
Create multiple elements dynamically at one time
Hi,
I need to create some links dynamically.
Below is my code... but I need to know instead of multiple steps.. is there a way to create dynamic elements together using one method itself.... or once i create the elements can i embed all these links together in the view?
lr_lta = cl_wd_link_to_action=>new_link_to_action(
id = 'LNK_CREATE'
on_action = 'ON_NAVIGATE'
text = 'Create'
view = lr_view ).
cl_wd_matrix_data=>new_matrix_data( element = lr_lta ).
lr_container->add_child( the_child = lr_lta ).
lr_lta = cl_wd_link_to_action=>new_link_to_action(
id = 'LNK_HISTORY'
on_action = 'ON_NAVIGATE'
text = 'Hitory'
view = lr_view ).
cl_wd_matrix_data=>new_matrix_data( element = lr_lta ).
lr_container->add_child( the_child = lr_lta ).
Any help will be grateful.
Regards and Thanks
TenzinHi,
This is a sample code for doing it using loop.
I just refined the code to make it most amenable to your requirement.
The code gives two different links at the same time with two different actions.
method WDDOMODIFYVIEW .
IF first_time eq abap_true.
data lr_ref type ref to cl_wd_link_to_action.
data lr_cont_ref type ref to cl_wd_uielement_container.
data lr_layo_ref type ref to cl_wd_flow_data.
data lv_times type i value 2.
data lv_count type i value 1.
lr_cont_ref ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
do lv_times times. "decide how many times you want the link
case lv_count. "decide what link to action with what action should be defined
when 1.
CALL METHOD cl_wd_link_to_action=>new_link_to_action
EXPORTING
enabled = ABAP_TRUE
image_first = ABAP_TRUE
on_action = 'First_Action'
text = 'First Link' "to display 'Gangtok' when clicked
receiving
control = lr_ref
CALL METHOD cl_wd_flow_data=>new_flow_data
EXPORTING
element = lr_ref
receiving
control = lr_layo_ref
CALL METHOD lr_cont_ref->add_child
EXPORTING
index = 1 "this is to set link to action in first place
the_child = lr_ref
When 2.
CALL METHOD cl_wd_link_to_action=>new_link_to_action
EXPORTING
enabled = ABAP_TRUE
image_first = ABAP_TRUE
on_action = 'Second_Action' "to display 'Kolkata' when clicked
text = 'Second Link'
receiving
control = lr_ref
CALL METHOD cl_wd_flow_data=>new_flow_data
EXPORTING
element = lr_ref
receiving
control = lr_layo_ref
CALL METHOD lr_cont_ref->add_child
EXPORTING
index = 2 "this is to set the link to action in 2nd place
the_child = lr_ref
endcase.
lv_count = lv_count + 1.
enddo.
endif.
endmethod.
Regards,
Prosenjit.
Edited by: prosenjit chaudhuri on Feb 16, 2009 12:48 PM -
ABAP: Create UI element dynamically
Hello,
I have a need create a UI element (dropDown, inputField, etc.) dynamically.
How would I approach this problem? What classes correspond to this?
Thank you.This topic has been covered quite nicely in a series of weblogs by Thomas Szuecs:
/people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
/people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
/people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements -
Creating text elements dynamically by program
Hi all,
Do you know how I can create text symbols or selection texts dynamically by program? (calling a FM or editing a table?)
What's the table for text elements?
Thanks in advance,
MathieuHi,
Not sure of FM. But programically u can do.
Check the statement
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE
SY-LANGU.
This creates the text elements in the specifies program and in specified language.
Not only text elements but also list headings u can create.
Check below sample code given by SAP.
DATA: PROGRAM(8) VALUE 'PROGRAM',
TAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.
TAB-ID = 'T'. TAB-KEY = SPACE. TAB-ENTRY = 'Sales'.
APPEND TAB.
TAB-ID = 'I'. TAB-KEY = '200'. TAB-ENTRY = 'Tax'.
APPEND TAB.
TAB-ID = 'H'. TAB-KEY = '001'. TAB-ENTRY = 'Name Age'.
APPEND TAB.
TAB-ID = 'S'. TAB-KEY = 'CUST'. TAB-ENTRY = 'Customer'.
APPEND TAB.
TAB-ID = 'R'. TAB-KEY = SPACE. TAB-ENTRY = 'Test program'.
APPEND TAB.
SORT TAB BY ID KEY.
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.
eg:TAB-ID = 'I'. For Text elements
TAB-KEY = '200'. Text element number
TAB-ENTRY = 'Tax'. Actual text
But use it only for new developments. Bucause it may overwrite the existing texts.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Aug 8, 2008 2:48 PM -
AppleScript Studio/Xcode problem - Problem with text entries! Please help!
Hey, I've been up for hours each night looking for solutions to this but still have had no luck.
I am creating an app in Xcode/Applescript studio that will ask you to enter how many times you would like system events to repeat a certain keystroke. First of all, the code would look something like this:
on click theObject
If the name of theObject is equal to "myApplication" then
(Right here would be where the variables representing text in an input in the app's window would be, which I have absolutely no clue what to type.)
tell application "text edit"
activate
tell application "system events"
keystroke x (x representing a variable)
end tell
end tell
end clicked
and that's about as far as I can get. I want a variable representing the text in the main text entry box, but I have no clue how to access that text, or even know if it's submitted or detected when I hit a button. Hopefully you're following, as I am way to confused to fully explain it, but please try and help me out if you can.Hi Kamprath445,
Though this mentions iTunes, I think it has good examples you can use...
http://dougscripts.com/itunes/itinfo/keycodes.php
More in depth...
http://developer.apple.com/documentation/applescript/conceptual/applescriptlangg uide/conceptual/ASLR_variables.html -
Create a tab view item in obj-c for use in applescript studio
I'm making an application with applescript studio. I want to be able to add tab view items to a tab view at the press of a button. The problem I have is applescript studio doesn't allow me to create a new tab view item. So I'm thinking I can create the tab view item using objective-c, pass that to my applescript, then add it to my tab view.
In applescript I plan to use the following call methods to first create the tab view item object, and then add it to my tab view. The objective-c code which is called from the first line in the applescript code is below that. When I run my code I'm getting an error saying newTVI is not defined... so maybe you can see my error! Be kind to me because I'm new to objective-c and I'm sure that's where my problem lies. Anyway, I'd appreciate any help.
==Applescript calls to create and add a new tab view item
set newTVI to call method "returnNewTabViewItem" of class "makeNewTabViewItem"
call method "addTabViewItem:" of objMainTV with parameter newTVI
==Objective-c code to create the tab view item
==makeNewTabViewItem.h==
#import <Cocoa/Cocoa.h>
@interface makeNewTabViewItem : NSTabViewItem
NSTabViewItem *newTVI;
-(NSTabViewItem *)returnNewTabViewItem;
@end
== makeNewTabViewItem.m==
#import "makeNewTabViewItem.h"
@implementation makeNewTabViewItem
-(NSTabViewItem *)returnNewTabViewItem
newTVI = [[[NSTabViewItem alloc] initWithIdentifier:nil] autorelease];
return newTVI;
@endPlease, any ideas?
-
Prob in displaying the dynamically created ui elements on click of a button
hi all
i created 1 inputfield, 2 buttons & i wrote the following code in wddomodifyview() of view.
IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
inf1.bindValue("Student.name");
IWDButton but1=(IWDButton)view.createElement(IWDButton.class,"button1");
but1.setText("Button1");
IWDButton but2=(IWDButton)view.createElement(IWDButton.class,"button2");
but2.setText("Button2");
IWDTransparentContainer tc=(IWDTransparentContainer)view.getElement("TransparentContainer");
tc.addChild(inf1);
tc.addChild(but1);
tc.addChild(but2);
IWDButton button1= (IWDButton) view.getElement("button1");
IWDAction theAction=wdThis.wdCreateAction(IPrivateDynCompView.WDActionEventHandler.DISPLAY,"");
but1.setOnAction(theAction);
IWDParameterMapping bm1 = button1.mappingOfOnAction();
bm1.addParameter("id", "b1");
IWDButton button2= (IWDButton) view.getElement("button2");
IWDParameterMapping bm2 = button1.mappingOfOnAction();
bm1.addParameter("id", "b2");
and i wrote the following code in onactiondisplay()
if (id.equals("b1"))
wdContext.currentStudentElement().setName("First Button Clicked");
else
wdContext.currentStudentElement().setName("Second Button Clicked");
when i run the application, the following error is displaying.....
The initial exception that caused the request to fail, was:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
... 35 more
com.sap.tc.webdynpro.services.exceptions.WDCreationFailedException: Cannot create view element implementation com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:75)
at com.sap.tc.webdynpro.progmodel.view.View.createElement(View.java:89)
at com.sap.dynactions.DynCompView.wdDoModifyView(DynCompView.java:140)
at com.sap.dynactions.wdp.InternalDynCompView.wdDoModifyView(InternalDynCompView.java:240)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:190)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:398)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.modifyView(ClientApplication.java:679)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:381)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:65)
... 30 more
Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
... 35 more
pls tell me how to run this application without errors.....
thanks & regards,
vila.Hi Vila,
Issue here is you are trying to create Input field with already used id "inf1" in first line of code
IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
Please change it to
IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf2");
and correspondingly line
tc.addChild(inf2);
Your code will work.
Please note that you should follow....following code style in wdDoModifyview
if(firstTime)
//dynamic view elements creation -
How to create an UI element dynamically on action in drop down?
Hi,
How to create an UI element dynamically on action of selecting a value from the drop down?
help out with the steps i need to follow..Hi,
<u><i><b>Dynamic UI Element creation</b></i></u>
We can create it only in the WD Modify View.
Get the instance for the Root UI Element Container.
Create the UI element Ex: Input Field, Text View etc.
Bind the UI Element to the Attribute Value.
Now bind the UI Element to the Root UI Element Container.
IWDTransparentContainer root =(IWDTransparentContainer)view.getRootElement();
IWDDropdownByIndex DdbName = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbName");
IWDDropdownByIndex DdbAge = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbAge");
IWDDropdownByIndex DdbGender = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbGender");
IWDNode Mad =wdContext.getChildNode("Person",0);
IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
DdbName.bindValue(NameAtt);
DdbAge.bindValue(AgeAtt);
DdbGender.bindValue(GenderAtt);
root.addChild(DdbName);
root.addChild(DdbAge);
root.addChild(DdbGender);
<u><i><b>Dynamic Action Creation</b></i></u>
Create the Action in the Action tab.
Create a Button.
Get the reference for the created action (Through the Event Handler).
Bind the Action to the Button.
Bind the Button to the Root UI element Container.
IWDButton ButGo = (IWDButton)view.createElement(IWDButton.class,"ButGo");
IWDAction ActGo = wdThis.wdCreateAction(IPrivateStartView.WDActionEventHandler.GO,"Click");
ButGo.setOnAction(ActGo);
root.addChild(ButGo);
Now write the required code for the Event Handler that is associated with the Action.
//@@begin onActionGo(ServerEvent)
IWDNode Mad = wdContext.getChildNode("Person",0);
wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Name"));
wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Age"));
wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Gender"));
//@@end
Regards
SURYA -
Applescript Studio - Dynamically named button title
Can anyone tell me if it is possible to retrieve the title of a button in an Applescript Studio application?
I have no problem if the title of the button is set in the Attributes Inspector.
EXAMPLE:
If I set the title of a button to "test" in the attributes inspector and attach a script to a button like:
*display dialog (get title of button "btnName" of window 1)*
the result will be a dialog containing the text "test"
However, if I set the title of a button through a script like
*set title of button "btnName" of window 1 to "test"*
and then try to retrieve it the same way
*display dialog (get title of button "btnName" of window 1)*
the dialog is empty
Does anyone know if it is possible to retrieve these dynamically set button titles?The name of the button has an applescript name, which is how I reference it from the script. But, the actual project uses a series of buttons which all have their titles set dynamically from a script. Also the mode of the buttons are set to "On Off" (not that I think that should make a difference) I am running leopard 10.5 with xcode 3.0.
I'm rather new to Applescript Studio and xcode. I don't know what would be wrong with the set-up. And why I would have no problem setting the button titles from a script but not be able to retrieve them.
I have come up with a work around, keeping track of the button titles in a separate array. I seems stupid to have to do that rather than access the existing button property, but it does work.
I will have to set up a simple test to explore what may be going wrong. -
Hiding an UI element dynamically in webdynpro ABAP
Hi Gurus,
I want to hide a Interactive form UI element dynamically at run time. Please let us know how to proceed with this and provide the code for this, which will be helpful.
Thanks
Rahulhi ,
bind the VISIBLE property of the UI element with a context attribute created in the CONTEXT tab. This context attribute should be of type WDUI_VISIBILITY
u can refer this code
wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_visible )." to make it visible.
wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_none ). "to make it invisible
regards,
Amit -
How to create some columns dynamically in the report designer depending upon the input selection
Post Author: ekta
CA Forum: Crystal Reports
how to create some columns dynamically in the report designer depending upon the input selection
how export this dynamic report in (pdf , xls,doc and rtf format)
report format is as below:
Element Codes
1
16
14
11
19
10
2
3
Employee nos.
Employee Name
Normal
RDO
WC
Breveavement
LWOP
Sick
Carers leave
AL
O/T 1.5
O/T 2.0
Total Hours
000004
PHAN , Hanh Huynh
68.40
7.60
76.00
000010
I , Jungue
68.40
7.60
2.00
5.00
76.00
000022
GARFINKEL , Hersch
66.30
7.60
2.10
76.00
In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
Can anybody help me how do I design such report....
ThanksHi Developer life,
According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric values) in the details, add an filter to filter the data base on this column group, but if
the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
Similar threads with details steps for your reference:
https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings
If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
Any question, please feel free to let me know.
Best Regards
Vicky Liu -
Xsl:element: generate name of element dynamic
Hi everybody,
in the target structure I have to create elements dynamically.
But this does not work:
<xsl:template name="process-message">
<!-- params: pattern, role -->
<xsl:variable name="ELEMENTNAME">
<xsl:value-of select="anyNode"/>
</xsl:variable>
<xsl:element name="($ELEMENTNAME)"> // HERE IS THE ERROR
<xsl:apply-templates mode="text"/>
</xsl:element>
</xsl:template>
Any ideas?
Regards MarioHi Prateek,
thanks.
Does not work.
Regards Mario -
Create Radio button dynamically in Table column.
HI All
I have used following code to create radio button dynamically. but it's getting dump saying that Could not find attribute STATUS.
Here STATUS is the attribute of the node in View context. But why this dump is coming.
Please correct me if any thing worng.
DATA: lr_radio TYPE REF TO cl_wd_radiobutton.
DATA: lr_containr TYPE REF TO cl_wd_transparent_container.
DATA: lr_data TYPE REF TO cl_wd_flow_data.
IF first_time = abap_true.
lr_containr ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_radio = cl_wd_radiobutton=>new_radiobutton(
view = view
id = 'RADIO'
text = 'Enroll'
bind_selected_key = 'STATUS'
key_to_select = 'STATUS' ).
lr_data = cl_wd_flow_data=>new_flow_data( element = lr_radio ).
lr_radio->set_layout_data( lr_data ).
lr_containr->add_child( lr_radio ).
ENDIF.
Thank you very much
RamHi Rama,
I solved it.check this code.
i think u did mistake in creating radio button you are not passing the
BIND_KEY_TO_SELECT
instead you are passing KEY_TO_SELECT.
data:lr_column2 type ref to cl_wd_table_column,
lr_radio type ref to cl_wd_radiobutton.
lr_column2 = obj_table->get_column(
id = 'TABLE1_PLANETYPE'
* INDEX = INDEX
lr_radio = cl_wd_radiobutton=>new_radiobutton(
* BIND_ENABLED = BIND_ENABLED
BIND_KEY_TO_SELECT = 'STATUS'
* BIND_KEY_VISIBLE = BIND_KEY_VISIBLE
* BIND_READ_ONLY = BIND_READ_ONLY
bind_selected_key = 'STATUS'
* BIND_STATE = BIND_STATE
* BIND_TEXT = BIND_TEXT
* BIND_TEXT_DIRECTION = BIND_TEXT_DIRECTION
* BIND_TOOLTIP = BIND_TOOLTIP
* BIND_VISIBLE = BIND_VISIBLE
* ENABLED = ABAP_TRUE
* EXPLANATION = EXPLANATION
ID = 'RAD1'
* KEY_TO_SELECT = KEY_TO_SELECT
* KEY_VISIBLE = KEY_VISIBLE
* ON_SELECT = ON_SELECT
* READ_ONLY = READ_ONLY
* STATE = E_STATE-NORMAL
TEXT = 'Test'
* TEXT_DIRECTION = E_TEXT_DIRECTION-INHERIT
* TOOLTIP = TOOLTIP
* VIEW = VIEW
* VISIBLE = E_VISIBLE-VISIBLE
lr_column2->set_table_cell_editor( the_table_cell_editor = lr_radio ).
Thanks,
Suman -
How to create a site column through Visual Studio 2010?
I was trying to create lists, content type and site columns through Visual Studio 2010. But I could not figure out how to add site column? What item do I need to add for this and what kind of coding is to be done?
Try this
1. Create a Empty project in Visual studio.
2.The Empty SharePoint Project template does not include any Features in the Features folder. To add a new Feature to this project, right -click the Features folder, and click Add Feature. This adds a new Feature component to the folder; double – click the
Feature1 icon in Solution Explorer to modify the Feature ’ s
metadata using the Feature designer. The Title and Description values appear on the Features pages in Site settings. It is a good idea to make these values
descriptive so that administrators will know what they are adding to the site when they activate the feature.
The feature ’ s scope determines where the feature can be activated within SharePoint. Please Note – Certain components, such as site columns, content types, Master pages, and Page Layouts, are installed at the site collection level and made available to all
sites within the collection. These components require that the scope for the feature be set to “ Site. ”
3. Next, add a new item to the project (Right – click project name ➪ Add ➪ New Item) and select the Empty Element template from the Add New Item dialog box.
The Empty Element template is an XML fi le where you can enter CAML Field definitions.
Following is what you will add in your elements.xml file –
< Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
< Field ID="{76C140E1-D827-433B-AD38-257F9594B846}"
Name="CustomCol"
DisplayName="My Custom Site Column"
Group="Custom group"
Type="Text"
Required="FALSE"/ >
< Field ID="{5F516D92-969C-4661-81B9-C9210E2A2FDC}"
Name="Choice Type"
DisplayName="My Choice Type"
Group="Custom group"
Type="Choice"
Required="FALSE" >
< CHOICES >
< CHOICE > Medical < /CHOICE >
< CHOICE > Dental < /CHOICE >
< CHOICE > Vision < /CHOICE >
< CHOICE > Insurance < /CHOICE >
< /CHOICES >
< /Field >
< /Elements >
4. To deploy the Site Columns defined in the Elements file, right – click the project name in the Visual Studio Solution Explorer, and select Deploy. This will deploy the solution file to the solution store and activate the Feature in the targeted site collection.
Maybe you are looking for
-
How do I access my family's library to put it on my ID now I have one of my own?
Hi. I have just created my own apple id to separate myself from my mum's iphone. How do I move songs from our library over to my account so I can still have access to them for my Ipod?
-
How can I use a firewire hard drive on a new Macbook with one USB-C only?
How can I use a firewire hard drive on a new MacBook with only one USB-C?
-
PI 7.0 to PI 7.1 upgrade : HTTPS Certificate Issue
Hi All, We have upgraded our Pi Systems from Pi 7.0 to PI 7.1 few weeks back, howevevr inetrface that require HTTPS connections have started failing. I believe PI 7.1 uprade creates a new certitifcate. But this would require sharing this certificate
-
Hello, I am currently creating a interactive feature for my company's website, where we would like our customers to come, select one of our marketing tools templates, and be able to customize their information using Input text boxes, colorpicker, fon
-
Are there functions to call Adobe's built-in filters?
Like say I wanted to call Gaussian Blur that photoshop already has, are there functions to do this? Or would I have to create my own Gaussian Blur? Thanks