Hybrid View
-
25 Feb 2012 3:52 AM #1
Very HTML in Sencha Touch
Very HTML in Sencha Touch
Good day.
I'm using Sencha Touch to create an app for iPhone to graduate school.
The application is intended to be an adaptation of a book for iPad. The paper book has about 1500 pages and who uses only text.
My question is how much I insert text in the HTML Sencha Touch? What is the correct way and easier for me to do?
thank you very much
Delfim Machado
-
25 Feb 2012 8:16 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
You can simply use the html config on a component/container
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Feb 2012 8:31 AM #3
did not understand
did not understand
sorry, did not understand. I'm new on this subject.
I saw that you can do something like this:
title: 'Mid'
styleHtmlContent: true,
xtype: 'form',
scroll: 'vertical'
html: "The public prayer and <b> Community </ b> of the people of God is with reason regarded as one of the main functions of the Church. Hence, at the very beginning, the baptized <devoted themselves to the teaching of the Apostles, the fraternal union the breaking of bread and prayers> (Act 2, 42). from the unanimous prayer of the Christian community in the repeated testimonies dao Acts of the Apostles. "
dockedItems: [{
xtype: 'toolbar'
dock: 'top',
items: [{
xtype: 'Searchfield'
placeholder: 'Search'
name: 'Searchfield'
}]
}
It turns out that I need to use too much text. How should I do?
What is the best solution.
thank you very much
Delfim Machado
-
25 Feb 2012 8:32 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
I'm not sure what the issue is when you say "It turns out that I need to use too much text".
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Feb 2012 8:37 AM #5
the book
the book
the book has almost 1500 pages. I tried pasting the text there and did not result. Maybe because they can not have paragraphs?
Is there a way to use PDF? clicking the menu open a PDF?
In any event preferred to use the HTML. Is this the only way to use?
thank you very much
-
25 Feb 2012 8:44 AM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
PDF will not work on all mobile devices. Not sure what ST version so here is a little sample in ST2:
Code:new Ext.carousel.Carousel({ fullscreen : true, defualts : { scrollable : 'vertical' }, items : [ { html : '<p>Paragraph one</p><br><p>Paragraph two</p>' }, { html : '<p>Paragraph one</p><br><p>Paragraph two</p>' } ] });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
2 Mar 2012 7:15 PM #7
I also in the process of learning HTML,it's a interesting thing
-
3 Mar 2012 1:06 AM #8
an example
an example
Can you give me an example of Ajax.Request page is loading and then setHtml ()
-
3 Mar 2012 4:34 AM #9
Html page loading example
Html page loading example
in my view file
......
{
title: 'Характеристики',
//html : 'Описание',
xtype: 'panel',
//htmlurl: 'pages/ford3/ford3.html',
listeners: {show: function(obj,opt){ htmlPageShow('pages/ford3/ford3.html',obj,opt);}},
scrollable: {direction: 'vertical'},
},
.....
in app.js
.....
function htmlPageShow(url,obj,opt)
{
//debugger
Ext.Ajax.request(
{
url: url,
//params: { id: 1},
scope: obj,
async: false,
success: function(response)
{
var text = response.responseText;
this.setHtml(text);
},
failure: function(response, opts)
{
alert('Ошибка загрузки: '+opts.url);
//debugger
//console.log('server-side failure with status code ' + response.status);
}
});
//alert(obj.getHtml());
}
.....
That' all folks!
I don't use inheritance because it's don't worked on Android.
-
3 Mar 2012 6:45 AM #10
no view html
no view html
I am able to show the alert, but show me the contents of the HTML page.
You can look at the page I am trying to modify: http://app.liturgia.pt/menu11/examples/kitchensink/
User Interface -> Forms -> HTML_teste
What am I doing wrong?


Reply With Quote