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

The Archive Base Latest Questions

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

I am having a problem on my application, what I am trying to do

  • 0

I am having a problem on my application, what I am trying to do is when ever someone changes the field shopStatus on the form to Pass, i want it to update my field shopApprovalDate to be mandatory. I am using the following event listener for this

@EventListener(targets="shopStatus", events="onchange")
public void onLicenseStatusChange(IRequestCycle cycle) {
    cycle.getResponseBuilder().updateComponent("shopStatus");
    cycle.getResponseBuilder().updateComponent("shopApprovalDateRequired");
    cycle.getResponseBuilder().updateComponent("shopApprovalDate");

}

this is the html that I am using for this

<td valign="center" align="left" class="rightTD" height="30" >
         <span jwcid="@If" condition="ognl:company.shopStatus == @valueobject.ShopStatus@Pass" renderTag="literal:false">
            <input jwcid="shopApprovalDateRequired@CustomDatePicker" disabled="ognl:disabled || isShopApprovalDateDisabled()"
            value="ognl:company.shopApprovalDate" displayName="message:company.shopApprovalDate" validators="validators:maxDateToday,required" />
         </span>
         <span jwcid="@Else" renderTag="literal:false">
            <input jwcid="shopApprovalDate@CustomDatePicker" disabled="ognl:disabled || isShopApprovalDateDisabled()"
            value="ognl:company.shopApprovalDate" displayName="message:company.shopApprovalDate" validators="validators:maxDateToday" />
         </span>
        </td>

The thing is that, if I change the shopStatus to Pass nothing happens, but if i save the page and reload the page, then the shopApprovalDate is set to mandatory so the html code is working, it is like the @EventListener is not updating shopApprovalDate when shopStatus is changed! I have debugged through the code and it is hitting the listener but nothing is happeneing

Does anyone have any ideas on this?

  • 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-10T14:11:07+00:00Added an answer on June 10, 2026 at 2:11 pm

    This is because you need to call an update on something that calls the @IF @Else and not the actual component itself

    If you add a outside the @If @Else and call that in the Event Listener this should work then like so

    The <div>

    <div jwcid="licenceAuthRequiredDiv@Any">
    <td valign="center" align="left" class="rightTD" height="30" >
         <span jwcid="@If" condition="ognl:company.shopStatus == @valueobject.ShopStatus@Pass" renderTag="literal:false">
            <input jwcid="shopApprovalDateRequired@CustomDatePicker" disabled="ognl:disabled || isShopApprovalDateDisabled()"
            value="ognl:company.shopApprovalDate" displayName="message:company.shopApprovalDate" validators="validators:maxDateToday,required" />
         </span>
         <span jwcid="@Else" renderTag="literal:false">
            <input jwcid="shopApprovalDate@CustomDatePicker" disabled="ognl:disabled || isShopApprovalDateDisabled()"
            value="ognl:company.shopApprovalDate" displayName="message:company.shopApprovalDate" validators="validators:maxDateToday" />
         </span>
        </td>
    </div> 
    

    The event listener

    @EventListener(targets="licensingStatus", events="onchange")
    public void onLicenseStatusChange(IRequestCycle cycle){
        cycle.getResponseBuilder().updateComponent("licenceAuthRequiredDiv");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an application in interface builder, and I'm having a problem.
I am having a problem with a VB.NET application which is trying to execute
I'm having a problem trying to use ZeroMQ in my new application. Please note:
I am having a weird problem with a simple map application I am trying
I'm having a problem trying to get a ViewBage property value and pass it
I'm trying build an App Engine connected Android application and am having some problems
In my application I am having problem to cover completely a page of the
I'm having a problem compiling an application which uses Core-Plot in debug mode. It
Having a problem deploying an MVC application. Basically the site loads correctly, the home
I am having a problem with structuring rails application. Let's say that I have

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.