WDA Embedding a view dynamically on an other view
Hi gurus,
I'm developing my first serious wda application, it has several views (esp_view1...10) that must be embedded at runtime on a view (com_view) on the main window, that has embedded at design time two views: com_view and an other (not relevant for my question).
I have defined a global variable in the controller esp_view type string that (depending on certain conditions) contains the name (esp_view1...10) that I want to embed on com_view.
I've readed several threads in the forum, several manuals that show how embed views dynamically on a window (not on an other view), and after seeing several samples I've tried using do_dynamic_navigation, but I'm incapable to do it (may be I don't understand still component usages??).
There is something that I'm forgetting??
Thanks in advance,
Alejandra
hi,
You can proceed this way :
1. Make 10 ViewContainter in your view_common i.e Place ViewContaier UI element in your common view.
2. Embed those views (V1-- V10) into these containers. For that Go to Windows, and inside windows you will find your View Containers. Drag and Drop your views under your component into the Windows.
3. Now make Outbound plugs in your Views(V1-- V10) and 10diff Inbound plugs in your Common View.
4.Create navigation link between outbound n inbound views.
5. For that , Go to windows and drag n drop outbound plug to inbound plug.
6.Now at run time you can fire the outbound plug of any View(V1--V10) whichever you want.
7. For firing a plug , you can use Code Wizard(control + F7).
Depending on your condition , fire plug using :
wd_this->fire_out_view1_plg( ). here out_view1 is outbound plug of View1.
I hope it helps.
Edited by: Saurav Mago on Apr 23, 2009 3:09 PM
Similar Messages
-
How to create a webdynpro view dynamically and embed into view container?
Hi all,
Anyone knows how to create a view dynamically and embed the view into an existing view container?
My layout looks like this:
I have an existing view named main_view.
Inside main_view, I create a view ui container named vcu_view.
I embed the main_view into my window.
I need the codes to create a view dynamically and embed the view into the view container. Anyone have any idea?
Thanks in advance.
Rgds,
Siong Chaohi Siong Chao ,,
empty view insence ..( create a view without any UI element in it ) in design time ..
>
Siong Chao wrote:
> Hi Chinnaiya,
>
> How do you create an empty view dynamically then? Thanks in advance.
i think we cannot create a new view dynamically because it is a webdynpro restriction ..
NOTE: experts correct me if i am wrong in this answer
Regards
Chinnaiya P -
Error while Driving a view using parameters from other view
Hi,
I have created a report with streamlist and Barchart view.Driving option is used in streamlist to drive the barchart. The driving works well untill i dont use any filters in the Streamlist.Once i use parameters in streamlist , the driving works only for the default values set.When Second set of values are chosed for the parameter,the values are displayed correctly , but once they are selected for driving,the current values are replaced by the results of the default parameter settings.
I have already done the tutorials for driving and it worked well untill i use filters in the main view,from where the driving is done.
I would really appreciate if someone could give a solution for this problem.
Regards,
LathikaHi,
Login as i.e. sys as sysdba. Standard password is change_on_install.
Or you can login in using user that has CREATE VIEW WITH ADMIN OPTION and then grant CREATE VIEW privilege to user to want.
Peter D. -
hi all,
i am embedding a view dynamically in view_container. that view is from other component, here is the code,
TARGET_COMPONENT_NAME = 'ZCOMP_TEST'.
TARGET_VIEW_NAME = 'MAIN_VIEW_1'.
SOURCE_PLUG_NAME = 'PLUG_TO'.
DATA: COMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
L_API_MAIN = WD_THIS->WD_GET_API( ).
TRY.
CALL METHOD L_API_MAIN->DO_DYNAMIC_NAVIGATION
EXPORTING
SOURCE_WINDOW_NAME = 'MAIN'
SOURCE_VUSAGE_NAME = 'MAIN_VIEW_USAGE_1'
SOURCE_PLUG_NAME = SOURCE_PLUG_NAME
PLUG_PARAMETERS =
TARGET_COMPONENT_NAME = TARGET_COMPONENT_NAME
TARGET_COMPONENT_USAGE = TARGET_COMPONENT_NAME
TARGET_VIEW_NAME = TARGET_VIEW_NAME
TARGET_PLUG_NAME = 'DEFAULT'
TARGET_EMBEDDING_POSITION = 'MAIN_VIEW/VIEW_1'
RECEIVING
COMPONENT_USAGE = COMP_USAGE
CATCH CX_WD_RUNTIME_REPOSITORY .
ENDTRY.
it is giving error
■The following error text was processed in the system NET : Controller MAIN_VIEW_1 Does Not Exist
pl suggestsolved
-
How can I generate a Complete View defination of multiple inline views
Hi,
I am trying to write a sql that will return the select statement of a view, but if the view contains reference to others views then
the select statement of those views should also be included in the final select as inline query. The same thing can be done using a
recursive procedure, which I already did, so I am posting this out of curiosity just to know if this is possible to achieve just via plain sql.
Let me explain in details what my requirement really is::
Say I have a View Called A.
The select for A is :: SELECT * FROM B,C;
Now B and C are both views and the select for those are respectively ;
View B : SELECT * FROM B1;
View C : SELECT * FROM C1;
So, I want a SQL QUERY which will take View A as input and will produre the following result :
View Name View Def
A SELECT * FROM (SELECT * FROM B1),(SELECT * FROM C1)
PS: If B1 and C1 are views then the select for those should also be included in the SELECT statement for A.
Thanks,
RuhuYou must be on a 12c Database for that
They have introduced DBMS_UTILITY.EXPAND_SQL_TEXT Procedure. Check out Oracle Database 12c Release 1 (12.1) New Features -
How to populate list in tree view dynamically
Hi,
I am new to Indesign Plugin creation.
I want to create list in tree view dynamically.
I tried wlistboxcomposite sdk sample in indesign cs4.
I have some doubts in this.
1. Can i write my own method in WLBCmpTreeViewAdapter class because it's implements ListTreeViewAdapter
If it's possible how can i call this method.
2. In this example they populating static string in constructor like this
WLBCmpTreeViewAdapter::WLBCmpTreeViewAdapter(IPMUnknown* boss):ListTreeViewAdapter(boss){
K2Vector<PMString> lists;
for (int32 i = 0; i< 12; i++){PMString name(kWLBCmpItemBaseKey);name.AppendNumber(i+1);name.Translate();lists.push_back(name);}
InterfacePtr<IStringListData> iListData(this, IID_ISTRINGLISTDATA);}
and this list is populating on loading time but my requirement is i have one button "get list" after clicking this button i have to populate the list, how can
i achieve this.
Pls do needful.
Thanks
ArunThe TreeViewAdaptor is responsible for mapping your custom data to the tree view itself. I almost always start by making it return some fixed number of objects with names "item 1" etc. That way you get the tree view working first.
Then, after you get it laid out and displaying properly, you can worry about using real data. At that point, you have your adaptor return the actual number of items in your list and each individual item. Then you can populate your list when you push your button and then invalidate the IControlView of the tree view widget to cause it to redraw. At that point your adaptor will get called and your data should appear.
Jon
"Expert for hire" -
Action reference in the MAIN view for other Views
Hi Experts,
I have created a view(MAIN) that contains SUBMIT button and also included four other views(Using ViewContainerUIElement) in the MAIN view itslef. So am calling the respective view based on some certain condition from MAIN view.
Now my problem is, am using check_mandatory_attr_on_view() method which is being called on SUBMIT action from MAIN view of WDDOBEFOREACTION. But it is not checking Required Fields from other views. It checks the Required Fields only in the MAIN view.
I know that I want to call the reference of other views in MAIN view, but how can I do it?
Please help me, as how I can check the Required fields on action of SUBMIT button in MAIN view for other views.
BR,
RAM.Hi,
Though am in MAIN view, If i clicks the submit button it checks the Required fields on both MAIN and Sub views, where still I have not called the Sub view.
If you didn't call the sub view, the WDDOINIT method of your sub view wouldn't have been triggered and so the sub view reference is not set in the component controller, isn't it.?
OR you are calling sub view separately in the initial state and get the reference and then in your MAIN view calling the sub view based on condition in the View Container UI..?
If so, create an attribute in your Main view (say sub_view_name of type string) and then use the below code to get the current sub view name and then pass the corresponding sub view reference:
DATA:lr_view_controller type ref to IF_WD_VIEW_CONTROLLER,
lr_main_view_usage type ref to IF_WD_RR_VIEW_USAGE.
lr_vc_assignment type ref to IF_WD_RR_VIEW_CNT_ASSIGNMENT.
lr_view_usage type ref to IF_WD_RR_VIEW_USAGE.
lr_t_views type WDRR_VCA_OBJECTS.
lr_s_view like line of lr_t_views.
lr_view type ref to if_wd_rr_view.
lr_view_controller = wd_this->wd_get_api( ).
lr_main_view_usage = lr_view_controller->GET_VIEW_USAGE( ).
lr_t_views = lr_main_view_usage->GET_VIEW_CNT_ASSIGNMENTS( ). "This will return all the View Container assignments.
* Now loop over all the View containers and get the reference of embedding view.
loop at lr_t_views into lr_s_view .
lr_vc_assignment = lr_s_view-VIEW_CNT_ASSIGNMENT.
lr_view_usage = lr_vc_assignment->GET_DEFAULT_VIEW_USAGE( ). " This will return view usage reference
lr_view = lr_view_usage->get_view( ). " This will have the meta info of view
wd_this->sub_view_name = lr_view->get_name( ).
endloop.
Now in onAction submit,
CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW(
EXPORTING
view_controller = lr_view_controller " MAin view reference
case wd_this->sub_view_name.
when 'SUB_VIEW1'.
CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW(
EXPORTING
view_controller = wd_comp_controller->gr_emb_view1.
when 'SUB_VIEW2'.
CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW(
EXPORTING
view_controller = wd_comp_controller->gr_emb_view2.
Or, alternatively; create all the nodes(of sub views) in component controller, then map all those to MAIN view, then read the required node attributes and validate manually.
hope this helps u,
Regards,
Kiran -
How to create a view dynamicly in plsql?
I need to write a pl/sql package to create a view dynamic
,but i can't use 'create or replace view xxxx as select *
from db where ...',I know the dbms_sql package can parse the
'select' sentence,but i don't know how to create a view,only can
drop a view,who can help me?
thanks!
nullTry 'EXECUTE IMMEDIATE 'CREATE AS SELECT....' in your PL/SQL
xhpxorcl (guest) wrote:
: I need to write a pl/sql package to create a view dynamic
: ,but i can't use 'create or replace view xxxx as select *
: from db where ...',I know the dbms_sql package can parse the
: 'select' sentence,but i don't know how to create a view,only
can
: drop a view,who can help me?
: thanks!
null -
BC4J,Setting a default Value In a View With Data From An Other View
hi
I'm developping A BC4J. I want to set the default value of a field By counting the number of rows in an other view.
So I want to instanciate the view and execute the sql statement and get the result.
Is that the right manner to do it or not.
can someone help me to do that
cheers
ghassenThere's lots of ways to skin this cat depending upon whether you mean "database view" or "view object" when you say "view", and individual requirements.
Given database views v1 and v2 with a common key between them
select v1.x, count(*) from v1,v2 where v1.key = v2.key group by v1.x;
either in the database view or in expert mode for the view object ( I think it'll take group by, but never done it ). ( assumption is that v1.x is a primary key for v1 )...
Try this from sql*Plus first to get a feel for how this works.
The catch with the above is that it is "static"... if you can ADD rows to v2 in your application... they aren't visible in the count until saved and requeried.
Another way ( I think... hopefully Oracle folk will kibitz... )
Create your own attribute on the view object like "TheOtherCount".
In the view object's RowImpl, find the "getTheOtherCount". Find the count of rows in the second view object or entity object or rowSetInfo through the method of your choice. ( If you've already set up a master detail relationship that is active you can just get the rowcount! ). Refer to earlier postings on how to get the rowcount, or to create a dynamic view query to get the count.
The nice thing is that this should reflect your counts even if the second view has added or removed rows... but will probably move like a snail.
Note that if you have a need where you want the row count updated in a frame for v1 whenever v2 is added to or removed from... well... then you need to set up some sort of event listener to do a redisplay of v1's frame, I'd think? Since the attribute you've created in the view object is not based on an entity object attribute, it has no way to know when it has been "updated" via an additional or removed row from the target.
I'm posting the above because no one has responded yet... it may form a place to start from. And maybe someone in the know will go "No, No, No... KKirk... it doesn't work that way at all!" and fill us in on how this can be accomplished!
Good Luck -
How to embed views dynamically in a view container ?
Hi ,
Can you please guide me how to embed a view dynamically in a view container ?
Thanks & Regards
Gaurav JainHello,
Please read this [/people/rajagopal.vemuri/blog/2006/09/19/web-dynpro-for-abap-creating-dynamic-ui-elements-and-context-step-by-step].
Regards. -
How to create dynamic connection in business view manager.
Hi Sir,
Can u explain how to create dynamic connection in business view manager.
Thanks
Vishali Raghava RajuHI Vaishali,
Can you please elaborate your requirement ?
-Regards
B -
WD- SALV- Setting initial View dynamically
Hi everyone,
I'd like to have 2 different ALV initial views, depending on certain conditions in my program (two buttons, each of them calling the same ALV, but with different initial View)
I'm settung at runtime the config_key when I initialize the ALV component, as Regina Breuer explained in the following forum
Re: WDA ALV initial view
After I run the program and I click on one of the buttons it works fine. But the initial view doesn't change even if I click on the other button, although in debugging mode I can see that the correct configuration key is being set.
For any suggestions I woud be very pleased!
Best Regards,
ChristianHi Baldari,
Please check this also..
WD -SALV- setting initial view
Cheers,
Kris. -
Dynamically generated Link for View uFF1F
i need dynamically create link,
like HTML Code <a href='URL'>text</a>
public void wdDoInit()
ArrayList al = .... (URL String List)
for(int i =0;i<al.size(); i++)
..... HOW CODING??[How to dynamically insert UI to View|How to dynamically insert UI to View]
duplicate thread
Sarbjeet -
Change subgrid view dynamically by Javascript
Hello,
In my current project Client
would like an activities view that shows related activities PLUS some fields from those activities.
Please let me know how to change subgrid view dynamically.
we are trying to get the same results as in the out of the box subgrid where you get the regarding activities but we want some additional fields such as the To from the phone
call activity
I am using below code to achieve this
// JavaScript source code
//Change the Fetch XML and set the subgrid ID
function UpdateSubGrid()
var SubGrid = document.getElementById("Activities");
if (SubGrid.readyState != "complete")
//The subgrid hasn't loaded, wait 1 second and then try again
setTimeout(UpdateSubGrid, 1000);
return;
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' >" +
"<entity name='activitypointer'>" +
" <attribute name='subject' />" +
"<attribute name='ownerid' />" +
"<attribute name='prioritycode' />" +
"<attribute name='regardingobjectid' />" +
"<attribute name='activitytypecode' />" +
"<attribute name='statecode' />" +
"<attribute name='scheduledstart' />" +
"<attribute name='scheduledend' />" +
"<attribute name='activityid' />" +
"<attribute name='instancetypecode' />" +
"<attribute name='community' />" +
"<order attribute='scheduledend' descending='false' />" +
"<filter type='and'>" +
" <condition attribute='isregularactivity' operator='eq' value='1' />" +
"</filter>" +
"<link-entity name='phonecall' from='activityid' to='activityid' visible='false' link-type='outer' alias='phonecalllinkage'>" +
" <attribute name='from' />" +
" <attribute name='to' />" +
"</link-entity>" +
"<link-entity name='task' from='activityid' to='activityid' visible='false' link-type='outer' alias='tasklinkage'>" +
" <attribute name='percentcomplete' />" +
"</link-entity>" +
"</entity>" +
"</fetch>";
// fetchXml
//Set Fetch XML
//Inject the new fetchXml..
SubGrid.control.SetParameter("fetchXml", fetchXml);
//Force the subgrid to refresh
SubGrid.control.refresh();
Many thanks in advance.
HarshaHi Pedro,
Thank you for your response.
Actual requirement is Client
would like an activities view that shows related activities PLUS some fields from those activities. I tried out of box this first but it is not achievable because some entities are not available in entities list to select columns.
I want to add coulns from related entity inside grid.
Please let me know how I can achieve this through IFrame, Plugin or ssrs report?
Thanks in advance.
Harsha -
I would like to create a view dynamically based on “Employee” table
A view in each database should contain every column in “Employee” table except column called “year”. “Employee” table exists in every database but has different columns except “year” column ,so
the employee view should contain different columns based on which database you create a view
How can I create a view dynamically for each database? I am using SQL server 2008 R2Try this... (Note the @Debug parameter is there to allow you to preview the code before you create the view... 1 to view the dynamically generated code, 0 tt simply execute it.)
DECLARE
@DeBug BIT = 1,
@ColumnString VARCHAR(MAX),
@sql VARCHAR(MAX)
SELECT
@ColumnString = COALESCE(@ColumnString + ',' + CHAR(10) + CHAR(9), '') + c.COLUMN_NAME
FROM
INFORMATION_SCHEMA.COLUMNS c
JOIN INFORMATION_SCHEMA.TABLES t ON c.TABLE_NAME = t.TABLE_NAME AND c.TABLE_SCHEMA = t.TABLE_SCHEMA
WHERE 1 = 1
AND t.TABLE_TYPE = 'BASE TABLE'
AND c.TABLE_NAME = 'Employee'
AND c.COLUMN_NAME <> 'Year'
ORDER BY
c.ORDINAL_POSITION
SET @sql = '
CREATE VIEW dbo.v_Employee
AS
SELECT
' + @ColumnString + '
FROM dbo.Employee'
IF @DeBug = 1
BEGIN
PRINT (@sql)
END
ELSE
BEGIN
EXEC (@SQL)
END
HTH,
Jason
Jason Long
Maybe you are looking for
-
Now a new problem ejecting disc
I inserted a music CD to copy to iTunes and after I tried to eject it but got this - "The disk "Untitled CD" is in use and could not be ejected. Try quitting applications and try again. I quit all applications but still it will not eject just says th
-
Lowest picture format quality in size?
Like is GIF, JPEG or what is good to use for uploading images when you only have 1GB of online storage from your webhost?
-
I've bought a couple albums recently - and after about 30 seconds to a minute it'll skip to the next song, and even if you restart the song it does the same thing. I've tried restarting my computer and that didn't work either... does anyone know what
-
Window Mode button gone?
In Snow Leopard and Leopard, there was a long button in the upper right of each Finder window that would allow the sidebar to be turned off and on. Mountain Lion seems to have removed this. Any way to get it back? I notice many mounted disk images op
-
Torch 9810 Need basics about Wifi auto-switching and tethering, please.
Concerning my AT&T Data plan: 1- when i'm using the device by itself, all indicators show that auto-switching is working when wifi is available. ok, bb gurus, i can't afford any surprises on my bill, so...is it really working all by itself, or am i g