Need to create UIElements dynamically in webdynpro
hi,
i want to know, if there is a possibility for dynamic form creation in webdynpro....
regards
rajesh
Hi,
Dynamic UI Element creation
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();
IWDInputField InpName = (IWDInputField)view.createElement(IWDInputField.class,"InpName");
IWDInputField InpAge = (IWDInputField)view.createElement(IWDInputField.class,"InpAge");
IWDInputField InpGender = (IWDInputField)view.createElement(IWDInputField.class,"InpGender");
IWDNode Mad =wdContext.getChildNode("Person",0);
IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
InpName.bindValue(NameAtt);
InpAge.bindValue(AgeAtt);
InpGender.bindValue(GenderAtt);
root.addChild(InpName);
root.addChild(InpAge);
root.addChild(InpGender);
Dynamic Action Creation
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
Hope it helps,
*GS
Similar Messages
-
Need to create a Calender in WebDynpro for ABAP
Hi,
Tcode SSC1 displays owner's calender. I need to create same calender in WebDynpro for ABAP. I couldn't find any standard component usage for the same. Is there any component usage for the same or is there any altenative to create the same?
It's quite urgent.
Thanks,
MaheshHi
You have to use DateNavigator Control to get the left hand side screen in SCC1 and
for the right hand side one you have to work with table Control
for Date Navigator UI control see WDR_TEST_EVENTS
and to get the right hand side screen see WDR_TEST_TABLE see the view SingleMarkableCell.
Using both these standard components you can achieve this.
Abhi -
Help needed in creating a dynamic poplist
Hi,
Can anybody please tell me how to create a dynamic poplist.
Can we create a dynamic poplist without using any controller code.
I have created a simple poplist for "Deptno".
Now I want to create a dynamic poplist for "Empname" , Which should be based on the 'Deptno' poplist entry.
When I select a department number from Deptno poplist, All the employees names under that perticular department should appear in my "Empname" poplist.
So please suggest me how to create "Empname" dynamic poplist.
Thanks,
Swaroopsee thread:
How to create dynamic poplist
--Mukul -
Need to create a dynamic caption(column name) in a dynamic table
Hi All,
I have created dynamic table .But the dynamic column is not showing.I have created two column name that is name and empId .I have tried with following code
IWDCaption nameCap=(IWDCaption)view.createElement(IWDCaption.class,"nameCap");
nameCap.setText("Name");
tabColumn1.setHeader((IWDCaption)nameCap);
IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");
addCap.setText("Address");
tabColumn2.setHeader((IWDCaption)addCap);
I m getting internal server error...But When i m comented the above code i can able to see tha dynamic table withput column name..Can anyone help me
SumanHi
IWDTableColumn tabColumn1 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"N_Co");
IWDTableColumn tabColumn2 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"A_Co");
IWDInputField nameText = (IWDInputField)view.createElement(IWDInputField.class,"N_Text");
nameText.bindValue(attrib1);
tabColumn1.setTableCellEditor((IWDTableCellEditor)nameText);
IWDInputField addText = (IWDInputField)view.createElement(IWDInputField.class,"A_Text");
addText.bindValue(attrib2);
tabColumn2.setTableCellEditor((IWDTableCellEditor)addText);
<b>I need to see the column name.....</b>
for that i have written the following code...
while writting the following code i m getting internal server error
IWDCaption nameCap = (IWDCaption)view.createElement(IWDCaption.class,"nameCap");
nameCap.setText("contribution_area");
tabColumn1.setHeader((IWDCaption)nameCap);
IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");
addCap.setText("SUM");
tabColumn2.setHeader((IWDCaption)addCap); -
Need to Create a Dynamic Tablular Form in APEX
Can someone point me to the APEX documentation that discusses how to create a tabular form that can be dynamic (I can add or change data in the table)? Similar to a report, but where the data can be modified.
Thanks.
DavidActually, I found the step by step tutorial on creating a tabular form. So I should be all set. No need to reply to this thread.
Thanks.
David -
I need to create Buttons dynamically Please Help
I am currently developing a card game. I represent my cards as buttons. But as the player draws more cards from the deck I have to generate buttons dynamically at run-time. I could use arrays of buttons and store new buttons inside that arrays of buttons. But the only problem is I need ActionListener for each of my buttons. How do you create ActionListener for each different dynamically created buttons? Please Help.
Here is my code. I just do not understand how to create those functions dynamically that functions different each time.
Here is my code please take a look.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class run108{
JButton setbutton;
JButton ButtonUp;
JButton ButtonDeal;
JButton slot1;
JButton slot2;
JButton slot3;
JButton slot4;
JButton slot5;
JButton slot6;
JButton slot7;
cards[] card = new cards[55];
public static void main(String[] argv)
run108 startgui = new run108();
startgui.createframe();
void createframe()
//Standard of way of creating Frame
JFrame frame = new JFrame("108");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocation(300,200);// Tells the startup position;
//Adding Panels to the framework
JPanel panelA = new JPanel();
panelA.setBackground(Color.white);
panelA.setLayout(new BoxLayout(panelA,BoxLayout.Y_AXIS));
JPanel panelB = new JPanel();
JPanel panelC = new JPanel();
//Adding buttons with card images
JLabel label1 = new JLabel(" Set of Cards");
panelA.add(label1);
ImageIcon pic1 = new ImageIcon("cards/backd.png");
setbutton = new JButton(pic1);
panelA.add(setbutton);
ImageIcon picdeal = new ImageIcon("cards/deal.png");
ButtonDeal = new JButton(picdeal);
panelA.add(BorderLayout.CENTER, ButtonDeal);
ButtonDeal.addActionListener(new DealListener());
JLabel label2 = new JLabel(" Your Target");
panelA.add(label2);
ButtonUp = new JButton(pic1);
panelA.add(BorderLayout.CENTER, ButtonUp);
frame.add(BorderLayout.WEST,panelA);
// Adds 7 initial card slots.
ImageIcon pic2 = new ImageIcon("cards/backc.png");
slot1 = new JButton(pic2);
panelB.add(slot1);
slot1.addActionListener(new Slot1Listener());
slot2 = new JButton(pic2);
panelB.add(slot2);
slot2.addActionListener(new Slot2Listener());
slot3 = new JButton(pic2);
panelB.add(slot3);
slot3.addActionListener(new Slot3Listener());
slot4 = new JButton(pic2);
panelB.add(slot4);
slot4.addActionListener(new Slot4Listener());
slot5 = new JButton(pic2);
panelB.add(slot5);
slot5.addActionListener(new Slot5Listener());
slot6 = new JButton(pic2);
panelB.add(slot6);
slot6.addActionListener(new Slot6Listener());
slot7 = new JButton(pic2);
panelB.add(slot7);
slot7.addActionListener(new Slot7Listener());
frame.add(BorderLayout.CENTER,panelB);
// This has to be added @ the end to show the components
//that were added after on. If it is placed before the components
//the components shall not appear since they sit on the frame
frame.setSize(600,500);
frame.setVisible(true);
class DealListener implements ActionListener
public void actionPerformed(ActionEvent event){}
class Slot1Listener implements ActionListener
public void actionPerformed(ActionEvent event){}
class Slot2Listener implements ActionListener
public void actionPerformed(ActionEvent event){}
class Slot3Listener implements ActionListener
public void actionPerformed(ActionEvent event){}
class Slot4Listener implements ActionListener
public void actionPerformed(ActionEvent event){}
class Slot5Listener implements ActionListener
public void actionPerformed(ActionEvent event){}
class Slot6Listener implements ActionListener
public void actionPerformed(ActionEvent event){}
class Slot7Listener implements ActionListener
public void actionPerformed(ActionEvent event){}
} -
Assistance Needed With Creating a Dynamic Query
I am attempting to rename several of my primary key/foreign key constraints from the default "SYS" names to something actually meaningful. I have several "semi-dynamic" queries that look something like this:
SELECT 'ALTER TABLE L_ROLE RENAME CONSTRAINT ' || CONSTRAINT_NAME || ' TO NN_ROLE_ID; ' FROM USER_CONSTRAINTS WHERE CONSTRAINT_TYPE ='C' AND TABLE_NAME='L_ROLE' AND search_cond(constraint_name)='"ID" IS NOT NULL';
Unfortunately, I have to capture the output of this script and run THOSE statements to get anything done.
I would like to convert this to simply use EXECUTE IMMEDIATE or if necessary a stored procedure. Unfortunately, I'm a bit confused on what the end result would look like. Any assistance would be appreciated.
Jason
p.s."search_cond" is a custom function defined as follows:
create function search_cond( p_cons_name in varchar2 ) return varchar2
as
l_search_condition varchar2(4000);
begin
select SEARCH_CONDITION into l_search_condition
from user_constraints
where constraint_name = p_cons_name;
return l_search_condition;
end;
For some reason, just running the query outside the function doesn't work.OK, try this. Please note that I commented out the actual exec immediate line and instead just dbms_output the commands that will get executed. This way you can try this first to make sure it produces what you expect. Then just put the exec immediate back in when you are ready.
DECLARE
TYPE cur_typ IS REF CURSOR;
v_cursor cur_typ;
v_query VARCHAR2(1000);
v_exec VARCHAR2(1000);
BEGIN
v_query := 'SELECT ''ALTER TABLE ''||uc.table_name||'' RENAME CONSTRAINT '' || uc.constraint_name ||
'' TO NN_''||ucc.column_name||'' '' thequery
FROM user_constraints uc,
user_cons_columns ucc
WHERE uc.constraint_name = ucc.constraint_name
AND uc.constraint_type =''C''
AND search_cond(uc.constraint_name)=''"ID" IS NOT NULL''
AND uc.constraint_name LIKE ''SYS%'' ';
DBMS_OUTPUT.PUT_LINE(v_query);
OPEN v_cursor FOR v_query;
LOOP
FETCH v_cursor INTO v_exec;
EXIT WHEN v_cursor%NOTFOUND;
--EXECUTE IMMEDIATE (v_exec);
dbms_output.put_line(v_exec);
END LOOP;
CLOSE v_cursor;
END;
/Greg -
Need to create checkboxes dynamically
Hi all ,
I need to craete checkboxes in jsp using htmlb dynamically
also on click of a button , I want to send the values of the selected checkboxes to a function
can somebdy help , I will be using htmlb controlsHi,
The below link may help you
http://help.sap.com/erp2005_ehp_03/helpdata/EN/7d/9b0e41a346ef6fe10000000a1550b0/frameset.htm
Regards
Suresh Bachimanchi -
Need to Create a Dynamic Calendar Based on School Year Sharepoint O365
I have a request from a school program department. They are in need of a calendar based on total number of days in a school year (180) excluding weekends/holidays. The calendar will need to provide the following information: 1. Upon a student entering
a program, the calendar will need to calculate days of school before entering program, school days in program, and school days after completion of program. I am trying to figure out if this is possible and if so, which program I should use. Access, Excel??
Any suggestions or input would be appreciated.I feel that your question lacks a lot of background info which would have a HUGE impact on the design of the solution... specifically...
you need a calendar... a calendar is generally a way of visually formatting data into days/weeks/months... and such a calendar can exclude weekends (just don't show saturday/sunday), but there's no good PRACTICAL way to exclude specific days within a month-view.
(I guess if you were using a ghantt chart type of view, you could skip holidays/etc.
But then you mention needing to CALCULATE days... which is different from seeing data visually represented as a calendar...
You mention how the calculation will be used relative to OTHER data, but you don't really mention how that other data is being used.
You also don't really mention what happens in the event of CHANGE... does anything need to happen to the OTHER data, if for example, a school has so many snow days that the school year is extended?
So...
I see a whole host of options...
If the OTHER data is in an InfoPath form, you could create a web service to calculate the days.
If the OTHER data is in an Excel form, you could have a hidden spreadsheet
If the OTHER data is in an Access form, you could have a function operate against some external table lookup
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
How to create a dynamic entry list for an input field in VC(ce 7.1)
Hello all,
I have an Input field, i need to create a Dynamic Entry List for it in VC(ce 7.1).
How can this be done.
Thanks in Advance.
Thanks and Regards,
Santhosh Guptha NHi Santhosh,
You can define Dynamic entry list for Drop down list and combo box but not for input field.
[Refer this|http://help.sap.com/saphelp_nwce10/helpdata/en/2a/28249060dd4dbc872f6266f4557364/frameset.htm] for defining entry list.
Let me know if it helped.
Regards,
Dharmi -
How do I create a Dynamic PDF in ColdFusion
I am using ColdFusion CS4 and I need to create a dynamic PDF certificate for the user when they finish a short test.
Their name is in a session var and should dynamically enter in to the Name field of the certificate as well as the date.
The user can print The PDF certificate, which must be protected to Allow Print only.
I have a PDF created in Adobe Lifecycle Designer. This contains all the data and a text field Name and Data that needs the dynamic input from ColdFusion.
<cfpdfform action="populate" source="certificate.pdf">
<cfpdfsubform name="form1">
<cfpdfsubform name="page1">
<cfpdfformparam name="employeeName" value="John Hollings" />
<cfpdfformparam name="date" value="#dateformat(now(), 'dd mmmm, yyyy')#" />
<cfpdfformparam name="submitURL" value="#CGI.SCRIPT_NAME#" />
</cfpdfsubform>
</cfpdfsubform>
</cfpdfform>
Thsi work but the PDF textFields are open to edit, I need to lock down the PDF so only printing can operate...
No Copy of data
No Saving the file (if possible)
Only print and closeact332 wrote:
If I make a form in Adobe Pro9 it opens Lifecycle and I am back there.
Unfortunately, I am not using Acrobat 9/LiveCycle. So I cannot really provide any specifics there. For usage questions, you might try asking on the Acrobat/LiveCycle forums. But from CF's perspective, the key is the form's _format_. Acrobat (AcroForms) and LiveCycle forms are two totally different formats internally. (Like MS Office 2007 files versus MS Office 2003 files). To flatten a form from CF, it must be an AcroForm:
http://www.planetpdf.com/article.asp?ContentID=adobe_live_cycle_designer_and_acrobat_pdf_f orms_under_the_hood&page=1
act332 wrote:
I am trying to allow a user to print a document (certificate) with their name and date dynamically inserted, this document
Well as I mentioned, you can use cfpdf or ddx to set whatever permissions you need. The default is "All" (ie all actions are allowed) but you can restrict the permissions by passing in a list of which permissions _should_ be allowed. Anything not included in the list will be restricted.
<cfpdf permissions="None" ...> OR
<cfpdf permissions="AllowPrinting" ...> OR
<cfpdf permissions="AllowPrinting,AllowCopy" ...> OR -
Howto create a dynamic link with current domain
We need to create a dynamic link on a html page in the portal.
The link should contain a dynamic part containing the domain where the CLIENT is in. It should look like this : http://mytool.windowsdomain.corp/tool where "windowsdomain.corp" is dynamic. Where could we get this information from?
Thanks!
MatthiasHi Matthias,
you could paste something like this in a Custom JSP Component:
<script type="text/javascript">
function getServerURL() {
return top.document.location.protocol+"//"+top.document.location.host;
function redirect(uri) {
try {
top.location.href=uri;
} catch (e) {
//unfortunately this is not triggered in IE - only in mozilla
alert("No valid Redirection-URL could be generated. Please contact your Administrator.");
redirect(getServerURL()+'/tool'+top.document.location.search);
</script>
Best Reagrds, Thomas -
Create a dynamic query with or/and
Hello!
Please help to accomplish the following:
User needs to create a dynamic query.
There are few select lists: sex, race, state …
User selects whatever he needs from select lists, which would become the first part of the “where clause” – i.e. (sex = ‘M’ AND state = ‘NY’).
Then the user wants to add an additional condition using “OR/AND” – i.e. i.e. (sex = ‘M’ AND state = ‘NY’) OR (sex = ‘F’).
I have been able to build the first clause and pass to a variable. I need to be able to clear the values in the select lists, but keep the value stored in the variable, and then append each new clause to the variable. This needs to be event driven by an item on the page.
Any help is appreciated.
Thank you in advance.Hi,
At that point my application works fine.
But I need to add ability to clear select lists and enter a new condition with 'OR'
operator.
The final SQL statement should look:
select employee_id, name from employee_v where (sex = ‘M’ AND state = ‘NY’) OR (sex = ‘F’)
Thank you. -
Creating a dynamic nested menu with xml data received from a webservice
I need to create a dynamic menu based on a xml returned by a webservice.
the xml comes basically in this format:
[quote]
<resposta>
<status>Success</status>
<mensagem>Whatever</mensagem>
<dados>
<projeto nome="name" cliente="client name">
<atividade nome="name">
<etapa>
<nome>name</nome>
<other_attributes>...</other_attributes>
</etapa>
(other etapas)
</atividade>
(other atividades)
</projeto>
(other projetos)
</dados>
</resposta>
[/quote]
What I need is to create a menu like:
- Projeto.Nome - Projeto.Cliente:
- Atividade.nome:
(start button) etapa1
(start button) etapa2
- Projeto2.Nome - Projeto2.Cliente:
- Atividade.nome:
(start button) etapa1
(start button) etapa2
And so on...
I've tried using an HTTPService and a DataGroup, this code above works fine for display the projeto's names:
[quote]
<s:HTTPService id="loginService"
url="http://timesheet.infinitech.local/services"
method="POST" contentType="application/xml"
result="handleLoginResult();"
fault="handleFault(event);" >
<s:request xmlns="">
<requisicao>
<tipo>login</tipo>
<usuario>{campoUsuario.text}</usuario>
<senha>{campoSenha.text}</senha>
</requisicao>
</s:request>
</s:HTTPService>
and the DataGroup:
<s:DataGroup dataProvider="{tarefasService.lastResult.resposta.dados.projeto}" width="100%" y="100" x="20"
includeIn="Principal">
<s:layout>
<s:VerticalLayout />
</s:layout>
<s:itemRenderer>
<fx:Component>
<s:ItemRenderer>
<s:layout>
<s:HorizontalLayout />
</s:layout>
<s:Button />
<s:Label text="{data.nome}" />
</s:ItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:DataGroup>
[/quote]
I have then tried including another datagroup inside the datagroup item renderer, but I just couldn't get it to work anyway, and tried it in a lot of ways... (basically, it would be a datagroup with dataProvider={data.atividade}).
Can anyone tell me how to get this to work?
I've uploaded an example xml, you can use it as the url for the HTTPService:
http://www.pdinfo.com.br/example.xml
Thanks in advance.Hi,
A lot of the information you need is in Adobe's scripting guide http://www.adobe.com/go/learn_lc_scriptingReference Also there is a very useful Adobe guide to Calculations and Scripts (and while it is for version 6 it is still very good because of the way it is laid out) http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
The Javascript could be used in the Layout: Ready event.
For italic font:
if (...some test...)
this.font.posture = "italic";
else
this.font.posture = "normal";
For bold font:
if (...some test...)
this.font.weight = "bold";
else
this.font.weight = "normal";
The script will change the font for the complete field. I don't think you can change parts of a field.You can also change font colour and font type (the guides above will help).
Good luck,
Niall -
Creating a dynamic sqlldr control file
Hi,
I am in need of creating a dynamic sqlldr control file that will check the flat file, delimiter and load the data in a table. The table is having all the columns but the flat file can vary time to time.
looking forward for your valuable suggestions.
Regards
Rajib.You may want to post more explicit requirements if you want sample code. For example, what the file looks like, what variations are allowed, what variations are disallowed, an example control file that would be output, etc. Specifying the precise language you're using (there are many different shell scripting languages) would also help.
In my experience, though, this sort of thing is almost always a one-off-- examples don't tend to be particularly helpful because every set of requirements tends to be very particular. If you have a full understanding of the requirements, and a decent understanding of your scripting language, I doubt it would take more than half a day to knock something together.
Justin
Maybe you are looking for
-
My iPhone 4 says "backed up-never". I am trying to back up to Icloud..it says it will automatically backup when is plugged in, locked, and connected to Wi-Fi. Does this mean I have to lock my phone? It shows "backing up" & "estimating time remaini
-
Hello everyone, I have an issue: I Know the aggregate function ORDER BY and I know we can specify the columns we need to put in order and if they have to be ASCENDING or DESCENDING But I'd like to create a "personal criterium", for example i have the
-
Recorded Audio Not playing back in Premiere Pro
I use Dxtory to record; Sound from system as well as mutual programs such as skype all playback as intended. The audio from my microphone, though it plays back when reviewing it in a media program, is not present when I import it into Premiere. Still
-
F-03 Partial Payment Tab texts missing
Hi, In f-03 Transaction we are not able to see the texts in Russian and Czech languages for partial payment tab. If logging on English its ok Cheers
-
I've asked this question in SQL Server Upgrade forume, I'm asking here as well: Your help is highly appreciated! After migrating ReportServer db from 2008 to 2012, when access Report Manager throughhttp://myserver:80/Reports, I got the error below: u