Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8502795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:35:05+00:00 2026-06-11T01:35:05+00:00

Salutations I have been trying to find a way to edit an Ember.Select box

  • 0

Salutations

I have been trying to find a way to edit an Ember.Select box without actually manually selecting the values but editing them internally. My Ember.Select looks like this:

{{view Ember.Select 
  contentBinding="Et.router.availablePhasesController" 
  optionValuePath="content.id" 
  optionLabelPath="content.label" 
  selectionBinding="a.selectedPhase"
}}

availablePhasesController looks like this:

Et.AvailablePhasesController = Ember.ArrayController.extend({
content: [
  { id: 1, label: "1" },
  { id: 2, label: "2" },
  { id: 3, label: "3" }
 ]
});

This all works fine an dandy when I select these values from the select box, but my question is, can I somehow change the value on the select element created by Ember.Select and it will trigger the binding, meaning my “a.selectedPhase” will also get the value used to change the select element.

I tried using jQuery with .val() and .attr(“value”) but this only affected the UI and did not trigger the binding, meaning the select box had the value but not “a.selectedPhase”

I also tried extending the Ember.Select view and found out that it has a variable “value” which stores the current value and updates according to the binding but I could not find any use for this. I created observers that observed when this value changed but that didn’t help since it only changed when I manually selected a new value.

To summarize, is there a way to trigger the selectionBinding through some means other then directly changing the variables in the bindings or through the UI?

EDIT: I have created a jsfiddle as someone requested in the comments: http://jsfiddle.net/y52Pc/2/

You can see that the binding works fine, if you select a different option with the select box it will update correctly. I also set up two buttons, one uses the Ember.set method, this will work fine as well and will trigger the binding. The other method which uses jQuery.val() will only affect the UI and not trigger the binding.

What I am looking for is some other way of triggering the bindings with something else then .set or manually by selecting the select box.

EDIT 2: I added an updated way of triggering the bindings through jQuery here: http://jsfiddle.net/y52Pc/3/
This seems to solve the problem!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:35:07+00:00Added an answer on June 11, 2026 at 1:35 am

    Whenever you change value of select component using $().attr(), it will not trigger the change event (DOM event should fire to ember.js update the bindings). You should manually call like $('selector').attr().trigger('change')

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Salutations, I have been unable to find a way to apply a fading or
Ok, so I have been trying to iron out this data binding for a
Salutations everyone, I have a somewhat strange problem with my repo. Initial I only
I have pattern like below hi hello hallo greetings salutations no more hello for
I Currently have this view as scripted below. The problem is I cannot find
I have a SQL query Question, I am trying to nest two separate queries
I've got an issue that's been bothering me. I have to store information from
Greeting and Salutations! I work in an environment where I have a development server,
Greetings and salutations, I have two Android apps: one is the server and one
I have problem with the way I treat the memory management in iphone..please please

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.