Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectOnemenu ajax update #302

Closed
lyahim opened this issue Feb 20, 2016 · 9 comments
Closed

selectOnemenu ajax update #302

lyahim opened this issue Feb 20, 2016 · 9 comments
Assignees
Milestone

Comments

@lyahim
Copy link
Contributor

lyahim commented Feb 20, 2016

Hello All,
I try to update a selectOneMenu with other one with ajax.
the code is:

<b:selectOneMenu id="cSelect" onchange="ajax:passEditBean.changeClient()" update="lSelect" required="true">
    ....
</b:selectOneMenu>
<b:selectOneMenu id="lSelect">
  ....
</b:selectOneMenu>

The result is the following:

image

The ajax response is:

<?xml version="1.0" encoding="UTF-8"?><partial-response id="j_id__v_0"><changes><update id="passForm:lSelect"><![CDATA[<div class="form-group"><label for="passForm:lSelect" class="bf-no-message">???pass_edit.lesson???</label>
<select id="passForm:lSelect" name="passForm:lSelect" class="form-control bf-no-message" title="???pass_edit.lesson???"><option data-label="Kérem válasszon" value="">Kérem válasszon</option><option data-label="Típus 1" value="1" selected="true">Típus 1</option><option data-label="típus2" value="2">típus2</option></select></div>]]></update><update id="j_id__v_0:javax.faces.ViewState:1"><![CDATA[fDilWxUAxJcYO7cVx9EQF8+nI+p5cAoX8rHZ15MrvMX29WiO]]></update></changes></partial-response>

Do I something wrong or is it a bug?

Thank you,
Mihaly

@stephanrauh
Copy link
Collaborator

After reformatting, the AJAX response looks like so:

<?xml version="1.0" encoding="UTF-8"?>
<partial-response id="j_id__v_0">
  <changes>
    <update id="passForm:lSelect"><![CDATA[
      <div class="form-group">
        <label for="passForm:lSelect" class="bf-no-message">???pass_edit.lesson???</label>
        <select id="passForm:lSelect" name="passForm:lSelect" class="form-control bf-no-message" title="???pass_edit.lesson???">
          <option data-label="Kérem válasszon" value="">Kérem válasszon</option>
          <option data-label="Típus 1" value="1" selected="true">Típus 1</option>
          <option data-label="típus2" value="2">típus2</option>
        </select>
      </div>
    ]]>
    </update>    
    <update id="j_id__v_0:javax.faces.ViewState:1"><![CDATA[fDilWxUAxJcYO7cVx9EQF8+nI+p5cAoX8rHZ15MrvMX29WiO]]></update>
  </changes>
</partial-response>

@lyahim
Copy link
Contributor Author

lyahim commented Feb 20, 2016

Yes, It looks the response updates the id="passForm:lSelect" which is the 'select' not the whole div wrapper. For example inputText wrapper div has the id and the input has a modified id.

@stephanrauh
Copy link
Collaborator

By the look of it, the attributes "update", "process" and "ajax" were missing in the taglib. I've added them to make them available for NetBeans users and for the autocompletion of your IDE.

@stephanrauh
Copy link
Collaborator

Also see PR #296 .

@stephanrauh
Copy link
Collaborator

I've uploaded a developer snapshot to Maven Central containing a bugfix. As usual, see #151 on how to get the snapshot. Would you mind to test the bug?

Thanks in advance!
Stephan

@lyahim
Copy link
Contributor Author

lyahim commented Feb 20, 2016

I will checking

@lyahim
Copy link
Contributor Author

lyahim commented Feb 22, 2016

Hello Stephan,
I don't see any changes in snapshot. Is it possible couldn't make the deploy?

Mihaly

@zhedar
Copy link
Collaborator

zhedar commented Apr 12, 2016

@lyahim This may be a bit late, but you may either have to delete the 0.8.2-Snapshot files in your local Maven-Repository or explicitly force Maven to update the dependencies. Maybe that's why the snapshot seems stale to you?

@stephanrauh
Copy link
Collaborator

I've just retested the issue. We've solved the bug in the meantime. I'll close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants