Web Dynpro - How to set and get info from Component Controller
Hi Gurus!!!
Im having some problems getting and setting info in component controller of my Web Dynpro.
I can't see the difference between View Context and Global Context.
How can i create a Global Context Between two views?
Thanks!
Regards.
Polakinho.-
hii
difference between view context and global context is we can use the same component controller for all the views in the same application.but when when we create node in view context then it will be available for that view only not for any other view...so if we want to use the same node for all the views we need to create that view in the component controller.so it will become global for that application.
for using global node you need to map that context in view controller.for that you need to go to that view then click on context tab and drag and drop node from component controller.so it will be available for that view.i hope it helps you.
regards
twinkal
Similar Messages
-
Web Dynpro: How to set the header of Tabs in a Tabstrip?
Hi all,
I created a tabstrip with 3 tabs. Now I am trying to give proper heading to each of the Tabs but unable to do so because I do not find any property to the Tab(s) for which, I can assign the heading. Only the following 4 Properties are available for a Tab:
ID
enabled
hasContentPadding
visible
I am able to launch the application but it does not show me any text, although the tabs are clickable. Can anyone please tell me how to make headings (or titles/text) appear individually for each of the tags? If there's any code to do it, please tell me what it is.
Thank you.
P.S: Will award points to the most fruitful solution.hi,
u need to open the screen with graphical screen painter layout tool,
double click on tha tab that u want to give text to it.
enter the name of the text/heading in text field
activate the screen.
hope it helps
thanks
Sachin -
How to post and get data from server using Get Webrequest
Hi:-)
I'm trying to send a username and password argument my server and the server is suppose to send some string back. The following code, that I got of the web, just dies. I think this line:
HttpWebRequestpreq = result.AsyncState
asHttpWebRequest;
is null. Can you kindly fix this for me? Thank you in advance:-)
notes: I have a few textboxes with the values for the request params
I'm targeting Windows Phone 8.0 and Windows Phone 8.1 devices
privatevoidBtnSignUpSubmit_Tab(objectsender,
RoutedEventArgse)
//show error if Username == Username
if(TbUN.Text.ToString() ==
"Username")
MessageBox.Show("You
must fill in your Username in the Username textbox.\nThank you.");
return;
//make sure all fields are filled in
if(TbUN.Text.ToString() ==
""|| TbPW.Text.ToString()
== ""|| TbCPW.Text.ToString()
== "")
MessageBox.Show("All
fields must be filled in.\nThank you.");
return;
//make sure Password is the same as Confirm Password
if(TbPW.Text.CompareTo(TbCPW.Text) !=
0)
MessageBox.Show("Your
Password should be the same as Confirm Password.\nThank you.");
return;
//make sure Username contains valid characters
boolbValid = IsUsernameValid(TbUN.Text);
if(bValid)
bSignUp =
true;
//disable textboxes
TbUN.IsEnabled =
false;
TbPW.IsEnabled =
false;
TbCPW.IsEnabled =
false;
TbEmail.IsEnabled =
false;
BtnSignUpSubmit.IsEnabled =
false;
title.Text =
"requesting...";
//make Post request top-server
//add parameters
stringdata =
"username="+TbUN.Text+"&Password="+TbPW.Text;
if(TbEmail.Text.Contains("@")
&& TbEmail.Text.Contains("."))
data +=
"&email="+ TbEmail.Text;
System.
UriURL =
newUri("http://www.iclips.co.za/RegisterUsernameAndPassword.php");
WebRequestwebRequest =
WebRequest.Create(URL);
webRequest.Method =
"POST";
webRequest.ContentType =
"application/x-www-form-urlencoded";
webRequest.ContentLength = data.Length;
//we first obtain an input stream to which to write the body of the HTTP POST
webRequest.BeginGetRequestStream((
IAsyncResultresult) =>
HttpWebRequestpreq = result.AsyncState
asHttpWebRequest;
if(preq !=
null)
StreampostStream = preq.EndGetRequestStream(result);
//guess one could just accept a byte[] [via function argument] for arbitrary data types - images, audio,...
byte[] dataStream =
Encoding.UTF8.GetBytes(data);
postStream.Write(dataStream, 0, dataStream.Length);
postStream.Close();
//we can then finalize the request...
preq.BeginGetResponse((
IAsyncResultfinal_result) =>
HttpWebRequestreq = final_result.AsyncState
asHttpWebRequest;
if(req !=
null)
try
//we call the success callback as long as we get a response stream
WebResponseresponse = req.EndGetResponse(final_result);
success_callback(response.GetResponseStream());
catch(WebExceptionwe)
//otherwise call the error/failure callback
error_callback(we.Message);
return;
}, preq);
}, URL);
privatevoiderror_callback(stringp)
if(bSignUp)
bSignUp =
false;
// Show error message
MessageBox.Show("Connection
Error!\n\n"+ p);
//enable input
//disable textboxes
TbUN.IsEnabled =
true;
TbPW.IsEnabled =
true;
TbCPW.IsEnabled =
true;
TbEmail.IsEnabled =
true;
BtnSignUpSubmit.IsEnabled =
false;
title.Text =
"try again";
privatevoidsuccess_callback(Streamstream)
if(bSignUp)
bSignUp =
false;
// Open the stream using a StreamReader for easy access.
StreamReaderreader =
newStreamReader(stream);
// Read the content.
stringresponse = reader.ReadToEnd();
// Display the content.
MessageBox.Show(response);
// Clean up the streams.
reader.Close();// Directives
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using iClips.Resources;
using System.ComponentModel;
using System.Threading;
using System.IO;
using System.IO.IsolatedStorage;
using Microsoft.Devices;
using System.Windows.Media;
using Microsoft.Xna.Framework.Media;
using System.Windows.Media.Imaging;
using System.Threading.Tasks;
using System.Text;
using Windows.Storage;
using System.Windows.Threading;
using System.Diagnostics;
using System.Globalization;
namespace iClips
public partial class MainPage : PhoneApplicationPage
Boolean bSignUp;
HyperlinkButton BtnSignIn, BtnSignUp, BtnSignUpSubmit;
TextBox TbUN, TbPW, TbCPW, TbEmail;
TextBlock un, title;
System.DateTime startTime;
// Viewfinder for capturing video.
private VideoBrush videoRecorderBrush;
// Source and device for capturing video.
private CaptureSource captureSource;
private CaptureDevice vcDevice;
double w, h;
// File details for storing the recording.
private IsolatedStorageFileStream isoVideoFile;
private FileSink fileSink;
private string isoVideoFileName = "CameraMovie.mp4";
// For managing button and application state.
private enum ButtonState { Initialized, Stopped, Ready, Recording, Playback, Paused, NoChange, CameraNotSupported };
private ButtonState currentAppState;
//create reference to SocketClient
SocketClient sock = new SocketClient();
// Constructor
public MainPage()
InitializeComponent();
//setup recording
// Prepare ApplicationBar and buttons.
PhoneAppBar = (ApplicationBar)ApplicationBar;
PhoneAppBar.IsVisible = true;
StartRecording = ((ApplicationBarIconButton)ApplicationBar.Buttons[0]);
StopPlaybackRecording = ((ApplicationBarIconButton)ApplicationBar.Buttons[1]);
StartPlayback = ((ApplicationBarIconButton)ApplicationBar.Buttons[2]);
PausePlayback = ((ApplicationBarIconButton)ApplicationBar.Buttons[3]);
//display a welcome message
txtDebug.Text = "Welcome to iClips.";
string result = sock.Connect("197.189.214.116", 5000);
txtOutput.Text = result;
if(result.Contains("success")){
sock.Send("#testing_");
SetScreenResolution();
//set image on load friends
/*Uri uri = new Uri("/Assets/home_icons/myFriends.png", UriKind.Relative);
BitmapImage imgSource = new BitmapImage(uri);
Image image = new Image();
image.Source = imgSource;
load_friends.Content = image;*/
SignIn();
private void SignIn()
// remove all elements inside sign grid
for (int index = MyGrid.Children.Count - 1; index >= 0; index--)
MyGrid.Children.RemoveAt(index);
BtnSignIn = new HyperlinkButton();
BtnSignIn.Content = "<< Sign In >>";
BtnSignIn.Click += new RoutedEventHandler(SignIn_Tab);
BtnSignIn.VerticalAlignment = VerticalAlignment.Bottom;
BtnSignUp = new HyperlinkButton();
BtnSignUp.Content = "<< I'm new here. Sign Up. >>";
BtnSignUp.Click += new RoutedEventHandler(SignUp_Tab);
BtnSignUp.VerticalAlignment = VerticalAlignment.Bottom;
un = new TextBlock();
un.Text = "Enter your Username:";
un.VerticalAlignment = VerticalAlignment.Bottom;
un.HorizontalAlignment = HorizontalAlignment.Center;
TextBlock pw = new TextBlock();
pw.Text = "Enter your Password:";
pw.VerticalAlignment = VerticalAlignment.Bottom;
pw.HorizontalAlignment = HorizontalAlignment.Center;
//setup username textbox
TbUN = new TextBox();
TbUN.Opacity = 0.5;
TbUN.Text = "";
TbUN.FontSize = 16;
TbUN.FontWeight = FontWeights.ExtraBold;
TbUN.Foreground = new SolidColorBrush(Colors.Black);
TbUN.Background = new SolidColorBrush(Colors.Transparent);
TbUN.VerticalAlignment = VerticalAlignment.Top;
TbUN.Height = 70;
TbUN.Tap += TbUN_Tap;
//setup password textbox
TbPW = new TextBox();
TbPW.Opacity = 0.5;
TbPW.Text = "";
TbPW.FontSize = 16;
TbPW.FontWeight = FontWeights.ExtraBold;
TbPW.Foreground = new SolidColorBrush(Colors.Black);
TbPW.Background = new SolidColorBrush(Colors.Transparent);
TbPW.VerticalAlignment = VerticalAlignment.Top;
TbPW.Height = 70;
TbPW.Tap += TbPW_Tap;
//Show the background color of MyGrid
MyGrid.Background = new SolidColorBrush(Colors.Blue);
// Create Row for Username Textblock
RowDefinition gridRow0 = new RowDefinition();
gridRow0.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow0);
// Create Row for Username
RowDefinition gridRow1 = new RowDefinition();
gridRow1.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow1);
//create row for password Textblock
RowDefinition gridRow2a = new RowDefinition();
gridRow2a.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow2a);
//create row for password
RowDefinition gridRow2 = new RowDefinition();
gridRow2.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow2);
//create row for << Sign In >>
RowDefinition gridRow3 = new RowDefinition();
gridRow3.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow3);
//create row for << Sign Up >>
RowDefinition gridRow4 = new RowDefinition();
gridRow4.Height = new GridLength(120);
MyGrid.RowDefinitions.Add(gridRow4);
Grid.SetRow(un, 0);
Grid.SetColumn(un, 0);
Grid.SetRow(TbUN, 1);
Grid.SetColumn(TbUN, 0);
Grid.SetRow(pw, 2);
Grid.SetColumn(pw, 0);
Grid.SetRow(TbPW, 3);
Grid.SetColumn(TbPW, 0);
Grid.SetRow(BtnSignIn, 4);
Grid.SetColumn(BtnSignIn, 0);
Grid.SetRow(BtnSignUp, 5);
Grid.SetColumn(BtnSignUp, 0);
MyGrid.Children.Add(un);
MyGrid.Children.Add(TbUN);
MyGrid.Children.Add(pw);
MyGrid.Children.Add(TbPW);
MyGrid.Children.Add(BtnSignIn);
MyGrid.Children.Add(BtnSignUp);
private void SignUp_Tab(object sender, RoutedEventArgs e)
MessageBox.Show("Welcome to Sign up.\n\nYou need 3 things to create an account:\n1. A unique Case-Sensitive Username. ex 'iClips' is not the same as 'Iclips'\n2. A password to secure you account. \n3. A profile photo for easy recognition.\nThank you.");
// remove all elements inside sign grid
for (int index = MyGrid.Children.Count - 1; index >= 0; index--)
MyGrid.Children.RemoveAt(index);
//repopulate grid with Sign Up elements
//create title
title = new TextBlock();
title.Text = "--- Sign Up 1/2 ---";
title.VerticalAlignment = VerticalAlignment.Top;
title.HorizontalAlignment = HorizontalAlignment.Center;
//field for Username
TbUN = new TextBox();
TbUN.Opacity = 0.5;
TbUN.Text = "Username";
TbUN.FontSize = 16;
TbUN.FontWeight = FontWeights.ExtraBold;
TbUN.Foreground = new SolidColorBrush(Colors.Black);
TbUN.Background = new SolidColorBrush(Colors.Transparent);
TbUN.VerticalAlignment = VerticalAlignment.Top;
TbUN.Height = 70;
TbUN.Tap += TbUN_Tap;
//field for Password
TbPW = new TextBox();
TbPW.Opacity = 0.5;
TbPW.Text = "Password";
TbPW.FontSize = 16;
TbPW.FontWeight = FontWeights.ExtraBold;
TbPW.Foreground = new SolidColorBrush(Colors.Black);
TbPW.Background = new SolidColorBrush(Colors.Transparent);
TbPW.VerticalAlignment = VerticalAlignment.Top;
TbPW.Height = 70;
TbPW.Tap += TbPW_Tap;
//field Confirm for Password
TbCPW = new TextBox();
TbCPW.Opacity = 0.5;
TbCPW.Text = "Confirm Password";
TbCPW.FontSize = 16;
TbCPW.FontWeight = FontWeights.ExtraBold;
TbCPW.Foreground = new SolidColorBrush(Colors.Black);
TbCPW.Background = new SolidColorBrush(Colors.Transparent);
TbCPW.VerticalAlignment = VerticalAlignment.Top;
TbCPW.Height = 70;
TbCPW.Tap += TbCPW_Tap;
//field for Optional Email
TbEmail = new TextBox();
TbEmail.Opacity = 0.5;
TbEmail.Text = "Email (Optional)";
TbEmail.FontSize = 16;
TbEmail.FontWeight = FontWeights.ExtraBold;
TbEmail.Foreground = new SolidColorBrush(Colors.Black);
TbEmail.Background = new SolidColorBrush(Colors.Transparent);
TbEmail.VerticalAlignment = VerticalAlignment.Top;
TbEmail.Height = 70;
TbEmail.Tap += TbEmail_Tap;
HyperlinkButton BtnGoBack = new HyperlinkButton();
BtnGoBack.Content = "<< Go Back ";
BtnGoBack.Click += new RoutedEventHandler(BtnGoBack_Tab);
BtnGoBack.VerticalAlignment = VerticalAlignment.Bottom;
BtnSignUpSubmit = new HyperlinkButton();
BtnSignUpSubmit.Content = "<< Sign Up >>";
BtnSignUpSubmit.Click += new RoutedEventHandler(BtnSignUpSubmit_Tab);
BtnSignUpSubmit.VerticalAlignment = VerticalAlignment.Bottom;
// Create Row for title
RowDefinition gridRow0 = new RowDefinition();
gridRow0.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow0);
// Create Row for Username
RowDefinition gridRow1 = new RowDefinition();
gridRow1.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow1);
//create row for password Textblock
RowDefinition gridRow2a = new RowDefinition();
gridRow2a.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow2a);
//create row for Confirm password
RowDefinition gridRow2 = new RowDefinition();
gridRow2.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow2);
//create row for email
RowDefinition gridRow3 = new RowDefinition();
gridRow3.Height = new GridLength(60);
MyGrid.RowDefinitions.Add(gridRow3);
//create row for << Sign Up >>
RowDefinition gridRow4 = new RowDefinition();
gridRow4.Height = new GridLength(120);
MyGrid.RowDefinitions.Add(gridRow4);
//create row for << Go Back >>
RowDefinition gridRow5 = new RowDefinition();
gridRow5.Height = new GridLength(120);
MyGrid.RowDefinitions.Add(gridRow5);
Grid.SetRow(title, 0);
Grid.SetColumn(title, 0);
Grid.SetRow(TbUN, 1);
Grid.SetColumn(TbUN, 0);
Grid.SetRow(TbPW, 2);
Grid.SetColumn(TbPW, 0);
Grid.SetRow(TbCPW, 3);
Grid.SetColumn(TbCPW, 0);
Grid.SetRow(TbEmail, 4);
Grid.SetColumn(TbEmail, 0);
Grid.SetRow(BtnSignUpSubmit, 5);
Grid.SetColumn(BtnSignUpSubmit, 0);
Grid.SetRow(BtnGoBack, 6);
Grid.SetColumn(BtnGoBack, 0);
MyGrid.Children.Add(title);
MyGrid.Children.Add(TbUN);
MyGrid.Children.Add(TbPW);
MyGrid.Children.Add(TbCPW);
MyGrid.Children.Add(TbEmail);
MyGrid.Children.Add(BtnSignUpSubmit);
MyGrid.Children.Add(BtnGoBack);
BtnSignUp.Content = "<< Sign Up >>";
private bool IsUsernameValid(string str)
int d;
if (str.Length > 30)
MessageBox.Show("You may only use a maximum of 30 characters for your Username.\nThank you.");
return false;
for (d = 0; d < str.Length; d++)
if (str.Contains("~") || str.Contains("!") || str.Contains("@") || str.Contains("$")
|| str.Contains("#") || str.Contains("%") || str.Contains("|") || str.Contains("_"))
MessageBox.Show("Your Username may not contain any of the follwing characters: \n~ ! @ # $ % | _\nThank you.");
return false;
return true;
private void BtnSignUpSubmit_Tab(object sender, RoutedEventArgs e)
//show error if Username == Username
if (TbUN.Text.ToString() == "Username")
MessageBox.Show("You must fill in your Username in the Username textbox.\nThank you.");
return;
//make sure all fields are filled in
if (TbUN.Text.ToString() == "" || TbPW.Text.ToString() == "" || TbCPW.Text.ToString() == "")
MessageBox.Show("All fields must be filled in.\nThank you.");
return;
//make sure Password is the same as Confirm Password
if (TbPW.Text.CompareTo(TbCPW.Text) != 0)
MessageBox.Show("Your Password should be the same as Confirm Password.\nThank you.");
return;
//make sure Username contains valid characters
bool bValid = IsUsernameValid(TbUN.Text);
if (bValid)
bSignUp = true;
//disable textboxes
TbUN.IsEnabled = false;
TbPW.IsEnabled = false;
TbCPW.IsEnabled = false;
TbEmail.IsEnabled = false;
BtnSignUpSubmit.IsEnabled = false;
title.Text = "requesting...";
//make Post request top-server
//add parameters
string data = "username="+TbUN.Text+"&Password="+TbPW.Text;
if(TbEmail.Text.Contains("@") && TbEmail.Text.Contains("."))
data += "&email=" + TbEmail.Text;
System.Uri URL = new Uri("http://www.iclips.co.za/RegisterUsernameAndPassword.php");
WebRequest webRequest = WebRequest.Create(URL);
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.ContentLength = data.Length;
//we first obtain an input stream to which to write the body of the HTTP POST
webRequest.BeginGetRequestStream((IAsyncResult result) =>
HttpWebRequest preq = result.AsyncState as HttpWebRequest;
if (preq != null)
Stream postStream = preq.EndGetRequestStream(result);
//guess one could just accept a byte[] [via function argument] for arbitrary data types - images, audio,...
byte[] dataStream = Encoding.UTF8.GetBytes(data);
postStream.Write(dataStream, 0, dataStream.Length);
postStream.Close();
//we can then finalize the request...
preq.BeginGetResponse((IAsyncResult final_result) =>
HttpWebRequest req = final_result.AsyncState as HttpWebRequest;
if (req != null)
try
//we call the success callback as long as we get a response stream
WebResponse response = req.EndGetResponse(final_result);
success_callback(response.GetResponseStream());
catch (WebException we)
//otherwise call the error/failure callback
error_callback(we.Message);
return;
}, preq);
}, URL);
private void error_callback(string p)
if (bSignUp)
bSignUp = false;
// Show error message
MessageBox.Show("Connection Error!\n\n" + p);
//enable input
//disable textboxes
TbUN.IsEnabled = true;
TbPW.IsEnabled = true;
TbCPW.IsEnabled = true;
TbEmail.IsEnabled = true;
BtnSignUpSubmit.IsEnabled = false;
title.Text = "try again";
private void success_callback(Stream stream)
if (bSignUp)
bSignUp = false;
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(stream);
// Read the content.
string response = reader.ReadToEnd();
// Display the content.
MessageBox.Show(response);
// Clean up the streams.
reader.Close();
private void BtnGoBack_Tab(object sender, RoutedEventArgs e)
SignIn();
private void TbEmail_Tap(object sender, System.Windows.Input.GestureEventArgs e)
TbEmail.SelectAll();
private void TbCPW_Tap(object sender, System.Windows.Input.GestureEventArgs e)
TbCPW.SelectAll();
private void SignIn_Tab(object sender, RoutedEventArgs e)
if (TbUN.Text.ToString() == "" || TbPW.Text.ToString() == "")
MessageBox.Show("Your Username or Password cannot be empty.\nThank you.");
return;
private void TbUN_Tap(object sender, System.Windows.Input.GestureEventArgs e)
TbUN.SelectAll();
un.Text = "Usernames are Case-Sensitive.\n'Iclips' is not the same as 'iClips'.";
private void TbPW_Tap(object sender, System.Windows.Input.GestureEventArgs e)
TbPW.SelectAll();
protected override void OnNavigatedTo(NavigationEventArgs e)
base.OnNavigatedTo(e);
// Initialize the video recorder.
InitializeVideoRecorder();
CameraButtons.ShutterKeyHalfPressed += OnButtonHalfPress;
// The event is fired when the shutter button receives a full press.
CameraButtons.ShutterKeyPressed += OnButtonFullPress;
// The event is fired when the shutter button is released.
CameraButtons.ShutterKeyReleased += OnButtonRelease;
protected override void OnNavigatedFrom(NavigationEventArgs e)
// Dispose of camera and media objects.
DisposeVideoPlayer();
DisposeVideoRecorder();
base.OnNavigatedFrom(e);
CameraButtons.ShutterKeyHalfPressed -= OnButtonHalfPress;
CameraButtons.ShutterKeyPressed -= OnButtonFullPress;
CameraButtons.ShutterKeyReleased -= OnButtonRelease;
// Ensure that the viewfinder is upright in LandscapeRight.
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
if (vcDevice != null)
if (e.Orientation == PageOrientation.LandscapeLeft)
txtDebug.Text = "LandscapeLeft";
videoRecorderBrush.RelativeTransform =
new CompositeTransform() { CenterX = 0.5, CenterY = 0.5, Rotation = 90 };
//rotate logo
if (logo != null)
RotateTransform rt = new RotateTransform();
rt.Angle = 90;
//default rotation is around top left corner of the control,
//but you sometimes want to rotate around the center of the control
//to do that, you need to set the RenderTransFormOrigin
//of the item you're going to rotate
//I did not test this approach, maybe You're going to need to use actual coordinates
//so this bit is for information purposes only
logo.RenderTransformOrigin = new Point(0.5, 0.5);
logo.RenderTransform = rt;
//rotate sign in link
if (MyGrid != null)
RotateTransform rt = new RotateTransform();
rt.Angle = 90;
//default rotation is around top left corner of the control,
//but you sometimes want to rotate around the center of the control
//to do that, you need to set the RenderTransFormOrigin
//of the item you're going to rotate
//I did not test this approach, maybe You're going to need to use actual coordinates
//so this bit is for information purposes only
MyGrid.RenderTransformOrigin = new Point(0.5, 0.5);
MyGrid.RenderTransform = rt;
if (e.Orientation == PageOrientation.PortraitUp)
txtDebug.Text = "PortraitUp";
videoRecorderBrush.RelativeTransform =
new CompositeTransform() { CenterX = 0.5, CenterY = 0.5, Rotation = 0 };
//rotate logo
if (logo != null)
RotateTransform rt = new RotateTransform();
rt.Angle = 0;
//default rotation is around top left corner of the control,
//but you sometimes want to rotate around the center of the control
//to do that, you need to set the RenderTransFormOrigin
//of the item you're going to rotate
//I did not test this approach, maybe You're going to need to use actual coordinates
//so this bit is for information purposes only
logo.RenderTransformOrigin = new Point(0.5, 0.5);
logo.RenderTransform = rt;
//rotate sign in link
if (MyGrid != null)
RotateTransform rt = new RotateTransform();
rt.Angle = 0;
//default rotation is around top left corner of the control,
//but you sometimes want to rotate around the center of the control
//to do that, you need to set the RenderTransFormOrigin
//of the item you're going to rotate
//I did not test this approach, maybe You're going to need to use actual coordinates
//so this bit is for information purposes only
MyGrid.RenderTransformOrigin = new Point(0.5, 0.5);
MyGrid.RenderTransform = rt;
if (e.Orientation == PageOrientation.LandscapeRight)
txtDebug.Text = "LandscapeRight";
// Rotate for LandscapeRight orientation.
//videoRecorderBrush.RelativeTransform =
//new CompositeTransform() { CenterX = 0.5, CenterY = 0.5, Rotation = 180 };
//rotate logo
if (logo != null)
RotateTransform rt = new RotateTransform();
rt.Angle = -90;
//default rotation is around top left corner of the control,
//but you sometimes want to rotate around the center of the control
//to do that, you need to set the RenderTransFormOrigin
//of the item you're going to rotate
//I did not test this approach, maybe You're going to need to use actual coordinates
//so this bit is for information purposes only
logo.RenderTransformOrigin = new Point(0.5, 0.5);
logo.RenderTransform = rt;
//rotate sign in link
if (MyGrid != null)
RotateTransform rt = new RotateTransform();
rt.Angle = -90;
//default rotation is around top left corner of the control,
//but you sometimes want to rotate around the center of the control
//to do that, you need to set the RenderTransFormOrigin
//of the item you're going to rotate
//I did not test this approach, maybe You're going to need to use actual coordinates
//so this bit is for information purposes only
MyGrid.RenderTransformOrigin = new Point(0.5, 0.5);
MyGrid.RenderTransform = rt;
if (e.Orientation == PageOrientation.PortraitDown)
txtDebug.Text = "PortraitDown";
videoRecorderBrush.RelativeTransform =
new CompositeTransform() { CenterX = 0.5, CenterY = 0.5, Rotation = 270 };
// Provide auto-focus with a half button press using the hardware shutter button.
private void OnButtonHalfPress(object sender, EventArgs e)
// Focus when a capture is not in progress.
try
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = "Half Button Press: Auto Focus";
catch (Exception focusError)
// Cannot focus when a capture is in progress.
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = focusError.Message;
// Capture the image with a full button press using the hardware shutter button.
private void OnButtonFullPress(object sender, EventArgs e)
// Focus when a capture is not in progress.
try
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = "Full Button Press: Auto Focus";
catch (Exception focusError)
// Cannot focus when a capture is in progress.
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = focusError.Message;
// Cancel the focus if the half button press is released using the hardware shutter button.
private void OnButtonRelease(object sender, EventArgs e)
try
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = "Shutter is released: Auto Focus";
catch (Exception focusError)
// Cannot focus when a capture is in progress.
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = focusError.Message;
// Update the buttons and text on the UI thread based on app state.
private void UpdateUI(ButtonState currentButtonState, string statusMessage)
// Run code on the UI thread.
Dispatcher.BeginInvoke(delegate
switch (currentButtonState)
// When the camera is not supported by the phone.
case ButtonState.CameraNotSupported:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = false;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = false;
break;
// First launch of the application, so no video is available.
case ButtonState.Initialized:
StartRecording.IsEnabled = true;
StopPlaybackRecording.IsEnabled = false;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = false;
break;
// Ready to record, so video is available for viewing.
case ButtonState.Ready:
StartRecording.IsEnabled = true;
StopPlaybackRecording.IsEnabled = false;
StartPlayback.IsEnabled = true;
PausePlayback.IsEnabled = false;
break;
// Video recording is in progress.
case ButtonState.Recording:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = true;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = false;
break;
// Video playback is in progress.
case ButtonState.Playback:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = true;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = true;
break;
// Video playback has been paused.
case ButtonState.Paused:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = true;
StartPlayback.IsEnabled = true;
PausePlayback.IsEnabled = false;
break;
default:
break;
// Display a message.
txtDebug.Text = statusMessage;
// Note the current application state.
currentAppState = currentButtonState;
public void InitializeVideoRecorder()
if (captureSource == null)
// Create the VideoRecorder objects.
captureSource = new CaptureSource();
fileSink = new FileSink();
vcDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();
// Add eventhandlers for captureSource.
captureSource.CaptureFailed += new EventHandler<ExceptionRoutedEventArgs>(OnCaptureFailed);
// Initialize the camera if it exists on the phone.
if (vcDevice != null)
// Create the VideoBrush for the viewfinder.
videoRecorderBrush = new VideoBrush();
videoRecorderBrush.SetSource(captureSource);
// Display the viewfinder image on the rectangle.
viewfinderRectangle.Fill = videoRecorderBrush;
// Start video capture and display it on the viewfinder.
captureSource.Start();
// Set the button state and the message.
UpdateUI(ButtonState.Initialized, "Tap record to start recording...");
else
// Disable buttons when the camera is not supported by the phone.
UpdateUI(ButtonState.CameraNotSupported, "A camera is not supported on this phone.");
// Set recording state: start recording.
private void StartVideoRecording()
try
// Connect fileSink to captureSource.
if (captureSource.VideoCaptureDevice != null
&& captureSource.State == CaptureState.Started)
captureSource.Stop();
// Connect the input and output of fileSink.
fileSink.CaptureSource = captureSource;
fileSink.IsolatedStorageFileName = isoVideoFileName;
// Begin recording.
if (captureSource.VideoCaptureDevice != null
&& captureSource.State == CaptureState.Stopped)
captureSource.Start();
// Set the button states and the message.
UpdateUI(ButtonState.Recording, "Recording...");
StartTimer();
// If recording fails, display an error.
catch (Exception e)
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = "ERROR: " + e.Message.ToString();
//start the timer
private void StartTimer()
dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
dispatcherTimer.Start();
startTime = System.DateTime.Now;
private void StopTimer()
dispatcherTimer.Stop();
private void dispatcherTimer_Tick(object sender, EventArgs e)
System.DateTime now = System.DateTime.Now;
txtRecTime.Text = now.Subtract(startTime).ToString();
// Set the recording state: stop recording.
private void StopVideoRecording()
try
// Stop recording.
if (captureSource.VideoCaptureDevice != null
&& captureSource.State == CaptureState.Started)
captureSource.Stop();
// Disconnect fileSink.
fileSink.CaptureSource = null;
fileSink.IsolatedStorageFileName = null;
// Set the button states and the message.
UpdateUI(ButtonState.Stopped, "Preparing viewfinder...");
StopTimer();
StartVideoPreview();
// If stop fails, display an error.
catch (Exception e)
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = "ERROR: " + e.Message.ToString();
// Set the recording state: display the video on the viewfinder.
private void StartVideoPreview()
try
// Display the video on the viewfinder.
if (captureSource.VideoCaptureDevice != null
&& captureSource.State == CaptureState.Stopped)
// Add captureSource to videoBrush.
videoRecorderBrush.SetSource(captureSource);
// Add videoBrush to the visual tree.
viewfinderRectangle.Fill = videoRecorderBrush;
captureSource.Start();
// Set the button states and the message.
UpdateUI(ButtonState.Ready, "Ready to record.");
// If preview fails, display an error.
catch (Exception e)
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = "ERROR: " + e.Message.ToString();
// Start the video recording.
private void StartRecording_Click(object sender, EventArgs e)
// Avoid duplicate taps.
StartRecording.IsEnabled = false;
StartVideoRecording();
// Handle stop requests.
private void StopPlaybackRecording_Click(object sender, EventArgs e)
// Avoid duplicate taps.
StopPlaybackRecording.IsEnabled = false;
// Stop during video recording.
if (currentAppState == ButtonState.Recording)
StopVideoRecording();
// Set the button state and the message.
UpdateUI(ButtonState.NoChange, "Recording stopped.");
// Stop during video playback.
else
// Remove playback objects.
DisposeVideoPlayer();
StartVideoPreview();
// Set the button state and the message.
UpdateUI(ButtonState.NoChange, "Playback stopped.");
// Start video playback.
private void StartPlayback_Click(object sender, EventArgs e)
// Avoid duplicate taps.
StartPlayback.IsEnabled = false;
// Start video playback when the file stream exists.
if (isoVideoFile != null)
VideoPlayer.Play();
// Start the video for the first time.
else
// Stop the capture source.
captureSource.Stop();
// Remove VideoBrush from the tree.
viewfinderRectangle.Fill = null;
// Create the file stream and attach it to the MediaElement.
isoVideoFile = new IsolatedStorageFileStream(isoVideoFileName,
FileMode.Open, FileAccess.Read,
IsolatedStorageFile.GetUserStoreForApplication());
VideoPlayer.SetSource(isoVideoFile);
// Add an event handler for the end of playback.
VideoPlayer.MediaEnded += new RoutedEventHandler(VideoPlayerMediaEnded);
// Start video playback.
VideoPlayer.Play();
// Set the button state and the message.
UpdateUI(ButtonState.Playback, "Playback started.");
// Pause video playback.
private void PausePlayback_Click(object sender, EventArgs e)
// Avoid duplicate taps.
PausePlayback.IsEnabled = false;
// If mediaElement exists, pause playback.
if (VideoPlayer != null)
VideoPlayer.Pause();
// Set the button state and the message.
UpdateUI(ButtonState.Paused, "Playback paused.");
private void DisposeVideoPlayer()
if (VideoPlayer != null)
// Stop the VideoPlayer MediaElement.
VideoPlayer.Stop();
// Remove playback objects.
VideoPlayer.Source = null;
isoVideoFile = null;
// Remove the event handler.
VideoPlayer.MediaEnded -= VideoPlayerMediaEnded;
private void DisposeVideoRecorder()
if (captureSource != null)
// Stop captureSource if it is running.
if (captureSource.VideoCaptureDevice != null
&& captureSource.State == CaptureState.Started)
captureSource.Stop();
// Remove the event handler for captureSource.
captureSource.CaptureFailed -= OnCaptureFailed;
// Remove the video recording objects.
captureSource = null;
vcDevice = null;
fileSink = null;
videoRecorderBrush = null;
// If recording fails, display an error message.
private void OnCaptureFailed(object sender, ExceptionRoutedEventArgs e)
this.Dispatcher.BeginInvoke(delegate()
txtDebug.Text = "ERROR: " + e.ErrorException.Message.ToString();
// Display the viewfinder when playback ends.
public void VideoPlayerMediaEnded(object sender, RoutedEventArgs e)
// Remove the playback objects.
DisposeVideoPlayer();
StartVideoPreview();
public void SetScreenResolution()
w = Application.Current.Host.Content.ActualWidth;
h = Application.Current.Host.Content.ActualHeight;
setResViewF(w, h);
public void setResViewF(double width, double height)
viewfinderRectangle.Width = width;
viewfinderRectangle.Height = height;
resMI.Content = "resolution: " + width + "*" + height;
private void resMI_Click(object sender, RoutedEventArgs e)
switch (resMI.Content.ToString())
case "resolution: 176*220":
setResViewF(240, 320);
break;
case "resolution: 240*320":
setResViewF(360, 480);
break;
case "resolution: 360*480":
setResViewF(480, 800);
break;
case "resolution: 480*800":
setResViewF(1440, 720);
break;
case "resolution: 1440*720":
setResViewF(1920, 1080);
break;
case "resolution: 1920*1080":
setResViewF(176, 220);
break;
default:
setResViewF(176, 220);
break;
public void WriteToFile(string key, string value)
var Iso_settings = System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings;
if (!Iso_settings.Contains(key))
Iso_settings.Add(key, value);
Iso_settings.Save();//This will save your data in isolated storage.
public string ReadFromFile(string key)
var Iso_settings = System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings;
if (Iso_settings.Contains(key))
return (string)Iso_settings[key];
else
return null;
public DispatcherTimer dispatcherTimer { get; set; }
private void ToggleZoom(MediaElement media)
if (media.Stretch != Stretch.UniformToFill)
// zoom
media.Stretch = Stretch.UniformToFill;
else
// unzoom
media.Stretch = Stretch.Uniform;
BtnSignUpSubmit_Tab is the HyperLinkButton that would trigger the web request process. I need this code to work perfectly because a lot of people will use this. If you can simplify the http web request that already feels so good. Thank you. -
Capture image and get info from flv file
Hi everyone
would apprichate help from any one who can tell me how and is
their any batch software for win\linux that can prepare xml file
with movie length and jpg\gif image capture of one of the frames
(if i can set to to frame 20 and not 1 as dafualt) out of flv file.
its for academic fms project and we have thousands of courses
which we recorded and got them on flv, and need the data for the
catalog.
so - if any one can pls assist, got something ready or just
tell me how to do it, we really will apprichate it.
10x very much !FLVMDI will create the XML file for you (it will have
additional nodes, but it will have the info you need). FFMPEG will
extract the images for you.
I'm not sure if either of those programs do batch
runs. -
Process Class:How to give and get data from an exe file continuously???
hi,,,
I am trying to run an executable file from my program to give it input and read its output....
And i am having problems...
The exe file takes one input and appends to it "1235" (ITS A TEST CASE).
When it is only for a single input , the program rums perfectly.. but when it is within a loop it does not
Pls help
Here is the code for that EXE file. (its in C)
#include<stdio.h>
int main()
char a[10];
int i;
int k=1235;
while(1){
scanf("%s",a);
if(a[0]=='s')
break;
printf("%s%d\n",a,k);
}Note that when i remove the loop here, my code is able to get and give it data.
My JAVA program::
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
try {
String line;
Process p = Runtime.getRuntime().exec
("C:\\users\\Untitled3.exe");
BufferedWriter out=new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
out.write("dfgsfs\n");
time= java.lang.System.nanoTime();
out.flush();
BufferedReader input =new BufferedReader(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null) {
System.out.println(input.readLine());
input.close();
catch (Exception err) {
err.printStackTrace();
}PLS HELPI see a problem in your C code. You're not flushing stdout after you printf and that usually means java is not seeing whats your C program is printing.
removing the loop probably works because stdout is being flushed right before exit.
I used a perl script to test your stuff and found that flushing made the trick
#!/usr/bin/perl
open(OUTFILE,">>./output.txt");
$| = 1;
while (<STDIN>) {
if (m/.*error.*/) {
print STDERR $_;
} else {
print STDOUT $_;
print OUTFILE $_;
if (m/exit/) {
last;
close(OUTFILE);
exit;notice "$| =1;" that autoflushes in perl (just in case you were wondering where my flush call went)
Enjoy! -
I have a new MacBook Air and don't know how to get info from my USB stick and get info from my SD card. Can anyone help, please?
Plug the stick and/or card into the appropriate slots on the side of your Air. Do you see icons for the devices appear on the desktop? Click into them to see what files are there.
Matt -
How do I get the iCloud to save and sync and upload info from both the devices on my account. Right now I can only do one
You must put each device on the Verizon cloud.
Not both lines on one.
Go and set up a my Verizon account for the second line and you will have Verizon cloud service on that line.
Oh the term "icloud" is a trademark of Apple Inc. Verizon is not Apple.
Good Luck -
How can i set action on UITaBar and get event from that
Hi All,
I m doing one apps in which i have to add three UITabBarItem and this is UITabBarSystemItem.
Now i cannot understand that how can i set action and get event from the?
And how can i set various views on three tab bar item.
I have to use UITabBar means i have to use UINavigationController+UITabBar
My code id
tabBar =[[UITabBar alloc] initWithFrame:CGRectMake(0,370,320,50)];
tabBar.backgroundColor =[UIColor blackColor];
UITabBarItem *search =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemSearch tag:0];
UITabBarItem *recents =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemRecents tag:1];
UITabBarItem *favorites =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorit es tag:2];
tabBar.items =[[NSArray arrayWithObjects:search,recents,favorites, nil] retain];
tabBar.selectedItem = search;
[myView addSubview:tabBar];
[tabBar release];
I add a action:
UITabBarItem *search =[[UITabBarItem alloc] InitWithTabBarSystemItem:UITabBarSystemItemSearch tag:0 action:@selector(select:)];
So it error: Warning -no'InitWithTabBarSystemItem:tag:action:' method fount
So any can help me regarding it?Thanks RickMaddy very much.
I read and do with sample at the View Controller Programming Guide . But when run it only view TabBar with title but haven't got any TabBarItem on it. I searched a few example about TabBar and i did, but i want do a form with a button then press on button it view a form with 2 TabBarItem on TabBar and press each TabBarItem will show correlative form page 1, page 2.
UITabBarController *tabBarControl = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
tabBarControl.title = @"Tab bar";
ViewControl1 *view1 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl1" bundle:nil] autorelease];
ViewControl1 *view2 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl2" bundle:nil] autorelease];
tabBarControl.viewControllers = [NSArray arrayWithObjects:view1,view2,nil];
[self.navigationController pushViewController:tabBarControl animated:YES]; -
Who can tell me how to use ni-imaq functions imgSessionSerialFlash,imgSessionSerialWrite and imgSessionSerialRead to set and get my carema attribute?
My camera is duncantech ms3100 and the frame grabber is pci-1428.I use ni-imaq2.6.When I use these functions,it tell me error -1074397163(IMG_ERR_BINT:Bad interface) .I have the same problem on my IPAD 2. One calender that i cant delete or find any settings for... Its just in the calender app under diffrent calenders. how do i delete it?
-
I am having finder issues. Mostly on the main hard drive. It takes ages to find things and I get the spinning wheel every time I open a folder.
So I moved all of my files to a external drive. When I had finished transfering I hit get info on the files on the external drive and on the same folder on the main drive. To ensure that it has copied over all the files. Because it was acting up and not copying all the files.
Get Info refuses to show the number of files within the folders on the main hard drive. It hasppily tells me everything on any of the external drives.
I have reset, the imac. I have re indexed 3 times. I have deleted the finder plist files. I have reset finder using terminal commands. I have moved nearly everything off the main hard drive. But nothing is working.
Can anyone offer any suggestions as to what could be causing my finder and get info issues.
Any help wpuld be appreciated.
Running Mountain Lion on a late 2009 ImacSome of your user files (not system files) have incorrect permissions or are locked. This procedure will unlock those files and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
Back up all data.
Step 1
If you have more than one user, and the one in question is not an administrator, then go to Step 2.
Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):
sudo find ~ $TMPDIR.. -exec chflags nouchg,nouappnd,noschg,nosappnd {} + -exec chown $UID {} + -exec chmod +rw {} + -exec chmod -N {} + -type d -exec chmod +x {} + 2>&-
This time you'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
Step 2 (optional)
Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
Start up in Recovery mode. When the OS X Utilities screen appears, select
Utilities ▹ Terminal
from the menu bar. A Terminal window will open. In that window, type this:
res
Press the tab key. The partial command you typed will automatically be completed to this:
resetpassword
Press return. A Reset Password window will open. You’re not going to reset a password.
Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
Select your username from the menu labeled Select the user account if not already selected.
Under Reset Home Directory Permissions and ACLs, click the Reset button
Select
▹ Restart
from the menu bar. -
Web Dynpro ABAP - Select Option and ALV Component Usage
Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
Note
The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I went in debug and the piece of code dumping is:
lt_range_table =
wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
Is there someone who can help me?
Thanks in advance,
Stefano.Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get
an error as
Note
The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
data: itab type standard table of zmy_table,
wa type zmy_table.
data:
node_employee type ref to if_wd_context_node,
elem_employee type ref to if_wd_context_element,
stru_employee type wd_this->element_employee ,
item_userid like stru_employee-userid.
navigate from <CONTEXT> to <EMPLOYEE> via lead selection
node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
@TODO handle not set lead selection
if ( node_employee is initial ).
endif.
get element via lead selection
elem_employee = node_employee->get_element( ).
@TODO handle not set lead selection
if ( elem_employee is initial ).
endif.
alternative access via index
Elem_Employee = Node_Employee->get_Element( Index = 1 ).
@TODO handle non existant child
if ( Elem_Employee is initial ).
endif.
get single attribute
elem_employee->get_attribute(
exporting
name = `USERID`
importing
value = item_userid ).
select *
from zmy_table
into table itab
where userid = item_userid.
node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
node_employee->bind_elements( itab ).
Is there someone who can help me and can tell am i doing wrong?
Thanks in advance,
Dheeraj -
i no longer have a credit card and it wont let me update my apps how do i erase credit info from iphone
Hello there, NayNay32.
The following Knowledge Base article offers up some great infomation in regards to changing your payment information in iTunes:
iTunes Store: Changing your payment information
http://support.apple.com/kb/ht1918
There is also a link to see what to do if you do not have the None option or cant select it:
Why can’t I select None when I edit my payment information?
http://support.apple.com/kb/TS5366
If your issue still persists, then:
Get help
If you need help changing your payment information, contact iTunes Store support.
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
Set and get values with vector
I have a class that that querys a db and sets a value of the result to a vector array. Is it possible to set and retrieve that vector array using the set and get methods?
ex:
my class:
sql = "Select ...";
Vector fName = new Vector();
rs = sqlStatement.executeQuery(sql);
if (rs != null) {
while (rs.next()) {
fName.add(rs.getString("fName") + "");
rs.close();
setFName(fName);
how would I set up the set and get methods???
thanksI am unsure of what you are asking:
A Vector has set and get methods for it, you use indexes of the array to say what element you want to work with.
If you are asking how do you know what elements of the Vector contain which data columns, you have to remember how you put them in.
If you are asking if you can use set to load the Vector: then NO, you have to have elemenets already there to change, use the add method.
If you are asking how to access the elements of the Vector you use an Enumeration:
for(java.util.Enumeration e = v.elements(); e.hasMoreElements();){
s = (java.lang.String) e.nextElement();
vl.add(s.substring(0, 12));
If you are asking something else: please elaborate what you want--my brain may not be very functional this morning. -
Abstract class with set and get methods
hi
how to write set and get methods(plain methods) in an abstartc class
ex: setUsername(String)
String getUsername()
and one class is extending this abstract class and same methods existing in that sub class also..... how to write......plz provide some ideas
am new to programming....
asap
thnx in advanceyes... as i told u.... i am new to coding......
and my problem is ..... i have 2 classes one is abstract class without abstract methods.. and another class is extending abstract class.....
in abstract class i have 2 methods...one is setusername(string) and getusername() ..... how to write these two methods.... in abstract class i have private variables username...... when user logins ..... i need to catch the user name and i need to validate with my oracle database and i need to identify the role of that user and based on role of that user i need to direct him to appropriate jsp page.......
for that now i am writing business process classes..... the above mentioned two classes are from business process.....
could u help me now
thnx in advance -
How do I create a new account and get stuff from the old account to the new account
How do I create a new account and get stuff from the old account to the new account
There are instructions on this page for creating a new account : Set up an Apple ID in iTunes
Or if you don't want to give credit card details : Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method
But you won't be able to transfer purchases from your old account to it, all content that you download from the store will remain tied to the account that downloaded it.
Maybe you are looking for
-
When dealing with a number of draft emails Mail has a bug which affects the subject line by not saving whatever is typed in the subject field. This becomes apparent when opening up the draft email for editing. When in the view pane, the subject field
-
Expert - Generating SCD Type2 Mapping for a Table Operator - To Share
Hi All, I have created an Expert which generates a SCD Type2 Mapping for a Table Operator being used as Dimension. Let me know how I can share this expert. This forum has helped answer many questions and I would like to contribute. Thanks, Sam.
-
Checking for errors before saving in CRMD_ORDER
Hi, I have a requirement where I need to check if any errors exist before being able to save a document in t-code CRMD_ORDER. If any error exists, then user should not be able to save the document. Currently, if even if errors exist, the user is able
-
HT4228 Je veut un mise à jour du logiciel ios7 pour installer a mon iPhone 4S
Halo i nées to send me logiciel ios7.1.4 from my phone 4s
-
Upgrade 12.1.1 to 12.1.3 Problem
Hi I have done many times upgrade from EBS 12.1.1 to EBS 12.1.3 in Oracle Linux 64b but it's my first time in HPUX Itanium 64b. please give me an answer for my qustions: *1) i'm now in EBS 12.1.1 and database 11.1.0.7* according to document 761570.1