Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16982] TiAPI: textid (and similar) properties not supported on ListView

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.3
Fix Version/sn/a
ComponentsTiAPI
Labelsi18n, listview
ReporterFokke Zandbergen
AssigneeUnknown
Created2014-05-10T17:57:31.000+0000
Updated2018-02-28T20:03:31.000+0000

Description

The attached example app is based on the *List View with Custom Item Template* example in the [ListView docs](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView) to show that textid and similar properties currently don't seem to work in ListViews. A fragment of the app.js:
var fruitDataSet = [
    { info: {textid: 'foo'}, es_info: {text: 'Manzana'}, pic: {image: 'apple.png'}},
    { info: {text: 'Banana'}, es_info: {text: 'Banana'}, pic: {image: 'banana.png'}}
];
The i18n/en/strings.xml source:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
  <string name="foo">bar</string>
</resources>
The test app also has a red label overlaid on the ListView using the same textid to show that the string does work on a regular label.

Attachments

FileDateSize
textid.zip2014-05-10T17:57:31.000+00002988

Comments

  1. Ritu Agrawal 2014-05-19

    Moving this ticket to engineering as I can reproduce this issue with the provided test case. Since textid property is neither supported nor documented, I am not sure if it is a bug or improvement request.
  2. Fokke Zandbergen 2014-05-19

    It's not document because everything in a ListView template is is just regular Views, so every of those View's properties should be supported. So yes, it's a bug.
  3. Clément Blanco 2016-04-28

    Any update on that one?
  4. Clément Blanco 2016-04-28

    Workaround found:
    <ListItem info:text="L('foo')" />
    or
       var fruitDataSet = [
           { info: {text: L('foo')}, es_info: {text: 'Manzana'}, pic: {image: 'apple.png'}},
           { info: {text: 'Banana'}, es_info: {text: 'Banana'}, pic: {image: 'banana.png'}}
       ];
       

JSON Source