As far I understand you need this

<s:checkbox
  name="viewFilter.showCompleted"
  value="%{!viewFilter.showCompleted}"
  fieldValue="%{!viewFilter.showCompleted}"
  submitUnchecked="true"
/>

pt., 1 wrz 2023 o 14:15 Burton Rhodes <burtonrho...@gmail.com> napisaƂ(a):
>
> Not sure why I am hung up on this, but I'm trying to present a simple
> checkbox that functions inversely to the parameter value. In other words,
> when the value is true, the checkbox should be unchecked (and vice versa).
> I'm trying to avoid creating a specific Action variable for this or a
> hidden form field.  I'm sure I'm missing something very simple here, but
> can anyone tell me how to do this?
>
> Attempt 1
> <s:checkbox
> name="viewFilter.showCompleted" value="%{!viewFilter.showCompleted}"
> submitUnchecked="true"
> />
>
> Attempt 2
> <s:checkbox name="viewFilter.showCompleted" fieldValue="false"
> submitUnchecked="true" />

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to