Giter Club home page Giter Club logo

Comments (5)

nullterminated avatar nullterminated commented on August 10, 2024

I considered the same solution when I first encountered this. Unfortunately, that will still break if there are multiple ERDInspects of the same EO on a single page. Imagine entity A has two relationships to entity B. If the property level component for both A->B relationships is an ERDInspect, then this same problem happens with every field in the two inspects. Just adding the property key doesn't really fix the problem, it simply moves it one page deeper.

Also remember that sometimes the property key is actually a key path. That keypath could even terminate with an @key. That makes parsing the property key for a css ID a bit more difficult too.

from wonder.

johanhenselmans avatar johanhenselmans commented on August 10, 2024

What about using UUID's as part of the ID generation? Would that solve it, or am I misunderstanding the whole problem?

from wonder.

nullterminated avatar nullterminated commented on August 10, 2024

Well, it would have to be repeatable. UUID would work fine for uniqueness, but each div needs to have the same id for each page iteration. Otherwise, anything ajax outside of that container that uses the container id would break once the update container refreshed and the id changes.

The last time I did anything like ajax with d2w, I opted to generate the ids using ERXWOContext's safeId stuff in the component and pushed it onto the context after storing it on an ivar. I also remember firing a NSNotification to alert the interested parties.

It was a little complex, but it worked well with no potential for collisions. Doing that to all of ERModern would be a much more time consuming task. Have a look at the AjaxNotificationCenter and the AjaxObservingSwitch in the AjaxLook framework if you're interested.

Basically, using an assignment to do the job is straightforward and it works in most cases, but it is not flawless.

from wonder.

fbarthez avatar fbarthez commented on August 10, 2024

I thought this had been resolved but learned at WOWODC that it hadn't. I've added a pull request with a fix I've been using in production since late 2012: #561
It does not address Ramsey's concern regarding multiple editors for an entity on a single page, but I feel it's still a lot better than the current implementation.

from wonder.

fbarthez avatar fbarthez commented on August 10, 2024

This was fixed in [44c03bd].

from wonder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.