Questions tagged [jsviews]

JsViews: Next-generation MVVM framework created and maintained by Boris Moore. Do NOT use this tag for questions about "JS views" in SAPUI5.

JsViews

Next-generation MVVM framework - bringing templates to life. Integrates with JsRender.

The JsViews framework brings declarative data-binding to JsRender templates, supports MVVM and MVP (custom tag controls), and much more...

Currently in pre-beta (could still have a few breaking changes in more advanced APIs).

See also on GitHub: https://github.com/BorisMoore/jsviews

JsRender can also be used stand-alone, without JsViews, and with or without jQuery:

209 questions
0
votes
2 answers

Get {{#index}} parent of the first for loop inside the second for loop in JSrender

I have two for loops, the second one is inside the first one, I'd like to get the #index of the first loop inside the second loop. this is my code: {{for parentObject}} {{for childObject}}
user2982862
  • 1
  • 1
  • 1
0
votes
1 answer

jsViews dynamic linking to a different item in array

I am trying to have a dynamic if linking to a property of a different item in an array. My current code: Loader for (...) { var index = this.App.Data.Questions.push({ ... }) - 1; if…
neo post modern
  • 2,262
  • 18
  • 30
0
votes
2 answers

Is it syntactically wrong to use the html converter in jsView like so: data-link="html{:property}" instead of data-link="{html:property}"?

We are using the html converter on a lot of our templates that render in jsViews/jsRender. We came across an issue, where jsViews was fumbling on a "Mismatch" error when a tag was in the text it was rendering. We did not notice this, until recently…
Casey ScriptFu Pharr
  • 1,672
  • 1
  • 16
  • 36
0
votes
1 answer

jsView: How to get current element during "onBeforeChangeEvent"

I am wondering if there is a way that I can get the current element that is triggering the onBeforeChangeEvent function in jsViews. I want to get the current element that it is working on, to do some extra jQuery work on it. A basic example is…
Casey ScriptFu Pharr
  • 1,672
  • 1
  • 16
  • 36
0
votes
1 answer

Remove the extra property added by JsViews

Well I don't think I am using proper term but I will try to explain the same. We have a Array of data coming from server using Remoting. Now we are using JSViews to bing the same to editable form with a update button. Once this button is pressed the…
Avidev9
  • 601
  • 1
  • 6
  • 15
0
votes
1 answer

Pass specific converters/templates to template with jsViews/jsRender

I am trying to pass in converters and/or templates only to a specific template. According to the API you can only pass in helpers, but not converters or templates. Is there any way to do this or does someone know if it is planned to support this in…
neo post modern
  • 2,262
  • 18
  • 30
0
votes
1 answer

jsViews: bind function/helper to DOM event

I am trying to remove an element from a list that is being displayed with a {^{for}} loop by clicking an element. This could of course be achieved through jQuery's .on as seen here: Todos example, Source Line 138 But I would like a jQuery-free…
neo post modern
  • 2,262
  • 18
  • 30
0
votes
2 answers

Make "if" dynamic in JSViews

I am trying to use JSViews to make a dynamic ui. I want to have radio buttons that hide/show different parts of the ui, and have the radio button be bound to my data. Creating and binding the radio buttons works ok, but I am stuck on the next part.…
Backslider
  • 109
  • 1
  • 8
0
votes
1 answer

JsRender+ JsViews | How to $.observable().insert to object inner array

Sample JSON: https://gist.github.com/mekkoo/6604902 I want using $.observable().insert method to object inner array "items". but, I looked error "Uncaught TypeError: Object # has no method 'insert'" when method calling pages = //Sample JSON $.ajax…
mekkoo
  • 1
0
votes
2 answers

How to toggle a class using jsViews

Say I have an element in my template like the following:
It has several classes applied to it, but at design time I won't know exactly what classes they are. If the model used for data binding/linking has a property…
CHS
  • 965
  • 2
  • 18
  • 29
0
votes
1 answer

Wrap around template in jsRender

I am trying to wrap a piece of my template with plain HTML. Or in code: {{expandable}} CONTENT {{/expandable}} should turn into:
0
votes
4 answers

Validationwith two-way dat-bind in jsViews

Trying to find out an elegant way to handle validation client side on a two-way data bound property in jsViews template. As an example to reference, please look at the PI documentation for jsViews two-way binding at jsView's API link here:…
Ronny
  • 471
  • 1
  • 5
  • 11
0
votes
2 answers

Logic in JsViews css-tag

I am trying to put logic in a css-width in a data-link in jsViews. The two following approaches did not work: {{for Items}} ... or {{for Items}} ... …
neo post modern
  • 2,262
  • 18
  • 30
0
votes
1 answer

JsViews/JsRender - updating observable not working

I am working with JsViews/JsRender and quite complex dataSet. Currently I have some issues with updating the rendered values after data model changed. Could anyone please tell me, why the in the following code: http://jsfiddle.net/kWBFS/22/…
user1029968
  • 297
  • 2
  • 19
0
votes
1 answer

JsViews #index not updated when view model changes

Do I have to force a refresh somehow? I have a grid that gets updated when I call "remove", but the indices are not re-numbered. Has anyone run into this before? **Remove function:** $("#result") .on("click", ".change", function(){ var…
mawaru
  • 25
  • 1
  • 7
1 2 3
13
14