List Info

Thread: Get the value of a ReadOnly




Get the value of a ReadOnly
user name
2007-08-13 17:28:10
Hi all:

In my JSP I have:

....
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  <td class=&quot;td-contenido" colspan=&quot;2">
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; <h:selectOneMenu value=&quot;#{DiaFeriadoBean.tipFeriado }&quot; readonly="true&quot;>
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; <f:selectItems value=&quot;#{DiaFeriadoBean.tiposFeriadosSelect}"; />
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; </h:selectOneMenu&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  </td>;
.....

And In the DiaFeriadoBean the value of tipFeriado property is 0, I tried with disabled = true, but is the same, If I quit the reaonly=&quot;true&quot; then I can get the right value, My question is how can I get the value of a property that is read only?

Thanks
Re: Get the value of a ReadOnly
user name
2007-08-15 03:18:26
Do you try to change the value on the client-side with javascript? Then you shouldn9;t set readonly/disabled to true. With readonly or disabled set to true, your component value will never be decoded on the server.

regards,

Martin

On 8/14/07, daniel ccss < danielccss2gmail.com">danielccss2gmail.com> wrote:
Hi all:

In my JSP I have:

....
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  <td class=&quot;td-contenido" colspan=&quot;2">
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; <h:selectOneMenu value=&quot;#{DiaFeriadoBean.tipFeriado }" readonly="true&quot;>
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; <f:selectItems value=&quot;#{DiaFeriadoBean.tiposFeriadosSelect}"; />
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; </h:selectOneMenu&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  </td>;
.....

And In the DiaFeriadoBean the value of tipFeriado property is 0, I tried with disabled = true, but is the same, If I quit the reaonly=&quot;true&quot; then I can get the right value, My question is how can I get the value of a property that is read only?

Thanks



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces
Re: Get the value of a ReadOnly
user name
2007-08-15 08:47:08
Hi Martin
 
I donīt need to change the value with javascript what I need is to get the value of a readOnly <h:inputText, in struts&nbsp;I can do that, why in JSF no?

 ;
On 8/15/07, Martin Marinschek < martin.marinschekgmail.com">martin.marinschekgmail.com> wrote:
Do you try to change the value on the client-side with javascript? Then you shouldn9;t set readonly/disabled to true. With readonly or disabled set to true, your component value will never be decoded on the server.

regards,

Martin


On 8/14/07, daniel ccss <gmail.com" target="_blank">danielccss2gmail.com > wrote:
Hi all:

In my JSP I have:

....
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  <td class=&quot;td-contenido" colspan=&quot;2">
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <h:selectOneMenu value=&quot;#{DiaFeriadoBean.tipFeriado }" readonly="true&quot;>
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; <f:selectItems value=&quot;#{ DiaFeriadoBean.tiposFeriadosSelect}&quot; />
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; </h:selectOneMenu&gt;
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  </td>;
.....

And In the DiaFeriadoBean the value of tipFeriado property is 0, I tried with disabled = true, but is the same, If I quit the reaonly=&quot;true&quot; then I can get the right value, My question is how can I get the value of a property that is read only?

Thanks



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Get the value of a ReadOnly
user name
2007-08-31 14:19:52
Sorry - this I didn't understand. Please provide some
code-snippets.

regards,

Martin

On 8/15/07, daniel ccss <danielccss2gmail.com> wrote:
> Hi Martin
>
> I donīt need to change the value with javascript what I
need is to get the
> value of a readOnly <h:inputText, in struts I can do
that, why in JSF no?
>
>
>
> On 8/15/07, Martin Marinschek <martin.marinschekgmail.com> wrote:
> > Do you try to change the value on the client-side
with javascript? Then
> you shouldn't set readonly/disabled to true. With
readonly or disabled set
> to true, your component value will never be decoded on
the server.
> >
> > regards,
> >
> > Martin
> >
> >
> >
> > On 8/14/07, daniel ccss <danielccss2gmail.com
> wrote:
> > > Hi all:
> > >
> > > In my JSP I have:
> > >
> > > ....
> > >                         <td
class="td-contenido" colspan="2">
> > >                            
<h:selectOneMenu
> value="#{DiaFeriadoBean.tipFeriado }"
readonly="true">
> > >                                
<f:selectItems value="#{
> DiaFeriadoBean.tiposFeriadosSelect}" />
> > >                            
</h:selectOneMenu>
> > >                         </td>
> > > .....
> > >
> > > And In the DiaFeriadoBean the value of
tipFeriado property is 0, I tried
> with disabled = true, but is the same, If I quit the
reaonly="true" then I
> can get the right value, My question is how can I get
the value of a
> property that is read only?
> > >
> > > Thanks
> > >
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Get the value of a ReadOnly
user name
2007-08-31 14:59:15
At the end what I did was used an inputtext control to show the value as readonly and not the select. The problem for me, was that I couldnīt get the value of a read only select in the bean.

On 8/31/07, Martin Marinschek < martin.marinschekgmail.com">martin.marinschekgmail.com> wrote:
Sorry - this I didn't understand. Please provide some code-snippets.

regards,

Martin

On 8/15/07, daniel ccss < danielccss2gmail.com">danielccss2gmail.com> wrote:
>; Hi Martin
&gt;
> I donīt need to change the value with javascript what I need is to get the
> value of a readOnly <h:inputText, in struts I can do that, why in JSF no?
>
&gt;
>
&gt; On 8/15/07, Martin Marinschek < martin.marinschekgmail.com">martin.marinschekgmail.com> wrote:
>; > Do you try to change the value on the client-side with javascript? Then
> you shouldn9;t set readonly/disabled to true. With readonly or disabled set
> to true, your component value will never be decoded on the server.
&gt; >
> > regards,
&gt; >
> > Martin
>; >
> >
> >
> > On 8/14/07, daniel ccss < danielccss2gmail.com">danielccss2gmail.com > wrote:
>; > > Hi all:
> > >
> > > In my JSP I have:
> > >
> > > ....
> > >   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   <td class=&quot;td-contenido" colspan=&quot;2">
> > >   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  <h:selectOneMenu
&gt; value=&quot;#{DiaFeriadoBean.tipFeriado }" readonly=&quot;true&quot;>
&gt; > >   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  <f:selectItems value=&quot;#{
> DiaFeriadoBean.tiposFeriadosSelect}" />
> > >   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  </h:selectOneMenu&gt;
> > >   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   </td>;
> > > .....
> > >
>; > > And In the DiaFeriadoBean the value of tipFeriado property is 0, I tried
> with disabled = true, but is the same, If I quit the reaonly=&quot;true&quot; then I
> can get the right value, My question is how can I get the value of a
> property that is read only?
> > >
> > > Thanks
>; > >
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
>; >
> > Professional Support for Apache MyFaces
&gt;
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )