Comments (7)
I would do the same thing we do just below that for the transect:
example:
var modal = Alloy.createController("modal", {siteID:e.rowData.siteID}).getView();
- pass the site id, then call the database for your desired information.
"transects.js" does almost the exact same thing.
from capstone.
I can get the value over to modal.js with:
var args = arguments[0];
function editBtnClick(){alert(args.siteID);}
but is there any way to call args.siteID from modal.xml? I'm just using siteID as example, would probably want to display parkName.
from capstone.
I don't think so because parkName is only visible in the loop inside the index.js.
This would work in modal.js:
//retrieve siteID
var args = arguments[0];
var siteID = args.siteID;
//Open Database
var db = Ti.Database.open('ltemaDB');
//Query - Retrieve existing sites from database
var row = db.execute('SELECT park_name ' +
'FROM park p, site_survey s ' +
'WHERE p.park_id = s.park_id ' +
'AND s.site_id = ?', siteID);
var parkName = row.fieldByName('park_name');
db.close();
from capstone.
Or...
The only other thing you could do is pass parkName to the row when it is created in index.js? Don't know whats a better way?
from capstone.
Figured it out.
Instead of creating a label tag in the .xml and trying to assign it a dynamic property,
create the the label in the .js like so:
var args = arguments[0];
var label = Ti.UI.createLabel({ text: args.parkName});
$.modalWin.add(label);
from capstone.
I know this is closed but, I think I may have misinterpreted the question.
But you can use (in the .js file):
$.ID_of_label.text = "something";
from capstone.
That's perfect, thanks Blair.
from capstone.
Related Issues (20)
- Landscape orientation keyboard covers the comments field of addTransect HOT 1
- Cannot delete a re-listed plot observation. HOT 5
- Add Plot - allows duplicate plot naming/numbering HOT 10
- Feedback on photo preview modal HOT 3
- Disable or Hide info icon when in edit mode HOT 4
- Clicking the view behind a formview modal should dismiss it HOT 2
- Add plot observation: Search field doesn't distinguish species with multiple varieties in the english name section.
- Viewing an empty transect in plots.js causes a non-fatal database error
- Export screen is vague, needs instructions HOT 1
- Add Plot Observation Validation
- Transect Modal HOT 1
- Add Plot - Incomplete Validation (location capture) HOT 1
- Other Surveyors Field in addTransect, transectModal empty value error
- Errors are thrown after removing database regeneration lines (index.js) HOT 1
- Only allowed to select parks that are preloaded.
- Users can enter their own park name and hit done.
- Able to add a transect when error messages are visible for plot distance and surveyor name HOT 3
- Add Plot should check for > 400% plots HOT 2
- Revisiting a Site the Modal's show the red screen! App Error.
- Deleting a entry in the plot observation screen takes the table out of editing mode. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capstone.