Titanium Pass Textfield Value to New Window
Date : March 29 2020, 07:55 AM
may help you . I am attempting to take the value of a textfield and pass it to a new window (Javascript file) using Ti.App.fireEvent ( http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App-method-fireEvent) so that I can eventually insert it into a database when a button is pressed... So far I have a variable that stores the value of the textfield called usernameValue. This will then be sent to an http parameter value. There has to be something simple that I'm missing. Let me know if more information is needed to make this question more clear. , when sending data Ti.App.fireEvent('app:populateUsername', { "username" : usernameValue });
Ti.App.addEventListener('app:populateUsername', function(_data)
{
// all the data passed
Ti.API.info(JSON.stringify(_data));
// the value is here
Ti.API.info("the name passed as a parameter " + _data.username));
});
|
how to pass data from one window to another in titanium (classic)?
Date : March 29 2020, 07:55 AM
should help you out Please just check below Code and use in your code. you can perform your work like this. tableview.addEventListener('click',function(e){
//alert("RS Name : " +e.row.title);
var winn = Ti.UI.createWindow({
url:'hotelpage.js',
row_title : e.row.title,
all_info: e.row,
});
winn.open();
//var hostelwin = require('hotelpage').gethotelWin;
//var newwin = new hotelwin();
//newwin.open();
});
var curtWind = Ti.UI.currentWindow;
// Get Data like this
var title = curtWind.row_title;
var allData = curtWind.all_info;
// and you can use as per your requirement.
|
Can't pass Android custom meta-data in Titanium app
Date : March 29 2020, 07:55 AM
I hope this helps . To my understanding on Android meta-data is not supposed to be outside application tag. It can be inside activity,activity-alias,service,receiver,provider or application tag. According to the placement its accessibility is defined. If it is outside application tag it has no use. Please correct me if I am wrong.
|
How to Pass the data from Main Window to Child Window to display large data in table using AngulaJS
Tag : html , By : alchemist
Date : March 29 2020, 07:55 AM
hope this fix your issue You can do the same thing with below steps: Note: New window won't work in the plunker. So you have to try this in realtime in your local. <tr class="features" ng-repeat="list in opMessageLogs">
<td>{{list._id.$id}}</td>
<td>{{list.OPERATION}}</td>
<td>{{list.STATUS}}</td>
<td ng-click="showText(list.DATA, $index)">{{shortText(list.DATA)}}</td>
</tr>
var app = angular.module('studentApp', []);
app.controller('StudentCntrl', function($scope,$http, $window) {
$http.get('data.json').then(function (response){
console.log(response.data.pages);
$scope.opMessageLogs = response.data
});
$scope.shortText = function(data) {
if(data && data.length > 20) {
return data.substring(0, 20) + '..';
}
return data;
};
$scope.showText = function(data, index) {
var $popup = $window.open("Popup.html", "popup" + index, "width=250,height=100,left=10,top=150");
$popup.data = data;
};
});
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<script type="text/javascript">
var app = angular.module('MyChildApp', [])
app.controller('MyChildController', function ($scope, $window) {
$scope.data = $window.data;
});
</script>
<div ng-app="MyChildApp" ng-controller="MyChildController">
Data: <span ng-bind="data"></span>
</div>
</body>
</html>
|
Appcelerator issue: currentWindow : Titanium.UI.Window - REMOVED from Titanium since SDK 6.0.0
Date : March 29 2020, 07:55 AM
I wish this help you You can use the commonjs structure. If you need to pass a window from one file to the other, provide it using setters. // main.js
var details = require('details');
details.setWindow(myWindowVar);
// details.js
var window;
exports.setWindow = function(win){
window = win;
}
// details.js
exports.window = window;
// main.js
detailWindow = require('details').window;
//details.js
function createWindow(){
var win = Ti.UI.createWindow();
return win;
}
|