Questions tagged [viewcontext]

25 questions
1
vote
2 answers

How to create a custom class similar to HtmlHelper and initialize with ViewContext?

Our project uses a lot of custom HtmlHelper extension methods to be referenced in views like: @Html.MyHelperMethod() However, I'd like to keep them separated out from the system ones and be able to do something like either of the…
Roury
  • 13
  • 5
0
votes
0 answers

How to maintain the viewContext as a variable so I can leave the page while keeping viewContext saved

I have a function that saves to viewContext while in a detailView. The function grabs the users location, so it isn’t instant. The function works properly if I stay on the detailView for the item I selected, or go the to detialView for a different…
jhbetts
  • 17
  • 5
0
votes
1 answer

Intershop - pass call parameters to component

This question is related to this thread: Cannot Access Pipeline Dictionary Entry of View Pipeline in a Component I want to pass a pipeline parameter to a component which is referred to somewhere after a Tag. I don't really understand how this…
Foolix
  • 1
0
votes
1 answer

How do I loop through all open background view contexts and perform a save?

I have a program that concurrently reads the data from 3 separate CSV files into 3 separate background view contexts all based on the same persistent container. Once the data has been inserted into the view contexts I use a series of if statements…
Chris
  • 105
  • 8
0
votes
0 answers

How to maintain authentication information after a postback

I had to take over an old ASP.Net MVC 5 application and modify it so that it works with a new Payment Service Provider (PSP). This PSP offers a hosted page where payments are made, so I need to POST a form with a bunch of fields. One of the fields…
Eddie
  • 271
  • 4
  • 18
0
votes
2 answers

Object is possibly 'undefined'. TS2532

I keep getting Object is possibly 'undefined'. TS2532 and I know that it's due to assignment of setViewer to undefined, which I have done for the purpose of login matching but I came across with another problem. Right now, I have 2 data coming in…
James
  • 17
  • 7
0
votes
1 answer

Can a Rails helper_method use yield as if it was invoked in the corresponding view?

I have the following accordion generator which works fine when included directly in the view: <% def collapser(name) fad = { class: 'collapsed', data: {toggle: 'collapse', parent: '#accordion_id'}, href: "##{name}", aria:…
psychoslave
  • 2,783
  • 3
  • 27
  • 44
0
votes
1 answer

Access to stream of ViewContext's writer

I'm writing an html helper extension for MVC5. I need to access the ViewContext's stream to edit it. (like a textreader) htmlHelper.ViewContext.Writer.Write("
"); Is there any way to access the stream; so that I can manipulate or add some html…
freewill
  • 1,111
  • 1
  • 10
  • 23
0
votes
1 answer
-1
votes
1 answer

Data inconsistency between coredata entity attributes in app and fetchresults query in app share extension

Am using coredata in my app as well as its share extension (by leveraging app groups). Step 1. User saves data in the core app (in the standard viewContext), and then loads the share extension that connects to core data (also standard videContext)…
Zack
  • 41
  • 3
1
2