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 9198405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:16:27+00:00 2026-06-17T22:16:27+00:00

i am working in extjs4 MVC where I have been working on task to

  • 0

i am working in extjs4 MVC where I have been working on task to create question answer page functionality.There are 4 questions to be displayed with there options.I have getting all the selected questions and answers in controller.But I didnot know how to send to srver side using models method.I am getting stuck at this point.

Here is my some controller code
1)

check:function()
    {
        console.log("Inside check function.");
        //creating objects in javascript
          var obj=new Object();
          for(var i=0;i<=5;i++)
          {
                var inputs = document.getElementsByName(i); 
                var radio = "";  
                for (var j = 0; j < inputs.length; j++) {
                    if (inputs[j].checked) {
                        name = inputs[j].name;
                        value  = inputs[j].value;
                        //obj[i].name1=name;
                        obj[i]={'questionId':name,'option':value};
                        console.log("questionId="+name +" value="+ value);
                        console.log("object name="+ obj[i].questionId+" Object value="+obj[i].option);
                    }// End of if statment
                }// End of inner for loop
          }//End of outer for loop

    }// End of check function

2)here is I have getting some output in firebug

questionId=1 value=Aus QbqnsController.js:39
questionId=2 value=india QbqnsController.js:39
questionId=3 value=England QbqnsController.js:39
questionId=4 value=Srilanka 

Actually i want to use model class methods save() . but how can I use it.
please give me some suggestions.

3)here is my model classs

Ext.define('Balaee.model.qb.QbqnsModel',{
    extend: 'Ext.data.Model',
    idproperty:'questionId',//fields property first position pk.
    fields: ['questionId','question','languageId','userId','creationTime','questionStatusId','keyword'],
    hasMany:{
            model:'Balaee.model.qb.QbqnsoptionModel',
            foreignKey:'questionId',
            name:'options',
        },


        proxy:
        {
            type:'ajax',
            api:
            {
                    read:'http://localhost/balaee/balaee/index.php?r=QuestionBank/qbpaper/setuseranswer',
                    create:'http://localhost/balaee/balaee/index.php?r=QuestionBank/qbpaper/setuseranswer',
            },//end of api
            reader:
            {
                    type:'json',
            },//end of reader
            writer:
            {
                    type:'json',
                    root:'records',
            },//End of writer
        }   

});
  • 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-17T22:16:28+00:00Added an answer on June 17, 2026 at 10:16 pm

    If you’re using Ext MVC and you’re questions are model instances stored inside a store, you can use store.sync() which will batch the data in different states (add, edit, deletes etc) and sync them with the relevant store or model proxy url, or the api urls specified.

    This has the benefit of sending arrays of objects back in a single request, but then of course you need to separate them on the server side before processing.

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

Sidebar

Related Questions

i am working in extjs4 MVC and I have been getting stuck at a
I am working with ASP.NET MVC and have a view page with a simple
I am working with Extjs4.1 MVC. What I am trying to do is save
I am working in extjs. i am displaying 10 questions and its related options.
I am working on an Extjs portal example and downloaded the example from extjs4-mvc-portal
I have developed a web application using ExtJs4.0.7. The application is working fine in
I have ExtJS4 form, and FieldSet there. Fieldset is being controller by CHECKBOX. I
I am working on extjs4, my case is: Extjs mvc is used to build
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working with JSF 2.0 (and Primefaces), is there a way to fire an ActionListener

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.