Adding navigation items to view controllers in interface builder - pwnd me
I am perplexed by Interface builder. I had SDK version 2.x (can't recall now) and just upgraded to the newest 3.1 and now things do not work the same.
So that I could have a custom navigation item applied to my view controller, I have followed the instructions here:
http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptua l/IB_UserGuide/EditingNibFileObjects/EditingNibFileObjects.html
in section entitled "Configuring the Views for Additional Navigation Levels"
When I try to load the nib at runtime I get this error:
[* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "EventCreate" nib but the view outlet was not set.']
The view is set on the controller; however, I did not do anything to set the file's owner since the before-mentioned doc does not say anything about that. It seems the view must be set on the file's owner to make it work. This is confusing.
I've noticed that the nibs I had set up using the previous release (2.x can't remember now) aren't totally supported in the way I had them set up with navigation items. In IB, I would set the File's Owner to by view controller and then I could drop a navigation item in and connect that right away to the controller, and the controller had a navigation item outlet exposed by default. That doesn't appear to work any more. When I open my older nibs (xib files) the navigation item outlet shows up in the inspector for the controller BUT its greyed out, as if obsolete. There's no navigation item outlet showing in IB anymore, it seems when building new xibs. So, I don't know what to do here.
Can somebody help me?
crouchingchicken wrote:
I would set the File's Owner to by view controller and then I could drop a navigation item in and connect that right away to the controller
Yes, I agree. The nav item used to show up as an outlet of any view controller.
When I try to load the nib at runtime I get this error:
The problem with the doc is this line:
To push a new view controller at runtime, _create a new instance of your custom UIViewController subclass, initialize it with the nib_ file you created for it, and push it on the navigation controller stack.
The underlined portion can lead us to believe we can alloc and initWithNibName:bundle: as we would when File's Owner is a proxy for the controller we create in code. But that won't work in this case, since the controller we want is the one that's created from the view controller object when the nib is loaded. In other words, we don't want to alloc a new controller, we just want to grab the object made from the nib. Here's what to do:
// RootViewController.m
- (IBAction)nextView {
NSLog(@"nextView");
// SecondViewController *viewController = [[SecondViewController alloc]
// initWithNibName:@"SecondViewController" bundle:nil];
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"SecondViewController"
owner:self options:nil];
NSLog(@"nib=%@", nib);
SecondViewController *viewController = [nib objectAtIndex:0];
[self.navigationController pushViewController:viewController animated:YES];
// [viewController release];
Be sure not to release the object obtained from the nib, since we didn't alloc it. Top level objects created from a nib are autoreleased. You can put some logging into the second view controller's dealloc to verify it gets dealloced when popped:
// SecondViewController.m
- (void)dealloc {
NSLog(@"dealloc: %@", self);
[super dealloc];
- Ray
Similar Messages
-
Associating a Navigation Item with a View Controller in a XIB
According to Xcode:
The 'navigationItem' outlet of a UIViewController has been deprecated. Navigation items are required prior to loading a view controller's view. Instead of an outlet, consider embedding the navigation item in the view controller.
What does "embedding the navigation item in the view controller" mean? The obvious interpretation of putting a navigation item in the view controller's XIB as a peer to the view has no effect.Hi -
Try using Command "SET_SELECTION_STATE" in dropdown Data Binding - Data Binding type.
Anesh B -
Passing plist Items between views with a flip transition
Dear developers,
My question is a simple one, but the background around it can appear a bit complicated - please bear with me!
I have an app with two views; a flip transition allows navigation between them. In each view there is a UILabel - these display strings from a plist. The first View displays 'Question' strings and the second View displays 'Answer' strings.
The plist is structured as follows.
Root................................................(Array)
.............Item 0.................................(Dictionary)
.........................Question...................(String) "Question0?"
.........................ItemChild..................(Dictionary)
.....................................Answer.........(string) "Answer0"
.............Item 1.................................(Dictionary)
.........................Question...................(String) "Question1?"
.........................ItemChild..................(Dictionary)
.....................................Answer.........(string) "Answer1"
.............Item 2.................................(Dictionary)
.........................Question...................(String) "Question2?"
.........................ItemChild..................(Dictionary)
.....................................Answer.........(string) "Answer2"
In the first View there is a button that allows the user to navigate down the Items to view a desired Question/string. On flipping to the second view the itemChild Answer/strings are revealed. This works fine.
On flipping back to the first view however, the Item0 strings are displayed and i don't want this to happen!. Instead I would like the most recent item string to be retained/passed, so that on returning to the first view, the previously selected item question is displayed.
E.g. View 1 (displays Item2/Question2) ---> flip Transition --> View 2 (displays ItemChild/Answer2) --->flip Transition ----> View 1 (displays Item2/Question2)
I have tried to make this work by using the following code;
@secondViewController
- (IBAction)done {
NextItemViewController *controller = [[NextItemViewController alloc] initWithNibName:@"NextItemViewController" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
controller.Question = [[self. flashCards objectAtIndex:counter]objectForKey:@"Question"]; <-- i thought this might pass on the Item index position to the firstView
[self presentModalViewController:controller animated:YES];
[controller release];
but i think this is being ignored when the first view is reloaded.
how can i get this working?
the code is presented below and the source code for this project is here; http://rapidshare.com/files/408592175/NextItem_2.zip
Should you require further clarification (if the above doesn't make sense)- please get in touch.
with thanks
james
_first View (NextItemViewController.h)_
#import <UIKit/UIKit.h>
@interface NextItemViewController : UIViewController {
NSMutableArray *flashCards;
IBOutlet UILabel *Label1;
int counter;
@property (nonatomic, retain) NSMutableArray *flashCards;
@property (nonatomic, retain) UILabel *Label1;
@property (nonatomic, assign) int counter;
- (IBAction)NextItem;
-(IBAction)Flip;
@end
_First View (NextItemViewController.m)_
#import "NextItemViewController.h"
#import "FlippedViewController.h"
#import "Constants.h"
@implementation NextItemViewController
@synthesize Label1, flashCards, counter;
/////////////////////Code to load the Array into the UIlable////////////////////////////////////////////////
- (void)viewDidLoad {
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"FlashCardData" ofType:@"plist"];
NSMutableArray* tmpArray = [[NSMutableArray alloc]initWithContentsOfFile:path];
self.flashCards = tmpArray;
if ([flashCards count]) { // <-- handle null plist
NSDictionary *Question = [flashCards objectAtIndex:counter];
Label1.text = [Question objectForKey:Question_KEY];
else {
Label1.text = @"No Questions";
[tmpArray release];
///////////////////////////code to load Next item from UIbutton press/////////////////////////////////////
-(IBAction)NextItem {
int count = [flashCards count];
if (++counter < count) { // <-- any cards left?
NSDictionary *nextItem = [self.flashCards objectAtIndex:counter];
Label1.text = [nextItem objectForKey:Question_KEY]; // <-- use #define here
else {
Label1.text = @"Done"; // <-- no more cards
//////////////////////////code to flip views///////////////////////////////////////////////////////////////
- (void)FlippedViewDidFinish:(FlippedViewController *)controller {
[self dismissModalViewControllerAnimated:YES];
- (IBAction)Flip {
FlippedViewController *controller = [[FlippedViewController alloc] initWithNibName:@"FlippedViewController" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
controller.ItemChild = [[self. flashCards objectAtIndex:counter]objectForKey:@"ItemChild"];
[self presentModalViewController:controller animated:YES];
[controller release];
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
- (void)dealloc {
[Label1 release];
[flashCards release];
[super dealloc];
@end
_secondView (flippedViewController.h)_
@interface FlippedViewController : UIViewController {
NSDictionary *ItemChild;
IBOutlet UILabel *Label2;
@property (nonatomic, retain) NSDictionary *ItemChild;
@property (nonatomic, retain) UILabel *Label2;
- (IBAction)done;
@end
Second View (flippedViewController.m)
#import "FlippedViewController.h"
#import "NextItemViewController.h"
#import "Constants.h"
@implementation FlippedViewController
@synthesize Label2, ItemChild;
- (void)viewDidLoad {
[super viewDidLoad];
Label2.text = [ItemChild objectForKey:Answer_KEY];
- (IBAction)done {
NextItemViewController *controller = [[NextItemViewController alloc] initWithNibName:@"NextItemViewController" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
- (void)viewDidUnload {
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
- (void)dealloc {
[ItemChild release];
[Label2 release];
[super dealloc];
@endjames_coleman01 wrote:
I have tried to make this work by using the following code;
@secondViewController
- (IBAction)done {
NextItemViewController *controller = [[NextItemViewController alloc] initWithNibName:@"NextItemViewController" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
controller.Question = [[self. flashCards objectAtIndex:counter]objectForKey:@"Question"];
[self presentModalViewController:controller animated:YES];
[controller release];
but i think this is being ignored when the first view is reloaded.
The first view is never reloaded and never re-appears, James. The above method creates a new instance of NextItemViewController and presents its view modally. In other words, The first instance of NIVC is the parent of the first instance of FVC, which is the parent of the second instance of NIVC and so on. Each time you do a Flip->Back cycle you add new instances of NIVC and FVC to a growing "stack" of modal view controllers, none of which are ever released.
Since your intent in 'done' is to return to the parent of the modal view, all you need to do there is send a dismissModalViewController message to the parent controller (whose address is always stored in the 'parentViewController' property of the child modal view controller). So this is all you need:
- (IBAction)done {
[self.parentViewController dismissModalViewControllerAnimated:YES]; // <-- back to parent view
Since you already had 'FlippedViewDidFinish' in the parent, the following example code uses that method instead of the code above. Both examples do exactly the same thing in this case.
// NextItemViewController.h
#import <UIKit/UIKit.h>
@class FlippedViewController;
@interface NextItemViewController : UIViewController {
- (void)FlippedViewDidFinish:(FlippedViewController *)controller; // <-- add declaration
@end
// NextItemViewController.m
@implementation NextItemViewController
- (IBAction)Flip {
if (counter >= [flashCards count]) // <-- valid card?
return;
@end
// FlippedViewController.m
@implementation FlippedViewController
- (IBAction)done {
[(NextItemViewController*)self.parentViewController FlippedViewDidFinish:self]; // <-- back to parent view
@end
This second example also includes protection against calling 'Flip' with an invalid array index (i.e. when the deck is empty and "done" is displayed). You might consider disabling the "ItemChild" button in that case, and similarly disabling the "Next Item" button when the deck is empty, but I guess those decisions will depend on whether you want to automatically roll the counter back to 0, etc. I generally hard code array index protection even when it's "impossible" to access the array with an out-of-range index from the UI.
- Ray -
Where is the "apps" menu item in the new iTunes interface?
Where is the “apps” menu item in the new iTunes interface? I can no longer transfer files from my PC to my iPhone.
I just downloaded and installed the updated iTunes for my iPhone. I cannot find the “apps” menu item anywhere. How can I continue to download various types of files FROM my PC (Windows 7) TO my iPhone? I previously did this by clicking on the “apps” menu item and going from there. I cannot find the “apps” anywhere on the new iTunes. Thanks.Tonefox, no it's not under "Music" but I did some more digging and found where Apple has "hidden" Apps on their latest iTunes for PC. You need to click on "iPhone" (upper right menu item) to display more menue items, of which Apps is one of them. When I had clicked on "iPhone" before, I mistakenly closed the the iPhone option from view because I clicked on the up arrow next to iPhone, instead of just iPhone. Once you click on iPhone, the options look similar to what they did in the earlier version of iTunes and you can easily find Apps.
-
Displaying navigation item in Navigation Pane
1. I created a Portal in my 11.1.1.8 Portal Builder.
2. For that portal, I added a few links to navigation. Portal Home -> Portals -> Portal Builder -> "Administer" corresponding to my portal -> Assets-> Navigation -> Edit on the default navigation
3. I added the following code in the portal's page template:
<af:navigationPane id="pt_np1" var="node"
value="#{navigationContext.defaultNavigationModel.defaultMenuModel}"
level="1" hint="tabs">
<f:facet name="nodeStamp">
<af:commandNavigationItem text="#{node.label}"
action="#{node.doAction}"
destination="#{node.destination}"
id="pt_cni1"/>
</f:facet>
</af:navigationPane>
4. I see tabs with no text.
Expected: Tabs should contain the text that I entered in "Name" field of Navigation item.
Observed: The tabs are created but there is no text in them. The number of tabs are as expected. I had 6 navigation item, the number of tabs created are also 6.
For the text field, I tried the following:
node.id - displays the id of the navigation item.
node.prettyUrl - again, the id of the navigation item.
node.name - empty tabs
node.label - empty tabs.
The class of node is "oracle.webcenter.portalframework.sitestructure.SiteStructureResource". But, I could not get javadoc to see more information.
Does anyone know how I can get the Name of the navigation to display in the tabs?I found the answer. According to this link - http://docs.oracle.com/cd/E29542_01/webcenter.1111/e27739/jpsdg_app_els.htm#CHDCBJGJ
I should use node.title to get the title. -
Hi,
I have put up some custom navigation items in the Navigation along with Logout,Print etc.
I assigned a graphic gif image to each of the Navigation items in the property Image, but the images do not show up when the page renders.
I have selected images from the LOV in the Image property so there is less chance that the path taken is wrong ... my image value reads #APP_IMAGES#myicon.gif
I tried View Source of the page rendered but there also I could not see any HTML img src code for my image.
Any clues?
Thanks.Hey,
did you read this thread: Navigation Bar Image
That helped me out at the same problem!
Regards,
Tim -
[iPhone] Can I display two modal view controllers after each other?
Hi,
This is for BETA 7.
Here is a simplified version of my problem.
In my application root view controller , the user presses a 'Start Wizard' button and they get modal view controller A presented which contains a 'Step 1 Complete' button. When that 'Step 1 Complete' button is pressed , ModalVC A dismisses itself and delegates an "I'm done" event to the root view controller , which presents another ModalVC B to the user with a 'Step 2 complete'. So basically imagine a Wizard of Modal View Controllers. Try to make one, it doesn't work.
The problem is that MODALVC B doesn't get displayed. It almost seems that when ModalVC A dismisses itself from the parent , this does not go in effect until the main thread goes back into its message loop for a redraw or something and it ignores the subsequent 'PresentModalViewController : nextcontroller' call.
The only way to make it work is to have 2 buttons ('Do Step 1' and 'Do Step 2') is the root view controller and have the user press them individually. Of course that's not what I want.
Message was edited by: Maxm007Yes , most of my application uses the navigation bar. The problem is that the two modal views involved are are used separately throughout the application quite frequently. In this specific case I want to reuse them , but consecutively.
If I do choose to go for a navigation bar for this case , then I'd need to have two versions of these two views , one without and one with my custom toolbar , wouldn't I?
I'll definitely try the queued posting. Do I use NSNotification center or is there another way to asynchronously post an event? -
Interface Builder: Problems with selecting items?
Hello, does someone else have experience with IB selection problems?
I did the following:
-Created a textured window
-Dragged a toolbar into it
-Dragged a NSScrollView into the textured window
-Gave the NSScrollView a white background
-Scaled the NSScrollView so that it extended to the edges of the window
-Dragged 4xCheckboxes into the NSScrollView
After this I had major problems in selecting any of the Checkboxes. It seemed like if I moved the mouse around a bit and kept clicking, then in some point I was able to get the checkbox selected. However this happened only after 5-30 clicks. Also the scaling controls of the checkboxes were almost impossible to find and to use.
Is there a button or a checkbox in the IB configuration, or a keyboard key or something in the IB that would make selecting things a bit easier. Or am I just doing something wrong?Interface Builder is pretty buggy to begin with, so that is always going to be a hassle. You normally have to double-click inside scroll views to get to the actual contained items. Also, you can drill down through the scroll view in the object window in tree view and select the checkbox itself.
-
Navigating to a view on click of a button in Webclient
Hi Gurus,
I am trying to navigate to a view from one view by clicking on a button.
What is the coding to be done in do_handle_event and what is the navigation link to be provided in the customized run-time repository.
Any help would be appreciated and points would be awarded
Thanks,
JaiThis may help.
ashish.
3.4.1 Creating the View Set and Controllers
The following steps are necessary to create your view set:
1. Use the wizard to create a new view set SimpleActivitySet.
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 93
2. Skip through all following steps in the wizard.
3. Redefine the method if_bsp_wd_history_state_descr~get_state_description in the
generated class ZL_Z_CRM_IC_SIMPLEACTIVIT_IMPL as follows:
METHOD if_bsp_wd_history_state_descr~get_state_description .
description = text-001. " 'Simple Activity'
ENDMETHOD.
This method is called by the framework whenever the quick navigation dropdown box is refreshed.
It returns the text to be displayed, in our case, Simple Activity. Double-click on text-001 in order
to create the program text.
4. Add the following code to the layout of the view set:
<%@page language="abap"%>
<%@ extension name="htmlb" prefix="htmlb"%>
<%@ extension name="xhtmlb" prefix="xhtmlb"%>
<%@ extension name="crm_bsp_ic" prefix="crmic"%>
<%@ extension name="bsp" prefix="bsp"%>
<crmic:gridLayout cellPadding="0" cellSpacing="2" columnSize="1" rowSize="1"
width="100%" height="100%">
<crmic:gridLayoutCell columnIndex="1" rowIndex="1" width="100%" height="34%">
<bsp:call comp_id="<%=controller->GET_VIEWAREA_CONTENT_ID( 'SimpAct' )%>"
url="<%=controller->GET_VIEWAREA_CONTENT_URL( 'SimpAct' )%>"/>
</crmic:gridLayoutCell>
</crmic:gridLayout>
This HTMLB code simply creates a grid layout with one cell. Within the cell, we call the view by its
ID (SimpAct). The ID is later on defined in the framework (cf. section 3.4.3.2).
This design has some overhead in our case, but it shows in general how more complex view sets
are to be designed. For example, see the view set definition of the interaction record,
IRecViewSet.htm, in the BSP application CRM_IC.
5. Activate all your objects.
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 94
3.4.2 Creating the View and Controllers
The following steps are necessary to create your view:
1. Start the IC WebClient workbench and right-click on the View Root node to create a new view.
2. In the wizard, enter the following data:
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 95
We do not define value nodes here. Value nodes are context nodes which are not bound to the
BOL model but implemented in the context classes.
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 96
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 97
3. After this step, restart the IC WebClient workbench and see your new view in the hierarchy:
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 98
The following methods will all be created/implemented in the controller implementation class
ZL_Z_CRM_IC_SIMPLEACTIVI_IMPL. The additional controller base class should never be changed!
1. Define the inbound plug. This will be the method that is called by the framework whenever we
navigate to our view set. For more information on the link definition, see section 3.4.3.3.
Sample Code: Inbound Plug
In general, there are two way of passing parameters:
Via the business data context (BDC), which is represented by a custom controller.
At this custom controller you find the method SET_NAVIGATION_DATA and
GET_NAVIGATION_DATA to pass a context entity.
Binding to custom controller context nodes which leads to data sharing between views.
In our example we bind BTORDER, the root context node of our new view, to the
context node CURRENTINTERACTION of the BDC (custom controller CuCoBDC).
When our view is created the data of CURRENTINTERACTION is automatically set to
the node BTORDER and the data for the dependant nodes is automatically derived.
2. You can define a dropdown list box for the status as described in section 3.3.
3. The wizard automatically creates two methods that are responsible for the data transfer between
the model/controller and the view:
set_models
Sends data to the view. It is comparable to the PBO modules of traditional ABAP screen
programming.
do_handle_data
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 99
Retrieves data from the HTTP request fields. It is comparable to the PAI modules of an
ABAP screen.
3.4.3 Adjusting IC WebClient Framework
After having defined the views, controllers, and classes, we need to assign them to the runtime profile of
IC WebClient.
The first time you do this, there are some preparations needed which are explained in the following
section. After the preparation, the view and view set specific work for our example is explained.
3.4.3.1 Preparation
In order to prepare the IC WebClient framework for custom-built view sets, we need to create a new
runtime profile BSP application in the customer namespace. This BSP application will contain one page,
called CRM_IC.xml. It will contain the definition of all view sets and all navigational links by including the
corresponding files that actually contain the definitions. We build all this according to standard structures,
though it doesnt necessarily have to be this way.
To make things a bit simpler, we do not split up the repository into runtime and design time. All changes
we make are only relevant for the runtime repository.
Perform the following steps:
1. Create the BSP application Z_CRM_IC_RT_REP in the package Z_CONS_COOK.
2. Copy the file CRM_IC.xml from the BSP application CRM_IC_RT_REP to Z_CRM_IC_RT_REP.
3. Adjust the contents of this file according to the changes shown in bold in the following sample
code:
<?xml version="1.0"?>
<WebDynProDefinitions>
<Application id="CRM_IC">
<ViewSets>
<%@include file="../Z_CRM_IC_RT_REP/CRM_IC_All_Viewsets.xml" %>
</ViewSets>
<NavigationalLinks>
<%@include file="../Z_CRM_IC_RT_REP/CRM_IC_All_NavLinks.xml" %>
</NavigationalLinks>
</Application>
</WebDynProDefinitions>
Hence, CRM_IC.xml includes two more XML files which can be found in BSP application
Z_CRM_IC_RT_REP.
4. Create BSP application Z_CRM_IC_RT_REP in package Z_CONS_COOK.
5. Copy page fragment CRM_IC_All_Viewsets.xml of BSP application CRM_IC_DT_REP to
Z_CRM_IC_RT_REP and replace the file contents with the following lines:
<%@ include file="MainViewSet.xml" %>
<%@ include file="../CRM_IC_DT_REP/BuPaViewSet.xml" %>
<%@ include file="../CRM_IC_DT_REP/CRM_IC_All_Viewsets_wo_BUPA_and_Main.xml"
%>
This definition still works with all standard view sets, but replaces the MainViewSet.xml with our
own definition, since it is now loaded from Z_CRM_IC_RT_REP.
6. Copy page fragment MainViewSet.xml from BSP application CRM_IC_DT_REP to
Z_CRM_IC_RT_REP.
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 100
7. Copy page fragment CRM_IC_All_NavLinks.xml of BSP application CRM_IC_DT_REP to
Z_CRM_IC_RT_REP and replace the file contents with the following line:
<%@ include file="../CRM_IC_DT_REP/CRM_IC_All_NavLinks.xml" %>
This definition makes sure that standard navigational links still work and that we are able to add
our own link definitions later on.
8. Activate all objects.
9. Customize the IC WebClient runtime framework profile in such a way that the new source file is
used, as shown in the following sample code:
<?xml version="1.0"?>
<RuntimeFrameworkSettings>
<RuntimeRepositorySource type="BSP">
<BspApplication>Z_CRM_IC_RT_REP</BspApplication>
<PageName>CRM_IC.xml</PageName>
</RuntimeRepositorySource>
<WorkareaDefinition>
<ViewSet>workViewSet</ViewSet>
<ViewArea>workViewSetArea</ViewArea>
</WorkareaDefinition>
<ControllerReplacements>
<ControllerReplacement>
<ReplacedController>BuPaMoreContactView</ReplacedController>
<ReplacingController>Z_CRM_IC/BuPaMoreContactView</ReplacingController>
</ControllerReplacement>
<ControllerReplacement>
<ReplacedController>IRecReason</ReplacedController>
<ReplacingController>Z_CRM_IC/IRecReason</ReplacingController>
</ControllerReplacement>
</ControllerReplacements>
<InteractionLayerApplication>ALL</InteractionLayerApplication>
</RuntimeFrameworkSettings>
3.4.3.2 Creating View Definitions for Design Time Repositories
Every new view set must be defined in the runtime repository.
1. Create page fragment SimpleActivitySet.xml in BSP application Z_CRM_IC_RT_REP and maintain it
as shown in the following sample code:
<ViewSet id="Z_CRM_IC/SimpleActivitySet">
<ViewArea id="SimpAct" views="Z_CRM_IC/SimpleActivity"/>
</ViewSet>
The view area ID (SimpAct) is the name of the literal used in the bsp:call tag. For more
information, see section 3.4.1.
2. Include this file in the framework. Place the following line into page CRM_IC_All_Viewsets.xml in
BSP application Z_CRM_IC_RT_REP:
<%@ include file="SimpleActivitySet.xml" %>
3. Activate your objects.
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 101
3.4.3.3 Creating Navigational Link Definitions for Design Time Repositories
In order to provide a navigational link for the activity clipboard, we need to define this link.
1. Create page fragment SimpleActivityNavLinks.xml in BSP application Z_CRM_IC_RT_REP and
maintain it as shown in the following sample code:
<NavigationalLink name="SimpleActivity">
<Source viewRef="IRecActivitiesClipboard" outboundPlugRef="default"/>
<Targets>
<Target viewRef="Z_CRM_IC/SimpleActivity"
inboundPlugRef="inboundplugid"/>
</Targets>
</NavigationalLink>
The name of the link is SimpleActivity. We will refer to it in the activity clipboard Customizing. For
more information, see section 3.4.3.5. The link can be activated on the view
IRecActivitiesClipboard and it navigates to the view SimpleActivity in BSP application
Z_CRM_IC. When the target view is activated, method ip_inboundplugid of the view controller
class is called.
The framework adds the prefix ip_ automatically for this method.
2. Similar to the view definition, include the navigational link into the runtime repository. Add the
following line to the file CRM_IC_All_NavLinks.xml in BSP application Z_CRM_IC_RT_REP:
<%@ include file="SimpleActivityNavLinks.xml" %>
3. Activate your objects.
3.4.3.4 Placing View Sets into Controller Hierarchies
After the view set and the navigational link are defined, we finally add our new view to the possible views
for the work area. We need to adjust the file MainViewSet.xml in BSP application Z_CRM_IC_RT_REP. Add
the reference to our view set and activate the file as shown in the following sample code:
<ViewSet id="ICAPPMainViewSet">
<ViewArea id="navigationArea" views="navigationViewSet"/>
<ViewArea id="workArea" views="workViewSet"/>
<ViewArea id="contextArea" views="contextAreaView"/>
<ViewArea id="breadCrumbsArea" views="BreadCrumbsView"/>
<ViewArea id="globalSearchArea" views="HistoryView"/>
<ViewArea id="helpArea" views="Help"/>
<ViewArea id="statusArea" views="StatusView"/>
<ViewArea id="errorArea" views="ErrorViewSet"/>
</ViewSet>
<ViewSet id="navigationViewSet">
<ViewArea id="navigationViewSetArea" views="NavBarView"/>
</ViewSet>
<ViewSet id="workViewSet">
<ViewArea id="workViewSetArea"
views="<%@include file='../CRM_IC_DT_REP/StdWorkareaOccupation.xml' %>
Z_CRM_IC/SimpleActivitySet"/>
</ViewSet>
Consultants Cookbook for Interaction Center (IC) WebClient SAP CRM 4.0 Add-On for Service Industries Page 102 -
Hi all
When first adding an item to the basket, is it possible to add more than 1. For example on the partdetail.aspx page have a quantity box next to the add to basket link. Rather than adding it once then having to update the quantity after in basket view.
ThanksThe cart page is actually doing the add part, so you would either need to redirect from there using a plugin, or create a plugin to manually add the part (using NPOrder.AddPart())
If you want to create the plugin, then you only need to swap out the NavigateURL on the "~/catalog/controls/partslistblock.ascx" for the cart image.
Find the lnkAddToCart Hyperlink and change
NavigateUrl="~/commerce/cart.aspx?AddPartNo="
to
NavigateUrl="~/catalog/partdetail.aspx?partno="
Message was edited by:
Shane Hart -
No Connection Navigator in the View menu
Hi,
There is no Connection Navigator item in mu View menu, only System Navigator and CVS Navigator.
Any ideas?
/Krister SurellHave you installed the java edition?
In the Java edition only the core Java and XML features exist. The Application Navigator and the Connection Navigator are part of the larger J2EE and Studio(ADF) editions.
Thanks,
Geoff -
Hi All
When I am adding a item in master data then error occurred "variation for price list and price list for items" and finally i could'nt add item. So please solve it if you have any solution regarding it.
Thanks with regards
Bibha
Edited by: Bibha Singh123 on Mar 25, 2011 12:43 PMHi Bibha,
check Message 3506-9 Price List Error - Please Help thread.
Thanks,
Neetu -
Adding navigational attributes to a cube
We have upgraded to BW 7.3. Previously when we added navigational attributes to a cube we need to activate the update rules from the ods but now it appears that we don't need to do that anymore. Is this the expected behavaior? We are using the 3.5 update rules.
thanksHI,
If you are using 3.5, after selecting nav attr in the cube, the cube structure gets deactivated. The dependent update rules also gets deactivated. You will be forced to activate all again.
In BW 7.3, SAP would have given privilege to add without activation. It is good for us. So nothing to worry.
Regards,
Suman -
SharePoint 2013---How to convert current left Navigation into tree view
Hi All,
I want to convert current left navigation into tree view in SharePoint 2013. When we click on Modify Navigation and set headers and links; I need that should be convert into tree view. All headers should be expandable to thier links.
I just want tree view on navigation headers and links. not for all site and subsites which we can enabled from site settings --> Modify All Site settings --> Tree view
Please help me Master Page editing on Navigation Generation.. Thanks in advance!
Regards,
AnnaHi Anna,
If you want to replace the Quick Launch part with the custom treeview web part in master page, you can comment out or remove the quick launch code block "<!--SPM:<SharePoint:SPNavigationManager id="QuickLaunchNavigationManager.....>....<>-->",
then insert the custom web part snippet code in proper location in seattle master page, then all pages inheriting the seattle master page will have this web part.
Note, please back up the master page before customizing the original master page for recovery.
http://msdn.microsoft.com/en-us/library/office/jj862341(v=office.15).aspx
http://www.sharepointpals.com/post/Add-snippets-in-Page-layout-using-design-manager
Thanks,
Daniel Yang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
Daniel Yang
TechNet Community Support -
How to create new subsite while adding new item to the list by using javascript?
hi,
I hav a task ie, when I add item to the list then subsite will create with that list item title and description . So By using javascript, I have to create subsite while adding new item to the list.
Help me to solve this.
Thank you,Is your item getting added through Javascript client object model ? If yes, you can write in the success delegate of your list creation method the logic to create the subsite.
function CreateListItem()
var clientContext = new SP.ClientContext.get_current();
var oList = clientContext.get_web().get_lists().getByTitle('List Name');
var itemCreateInfo = new SP.ListItemCreationInformation();
this.oListItem = oList.addItem(itemCreateInfo);
oListItem.set_item('Title', 'My New Item!');
oListItem.set_item('Body', 'Hello World!');
oListItem.update();
clientContext.load(oListItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.CreateListItemOnSuccess), Function.createDelegate(this, this.onQueryFailed));
function CreateListItemOnSuccess() {
var subsiteTitle = oListItem.get_item('Title');
//Logic to create a subsite
function onQueryFailed(sender, args) {
I have added a sample flow for the above scenario. Have a look at the following lnk for how you can craete a subsite using ecmascript.
http://ravisoftltd.wordpress.com/2013/03/06/sharepoint-2010-create-site-with-ecma-script-with/
Geetanjali Arora | My blogs |
Maybe you are looking for
-
Billing document not passed on to accounting
Hi all, No sales tax is maintained in the sales order and the invoice is also created.User wants to send the Credit memo only for the tax.He put a manual tax condition type in the credit memo and enter the value for that.When the invocie is created f
-
I can't get a database connection.
Background: I've already built two sites with databases using DW CS6, PHPMySQL, and the same hosting company, so I know they allow remote connections. (I'm developing using the remote host because I've never found a tutorial for how to move it all fr
-
Percentage calculation and zero amount entries get dvision by zero error
Hello, i am calculating the total of a field and then reporting the contributions of that line entry in percentage form but when a line has a zero amount i get an error of 'division by zero'. I'll give some explamples below incase i'm not explaining
-
I have trouble while update iphoto, i can install new version of i photo
i have trouble while update iphoto, i can install new version of i photo
-
Browser pages open way off in the distance,"small print".How do i fix this?
Every Web Page I go to opens up very small. For every page I have to zoom the page many times just to read it. Is there anyway to set the page zoom to stay on that setting for every page?