You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Harald Geritzer <h....@gmail.com> on 2008/03/25 22:16:39 UTC

[T5] Upload progress, grid sorting

hi all,

is there a way to extend the tapestry 5 upload component for some sort of ajax progress. seems that 
commons fileupload allows to hook in a ProgressListener for ServletFileUpload.

My second question is, how can i set the initial sortorder for a grid in tapestry 5.0.11?

thank you for your help,
harald

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Upload progress, grid sorting

Posted by Harald Geritzer <h....@gmail.com>.
Finally i implemented my own sortmodel in my gridpage class which is rather a clone of the grid's
DefaultGridSortModel.

I think, the event where the initial sort should be set is the pageLoaded event...but at that point 
of time, the grids sortmodel isnt initialized yet and a NPE is thrown.
Probably Howard could give us some info, when the sort model gets initialized in the grid class.

from Grid.java:

     @Parameter
     private GridSortModel _sortModel;

     GridSortModel defaultSortModel()
     {
         return new DefaultGridSortModel();
     }

does tapestry bind unset parameters named x (in our case _sortModel) automatically with the values 
returned from defaultX() (defaultSortModel()) methods? if so, when?

best regards,
harald



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Upload progress, grid sorting

Posted by Andreas Pursian <dg...@gmx.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Altering the code snippet from the wiki like this

@Component
~    private Grid taskGrid;

@SetupRender
~    public void setupGrid() {
~        taskGrid.getSortModel().updateSort("columnName");
~    }

work for me but produces the nasty side effect, that the column
initially sorted can't be changed afterwards. The documentation says that

| The sort constraints (the column that is sorted, and ascending vs.
descending) is stored as persistent fields of the Grid component.

but i'am not sure how to access them. Could someone please provide an
additional hint?

best regards

Andreas Pursian

Harald Geritzer wrote:
|> See
|>
<http://wiki.apache.org/tapestry/Tapestry5GridComponent#head-3f39347a90813b68e1e1f773746476693b50f7c8>

|>
|
| thanks, but the wiki seems to be outdated. since the sorting changed
| with 5.0.11 by introducing sortmodels updateSort does not exist anymore.
|
| i even tried to setting the sortmodels sortcolumn in my pageLoaded
| procedure but a NPE is thrown
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
| For additional commands, e-mail: users-help@tapestry.apache.org
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH6n3hM14O/Esx/74RAmgBAKC1tm/np1zEM3/ARg0eaQckP0ZjkQCgh7PN
C09B56KvDTrenakHFLKKIBI=
=ZWbd
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Upload progress, grid sorting

Posted by Harald Geritzer <h....@gmail.com>.
> See
> <http://wiki.apache.org/tapestry/Tapestry5GridComponent#head-3f39347a90813b68e1e1f773746476693b50f7c8>

thanks, but the wiki seems to be outdated. since the sorting changed with 5.0.11 by introducing 
sortmodels updateSort does not exist anymore.

i even tried to setting the sortmodels sortcolumn in my pageLoaded procedure but a NPE is thrown

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] FormFragment doesn't work on IE6

Posted by Adam Zimowski <zi...@gmail.com>.
I'd file JIRA for this.

On Fri, Mar 28, 2008 at 3:14 PM, Zheng, Xiahong <Xi...@fmr.com> wrote:
> I had a look at the tapestry.js. The following function is used to
>  connect the checkbox with the fragment.
>
>     // Links a FormFragment to a checkbox, such that changing the
>  checkbox will hide
>     // or show the FormFragment. Care should be taken to render the page
>  with the
>     // checkbox and the FormFragment('s visibility) in agreement.
>
>     linkCheckboxToFormFragment : function(checkbox, element)
>     {
>         checkbox = $(checkbox);
>
>         checkbox.observe("change", function()
>         {
>             $(element).formFragment.setVisible(checkbox.checked);
>         });
>     },
>
>  I am not familiar with javascript function. But it seems to me that the
>  checkbox onchange event only toggles the visibility of the fragment.
>  There should be another line that toggels the hidden field value as
>  well.
>
>
>  -----Original Message-----
>  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>
>
> Sent: Thursday, March 27, 2008 4:10 PM
>  To: Tapestry users
>  Subject: Re: [T5] FormFragment doesn't work on IE6
>
>  I recently posted e-mail to this list on this exact same topic. Here
>  is that post:
>
>  Per documentation, FormFragment decides if its content should be
>  submitted based on the hidden field [formfragmentname]:hidden:
>
>  // this is the relevant code from FormFragment source: void
>  beginRender(..)
>        writer.element("input",
>
>                       "type", "hidden",
>
>                       "name", _controlName,
>
>                       "id", _clientId + ":hidden",
>
>                       "value", String.valueOf(_visible));
>        writer.end();
>
>
>  However, that field being generated at render time is fairly static,
>  which defeats the very purpose of dynamic behavior provided by
>  Tapestry.ElementEffect sidedown/slideup functions. The problem is that
>  when the silide function is invoked on the client (triggered by click
>  on the checkbox), that inherently means that FormFragment should be
>  submitted, but it won't be if the hidden field was generated with
>  false value.
>
>  The solution to this problem should be Tapestry dynamically changing
>  hidden field's value to true/false based on the client side state of
>  the checkbox tied to the FormFragment. For those who need a
>  workaround, I can share mine. In onclick of submit button one can
>  execute the following function:
>
>  function setupFragment(fragment, checkbox) {
>   var checked = document.getElementById(checkbox).value;
>   var advanced = (checked == 'on');
>   document.getElementById(fragment + ':hidden').value=advanced;
>  }
>
>
>  <input t:id="submitButton"
>  onclick="setupFragment('advancedFragment','advancedCheckbox');"
>  type="submit" t:type="submit" value="Submit"/>
>
>  I believe this should be one of those "plumbing" tasks that Tapestry
>  should do for us. Should this be a JIRA improvement, or am I missing
>  something?
>
>  -adam
>  Reply
>
>  Forward
>
>
>  Howard Lewis Ship
>  The code is already in place to set the hidden field to the correct
>  value whe...
>
>  Howard's Reply was:
>
>  "The code is already in place to set the hidden field to the correct
>  value when the form is submitted."
>
>  In fact, that code is already present in deepVisible stuff inside
>  tapestry.js
>
>  -adam
>
>
>
>
>  On Thu, Mar 27, 2008 at 3:02 PM, Zheng, Xiahong <Xi...@fmr.com>
>  wrote:
>  > I found a workaround. It seems tapestry is not linking the checkbox
>  >  event with the hidden field in this case
>  >
>  >      addPositionFragment:hidden
>  >
>  >  This value of this hidden field is used on the server side to
>  determine
>  >  if binding of the fragment fields should happen. If I manually add a
>  >  onchange event on the checkbox that toggles the value of the above
>  >  field, it starts to work
>  >
>  >
>  >          <t:checkbox t:id="addPosition" t:mixins="triggerfragment"
>  >
>  onclick="document.getElementById('addPositionFragment:hidden').value=tru
>  >  e"
>  >  fragment="addPositionFragment"/>
>  >
>  >  Is this a bug or by design?
>  >
>  >
>  >
>  >  -----Original Message-----
>  >  From: Zheng, Xiahong
>  >  Sent: Thursday, March 27, 2008 2:24 PM
>  >  To: Tapestry users
>  >
>  >
>  > Subject: RE: [T5] FormFragment doesn't work on IE6
>  >
>  >  I am not sure why it is not working for me. Here is my simple test
>  page,
>  >
>  >  NewPosition.tml
>  >
>  >  <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>  >
>  >  <body>
>  >
>  >  <form t:type="Form" t:id="addForm">
>  >         <t:checkbox t:id="addPosition" t:mixins="triggerfragment"
>  >  fragment="addPositionFragment"/>
>  >         <t:label for="addPosition">Add Position ?</t:label>
>  >         <t:formfragment t:id="addPositionFragment"
>  >  visible="addPosition">
>  >                 <table>
>  >                 <tr>
>  >                         <td class="unlined">
>  >                                 Symbol
>  >                         </td>
>  >                         <td class="unlined">
>  >                                 Shares
>  >                         </td>
>  >                         <td class="unlined">
>  >                                 Price
>  >                         </td>
>  >                 </tr>
>  >                 <tr>
>  >                         <td class="unlined">
>  >                                 <t:TextField
>  >  value="newPosition.symbol"/>
>  >                         </td>
>  >                         <td class="unlined">
>  >                                 <t:TextField
>  >  value="newPosition.shares"/>
>  >                         </td>
>  >                         <td class="unlined">
>  >                                 <t:TextField
>  >  value="newPosition.purchasePrice"/>
>  >                         </td>
>  >                 </tr>
>  >         </table>
>  >         <p/>
>  >         <t:submit value="Save"/>
>  >         </t:formfragment>
>  >  </form>
>  >
>  >  </body>
>  >
>  >  </html>
>  >
>  >  And my page class
>  >
>  >  NewPosition.java
>  >
>  >  public class NewPosition {
>  >
>  >         private Position newPosition = new Position();
>  >
>  >     private boolean addPosition;
>  >
>  >         public String onSubmit() {
>  >                 if (newPosition.getSymbol() != null) {
>  >                         // do something
>  >                 }
>  >
>  >                 return "Start";
>  >         }
>  >
>  >         public Position getNewPosition() {
>  >                 return newPosition;
>  >         }
>  >
>  >         public void setNewPosition(Position newPosition) {
>  >                 this.newPosition = newPosition;
>  >         }
>  >
>  >         public boolean isAddPosition() {
>  >                 return addPosition;
>  >         }
>  >
>  >         public void setAddPosition(boolean addPosition) {
>  >                 this.addPosition = addPosition;
>  >         }
>  >
>  >  }
>  >
>  >  And the position class
>  >
>  >  public class Position {
>  >
>  >         private String symbol;
>  >         private String shares;
>  >         private String purchasePrice;
>  >
>  >         public String getSymbol() {
>  >                 return symbol;
>  >         }
>  >
>  >         public void setSymbol(String symbol) {
>  >                 this.symbol = symbol;
>  >         }
>  >
>  >         public String getShares() {
>  >                 return shares;
>  >         }
>  >         public void setShares(String shares) {
>  >                 this.shares = shares;
>  >         }
>  >         public String getPurchasePrice() {
>  >                 return purchasePrice;
>  >         }
>  >         public void setPurchasePrice(String prices) {
>  >                 this.purchasePrice = prices;
>  >         }
>  >  }
>  >
>  >  In the onSubmit method, the newPosition instance is always blank. I
>  >  tried setting break point in the setter methods of the Position
>  classes
>  >  and they don't get invoked.
>  >
>  >  -----Original Message-----
>  >  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  >  Sent: Thursday, March 27, 2008 1:39 PM
>  >  To: Tapestry users
>  >  Subject: Re: [T5] FormFragment doesn't work on IE6
>  >
>  >  That could be by design. If your fragment is hidden values won't be
>  >  submitted. If it's shown, they should be submitted and I never had
>  >  this problem as they do submit correctly for me. I tested it with all
>  >  kinds of browsers and it works well aside from issue with javascript
>  >  slide down I mentioned earlier.
>  >
>  >  On Thu, Mar 27, 2008 at 12:28 PM, Zheng, Xiahong
>  <Xi...@fmr.com>
>  >  wrote:
>  >  > I am seeing another problem; On submit from the fragment, I don't
>  get
>  >  >  any input values bound to the fragment fields. Has anybody seen
>  it?
>  >  >
>  >  >
>  >  >
>  >  >  -----Original Message-----
>  >  >  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  >  >  Sent: Thursday, March 27, 2008 1:01 PM
>  >  >  To: Tapestry users
>  >  >  Subject: Re: [T5] FormFragment doesn't work on IE6
>  >  >
>  >  >  I think there is an issue, although it works partially. If you
>  click
>  >  >  on the checkbox it doesn't slide the fragment down. However, a
>  >  >  subsequent click anywhere on the page will slide it down causing
>  the
>  >  >  process and checkbox to be out of sync. I implemented my own
>  toggle
>  >  >  functionality so it wasn't that major of an issue for me, but that
>  is
>  >  >  something that probably has to get fixed for IE6.
>  >  >
>  >  >  On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong
>  >  <Xi...@fmr.com>
>  >  >  wrote:
>  >  >  > Anybody tested formfragment/mixin on IE6? I could not get the
>  >  fragment
>  >  >  >  to show on IE6. It does work on firefox however. Is this a
>  known
>  >  >  issue
>  >  >  >  or am I missing something?
>  >  >  >
>  >  >  >
>  >  ---------------------------------------------------------------------
>  >  >  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  >  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >  >  >
>  >  >  >
>  >  >
>  >  >
>  ---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >  >
>  >  >
>  >  >
>  ---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >  >
>  >  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] FormFragment doesn't work on IE6

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
I had a look at the tapestry.js. The following function is used to
connect the checkbox with the fragment.

    // Links a FormFragment to a checkbox, such that changing the
checkbox will hide
    // or show the FormFragment. Care should be taken to render the page
with the
    // checkbox and the FormFragment('s visibility) in agreement.

    linkCheckboxToFormFragment : function(checkbox, element)
    {
        checkbox = $(checkbox);

        checkbox.observe("change", function()
        {
            $(element).formFragment.setVisible(checkbox.checked);
        });
    },

I am not familiar with javascript function. But it seems to me that the
checkbox onchange event only toggles the visibility of the fragment.
There should be another line that toggels the hidden field value as
well.  

-----Original Message-----
From: Adam Zimowski [mailto:zimowski74@gmail.com] 
Sent: Thursday, March 27, 2008 4:10 PM
To: Tapestry users
Subject: Re: [T5] FormFragment doesn't work on IE6

I recently posted e-mail to this list on this exact same topic. Here
is that post:

Per documentation, FormFragment decides if its content should be
submitted based on the hidden field [formfragmentname]:hidden:

// this is the relevant code from FormFragment source: void
beginRender(..)
       writer.element("input",

                      "type", "hidden",

                      "name", _controlName,

                      "id", _clientId + ":hidden",

                      "value", String.valueOf(_visible));
       writer.end();


However, that field being generated at render time is fairly static,
which defeats the very purpose of dynamic behavior provided by
Tapestry.ElementEffect sidedown/slideup functions. The problem is that
when the silide function is invoked on the client (triggered by click
on the checkbox), that inherently means that FormFragment should be
submitted, but it won't be if the hidden field was generated with
false value.

The solution to this problem should be Tapestry dynamically changing
hidden field's value to true/false based on the client side state of
the checkbox tied to the FormFragment. For those who need a
workaround, I can share mine. In onclick of submit button one can
execute the following function:

function setupFragment(fragment, checkbox) {
 var checked = document.getElementById(checkbox).value;
 var advanced = (checked == 'on');
 document.getElementById(fragment + ':hidden').value=advanced;
}


<input t:id="submitButton"
onclick="setupFragment('advancedFragment','advancedCheckbox');"
type="submit" t:type="submit" value="Submit"/>

I believe this should be one of those "plumbing" tasks that Tapestry
should do for us. Should this be a JIRA improvement, or am I missing
something?

-adam
Reply
		
Forward
		
	
Howard Lewis Ship	
The code is already in place to set the hidden field to the correct
value whe...

Howard's Reply was:	
	
"The code is already in place to set the hidden field to the correct
value when the form is submitted."

In fact, that code is already present in deepVisible stuff inside
tapestry.js

-adam




On Thu, Mar 27, 2008 at 3:02 PM, Zheng, Xiahong <Xi...@fmr.com>
wrote:
> I found a workaround. It seems tapestry is not linking the checkbox
>  event with the hidden field in this case
>
>      addPositionFragment:hidden
>
>  This value of this hidden field is used on the server side to
determine
>  if binding of the fragment fields should happen. If I manually add a
>  onchange event on the checkbox that toggles the value of the above
>  field, it starts to work
>
>
>          <t:checkbox t:id="addPosition" t:mixins="triggerfragment"
>
onclick="document.getElementById('addPositionFragment:hidden').value=tru
>  e"
>  fragment="addPositionFragment"/>
>
>  Is this a bug or by design?
>
>
>
>  -----Original Message-----
>  From: Zheng, Xiahong
>  Sent: Thursday, March 27, 2008 2:24 PM
>  To: Tapestry users
>
>
> Subject: RE: [T5] FormFragment doesn't work on IE6
>
>  I am not sure why it is not working for me. Here is my simple test
page,
>
>  NewPosition.tml
>
>  <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>
>  <body>
>
>  <form t:type="Form" t:id="addForm">
>         <t:checkbox t:id="addPosition" t:mixins="triggerfragment"
>  fragment="addPositionFragment"/>
>         <t:label for="addPosition">Add Position ?</t:label>
>         <t:formfragment t:id="addPositionFragment"
>  visible="addPosition">
>                 <table>
>                 <tr>
>                         <td class="unlined">
>                                 Symbol
>                         </td>
>                         <td class="unlined">
>                                 Shares
>                         </td>
>                         <td class="unlined">
>                                 Price
>                         </td>
>                 </tr>
>                 <tr>
>                         <td class="unlined">
>                                 <t:TextField
>  value="newPosition.symbol"/>
>                         </td>
>                         <td class="unlined">
>                                 <t:TextField
>  value="newPosition.shares"/>
>                         </td>
>                         <td class="unlined">
>                                 <t:TextField
>  value="newPosition.purchasePrice"/>
>                         </td>
>                 </tr>
>         </table>
>         <p/>
>         <t:submit value="Save"/>
>         </t:formfragment>
>  </form>
>
>  </body>
>
>  </html>
>
>  And my page class
>
>  NewPosition.java
>
>  public class NewPosition {
>
>         private Position newPosition = new Position();
>
>     private boolean addPosition;
>
>         public String onSubmit() {
>                 if (newPosition.getSymbol() != null) {
>                         // do something
>                 }
>
>                 return "Start";
>         }
>
>         public Position getNewPosition() {
>                 return newPosition;
>         }
>
>         public void setNewPosition(Position newPosition) {
>                 this.newPosition = newPosition;
>         }
>
>         public boolean isAddPosition() {
>                 return addPosition;
>         }
>
>         public void setAddPosition(boolean addPosition) {
>                 this.addPosition = addPosition;
>         }
>
>  }
>
>  And the position class
>
>  public class Position {
>
>         private String symbol;
>         private String shares;
>         private String purchasePrice;
>
>         public String getSymbol() {
>                 return symbol;
>         }
>
>         public void setSymbol(String symbol) {
>                 this.symbol = symbol;
>         }
>
>         public String getShares() {
>                 return shares;
>         }
>         public void setShares(String shares) {
>                 this.shares = shares;
>         }
>         public String getPurchasePrice() {
>                 return purchasePrice;
>         }
>         public void setPurchasePrice(String prices) {
>                 this.purchasePrice = prices;
>         }
>  }
>
>  In the onSubmit method, the newPosition instance is always blank. I
>  tried setting break point in the setter methods of the Position
classes
>  and they don't get invoked.
>
>  -----Original Message-----
>  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  Sent: Thursday, March 27, 2008 1:39 PM
>  To: Tapestry users
>  Subject: Re: [T5] FormFragment doesn't work on IE6
>
>  That could be by design. If your fragment is hidden values won't be
>  submitted. If it's shown, they should be submitted and I never had
>  this problem as they do submit correctly for me. I tested it with all
>  kinds of browsers and it works well aside from issue with javascript
>  slide down I mentioned earlier.
>
>  On Thu, Mar 27, 2008 at 12:28 PM, Zheng, Xiahong
<Xi...@fmr.com>
>  wrote:
>  > I am seeing another problem; On submit from the fragment, I don't
get
>  >  any input values bound to the fragment fields. Has anybody seen
it?
>  >
>  >
>  >
>  >  -----Original Message-----
>  >  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  >  Sent: Thursday, March 27, 2008 1:01 PM
>  >  To: Tapestry users
>  >  Subject: Re: [T5] FormFragment doesn't work on IE6
>  >
>  >  I think there is an issue, although it works partially. If you
click
>  >  on the checkbox it doesn't slide the fragment down. However, a
>  >  subsequent click anywhere on the page will slide it down causing
the
>  >  process and checkbox to be out of sync. I implemented my own
toggle
>  >  functionality so it wasn't that major of an issue for me, but that
is
>  >  something that probably has to get fixed for IE6.
>  >
>  >  On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong
>  <Xi...@fmr.com>
>  >  wrote:
>  >  > Anybody tested formfragment/mixin on IE6? I could not get the
>  fragment
>  >  >  to show on IE6. It does work on firefox however. Is this a
known
>  >  issue
>  >  >  or am I missing something?
>  >  >
>  >  >
>  ---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >  >
>  >  >
>  >
>  >
---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>  >
---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] FormFragment doesn't work on IE6

Posted by Adam Zimowski <zi...@gmail.com>.
I recently posted e-mail to this list on this exact same topic. Here
is that post:

Per documentation, FormFragment decides if its content should be
submitted based on the hidden field [formfragmentname]:hidden:

// this is the relevant code from FormFragment source: void beginRender(..)
       writer.element("input",

                      "type", "hidden",

                      "name", _controlName,

                      "id", _clientId + ":hidden",

                      "value", String.valueOf(_visible));
       writer.end();


However, that field being generated at render time is fairly static,
which defeats the very purpose of dynamic behavior provided by
Tapestry.ElementEffect sidedown/slideup functions. The problem is that
when the silide function is invoked on the client (triggered by click
on the checkbox), that inherently means that FormFragment should be
submitted, but it won't be if the hidden field was generated with
false value.

The solution to this problem should be Tapestry dynamically changing
hidden field's value to true/false based on the client side state of
the checkbox tied to the FormFragment. For those who need a
workaround, I can share mine. In onclick of submit button one can
execute the following function:

function setupFragment(fragment, checkbox) {
 var checked = document.getElementById(checkbox).value;
 var advanced = (checked == 'on');
 document.getElementById(fragment + ':hidden').value=advanced;
}


<input t:id="submitButton"
onclick="setupFragment('advancedFragment','advancedCheckbox');"
type="submit" t:type="submit" value="Submit"/>

I believe this should be one of those "plumbing" tasks that Tapestry
should do for us. Should this be a JIRA improvement, or am I missing
something?

-adam
Reply
		
Forward
		
	
Howard Lewis Ship	
The code is already in place to set the hidden field to the correct value whe...

Howard's Reply was:	
	
"The code is already in place to set the hidden field to the correct
value when the form is submitted."

In fact, that code is already present in deepVisible stuff inside tapestry.js

-adam




On Thu, Mar 27, 2008 at 3:02 PM, Zheng, Xiahong <Xi...@fmr.com> wrote:
> I found a workaround. It seems tapestry is not linking the checkbox
>  event with the hidden field in this case
>
>      addPositionFragment:hidden
>
>  This value of this hidden field is used on the server side to determine
>  if binding of the fragment fields should happen. If I manually add a
>  onchange event on the checkbox that toggles the value of the above
>  field, it starts to work
>
>
>          <t:checkbox t:id="addPosition" t:mixins="triggerfragment"
>  onclick="document.getElementById('addPositionFragment:hidden').value=tru
>  e"
>  fragment="addPositionFragment"/>
>
>  Is this a bug or by design?
>
>
>
>  -----Original Message-----
>  From: Zheng, Xiahong
>  Sent: Thursday, March 27, 2008 2:24 PM
>  To: Tapestry users
>
>
> Subject: RE: [T5] FormFragment doesn't work on IE6
>
>  I am not sure why it is not working for me. Here is my simple test page,
>
>  NewPosition.tml
>
>  <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>
>  <body>
>
>  <form t:type="Form" t:id="addForm">
>         <t:checkbox t:id="addPosition" t:mixins="triggerfragment"
>  fragment="addPositionFragment"/>
>         <t:label for="addPosition">Add Position ?</t:label>
>         <t:formfragment t:id="addPositionFragment"
>  visible="addPosition">
>                 <table>
>                 <tr>
>                         <td class="unlined">
>                                 Symbol
>                         </td>
>                         <td class="unlined">
>                                 Shares
>                         </td>
>                         <td class="unlined">
>                                 Price
>                         </td>
>                 </tr>
>                 <tr>
>                         <td class="unlined">
>                                 <t:TextField
>  value="newPosition.symbol"/>
>                         </td>
>                         <td class="unlined">
>                                 <t:TextField
>  value="newPosition.shares"/>
>                         </td>
>                         <td class="unlined">
>                                 <t:TextField
>  value="newPosition.purchasePrice"/>
>                         </td>
>                 </tr>
>         </table>
>         <p/>
>         <t:submit value="Save"/>
>         </t:formfragment>
>  </form>
>
>  </body>
>
>  </html>
>
>  And my page class
>
>  NewPosition.java
>
>  public class NewPosition {
>
>         private Position newPosition = new Position();
>
>     private boolean addPosition;
>
>         public String onSubmit() {
>                 if (newPosition.getSymbol() != null) {
>                         // do something
>                 }
>
>                 return "Start";
>         }
>
>         public Position getNewPosition() {
>                 return newPosition;
>         }
>
>         public void setNewPosition(Position newPosition) {
>                 this.newPosition = newPosition;
>         }
>
>         public boolean isAddPosition() {
>                 return addPosition;
>         }
>
>         public void setAddPosition(boolean addPosition) {
>                 this.addPosition = addPosition;
>         }
>
>  }
>
>  And the position class
>
>  public class Position {
>
>         private String symbol;
>         private String shares;
>         private String purchasePrice;
>
>         public String getSymbol() {
>                 return symbol;
>         }
>
>         public void setSymbol(String symbol) {
>                 this.symbol = symbol;
>         }
>
>         public String getShares() {
>                 return shares;
>         }
>         public void setShares(String shares) {
>                 this.shares = shares;
>         }
>         public String getPurchasePrice() {
>                 return purchasePrice;
>         }
>         public void setPurchasePrice(String prices) {
>                 this.purchasePrice = prices;
>         }
>  }
>
>  In the onSubmit method, the newPosition instance is always blank. I
>  tried setting break point in the setter methods of the Position classes
>  and they don't get invoked.
>
>  -----Original Message-----
>  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  Sent: Thursday, March 27, 2008 1:39 PM
>  To: Tapestry users
>  Subject: Re: [T5] FormFragment doesn't work on IE6
>
>  That could be by design. If your fragment is hidden values won't be
>  submitted. If it's shown, they should be submitted and I never had
>  this problem as they do submit correctly for me. I tested it with all
>  kinds of browsers and it works well aside from issue with javascript
>  slide down I mentioned earlier.
>
>  On Thu, Mar 27, 2008 at 12:28 PM, Zheng, Xiahong <Xi...@fmr.com>
>  wrote:
>  > I am seeing another problem; On submit from the fragment, I don't get
>  >  any input values bound to the fragment fields. Has anybody seen it?
>  >
>  >
>  >
>  >  -----Original Message-----
>  >  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  >  Sent: Thursday, March 27, 2008 1:01 PM
>  >  To: Tapestry users
>  >  Subject: Re: [T5] FormFragment doesn't work on IE6
>  >
>  >  I think there is an issue, although it works partially. If you click
>  >  on the checkbox it doesn't slide the fragment down. However, a
>  >  subsequent click anywhere on the page will slide it down causing the
>  >  process and checkbox to be out of sync. I implemented my own toggle
>  >  functionality so it wasn't that major of an issue for me, but that is
>  >  something that probably has to get fixed for IE6.
>  >
>  >  On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong
>  <Xi...@fmr.com>
>  >  wrote:
>  >  > Anybody tested formfragment/mixin on IE6? I could not get the
>  fragment
>  >  >  to show on IE6. It does work on firefox however. Is this a known
>  >  issue
>  >  >  or am I missing something?
>  >  >
>  >  >
>  ---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >  >
>  >  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] FormFragment doesn't work on IE6

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
I found a workaround. It seems tapestry is not linking the checkbox
event with the hidden field in this case

     addPositionFragment:hidden

This value of this hidden field is used on the server side to determine
if binding of the fragment fields should happen. If I manually add a
onchange event on the checkbox that toggles the value of the above
field, it starts to work

         <t:checkbox t:id="addPosition" t:mixins="triggerfragment"
onclick="document.getElementById('addPositionFragment:hidden').value=tru
e"
fragment="addPositionFragment"/>

Is this a bug or by design? 
       

-----Original Message-----
From: Zheng, Xiahong 
Sent: Thursday, March 27, 2008 2:24 PM
To: Tapestry users
Subject: RE: [T5] FormFragment doesn't work on IE6

I am not sure why it is not working for me. Here is my simple test page,

NewPosition.tml

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">

<body>

<form t:type="Form" t:id="addForm">
	<t:checkbox t:id="addPosition" t:mixins="triggerfragment"
fragment="addPositionFragment"/>
	<t:label for="addPosition">Add Position ?</t:label>
	<t:formfragment t:id="addPositionFragment"
visible="addPosition">
		<table>
		<tr>
			<td class="unlined">
				Symbol
			</td>
			<td class="unlined">
				Shares
			</td>	
			<td class="unlined">
				Price
			</td>						
		</tr>
		<tr>
			<td class="unlined">
				<t:TextField
value="newPosition.symbol"/>
			</td>
			<td class="unlined">
				<t:TextField
value="newPosition.shares"/>
			</td>	
			<td class="unlined">
				<t:TextField
value="newPosition.purchasePrice"/>
			</td>						
		</tr>
	</table>	
	<p/>
	<t:submit value="Save"/>
	</t:formfragment>
</form>

</body>

</html> 

And my page class

NewPosition.java

public class NewPosition {
	
	private Position newPosition = new Position();
	
    private boolean addPosition;
	
	public String onSubmit() {
		if (newPosition.getSymbol() != null) {
			// do something
		}
		
		return "Start";
	}

	public Position getNewPosition() {
		return newPosition;
	}

	public void setNewPosition(Position newPosition) {
		this.newPosition = newPosition;
	}

	public boolean isAddPosition() {
		return addPosition;
	}

	public void setAddPosition(boolean addPosition) {
		this.addPosition = addPosition;
	}

}

And the position class

public class Position {
	
	private String symbol;
	private String shares;
	private String purchasePrice;

	public String getSymbol() {
		return symbol;
	}

	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public String getShares() {
		return shares;
	}
	public void setShares(String shares) {
		this.shares = shares;
	}
	public String getPurchasePrice() {
		return purchasePrice;
	}
	public void setPurchasePrice(String prices) {
		this.purchasePrice = prices;
	}
}

In the onSubmit method, the newPosition instance is always blank. I
tried setting break point in the setter methods of the Position classes
and they don't get invoked.

-----Original Message-----
From: Adam Zimowski [mailto:zimowski74@gmail.com] 
Sent: Thursday, March 27, 2008 1:39 PM
To: Tapestry users
Subject: Re: [T5] FormFragment doesn't work on IE6

That could be by design. If your fragment is hidden values won't be
submitted. If it's shown, they should be submitted and I never had
this problem as they do submit correctly for me. I tested it with all
kinds of browsers and it works well aside from issue with javascript
slide down I mentioned earlier.

On Thu, Mar 27, 2008 at 12:28 PM, Zheng, Xiahong <Xi...@fmr.com>
wrote:
> I am seeing another problem; On submit from the fragment, I don't get
>  any input values bound to the fragment fields. Has anybody seen it?
>
>
>
>  -----Original Message-----
>  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  Sent: Thursday, March 27, 2008 1:01 PM
>  To: Tapestry users
>  Subject: Re: [T5] FormFragment doesn't work on IE6
>
>  I think there is an issue, although it works partially. If you click
>  on the checkbox it doesn't slide the fragment down. However, a
>  subsequent click anywhere on the page will slide it down causing the
>  process and checkbox to be out of sync. I implemented my own toggle
>  functionality so it wasn't that major of an issue for me, but that is
>  something that probably has to get fixed for IE6.
>
>  On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong
<Xi...@fmr.com>
>  wrote:
>  > Anybody tested formfragment/mixin on IE6? I could not get the
fragment
>  >  to show on IE6. It does work on firefox however. Is this a known
>  issue
>  >  or am I missing something?
>  >
>  >
---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] FormFragment doesn't work on IE6

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
I am not sure why it is not working for me. Here is my simple test page,

NewPosition.tml

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">

<body>

<form t:type="Form" t:id="addForm">
	<t:checkbox t:id="addPosition" t:mixins="triggerfragment"
fragment="addPositionFragment"/>
	<t:label for="addPosition">Add Position ?</t:label>
	<t:formfragment t:id="addPositionFragment"
visible="addPosition">
		<table>
		<tr>
			<td class="unlined">
				Symbol
			</td>
			<td class="unlined">
				Shares
			</td>	
			<td class="unlined">
				Price
			</td>						
		</tr>
		<tr>
			<td class="unlined">
				<t:TextField
value="newPosition.symbol"/>
			</td>
			<td class="unlined">
				<t:TextField
value="newPosition.shares"/>
			</td>	
			<td class="unlined">
				<t:TextField
value="newPosition.purchasePrice"/>
			</td>						
		</tr>
	</table>	
	<p/>
	<t:submit value="Save"/>
	</t:formfragment>
</form>

</body>

</html> 

And my page class

NewPosition.java

public class NewPosition {
	
	private Position newPosition = new Position();
	
    private boolean addPosition;
	
	public String onSubmit() {
		if (newPosition.getSymbol() != null) {
			// do something
		}
		
		return "Start";
	}

	public Position getNewPosition() {
		return newPosition;
	}

	public void setNewPosition(Position newPosition) {
		this.newPosition = newPosition;
	}

	public boolean isAddPosition() {
		return addPosition;
	}

	public void setAddPosition(boolean addPosition) {
		this.addPosition = addPosition;
	}

}

And the position class

public class Position {
	
	private String symbol;
	private String shares;
	private String purchasePrice;

	public String getSymbol() {
		return symbol;
	}

	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public String getShares() {
		return shares;
	}
	public void setShares(String shares) {
		this.shares = shares;
	}
	public String getPurchasePrice() {
		return purchasePrice;
	}
	public void setPurchasePrice(String prices) {
		this.purchasePrice = prices;
	}
}

In the onSubmit method, the newPosition instance is always blank. I
tried setting break point in the setter methods of the Position classes
and they don't get invoked.

-----Original Message-----
From: Adam Zimowski [mailto:zimowski74@gmail.com] 
Sent: Thursday, March 27, 2008 1:39 PM
To: Tapestry users
Subject: Re: [T5] FormFragment doesn't work on IE6

That could be by design. If your fragment is hidden values won't be
submitted. If it's shown, they should be submitted and I never had
this problem as they do submit correctly for me. I tested it with all
kinds of browsers and it works well aside from issue with javascript
slide down I mentioned earlier.

On Thu, Mar 27, 2008 at 12:28 PM, Zheng, Xiahong <Xi...@fmr.com>
wrote:
> I am seeing another problem; On submit from the fragment, I don't get
>  any input values bound to the fragment fields. Has anybody seen it?
>
>
>
>  -----Original Message-----
>  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  Sent: Thursday, March 27, 2008 1:01 PM
>  To: Tapestry users
>  Subject: Re: [T5] FormFragment doesn't work on IE6
>
>  I think there is an issue, although it works partially. If you click
>  on the checkbox it doesn't slide the fragment down. However, a
>  subsequent click anywhere on the page will slide it down causing the
>  process and checkbox to be out of sync. I implemented my own toggle
>  functionality so it wasn't that major of an issue for me, but that is
>  something that probably has to get fixed for IE6.
>
>  On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong
<Xi...@fmr.com>
>  wrote:
>  > Anybody tested formfragment/mixin on IE6? I could not get the
fragment
>  >  to show on IE6. It does work on firefox however. Is this a known
>  issue
>  >  or am I missing something?
>  >
>  >
---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] FormFragment doesn't work on IE6

Posted by Adam Zimowski <zi...@gmail.com>.
That could be by design. If your fragment is hidden values won't be
submitted. If it's shown, they should be submitted and I never had
this problem as they do submit correctly for me. I tested it with all
kinds of browsers and it works well aside from issue with javascript
slide down I mentioned earlier.

On Thu, Mar 27, 2008 at 12:28 PM, Zheng, Xiahong <Xi...@fmr.com> wrote:
> I am seeing another problem; On submit from the fragment, I don't get
>  any input values bound to the fragment fields. Has anybody seen it?
>
>
>
>  -----Original Message-----
>  From: Adam Zimowski [mailto:zimowski74@gmail.com]
>  Sent: Thursday, March 27, 2008 1:01 PM
>  To: Tapestry users
>  Subject: Re: [T5] FormFragment doesn't work on IE6
>
>  I think there is an issue, although it works partially. If you click
>  on the checkbox it doesn't slide the fragment down. However, a
>  subsequent click anywhere on the page will slide it down causing the
>  process and checkbox to be out of sync. I implemented my own toggle
>  functionality so it wasn't that major of an issue for me, but that is
>  something that probably has to get fixed for IE6.
>
>  On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong <Xi...@fmr.com>
>  wrote:
>  > Anybody tested formfragment/mixin on IE6? I could not get the fragment
>  >  to show on IE6. It does work on firefox however. Is this a known
>  issue
>  >  or am I missing something?
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] FormFragment doesn't work on IE6

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
I am seeing another problem; On submit from the fragment, I don't get
any input values bound to the fragment fields. Has anybody seen it?  

-----Original Message-----
From: Adam Zimowski [mailto:zimowski74@gmail.com] 
Sent: Thursday, March 27, 2008 1:01 PM
To: Tapestry users
Subject: Re: [T5] FormFragment doesn't work on IE6

I think there is an issue, although it works partially. If you click
on the checkbox it doesn't slide the fragment down. However, a
subsequent click anywhere on the page will slide it down causing the
process and checkbox to be out of sync. I implemented my own toggle
functionality so it wasn't that major of an issue for me, but that is
something that probably has to get fixed for IE6.

On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong <Xi...@fmr.com>
wrote:
> Anybody tested formfragment/mixin on IE6? I could not get the fragment
>  to show on IE6. It does work on firefox however. Is this a known
issue
>  or am I missing something?
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] FormFragment doesn't work on IE6

Posted by Adam Zimowski <zi...@gmail.com>.
I think there is an issue, although it works partially. If you click
on the checkbox it doesn't slide the fragment down. However, a
subsequent click anywhere on the page will slide it down causing the
process and checkbox to be out of sync. I implemented my own toggle
functionality so it wasn't that major of an issue for me, but that is
something that probably has to get fixed for IE6.

On Thu, Mar 27, 2008 at 11:31 AM, Zheng, Xiahong <Xi...@fmr.com> wrote:
> Anybody tested formfragment/mixin on IE6? I could not get the fragment
>  to show on IE6. It does work on firefox however. Is this a known issue
>  or am I missing something?
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] FormFragment doesn't work on IE6

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
Anybody tested formfragment/mixin on IE6? I could not get the fragment
to show on IE6. It does work on firefox however. Is this a known issue
or am I missing something?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] Ajax validation

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
Thanks for the clarification. I was wondering if such capability already
exists in T5. I like the mixin approach since it doesn't require another
click. 

-----Original Message-----
From: Julian Wood [mailto:woodj@ucalgary.ca] 
Sent: Thursday, March 27, 2008 11:39 AM
To: Tapestry users
Subject: Re: [T5] Ajax validation

I think you need to do this yourself, using the builtin AJAX  
facilities, rather than using any of the builtin validation facilities.

Say you were looking to make sure a username was unique on signup.  
Place an actionlink  beside the field ("check availability"). The  
actionlink would need context (the username). The actionlink can  
update a zone containing the text field, and which also has some  
hidden divs containing the validation messages (just as a field with  
regular validation would be decorated). Display/hide the validation  
message div based on a flag set by the actionlink handler (which  
would obviously check the db for username uniqueness).

That would be my first try (there are some pieces in there which  
might not work the way I'm thinking) - you could also do it with a  
mixin (see the AutoComplete component).

HTH,

J


On 27-Mar-08, at 7:27 AM, Zheng, Xiahong wrote:

> Anyone?
>
> -----Original Message-----
> From: Zheng, Xiahong
> Sent: Wednesday, March 26, 2008 3:09 PM
> To: 'Tapestry users'
> Subject: [T5] Ajax validation
>
> If this topic has been discussed, please point me to the right  
> place. It
> seems that, by default, tapestry 5 only does client side validation  
> when
> you tab out of the input field. Server side validation happens on the
> form submit only. How can I enable server side validation on a  
> field by
> field basis, i.e., via ajax onblur event?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Ajax validation

Posted by Julian Wood <wo...@ucalgary.ca>.
I think you need to do this yourself, using the builtin AJAX  
facilities, rather than using any of the builtin validation facilities.

Say you were looking to make sure a username was unique on signup.  
Place an actionlink  beside the field ("check availability"). The  
actionlink would need context (the username). The actionlink can  
update a zone containing the text field, and which also has some  
hidden divs containing the validation messages (just as a field with  
regular validation would be decorated). Display/hide the validation  
message div based on a flag set by the actionlink handler (which  
would obviously check the db for username uniqueness).

That would be my first try (there are some pieces in there which  
might not work the way I'm thinking) - you could also do it with a  
mixin (see the AutoComplete component).

HTH,

J


On 27-Mar-08, at 7:27 AM, Zheng, Xiahong wrote:

> Anyone?
>
> -----Original Message-----
> From: Zheng, Xiahong
> Sent: Wednesday, March 26, 2008 3:09 PM
> To: 'Tapestry users'
> Subject: [T5] Ajax validation
>
> If this topic has been discussed, please point me to the right  
> place. It
> seems that, by default, tapestry 5 only does client side validation  
> when
> you tab out of the input field. Server side validation happens on the
> form submit only. How can I enable server side validation on a  
> field by
> field basis, i.e., via ajax onblur event?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] Ajax validation

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
Anyone? 

-----Original Message-----
From: Zheng, Xiahong 
Sent: Wednesday, March 26, 2008 3:09 PM
To: 'Tapestry users'
Subject: [T5] Ajax validation

If this topic has been discussed, please point me to the right place. It
seems that, by default, tapestry 5 only does client side validation when
you tab out of the input field. Server side validation happens on the
form submit only. How can I enable server side validation on a field by
field basis, i.e., via ajax onblur event?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


[T5] Ajax validation

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
If this topic has been discussed, please point me to the right place. It
seems that, by default, tapestry 5 only does client side validation when
you tab out of the input field. Server side validation happens on the
form submit only. How can I enable server side validation on a field by
field basis, i.e., via ajax onblur event?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Upload progress, grid sorting

Posted by Jesper Zedlitz <jz...@informatik.uni-kiel.de>.
Harald Geritzer wrote:
> how can i set the initial sortorder for a grid in tapestry 5.0.11?
> 
See
<http://wiki.apache.org/tapestry/Tapestry5GridComponent#head-3f39347a90813b68e1e1f773746476693b50f7c8>

Jesper

-- 
Jesper Zedlitz                   Dept. for Computer Science, CAU of Kiel
Room 1108                        Communication Systems Research Group
                                 Phone:    +49-(0)431-880-7279
Christian-Albrechts-Platz 4      Fax:      +49-(0)431-880-7615
24098 Kiel - Germany             jze@informatik.uni-kiel.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org