Standard tapestry upload component doesn't work with ajax requests and so
it can not be used in zone.
You can try custom solution like this:
http://mutabra.blogspot.com/2012/07/tapestry-ajax-upload-fixin.html
Or this:
http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
On Tue,
It happens because your entity is null. It can be because you didn't
initialize it in prepare for submit handler or with page activation context.
On Fri, Aug 2, 2013 at 10:06 AM, Will N. llcool_wil...@yahoo.fr wrote:
Hi,
i have some issues trying to save an Entitie in the database after
If you want to render string as html you need to use
MarkupWriter#writeRaw() method:
void beginRender(MarkupWriter writer) {
writer.writeRaw(input type='checkbox' name='leaf' id='leaf'
value='leaf'/);
}
Or you can use OutputRaw component:
t:outputraw value=testFunction()/
Or
You can dynamically create translator:
@Inject
private FieldTranslatorSource fieldTranslatorSource;
public getMyTranslator() {
switch(myAccountType) {
case ACCOUNT_TYPE1:
return createTranslator(myField, myTranslator1);
// other types
}
return null;
}
protected
You can reset field recorded value by calling recordInput method with null
parameter value:
tracker.recordInput(myField, null);
The same way to reset recorded error for field:
tracker.recordError(myField, null);
On Fri, Jun 14, 2013 at 2:11 AM, Ryan How r...@zbit.net.au wrote:
It's really
One note about ZoneRefresh mixin:
https://issues.apache.org/jira/browse/TAP5-2100
So it provides not the original event context(that was encoded in url) but
the context populated from parameter. And so it has no sence for now.
On Wed, Apr 24, 2013 at 4:21 PM, Michael Prescott
If you have web application you can use context param to specify
application version:
context-param
param-nametapestry.application-version/param-name
param-value${project.version}/param-value
/context-param
Then you just need to enable filtering for web.xml in
1. You can move form up, so that you personeditor component will contain
only form controls:
*page.tml*
t:form
t:personeditor t:person=person /
/t:form
*personeditor.tml*
t:textfield t:value=person.name /
...
*page2.tml*
t:form
t:personeditor t:person=person /
t:textfield
What about configuring robots.txt?
On Sat, Apr 6, 2013 at 1:50 PM, Nicolas Bouillon nico...@bouillon.netwrote:
Thanks for your thoughts, and that leads me to the following suggestion to
resolve my problem:
I've already contributed a custom RequestExceptionHandler using
If you need context path you can inject Request:
@Inject
private Request request;
public String getContextPath() {
return request.getContextPath()
}
On Mon, Apr 8, 2013 at 10:25 AM, Taha Hafeez Siddiqi
tawus.tapes...@gmail.com wrote:
Hi
You can use assets in your page using @Path
As I know RegistryShutdownHub is not deprecated.
RegistryShutdownListener is deprecated and can be replaced with a Runnable.
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/RegistryShutdownHub.html#addRegistryShutdownListener(java.lang.Runnable)
On Tue, Apr 2, 2013
Had the same issue when tried to use some service inside
SymbolProvider contribution. E.g.
@ApplicationDefaults
@Contribute(SymbolProvider.class)
public void contributeApplicationDefaults(final
MappedConfigurationString, String configuration, final MyService
myService) {
And the third option is to play with ApplicationDefaults,
FactoryDefaults, e.g. ApplicationDefaults has no service dependencies,
tapestr.production-mode symbol should be configured here,
FactoryDefaults can depend on your services.
On Fri, Mar 29, 2013 at 11:11 AM, Ivan Khalopik ikhalo
It depends on your task. If it is related to validation you can
campare values in onValidate handler:
@OnEvent(value=EventConstants.VALIDATE, component=mySelect)
void validateMaySelect(MyValue newValue) {
if (!myValue.equals(newValue)) {
// your code here
}
}
Or you can use getter
You can add getter for injected field inside vendor component:
Vendor.class
@InjectComponent
private Field vendorNameField;
public Field getVendorNameField() {
return vendorNameField;
}
Then inject vendor component inside the page
Page.class
@InjectComponent
private Vendor vendor;
void
It is not a tapestry question.
http://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html
On Sat, Mar 16, 2013 at 11:42 PM, nhhockeyplayer nashua
nhhockeypla...@hotmail.com wrote:
Folks,
I want to track my users. Is there a way to get host:port and ip ?
Best regards
and
I think the issue is that you use clientId directly in your
getClientId() method. To have a unique id you need to add some
additional work. You can look at AbstractField implementation:
@Parameter(value = prop:componentResources.id, defaultPrefix =
BindingConstants.LITERAL)
private String
...@starpoint.com wrote:
-Original Message-
From: Ivan Khalopik [mailto:ikhalo...@gmail.com]
Sent: Tuesday, March 05, 2013 3:34 AM
To: Tapestry users
Subject: Re: tapestry5.3 and Twitter-bootstrap disabled inputs
You can use span element with .uneditable-input if you have some field
Tapestry generates ids for components using id allocation mechanism. E.g.
t:zone t:id=myZone.../t:zone
In this case T5 will try to allocate myZone as id for zone. If this id is
already allocated by some other component it will try myZone_0, then
myZone_1...
This rule is broken inside ajax
You can use span element with .uneditable-input if you have some field
that should not be modified at all.
span class=input-xlarge uneditable-inputSome value here/span
If you need some client-side behaviour of enable/disable component use
disabled attribute as mentioned earlier.
input type=text
There is a helper method in configuration classes for service autobuilding:
configuration.addInstance(FooService.class, DevFooService.class);
But I think autobuilding inside service override contribution is not a good
idea as it can result in recursion if service has complex dependency tree.
The
You can use registry.getService(serviceId, serviceInterface)
On Thu, Feb 28, 2013 at 11:52 AM, antalk nab...@vankalleveen.net wrote:
Is it an idea to add a 'getServiceById' method to the Registry ?
The reason:
We are calling Tapestry service methods from a declarative view. We have
some
registry.getService(serviceId, Object.class)
On Thu, Feb 28, 2013 at 12:30 PM, antalk nab...@vankalleveen.net wrote:
Not really, i still have to specify the full class of the interface.
I just want to get a service by it's ID without specifying any class or
interface.
--
View this
t:zone t:id=zoneFilterType id=prop:ZoneFilterTypeId
...
t:zone t:id=zoneFilterProperty id=prop:ZoneFilterPropertyId
...
/t:zone
...
/t:zone
public String getZoneFilterTypeId() {
return zoneFilterType.getClientId();// return zoneFilterType +
currentFilterSection.getKey();
}
You just need to override css for t-beaneditor-row.
Global solution:
.t-beaneditor-row {
height: 200px;
}
More flexible solution:
div class=t-beaneditor my-own-cool-css-class
t:beaneditor object=mb:bean t:mixins=tynamo/BeanModelAdvisor/
/div
css:
.my-own-cool-css-class .t-beaneditor-row
It works everywhere.
Global solution:
.t-data-grid tr {
height: 200px;
}
Flexible solution:
t:grid class=t-data-grid my-own-cool-css-class
...
/t:grid
css:
.my-own-cool-css-class tr {
height: 200px;
}
On Mon, Feb 25, 2013 at 11:28 AM, Ken in Nashua kcola...@live.com wrote:
Thanks
Use components, e.g. splash.tml + Spash.java. So you will have something
like:
div id=tab0 class=content
t:splash/
/div
But the tapestry-way is to create custom component for tab control with
informal block parameters for tab contents:
t:tabs ...parameters...
p:tab0
CONTENT
/p:tab0
1) It seems that you use something like this
t:zone t:id=zone id=prop:zoneFilterPropertyId
...
t:select zone=prop:zoneFilterPropertyId .../
...
/t:zone
public String getZoneFilterPropertyId() {
return zone.getClientId();
}
It makes a recursion in zoneId retrieval. You just need to remove id
1. Each row will generate its own zone with unique id, so you can't use
static value for zone parameter. But you can use clientId of injected zone:
@InjectComponent
provate Zone zone;
public String getZoneId() {
return zone.getClientId();
}
2. If you will use @BindParameter annotation - both
As far as I understood flash strategy is needed to store values between
form submission and render requests.
Your flow:
1. onActivate() create values and store them in session
2. onSubmit() retrieve values and remove them from session = add value to
detached collection
3. onActivate() retrieve
// Hover/focus state, but only for links
a {
.label:hover,
.label:focus,
.badge:hover,
.badge:focus {
color: @white;
text-decoration: none;
cursor: pointer;
}
}
This lines are from the latest bootstrap sources. It adds hover behaviour
only for links with label/badge class.
As far as i understood you can't do this with common tapestry select
component. It has no context for VALUE_CHANGED event except selected value.
But you can try to implement your own logic.
Just copy logic responsible for VALUE_CHANGED event from tapestry select
component to mixin and add context
You can create your own component for rendering plain html files. I had
something similar to your issue - source code rendering.
https://github.com/sody/heroku-samples/blob/master/src/main/java/com/example/ui/components/Source.java
usage:
t:source content=classpath:sources/Source1.java/
Or you
You can wrap this fields with custom component, e.g. CoordinateEdit. Then
inject all needed fields using @InjectComponent annotation. In afterRender
or cleanupRender method you can use such trick:
private static final ComponentActionCoordinateEdit VALIDATE = new
ComponentActionCoordinateEdit {
And your encoder (that uses value index within list) can be replaced with
formState=iteration on loop component
--
BR
Ivan
to the
fields.
But when I update the form's fields using ajax, it's broken. I have a
feeling this could be wrong but its my very best guess so far.
On Mon, Nov 19, 2012 at 5:33 PM, Ivan Khalopik ikhalo...@gmail.com
wrote:
Do you use t:errors component to show errors for whole form
You can extract li items with content to separate component, e.g MenuItem
with parameter 'page'. Inside this component you can get this parameter
value, check whether this page is allowed for current user and if yes then
render li with inner PageLink component. If no then render nothing. So it
Select component with enabled ajax posts ajax request to the server-side.
Then server-side dispatches it to correspondent event handler and it
returns some value. Then this value goes to correspondent
ComponentEventResultProcessor and generates response markup. Then this
markup goes to client-side
When you use recordError(field, Message) you have not only messages
listed by t:errors/ component but also this messages are connected to the
fileds and can be used later:
1. You can remove t:errors and use t:error for=field/ component that
will render error message for specified field, e.g.
div
You can try 2 options:
1. Use validation by name to prevent name changes before request to DB. It
will be executed before name property will be assigned to new value:
@OnEvent(value=EventConstants.VALIDATE_FORM, component=nameField)
public void validateName() {
//...
}
t:beaneditform
I don't understand your question.
But if you change locale using PersistentLocale service it will be
persisted in URL and be changed for next page request. The new localale
should also be configured in tapestry.supported-locales symbol.
If you want to chnge locale just for this request you can use
,
Nicolás.-
On Mon, Nov 19, 2012 at 8:11 AM, Ivan Khalopik ikhalo...@gmail.com
wrote:
You can try 2 options:
1. Use validation by name to prevent name changes before request to DB.
It
will be executed before name property will be assigned to new value:
@OnEvent(value
Do you use t:errors component to show errors for whole form or just use
separate t:error components to show errors for particular field?
On Mon, Nov 19, 2012 at 6:28 PM, Muhammad Gelbana m.gelb...@gmail.comwrote:
When I first load my page, some form's fields are changed through ajax and
then I
this could be wrong but its my very best guess so far.
On Mon, Nov 19, 2012 at 5:33 PM, Ivan Khalopik ikhalo...@gmail.com
wrote:
Do you use t:errors component to show errors for whole form or just use
separate t:error components to show errors for particular field?
On Mon, Nov 19, 2012
Just tried your code and everething works as expected. Have you any client
side errors reported by your browser?
On Fri, Oct 5, 2012 at 8:41 AM, Henrik von Schlanbusch hen...@enovate.nowrote:
Hi. I have problems understanding multiple submits. I am running T5.3.5.
I have the following tml:
It seems that you have error in setSubmittingElement js function. This
function is responsible of functionality you need. It sets the id and name
of submit button the form was submitted from.
Hmm - I did not see this. This may be the source of my problems?
Yes, exactly. You have error in
Use EventConstants.FAILURE event handler to return updated zone. There is
also a bug in T5 with form validation inside zone:
https://issues.apache.org/jira/browse/TAP5-1512
You can try a workaround for this:
http://mutabra.blogspot.com/2012/09/tapestry-fixed-control-name-fixin.html
On Fri, Oct
Label component is used in addition to t5 Field component, so for parameter
is required and Field with defined identifier should exist. In case if you
need just an html label element you can use html tag label. As I
understand in your code snippet you need something like span with some
styling:
use block:autoPagingContent instead of block:components.autoPagingContent
On Mon, Oct 1, 2012 at 7:40 AM, Ken in Nashua kcola...@live.com wrote:
Hi Folks,
I am modeling a gallery in a template. This worked beautiful in T4.
But for T5 I have the following:
Gallery.TML (without showing
As you use your own zone update mechanism instead of native(e.g. EventLink
component) you can provide js-callback for ajax request as you mention
before.
To update zone use something like this:
var zone = Tapestry.findZoneManager(spec.zoneId);
function rowClickCalback(response) {
1. To place components defined in java class on your template you should
use t:id attribute equal to field name(id attribute references clientId
logic). As you don't use this attribute in your code snippet you have 2
separate selects. One of this selects are defined within java class and
doesn't
You need to contribute ComponentMessagesSource service:
@Contribute(ComponentMessagesSource.class)
public static void contributeComponentMessagesSource(
@Value(com/example/my-messages1) final Resource myMessage1,
@Value(com/example/my-messages2) final Resource myMessage2,
final
If you need to load all scripts when page is loaded just place @Import
annotation to your page java class. There is no way to make it dynamicly as
components placed in block are not rendered and as result doesn't add their
scripts to page. You need to specify all scripts explicitly.
Or you can
You can also use invisible iframe as a target of download link. It will
prevent opening a new window:
t:eventlink target=_download/
!-- somewhere in the bottom --
iframe name=_download style=display:none;/iframe
On Tue, Sep 18, 2012 at 9:05 AM, Waleriy walera0...@mail.ru wrote:
Thank you.
I think this is not a good solution to have a view page that consists of
form elements. Usually view pages are represented as plain text. But
technically there are two ways to reuse code/markup in tapestry:
1. Composition.
As was mentioned earlier in this thread we can extract all repeatable
Since 5.3 you can also contribute application defaults to change default
values for zone update and show parameter.
@Contribute(SymbolProvider.class)
@ApplicationDefaults
public void contributeApplicationDefaults(final
MappedConfigurationString, String configuration) {
//...
56 matches
Mail list logo